work on porting sway config over

This commit is contained in:
TheWanderingCrow 2025-06-25 10:46:12 -04:00
parent ddb6a7f013
commit 5a7a3dda30
8 changed files with 106 additions and 0 deletions

View file

@ -0,0 +1,6 @@
{pkgs, ...}: {
programs.chromium = {
enable = true;
package = pkgs.ungoogled-chromium;
};
}

View file

@ -0,0 +1,6 @@
{
imports = [
./firefox.nix
./chrome.nix
];
}

View file

@ -0,0 +1,5 @@
{pkgs, ...}: {
home.packages = [
pkgs.ferdium
];
}

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1,5 @@
{
wayland.windowManager.sway = {
enable = true;
};
}

4
modules/home/default.nix Normal file
View file

@ -0,0 +1,4 @@
{lib, ...}: {
imports = lib.custom.scanPaths ./.;
}

79
modules/home/monitors.nix Normal file
View file

@ -0,0 +1,79 @@
{
lib,
config,
...
}: {
options.monitors = lib.mkOption {
type = lib.types.listOf (
lib.types.submodule {
options = {
name = lib.mkOption {
type = lib.types.str;
example = "DP-1";
};
primary = lib.mkOption {
type = lib.types.bool;
default = false;
};
noBar = lib.mkOption {
type = lib.types.bool;
default = false;
};
width = lib.mkOption {
type = lib.types.int;
example = 1920;
};
height = lib.mkOption {
type = lib.types.int;
example = 1080;
};
refreshRate = lib.mkOption {
type = lib.types.int;
default = 60;
};
x = lib.mkOption {
type = lib.types.int;
default = 0;
};
y = lib.mkOption {
type = lib.types.int;
default = 0;
};
scale = lib.mkOption {
type = lib.types.number;
default = 1.0;
};
transform = lib.mkOption {
type = lib.types.int;
default = 0;
};
enabled = lib.mkOption {
type = lib.types.bool;
default = true;
};
workspace = lib.mkOption {
type = lib.types.nullOr lib.types.str;
description = "Defines a workspace that should persist on this monitor.";
default = null;
};
vrr = lib.mkOption {
type = lib.types.int;
description = "Variable Refresh Rate aka Adaptive Sync aka AMD FreeSync.\nValues are oriented towards hyprland's vrr values which are:\n0 = off, 1 = on, 2 = fullscreen only\nhttps://wiki.hyprland.org/Configuring/Variables/#misc";
default = 0;
};
};
}
);
default = [];
};
config = {
assertions = [
{
assertion =
((lib.length config.monitors) != 0)
-> ((lib.length (lib.filter (m: m.primary) config.monitors)) == 1);
message = "Exactly one monitor must be set to primary.";
}
];
};
}