dotfiles/modules/home/gui/desktop/niri/default.nix

75 lines
1.7 KiB
Nix
Raw Normal View History

2025-05-09 15:11:56 -05:00
{
config,
flake,
pkgs,
2025-05-10 16:28:48 -05:00
lib,
2025-05-16 20:03:42 -05:00
osConfig,
2025-05-09 15:11:56 -05:00
...
}:
let
2025-05-16 20:03:42 -05:00
inherit (flake.config.aesthetics.themes) currentTheme palettes;
2025-05-09 15:11:56 -05:00
inherit (flake.config.people) user0 user1 user2;
user = config.home.username;
2025-05-16 20:03:42 -05:00
colourHelpers = {
themeLogic =
if user == user0 then
currentTheme.theme0
else if user == user1 then
currentTheme.theme1
else if user == user2 then
currentTheme.theme2
else
currentTheme.theme0;
2025-05-09 15:11:56 -05:00
2025-05-16 20:03:42 -05:00
el = palettes.${colourHelpers.themeLogic}.colours;
2025-05-09 15:11:56 -05:00
2025-05-16 20:03:42 -05:00
makeColour = c: "#" + c;
};
2025-05-09 15:11:56 -05:00
2025-05-16 20:03:42 -05:00
workspaceStrings = {
workspace0 = "messaging";
workspace1 = "work";
workspace2 = "gaming";
workspace3 = "media";
workspace4 = "extra";
};
2025-05-09 15:11:56 -05:00
2025-05-16 20:03:42 -05:00
configPath = ./config;
configImports =
let
binds = import (configPath + /binds.nix) {
inherit
config
workspaceStrings
flake
osConfig
;
2025-05-09 15:11:56 -05:00
};
layout = import (configPath + /layout.nix) { inherit colourHelpers flake; };
2025-05-16 20:03:42 -05:00
main = import (configPath + /main.nix);
outputs = import (configPath + /outputs.nix) {
inherit
flake
osConfig
colourHelpers
;
};
startup = import (configPath + /startup.nix) { inherit lib pkgs; };
style = import (configPath + /style.nix) { inherit flake; };
windowrules = import (configPath + /windowrules.nix) { inherit flake workspaceStrings; };
2025-05-16 20:03:42 -05:00
workspaces = import (configPath + /workspaces.nix) { inherit workspaceStrings; };
in
binds // layout // main // outputs // startup // style // windowrules // workspaces;
in
{
programs.niri = {
settings = configImports;
2025-05-09 15:11:56 -05:00
};
}