mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-01-10 17:34:05 -05:00
work on porting sway config over
This commit is contained in:
parent
ddb6a7f013
commit
5a7a3dda30
8 changed files with 106 additions and 0 deletions
6
home/crow/common/optional/browsers/chrome.nix
Normal file
6
home/crow/common/optional/browsers/chrome.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
package = pkgs.ungoogled-chromium;
|
||||
};
|
||||
}
|
||||
6
home/crow/common/optional/browsers/default.nix
Normal file
6
home/crow/common/optional/browsers/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./firefox.nix
|
||||
./chrome.nix
|
||||
];
|
||||
}
|
||||
5
home/crow/common/optional/comms/default.nix
Normal file
5
home/crow/common/optional/comms/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = [
|
||||
pkgs.ferdium
|
||||
];
|
||||
}
|
||||
1
home/crow/common/optional/desktops/default.nix
Normal file
1
home/crow/common/optional/desktops/default.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
{}
|
||||
5
home/crow/common/optional/desktops/sway.nix
Normal file
5
home/crow/common/optional/desktops/sway.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
4
modules/home/default.nix
Normal file
4
modules/home/default.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{lib, ...}: {
|
||||
imports = lib.custom.scanPaths ./.;
|
||||
}
|
||||
|
||||
79
modules/home/monitors.nix
Normal file
79
modules/home/monitors.nix
Normal 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.";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue