dotfiles/modules/home/gui/desktop/niri/default.nix
2025-05-16 20:03:42 -05:00

74 lines
1.7 KiB
Nix
Executable file

{
config,
flake,
pkgs,
lib,
osConfig,
...
}:
let
inherit (flake.config.aesthetics.themes) currentTheme palettes;
inherit (flake.config.people) user0 user1 user2;
user = config.home.username;
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;
el = palettes.${colourHelpers.themeLogic}.colours;
makeColour = c: "#" + c;
};
workspaceStrings = {
workspace0 = "messaging";
workspace1 = "work";
workspace2 = "gaming";
workspace3 = "media";
workspace4 = "extra";
};
configPath = ./config;
configImports =
let
binds = import (configPath + /binds.nix) {
inherit
config
workspaceStrings
flake
osConfig
;
};
layout = import (configPath + /layout.nix) { inherit colourHelpers; };
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 workspaceStrings; };
workspaces = import (configPath + /workspaces.nix) { inherit workspaceStrings; };
in
binds // layout // main // outputs // startup // style // windowrules // workspaces;
in
{
programs.niri = {
settings = configImports;
};
}