diff --git a/common/cli.nix b/common/cli.nix index ffd91d9..6c574a7 100644 --- a/common/cli.nix +++ b/common/cli.nix @@ -16,10 +16,9 @@ ouch ; }; - home.packages = getPkgs { + user.packages = getPkgs { inherit (pkgs) lazygit - zoxide zellij ; }; diff --git a/common/editor-theme.nix b/common/editor-theme.nix new file mode 100644 index 0000000..e6f4c8e --- /dev/null +++ b/common/editor-theme.nix @@ -0,0 +1,181 @@ +{ + config, + scope, + ... +}: +with config.rice.palette.hex; +scope "user.programs.helix.themes.nix-rice" { + "attribute" = bright.cyan; + "keyword" = { + fg = normal.red; + }; + "keyword.directive" = normal.red; + "namespace" = bright.cyan; + "punctuation" = bright.yellow; + "punctuation.delimiter" = bright.yellow; + "operator" = bright.magenta; + "special" = normal.magenta; + "variable.other.member" = bright.blue; + "variable" = util.fg; + "variable.builtin" = bright.yellow; + "variable.parameter" = bright.white; + "type" = normal.yellow; + "type.builtin" = normal.yellow; + "constructor" = { + fg = bright.magenta; + modifiers = [ "bold" ]; + }; + "function" = { + fg = normal.green; + modifiers = [ "bold" ]; + }; + "function.macro" = bright.cyan; + "function.builtin" = normal.yellow; + "tag" = normal.red; + "comment" = { + fg = normal.magenta; + modifiers = [ "italic" ]; + }; + "constant" = { + fg = bright.magenta; + }; + "constant.builtin" = { + fg = bright.magenta; + modifiers = [ "bold" ]; + }; + "string" = normal.green; + "constant.numeric" = bright.magenta; + "constant.character.escape" = { + fg = bright.white; + modifiers = [ "bold" ]; + }; + "label" = bright.cyan; + "module" = bright.cyan; + "diff.plus" = bright.green; + "diff.delta" = bright.yellow; + "diff.minus" = bright.red; + "warning" = bright.yellow; + "error" = bright.red; + "info" = bright.cyan; + "hint" = bright.blue; + "ui.background" = { + inherit (util) bg; + }; + "ui.linenr" = { + fg = normal.cyan; + }; + "ui.linenr.selected" = { + fg = normal.yellow; + modifiers = [ "bold" ]; + }; + "ui.cursorline" = { + bg = normal.black; + }; + "ui.statusline" = { + inherit (util) fg; + bg = bright.black; + }; + "ui.statusline.normal" = { + inherit (util) fg; + bg = bright.black; + }; + "ui.statusline.insert" = { + inherit (util) fg; + bg = normal.blue; + }; + "ui.statusline.select" = { + inherit (util) fg; + bg = bright.yellow; + }; + "ui.statusline.inactive" = { + fg = normal.white; + bg = normal.black; + }; + "ui.popup" = { + bg = normal.black; + }; + "ui.window" = { + bg = normal.black; + }; + "ui.help" = { + bg = normal.black; + inherit (util) fg; + }; + "ui.text" = { + inherit (util) fg; + }; + "ui.text.focus" = { + inherit (util) fg; + }; + "ui.selection" = { + # modifiers = ["reversed"]; + bg = bright.yellow; + }; + "ui.selection.primary" = { + modifiers = [ "reversed" ]; + }; + # "ui.selection.primary" = { bg = bright.cyan; }; + "ui.cursor.primary" = { + bg = normal.white; + fg = normal.black; + }; + "ui.cursor.match" = { + bg = bright.cyan; + }; + "ui.menu" = { + inherit (util) fg; + bg = bright.black; + }; + "ui.menu.selected" = { + fg = bright.black; + bg = bright.blue; + modifiers = [ "bold" ]; + }; + "ui.virtual.whitespace" = bright.black; + "ui.virtual.ruler" = { + bg = normal.black; + }; + "ui.virtual.inlay-hint" = { + fg = normal.magenta; + }; + "diagnostic.warning" = { + underline = { + color = bright.yellow; + style = "curl"; + }; + }; + "diagnostic.error" = { + underline = { + color = bright.red; + style = "curl"; + }; + }; + "diagnostic.info" = { + underline = { + color = bright.cyan; + style = "curl"; + }; + }; + "diagnostic.hint" = { + underline = { + color = bright.blue; + style = "curl"; + }; + }; + "markup.heading" = bright.cyan; + "markup.bold" = { + modifiers = [ "bold" ]; + }; + "markup.italic" = { + modifiers = [ "italic" ]; + }; + "markup.strikethrough" = { + modifiers = [ "crossed_out" ]; + }; + "markup.link.url" = { + fg = bright.green; + modifiers = [ "underlined" ]; + }; + "markup.link.text" = bright.red; + "markup.raw" = bright.red; +} diff --git a/common/editor.nix b/common/editor.nix index 569b8e4..e746b3c 100644 --- a/common/editor.nix +++ b/common/editor.nix @@ -1,197 +1,12 @@ { inputs, pkgs, - config, scope, ... }: -let - inherit (config) rice; - pal = rice.palette.hex; -in -scope "hm.programs.helix" { +scope "user.programs.helix" { enable = true; package = inputs.helix.packages.${pkgs.system}.helix; - themes = with pal; { - nix-rice = { - "attribute" = bright.cyan; - "keyword" = { - fg = normal.red; - }; - "keyword.directive" = normal.red; - "namespace" = bright.cyan; - "punctuation" = bright.yellow; - "punctuation.delimiter" = bright.yellow; - "operator" = bright.magenta; - "special" = normal.magenta; - "variable.other.member" = bright.blue; - "variable" = util.fg; - "variable.builtin" = bright.yellow; - "variable.parameter" = bright.white; - "type" = normal.yellow; - "type.builtin" = normal.yellow; - "constructor" = { - fg = bright.magenta; - modifiers = [ "bold" ]; - }; - "function" = { - fg = normal.green; - modifiers = [ "bold" ]; - }; - "function.macro" = bright.cyan; - "function.builtin" = normal.yellow; - "tag" = normal.red; - "comment" = { - fg = normal.magenta; - modifiers = [ "italic" ]; - }; - "constant" = { - fg = bright.magenta; - }; - "constant.builtin" = { - fg = bright.magenta; - modifiers = [ "bold" ]; - }; - "string" = normal.green; - "constant.numeric" = bright.magenta; - "constant.character.escape" = { - fg = bright.white; - modifiers = [ "bold" ]; - }; - "label" = bright.cyan; - "module" = bright.cyan; - "diff.plus" = bright.green; - "diff.delta" = bright.yellow; - "diff.minus" = bright.red; - "warning" = bright.yellow; - "error" = bright.red; - "info" = bright.cyan; - "hint" = bright.blue; - "ui.background" = { - inherit (util) bg; - }; - "ui.linenr" = { - fg = normal.cyan; - }; - "ui.linenr.selected" = { - fg = normal.yellow; - modifiers = [ "bold" ]; - }; - "ui.cursorline" = { - bg = normal.black; - }; - "ui.statusline" = { - inherit (util) fg; - bg = bright.black; - }; - "ui.statusline.normal" = { - inherit (util) fg; - bg = bright.black; - }; - "ui.statusline.insert" = { - inherit (util) fg; - bg = normal.blue; - }; - "ui.statusline.select" = { - inherit (util) fg; - bg = bright.yellow; - }; - "ui.statusline.inactive" = { - fg = normal.white; - bg = normal.black; - }; - "ui.popup" = { - bg = normal.black; - }; - "ui.window" = { - bg = normal.black; - }; - "ui.help" = { - bg = normal.black; - inherit (util) fg; - }; - "ui.text" = { - inherit (util) fg; - }; - "ui.text.focus" = { - inherit (util) fg; - }; - "ui.selection" = { - # modifiers = ["reversed"]; - bg = bright.yellow; - }; - "ui.selection.primary" = { - modifiers = [ "reversed" ]; - }; - # "ui.selection.primary" = { bg = bright.cyan; }; - "ui.cursor.primary" = { - bg = normal.white; - fg = normal.black; - }; - "ui.cursor.match" = { - bg = bright.cyan; - }; - "ui.menu" = { - inherit (util) fg; - bg = bright.black; - }; - "ui.menu.selected" = { - fg = bright.black; - bg = bright.blue; - modifiers = [ "bold" ]; - }; - "ui.virtual.whitespace" = bright.black; - "ui.virtual.ruler" = { - bg = normal.black; - }; - "ui.virtual.inlay-hint" = { - fg = normal.magenta; - }; - "diagnostic.warning" = { - underline = { - color = bright.yellow; - style = "curl"; - }; - }; - "diagnostic.error" = { - underline = { - color = bright.red; - style = "curl"; - }; - }; - "diagnostic.info" = { - underline = { - color = bright.cyan; - style = "curl"; - }; - }; - "diagnostic.hint" = { - underline = { - color = bright.blue; - style = "curl"; - }; - }; - "markup.heading" = bright.cyan; - "markup.bold" = { - modifiers = [ "bold" ]; - }; - "markup.italic" = { - modifiers = [ "italic" ]; - }; - "markup.strikethrough" = { - modifiers = [ "crossed_out" ]; - }; - "markup.link.url" = { - fg = bright.green; - modifiers = [ "underlined" ]; - }; - "markup.link.text" = bright.red; - "markup.raw" = bright.red; - }; - }; - - # theme = "nix-rice" - settings = { theme = "nix-rice"; editor = { diff --git a/common/nix/gc.nix b/common/nix/gc.nix index 9d36665..75a0ee3 100644 --- a/common/nix/gc.nix +++ b/common/nix/gc.nix @@ -11,12 +11,6 @@ options = "--delete-older-than 14d"; }; - hm.nix.gc = { - automatic = true; - frequency = "weekly"; - options = "--delete-older-than 14d"; - }; - services.angrr = { enable = true; enableNixGcIntegration = true; diff --git a/common/nix/settings.nix b/common/nix/settings.nix index 5118c49..1ac5bc8 100644 --- a/common/nix/settings.nix +++ b/common/nix/settings.nix @@ -22,7 +22,13 @@ system.nixos.tags = [ "fatcock-xxl" ]; - home-manager.useGlobalPkgs = true; + hjem = { + clobberByDefault = true; + linker = pkgs.smfh; + }; - hjem.linker = pkgs.smfh; + environment.arbys = { + enable = true; + clobber = true; + }; } diff --git a/common/nix/tools.nix b/common/nix/tools.nix index 07b0c52..89e520d 100644 --- a/common/nix/tools.nix +++ b/common/nix/tools.nix @@ -5,11 +5,8 @@ ... }: { - environment.systemPackages = getPkgs { inherit (pkgs) - home-manager - cachix nixfmt-rfc-style ; inherit (inputs.nil.packages.${pkgs.system}) nil; diff --git a/common/systemd.nix b/common/systemd.nix index ab0327b..eeb770e 100644 --- a/common/systemd.nix +++ b/common/systemd.nix @@ -1,6 +1,5 @@ -{ ... }: -{ - systemd.services."user@".serviceConfig.Delegate = "memory pids cpu cpuset"; - systemd.user.extraConfig = "LogLevel=debug"; - hm.systemd.user.startServices = "sd-switch"; +{ scope, ... }: +scope "systemd" { + services."user@".serviceConfig.Delegate = "memory pids cpu cpuset"; + user.extraConfig = "LogLevel=debug"; } diff --git a/common/terminal.nix b/common/terminal.nix index f4401ca..2e58348 100644 --- a/common/terminal.nix +++ b/common/terminal.nix @@ -51,9 +51,7 @@ in ]; environment.shells = [ fish ]; users.defaultUserShell = fish; - console = { - font = "Lat2-Terminus16"; - }; + console.font = "Lat2-Terminus16"; environment.sessionVariables = { EDITOR = "hx"; diff --git a/common/users.nix b/common/users.nix index 0514ece..ad2b578 100644 --- a/common/users.nix +++ b/common/users.nix @@ -8,9 +8,4 @@ "wheel" ]; }; - - hm.config.home = { - username = mainUser; - homeDirectory = "/home/${mainUser}"; - }; } diff --git a/flake.lock b/flake.lock index 94d0ddd..1d16dcc 100644 --- a/flake.lock +++ b/flake.lock @@ -25,11 +25,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1754065275, - "narHash": "sha256-OYT3YIb5PB0Wjhc39+hDf7urVbTzJAcdlHEgku3dGyU=", + "lastModified": 1754669970, + "narHash": "sha256-8IxFp8E/SgWs+Fl7LxiiWClr8OnGw9S1jGtHuRamKmA=", "owner": "linyinfeng", "repo": "angrr", - "rev": "1f5492c0588ab364f3d5297c2d280fe2b58592c5", + "rev": "21c4235fd8d1d890d7d4b9624390371603905c11", "type": "github" }, "original": { @@ -40,11 +40,11 @@ }, "arbys": { "locked": { - "lastModified": 1754615787, - "narHash": "sha256-s5gpN0E8V0gBiZ2mkoUhl17y62N98IDTOg6AeM/rU44=", + "lastModified": 1754630947, + "narHash": "sha256-u1lLQRE56WhhgLM351RjRigFWIDKtQdrn/82kV3k278=", "ref": "refs/heads/meats", - "rev": "60ff6e4dc0a4e24f8f65342d09d50129e39e1963", - "revCount": 5, + "rev": "b72a62e2020924d087b3c0aedbf5c9ec47cc262a", + "revCount": 6, "type": "git", "url": "https://git.atagen.co/atagen/arbys" }, @@ -55,11 +55,11 @@ }, "crane": { "locked": { - "lastModified": 1753316655, - "narHash": "sha256-tzWa2kmTEN69OEMhxFy+J2oWSvZP5QhEgXp3TROOzl0=", + "lastModified": 1754269165, + "narHash": "sha256-0tcS8FHd4QjbCVoxN9jI+PjHgA4vc/IjkUSp+N3zy0U=", "owner": "ipetkov", "repo": "crane", - "rev": "f35a3372d070c9e9ccb63ba7ce347f0634ddf3d2", + "rev": "444e81206df3f7d92780680e45858e31d2f07a08", "type": "github" }, "original": { @@ -142,6 +142,21 @@ } }, "flake-compat_3": { + "locked": { + "lastModified": 1733328505, + "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_4": { "flake": false, "locked": { "lastModified": 1696426674, @@ -157,7 +172,7 @@ "type": "github" } }, - "flake-compat_4": { + "flake-compat_5": { "locked": { "lastModified": 1747046372, "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", @@ -180,11 +195,11 @@ ] }, "locked": { - "lastModified": 1753121425, - "narHash": "sha256-TVcTNvOeWWk1DXljFxVRp+E0tzG1LhrVjOGGoMHuXio=", + "lastModified": 1754487366, + "narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "644e0fc48951a860279da645ba77fe4a6e814c5e", + "rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18", "type": "github" }, "original": { @@ -229,6 +244,24 @@ "type": "github" } }, + "flake-parts_4": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_3" + }, + "locked": { + "lastModified": 1743550720, + "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c621e8422220273271f52058f618c94e405bb0f5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-schemas": { "locked": { "lastModified": 1721999734, @@ -245,7 +278,7 @@ }, "flake-utils": { "inputs": { - "systems": "systems_3" + "systems": "systems_4" }, "locked": { "lastModified": 1731533236, @@ -278,7 +311,7 @@ }, "git-hooks-nix": { "inputs": { - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_4", "gitignore": "gitignore", "nixpkgs": "nixpkgs_14" }, @@ -324,11 +357,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1754613249, - "narHash": "sha256-v62rsM5v2jFLNx9Wga/8C7kSSZaMKzPovRGEMiswtU4=", + "lastModified": 1755025942, + "narHash": "sha256-eKVn1PYxBsVVd6gs1IIuBQhTZmb5UNBgbC9+qBNT9cw=", "owner": "helix-editor", "repo": "helix", - "rev": "18572973e6332101810169668894a99261bcd96b", + "rev": "001efa801e28cd19147d9369890133c2d631842a", "type": "github" }, "original": { @@ -344,6 +377,52 @@ ], "smfh": "smfh" }, + "locked": { + "lastModified": 1755001052, + "narHash": "sha256-27YOZ6P8jRjeGydOK/EX/3e4d95eFouSpBSsS08Nryw=", + "owner": "feel-co", + "repo": "hjem", + "rev": "46c06ba2fc5f14772a3f64a6e6e4adbff17b1d9f", + "type": "github" + }, + "original": { + "owner": "feel-co", + "repo": "hjem", + "type": "github" + } + }, + "hjem-rum": { + "inputs": { + "hjem": "hjem_2", + "ndg": "ndg", + "nixpkgs": [ + "nixpkgs" + ], + "treefmt-nix": "treefmt-nix_2" + }, + "locked": { + "lastModified": 1755081855, + "narHash": "sha256-o751fp3GYDZ2brb+DHRxX6JGTctvCvNqlG+C+oi/nVI=", + "owner": "snugnug", + "repo": "hjem-rum", + "rev": "3cfa85f8614a01baf5e49829ee755d14d3390259", + "type": "github" + }, + "original": { + "owner": "snugnug", + "ref": "pull/128/head", + "repo": "hjem-rum", + "type": "github" + } + }, + "hjem_2": { + "inputs": { + "nixpkgs": [ + "hjem-rum", + "nixpkgs" + ], + "smfh": "smfh_2" + }, "locked": { "lastModified": 1754244549, "narHash": "sha256-ByZ81/QttgSS1mQYttnaoMw2WnqMvQ6HCxBPOioKrOA=", @@ -365,11 +444,11 @@ ] }, "locked": { - "lastModified": 1754613544, - "narHash": "sha256-ueR1mGX4I4DWfDRRxxMphbKDNisDeMPMusN72VV1+cc=", + "lastModified": 1754974548, + "narHash": "sha256-XMjUjKD/QRPcqUnmSDczSYdw46SilnG0+wkho654DFM=", "owner": "nix-community", "repo": "home-manager", - "rev": "cc2fa2331aebf9661d22bb507d362b39852ac73f", + "rev": "27a26be51ff0162a8f67660239f9407dba68d7c5", "type": "github" }, "original": { @@ -386,11 +465,11 @@ ] }, "locked": { - "lastModified": 1754575993, - "narHash": "sha256-0ut8TM76DeMnexgwNyMx2c5flhp4IPtqQ79XR0hpmY0=", + "lastModified": 1754886238, + "narHash": "sha256-LTQomWOwG70lZR+78ZYSZ9sYELWNq3HJ7/tdHzfif/s=", "owner": "nix-community", "repo": "home-manager", - "rev": "d8a475e179888553b6863204a93295da6ee13eb4", + "rev": "0d492b89d1993579e63b9dbdaed17fd7824834da", "type": "github" }, "original": { @@ -427,11 +506,11 @@ ] }, "locked": { - "lastModified": 1754110197, - "narHash": "sha256-N7GWK2084EsNdwzwg6FCIgMrSau1WwzxGSNdPHx5Tak=", + "lastModified": 1754639028, + "narHash": "sha256-w1+XzPBAZPbeGLMAgAlOjIquswo6Q42PMep9KSrRzOA=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "04ce5c103eb621220d69102bc0ee27c3abd89204", + "rev": "d49809278138d17be77ab0ef5506b26dc477fa62", "type": "github" }, "original": { @@ -459,11 +538,11 @@ "lix": { "flake": false, "locked": { - "lastModified": 1754569551, - "narHash": "sha256-P+WiN95OjCqHhfygglS/VOFTSj7qNdL5XQDo2wxhQqg=", - "rev": "8bbd5e1d0df9c31b4d86ba07bc85beb952e42ccb", + "lastModified": 1755000875, + "narHash": "sha256-bCyz75cXV4ZBGgGCouppIt9P3ZxA752eTMpewwijVdg=", + "rev": "4a119e6e46f275c3bb7868c6c688ebb75af62b3b", "type": "tarball", - "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/8bbd5e1d0df9c31b4d86ba07bc85beb952e42ccb.tar.gz?rev=8bbd5e1d0df9c31b4d86ba07bc85beb952e42ccb" + "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/4a119e6e46f275c3bb7868c6c688ebb75af62b3b.tar.gz?rev=4a119e6e46f275c3bb7868c6c688ebb75af62b3b" }, "original": { "type": "tarball", @@ -536,6 +615,29 @@ "inputs": { "flake-compat": "flake-compat_2", "flake-parts": "flake-parts_2", + "nixpkgs": [ + "hjem-rum", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1748103964, + "narHash": "sha256-aRFl6I3x1aKzeOBaD/OJHYv+OQ+qE+3FR9uKhIvfW+A=", + "owner": "feel-co", + "repo": "ndg", + "rev": "c556c4cbcba61474bf8a342a31a2d94cbefd8986", + "type": "github" + }, + "original": { + "owner": "feel-co", + "repo": "ndg", + "type": "github" + } + }, + "ndg_2": { + "inputs": { + "flake-compat": "flake-compat_3", + "flake-parts": "flake-parts_3", "nixpkgs": "nixpkgs_6" }, "locked": { @@ -557,11 +659,11 @@ "nixpkgs": "nixpkgs_8" }, "locked": { - "lastModified": 1753661392, - "narHash": "sha256-fK4INnIJQNAA8cyjcDRZSPleA+N/STI6I0oBDMZ2r+E=", + "lastModified": 1754679101, + "narHash": "sha256-nFK2XhrDS5igmkDQWmyTcgiJsEr3KOcR31DaSy+Fy9s=", "owner": "oxalica", "repo": "nil", - "rev": "cd7a6f6d5dc58484e62a8e85677e06e47cf2bd4d", + "rev": "f80fe365cb441624d1608235e6e793e5dce47fb0", "type": "github" }, "original": { @@ -580,11 +682,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1754593792, - "narHash": "sha256-ufYmw5vGCUuMdLb8A4MkDKzaXUqlReu7A0wn9EbQ5do=", + "lastModified": 1755008894, + "narHash": "sha256-QDlUT5Bvq9YXZI3YLtOGIbEJo/bEbtRJmyPsoC6UXFg=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "e76792be7533a57d1420b9cdfe3efa4690a650f0", + "rev": "5196ae4f1ffece7433e0c441f396ccc045919aa3", "type": "github" }, "original": { @@ -655,7 +757,7 @@ "naersk": "naersk", "niri-flake": "niri-flake", "nixpkgs": "nixpkgs_12", - "systems": "systems_4" + "systems": "systems_5" }, "locked": { "lastModified": 1753421223, @@ -674,11 +776,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1754589971, - "narHash": "sha256-gu0lWJbDkHs6+V9KHXwQHtZ2Hp72FxOjy3YisJ3qj9k=", + "lastModified": 1754894368, + "narHash": "sha256-I7uSAOosX79BLVTWRHWHvT9z3Lv8rDYY3RogV/0Gne0=", "owner": "YaLTeR", "repo": "niri", - "rev": "f74d83dccaa6e8fffb38c304dd5d1eae07b87d24", + "rev": "0044578681cee50fd7ad49fcb8d1e2ea53d85fe4", "type": "github" }, "original": { @@ -731,11 +833,11 @@ "nixpkgs": "nixpkgs_13" }, "locked": { - "lastModified": 1754195341, - "narHash": "sha256-YL71IEf2OugH3gmAsxQox6BJI0KOcHKtW2QqT/+s2SA=", + "lastModified": 1754800038, + "narHash": "sha256-UbLO8/0pVBXLJuyRizYOJigtzQAj8Z2bTnbKSec/wN0=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "b7fcd4e26d67fca48e77de9b0d0f954b18ae9562", + "rev": "b65f8d80656f9fcbd1fecc4b7f0730f468333142", "type": "github" }, "original": { @@ -746,12 +848,12 @@ }, "nix-rice": { "inputs": { - "flake-parts": "flake-parts_3", + "flake-parts": "flake-parts_4", "git-hooks-nix": "git-hooks-nix", "kitty-themes-src": "kitty-themes-src", "nixpkgs": "nixpkgs_15", - "nixpkgs-lib": "nixpkgs-lib_3", - "systems": "systems_5" + "nixpkgs-lib": "nixpkgs-lib_4", + "systems": "systems_6" }, "locked": { "lastModified": 1748538518, @@ -799,11 +901,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1753939845, - "narHash": "sha256-K2ViRJfdVGE8tpJejs8Qpvvejks1+A4GQej/lBk5y7I=", + "lastModified": 1754498491, + "narHash": "sha256-erbiH2agUTD0Z30xcVSFcDHzkRvkRXOQ3lb887bcVrs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "94def634a20494ee057c76998843c015909d6311", + "rev": "c2ae88e026f9525daf89587f3cbee584b92b6134", "type": "github" }, "original": { @@ -844,6 +946,21 @@ } }, "nixpkgs-lib_3": { + "locked": { + "lastModified": 1743296961, + "narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixpkgs-lib_4": { "locked": { "lastModified": 1748135671, "narHash": "sha256-PIkcBpddXRAGWstWV7zTwRZ9EAPqgzFNssux17p1NTg=", @@ -860,11 +977,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1754292888, - "narHash": "sha256-1ziydHSiDuSnaiPzCQh1mRFBsM2d2yRX9I+5OPGEmIE=", + "lastModified": 1754937576, + "narHash": "sha256-3sWA5WJybUE16kIMZ3+uxcxKZY/JRR4DFBqLdSLBo7w=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ce01daebf8489ba97bd1609d185ea276efdeb121", + "rev": "ddae11e58c0c345bf66efbddbf2192ed0e58f896", "type": "github" }, "original": { @@ -956,11 +1073,11 @@ }, "nixpkgs_13": { "locked": { - "lastModified": 1753939845, - "narHash": "sha256-K2ViRJfdVGE8tpJejs8Qpvvejks1+A4GQej/lBk5y7I=", + "lastModified": 1754725699, + "narHash": "sha256-iAcj9T/Y+3DBy2J0N+yF9XQQQ8IEb5swLFzs23CdP88=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "94def634a20494ee057c76998843c015909d6311", + "rev": "85dbfc7aaf52ecb755f87e577ddbe6dbbdbc1054", "type": "github" }, "original": { @@ -1003,11 +1120,11 @@ }, "nixpkgs_16": { "locked": { - "lastModified": 1754498491, - "narHash": "sha256-erbiH2agUTD0Z30xcVSFcDHzkRvkRXOQ3lb887bcVrs=", + "lastModified": 1754725699, + "narHash": "sha256-iAcj9T/Y+3DBy2J0N+yF9XQQQ8IEb5swLFzs23CdP88=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c2ae88e026f9525daf89587f3cbee584b92b6134", + "rev": "85dbfc7aaf52ecb755f87e577ddbe6dbbdbc1054", "type": "github" }, "original": { @@ -1019,11 +1136,11 @@ }, "nixpkgs_17": { "locked": { - "lastModified": 1754498491, - "narHash": "sha256-erbiH2agUTD0Z30xcVSFcDHzkRvkRXOQ3lb887bcVrs=", + "lastModified": 1754725699, + "narHash": "sha256-iAcj9T/Y+3DBy2J0N+yF9XQQQ8IEb5swLFzs23CdP88=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c2ae88e026f9525daf89587f3cbee584b92b6134", + "rev": "85dbfc7aaf52ecb755f87e577ddbe6dbbdbc1054", "type": "github" }, "original": { @@ -1163,11 +1280,11 @@ }, "nixpkgs_9": { "locked": { - "lastModified": 1754498491, - "narHash": "sha256-erbiH2agUTD0Z30xcVSFcDHzkRvkRXOQ3lb887bcVrs=", + "lastModified": 1754725699, + "narHash": "sha256-iAcj9T/Y+3DBy2J0N+yF9XQQQ8IEb5swLFzs23CdP88=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c2ae88e026f9525daf89587f3cbee584b92b6134", + "rev": "85dbfc7aaf52ecb755f87e577ddbe6dbbdbc1054", "type": "github" }, "original": { @@ -1183,14 +1300,14 @@ "home-manager": "home-manager_2", "jovian": "jovian", "nixpkgs": "nixpkgs_17", - "rust-overlay": "rust-overlay_3" + "rust-overlay": "rust-overlay_4" }, "locked": { - "lastModified": 1754597469, - "narHash": "sha256-XdVdXIU23qFcE1fdMVaaGhFSdVRGHjBXcRh/KHO9jqQ=", + "lastModified": 1754907869, + "narHash": "sha256-tzshAAjt0xDjCc/aOgii6PSqePIc2rWYSXF8VnqEhIg=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "adaeec6210ede1cdc71c5d65c89c8161490a9e64", + "rev": "b5f83e0d7bce67af178f6aaef95853fedf4c00a0", "type": "github" }, "original": { @@ -1228,6 +1345,7 @@ "culr": "culr", "helix": "helix", "hjem": "hjem", + "hjem-rum": "hjem-rum", "home-manager": "home-manager", "hudcore": "hudcore", "lix": "lix", @@ -1306,6 +1424,29 @@ } }, "rust-overlay_3": { + "inputs": { + "nixpkgs": [ + "hjem-rum", + "hjem", + "smfh", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1747622321, + "narHash": "sha256-W0dYIWgsUu6rvOJRtKLhKskkv0VhQhJYGNIq+gGUc8g=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "bd030fd9983f7fddf87be1c64aa3064c8afa24c4", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "rust-overlay_4": { "inputs": { "nixpkgs": [ "nyx", @@ -1313,11 +1454,11 @@ ] }, "locked": { - "lastModified": 1754575663, - "narHash": "sha256-afOx8AG0KYtw7mlt6s6ahBBy7eEHZwws3iCRoiuRQS4=", + "lastModified": 1754880555, + "narHash": "sha256-tG6l0wiX8V8IvG4HFYY8IYN5vpNAxQ+UWunjjpE6SqU=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "6db0fb0e9cec2e9729dc52bf4898e6c135bb8a0f", + "rev": "17c591a44e4eb77f05f27cd37e1cfc3f219c7fc4", "type": "github" }, "original": { @@ -1349,6 +1490,30 @@ "type": "github" } }, + "smfh_2": { + "inputs": { + "nixpkgs": [ + "hjem-rum", + "hjem", + "nixpkgs" + ], + "rust-overlay": "rust-overlay_3", + "systems": "systems_3" + }, + "locked": { + "lastModified": 1749906619, + "narHash": "sha256-/9Ww10kYopxfCNNnNDwENTubs7Wzqlw+O6PJAHNOYQw=", + "owner": "feel-co", + "repo": "smfh", + "rev": "39f5c06153f63100376bc607b1465850b6df77fd", + "type": "github" + }, + "original": { + "owner": "feel-co", + "repo": "smfh", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1689347949, @@ -1395,6 +1560,21 @@ } }, "systems_4": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_5": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", @@ -1409,7 +1589,7 @@ "type": "github" } }, - "systems_5": { + "systems_6": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1432,11 +1612,32 @@ ] }, "locked": { - "lastModified": 1754061284, - "narHash": "sha256-ONcNxdSiPyJ9qavMPJYAXDNBzYobHRxw0WbT38lKbwU=", + "lastModified": 1754492133, + "narHash": "sha256-B+3g9+76KlGe34Yk9za8AF3RL+lnbHXkLiVHLjYVOAc=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "58bd4da459f0a39e506847109a2a5cfceb837796", + "rev": "1298185c05a56bff66383a20be0b41a307f52228", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix_2": { + "inputs": { + "nixpkgs": [ + "hjem-rum", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1746216483, + "narHash": "sha256-4h3s1L/kKqt3gMDcVfN8/4v2jqHrgLIe4qok4ApH5x4=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "29ec5026372e0dec56f890e50dbe4f45930320fd", "type": "github" }, "original": { @@ -1447,7 +1648,7 @@ }, "unf": { "inputs": { - "ndg": "ndg", + "ndg": "ndg_2", "nixpkgs": "nixpkgs_7" }, "locked": { @@ -1532,7 +1733,7 @@ }, "zedless": { "inputs": { - "flake-compat": "flake-compat_4", + "flake-compat": "flake-compat_5", "nixpkgs": "nixpkgs_18" }, "locked": { diff --git a/flake.nix b/flake.nix index 886b254..96a1987 100644 --- a/flake.nix +++ b/flake.nix @@ -42,6 +42,11 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + hjem-rum = { + url = "github:snugnug/hjem-rum/pull/128/head"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + hudcore.url = "git+https://git.atagen.co/atagen/hudcore-plymouth.git"; quickshell = { diff --git a/graphical/audio-control.nix b/graphical/audio-control.nix index d567f08..b196b0a 100644 --- a/graphical/audio-control.nix +++ b/graphical/audio-control.nix @@ -5,12 +5,12 @@ ... }: { - home.packages = getPkgs { + user.packages = getPkgs { inherit (pkgs) avizo playerctl ; }; - hm.quickServices."avizo-service" = "${lib.getExe' pkgs.avizo "avizo-service"}"; + quick.services."avizo-service" = "${lib.getExe' pkgs.avizo "avizo-service"}"; } diff --git a/graphical/binds.nix b/graphical/binds.nix index 1e75a29..89708da 100644 --- a/graphical/binds.nix +++ b/graphical/binds.nix @@ -1,120 +1,122 @@ -{ - pkgs, - lib, - config, - inputs, - scope, - ... -}: -let - inherit (lib) - range - nameValuePair - mapAttrs' - mergeAttrsList - ; - inherit (builtins) listToAttrs replaceStrings; - inherit (config.hm.lib.niri) actions; - hBinds = { - H = "left"; - L = "right"; - }; - vBinds = { - J = "down"; - K = "up"; - }; - makeDirBind = - mods: cmd: keys: - mapAttrs' ( - key: dir: - nameValuePair "${mods}+${key}" { - action = actions."${replaceStrings [ "$DIR" ] [ "${dir}" ] "${cmd}"}"; - } - ) keys; - makeWsBind = - mods: cmd: - listToAttrs ( - map (num: { - name = "${mods}+${builtins.toString num}"; - value = { - action."${cmd}" = num; - }; - }) (range 1 6) - ); - tagctl = lib.getExe' inputs.niri-tag.packages.${pkgs.system}.unstable "tagctl"; - makeTagBind = - mods: cmd: - listToAttrs ( - map (num: { - name = "${mods}+${builtins.toString num}"; - value = { - action.spawn = [ - tagctl - cmd - (builtins.toString num) - ]; - }; - }) (range 1 6) - ); -in -scope "hm.programs.niri.settings" { - binds = mergeAttrsList [ - { - "Mod+D".action.spawn = [ - "qs" - "ipc" - "call" - "launch" - "toggle" - ]; - "Mod+F".action.spawn = "firefox"; - "Mod+E".action.spawn = "nautilus"; - "Mod+Return".action.spawn = "foot"; - "Mod+Shift+E".action.spawn = "wlogout"; - "Mod+Equal".action.spawn = "bitwarden"; - "Mod+Shift+Q".action = actions.close-window; - "Mod+Shift+S".action = actions.screenshot; - "Mod+R".action = actions.switch-preset-column-width; - "Mod+Shift+R".action = actions.maximize-column; - "XF86AudioRaiseVolume".action.spawn = [ - "volumectl" - "-u" - "up" - ]; - "XF86AudioLowerVolume".action.spawn = [ - "volumectl" - "-u" - "down" - ]; - "XF86AudioMute".action.spawn = [ - "volumectl" - "toggle-mute" - ]; - "XF86AudioStop".action.spawn = [ - "playerctl" - "stop" - ]; - "XF86AudioPlay".action.spawn = [ - "playerctl" - "play-pause" - ]; - "XF86AudioNext".action.spawn = [ - "playerctl" - "next" - ]; - "XF86AudioPrev".action.spawn = [ - "playerctl" - "previous" - ]; - "Mod+Space".action = actions.toggle-window-floating; - } - (makeDirBind "Mod" "focus-window-$DIR" vBinds) - (makeDirBind "Mod" "focus-column-or-monitor-$DIR" hBinds) - (makeDirBind "Mod+Shift" "move-column-$DIR-or-to-monitor-$DIR" hBinds) - (makeDirBind "Mod+Ctrl" "consume-or-expel-window-$DIR" hBinds) - (makeDirBind "Mod+Ctrl" "move-window-$DIR" vBinds) - (makeTagBind "Mod" "toggle-tag") - (makeTagBind "Mod+Shift" "toggle") - (makeTagBind "Mod+Ctrl" "exclusive-tag") - ]; -} +_: { } +# TODO rewrite this with hjem-rum +# { +# pkgs, +# lib, +# config, +# inputs, +# scope, +# ... +# }: +# let +# inherit (lib) +# range +# nameValuePair +# mapAttrs' +# mergeAttrsList +# ; +# inherit (builtins) listToAttrs replaceStrings; +# inherit (config.hm.lib.niri) actions; +# hBinds = { +# H = "left"; +# L = "right"; +# }; +# vBinds = { +# J = "down"; +# K = "up"; +# }; +# makeDirBind = +# mods: cmd: keys: +# mapAttrs' ( +# key: dir: +# nameValuePair "${mods}+${key}" { +# action = actions."${replaceStrings [ "$DIR" ] [ "${dir}" ] "${cmd}"}"; +# } +# ) keys; +# makeWsBind = +# mods: cmd: +# listToAttrs ( +# map (num: { +# name = "${mods}+${builtins.toString num}"; +# value = { +# action."${cmd}" = num; +# }; +# }) (range 1 6) +# ); +# tagctl = lib.getExe' inputs.niri-tag.packages.${pkgs.system}.unstable "tagctl"; +# makeTagBind = +# mods: cmd: +# listToAttrs ( +# map (num: { +# name = "${mods}+${builtins.toString num}"; +# value = { +# action.spawn = [ +# tagctl +# cmd +# (builtins.toString num) +# ]; +# }; +# }) (range 1 6) +# ); +# in +# scope "hm.programs.niri.settings" { +# binds = mergeAttrsList [ +# { +# "Mod+D".action.spawn = [ +# "qs" +# "ipc" +# "call" +# "launch" +# "toggle" +# ]; +# "Mod+F".action.spawn = "firefox"; +# "Mod+E".action.spawn = "nautilus"; +# "Mod+Return".action.spawn = "foot"; +# "Mod+Shift+E".action.spawn = "wlogout"; +# "Mod+Equal".action.spawn = "bitwarden"; +# "Mod+Shift+Q".action = actions.close-window; +# "Mod+Shift+S".action = actions.screenshot; +# "Mod+R".action = actions.switch-preset-column-width; +# "Mod+Shift+R".action = actions.maximize-column; +# "XF86AudioRaiseVolume".action.spawn = [ +# "volumectl" +# "-u" +# "up" +# ]; +# "XF86AudioLowerVolume".action.spawn = [ +# "volumectl" +# "-u" +# "down" +# ]; +# "XF86AudioMute".action.spawn = [ +# "volumectl" +# "toggle-mute" +# ]; +# "XF86AudioStop".action.spawn = [ +# "playerctl" +# "stop" +# ]; +# "XF86AudioPlay".action.spawn = [ +# "playerctl" +# "play-pause" +# ]; +# "XF86AudioNext".action.spawn = [ +# "playerctl" +# "next" +# ]; +# "XF86AudioPrev".action.spawn = [ +# "playerctl" +# "previous" +# ]; +# "Mod+Space".action = actions.toggle-window-floating; +# } +# (makeDirBind "Mod" "focus-window-$DIR" vBinds) +# (makeDirBind "Mod" "focus-column-or-monitor-$DIR" hBinds) +# (makeDirBind "Mod+Shift" "move-column-$DIR-or-to-monitor-$DIR" hBinds) +# (makeDirBind "Mod+Ctrl" "consume-or-expel-window-$DIR" hBinds) +# (makeDirBind "Mod+Ctrl" "move-window-$DIR" vBinds) +# (makeTagBind "Mod" "toggle-tag") +# (makeTagBind "Mod+Shift" "toggle") +# (makeTagBind "Mod+Ctrl" "exclusive-tag") +# ]; +# } diff --git a/graphical/browser.nix b/graphical/browser.nix index b459d00..0a7b520 100644 --- a/graphical/browser.nix +++ b/graphical/browser.nix @@ -1,92 +1,122 @@ { - lib, - scope, + pkgs, ... }: -let - officialAddon = name: { - install_url = lib.strings.concatStrings [ - "https://addons.mozilla.org/firefox/downloads/latest/" - name - "/latest.xpi" +{ + user.packages = [ pkgs.chromium ]; + programs.chromium = { + enable = true; + homepageLocation = "about:blank"; + extraOpts = { + "BrowserSignin" = 0; + "SyncDisabled" = true; + "DriveDisabled" = true; + "AIModeSettings" = 1; + "GenAiDefaultSettings" = 1; + "SafeBrowsingProtectionLevel" = 0; + "DeviceAutoUpdateDisabled" = true; + "PasswordManagerEnabled" = false; + "SpellcheckEnabled" = true; + "SpellcheckLanguage" = [ + "en-AU" + ]; + "CloudReportingEnabled" = false; + "GoogleWorkspaceCloudUpload" = "disallowed"; + "MicrosoftOfficeCloudUpload" = "disallowed"; + }; + extensions = [ + "ddkjiahejlhfcafbddmgiahcphecmpfh" # ublock origin lite + "eimadpbcbfnmbkopoojfekhnkhdbieeh" # dark reader + "hfjbmagddngcpeloejdejnfgbamkjaeg" # vimium c + "bkmmlbllpjdpgcgdohbaghfaecnddhni" # webrtc protect + "nngceckbapebfimnlniiiahkandclblb" # bitwarden ]; - installation_mode = "force_installed"; - }; - lock-false = { - Value = false; - Status = "locked"; - }; - lock-true = { - Value = true; - Status = "locked"; - }; -in -scope "hm.programs.firefox" { - enable = true; - - policies = { - DisableTelemetry = true; - DisableFirefoxStudies = true; - EnableTrackingProtection = { - Value = true; - Locked = true; - Cryptomining = true; - Fingerprinting = true; - }; - DisablePocket = true; - DisableFirefoxAccounts = true; - DisableAccounts = true; - DisableFirefoxScreenshots = true; - DisableAppUpdate = true; - DisablePrivateBrowsing = true; - DontCheckDefaultBrowser = true; - - OverrideFirstRunPage = ""; - OverridePostUpdatePage = ""; - DisplayBookmarksToolbar = "newtab"; # alternatives: "always" or "newtab" - DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on" - SearchBar = "unified"; # alternative: "separate" - - ExtensionSettings = { - "*".installation_mode = "blocked"; # blocks all addons except the ones specified below - "uBlock0@raymondhill.net" = officialAddon "ublock-origin"; - "addon@darkreader.org" = officialAddon "darkreader"; - "vimium-c@gdh1995.cn" = officialAddon "vimium-c"; - "{b86e4813-687a-43e6-ab65-0bde4ab75758}" = officialAddon "localcdn-fork-of-decentraleyes"; - "jid1-5Fs7iTLscUaZBgwr@jetpack" = officialAddon "happy-bonobo-disable-webrtc"; - "{446900e4-71c2-419f-a6a7-df9c091e268b}" = officialAddon "bitwarden-password-mananger"; - }; - - Preferences = { - "extensions.pocket.enabled" = lock-false; - "extensions.screenshots.disabled" = lock-true; - "browser.topsites.contile.enabled" = lock-false; - "browser.formfill.enable" = lock-false; - "browser.search.suggest.enabled" = lock-false; - "browser.search.suggest.enabled.private" = lock-false; - "browser.urlbar.suggest.searches" = lock-false; - "browser.urlbar.showSearchSuggestionsFirst" = lock-false; - "browser.newtabpage.activity-stream.feeds.section.topstories" = lock-false; - "browser.newtabpage.activity-stream.feeds.snippets" = lock-false; - "browser.newtabpage.activity-stream.section.highlights.includePocket" = lock-false; - "browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = lock-false; - "browser.newtabpage.activity-stream.section.highlights.includeDownloads" = lock-false; - "browser.newtabpage.activity-stream.section.highlights.includeVisited" = lock-false; - "browser.newtabpage.activity-stream.showSponsored" = lock-false; - "browser.newtabpage.activity-stream.system.showSponsored" = lock-false; - "browser.newtabpage.activity-stream.showSponsoredTopSites" = lock-false; - }; - }; - - profiles.default = { - id = 0; - name = "Default"; - settings = { - "browser.startup.homepage" = "about:blank"; - "browser.shell.didSkipDefaultBrowserCheckOnFirstRun" = true; - "browser.policies.applied" = true; - "widget.use-xdg-desktop-portal.file-picker" = 1; - "widget.use-xdg-desktop-portal.mime-handler" = 1; - }; }; } +# let +# officialAddon = name: { +# install_url = lib.strings.concatStrings [ +# "https://addons.mozilla.org/firefox/downloads/latest/" +# name +# "/latest.xpi" +# ]; +# installation_mode = "force_installed"; +# }; +# lock-false = { +# Value = false; +# Status = "locked"; +# }; +# lock-true = { +# Value = true; +# Status = "locked"; +# }; +# in +# scope "hm.programs.firefox" { +# enable = true; + +# policies = { +# DisableTelemetry = true; +# DisableFirefoxStudies = true; +# EnableTrackingProtection = { +# Value = true; +# Locked = true; +# Cryptomining = true; +# Fingerprinting = true; +# }; +# DisablePocket = true; +# DisableFirefoxAccounts = true; +# DisableAccounts = true; +# DisableFirefoxScreenshots = true; +# DisableAppUpdate = true; +# DisablePrivateBrowsing = true; +# DontCheckDefaultBrowser = true; + +# OverrideFirstRunPage = ""; +# OverridePostUpdatePage = ""; +# DisplayBookmarksToolbar = "newtab"; # alternatives: "always" or "newtab" +# DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on" +# SearchBar = "unified"; # alternative: "separate" + +# ExtensionSettings = { +# "*".installation_mode = "blocked"; # blocks all addons except the ones specified below +# "uBlock0@raymondhill.net" = officialAddon "ublock-origin"; +# "addon@darkreader.org" = officialAddon "darkreader"; +# "vimium-c@gdh1995.cn" = officialAddon "vimium-c"; +# "{b86e4813-687a-43e6-ab65-0bde4ab75758}" = officialAddon "localcdn-fork-of-decentraleyes"; +# "jid1-5Fs7iTLscUaZBgwr@jetpack" = officialAddon "happy-bonobo-disable-webrtc"; +# "{446900e4-71c2-419f-a6a7-df9c091e268b}" = officialAddon "bitwarden-password-mananger"; +# }; + +# Preferences = { +# "extensions.pocket.enabled" = lock-false; +# "extensions.screenshots.disabled" = lock-true; +# "browser.topsites.contile.enabled" = lock-false; +# "browser.formfill.enable" = lock-false; +# "browser.search.suggest.enabled" = lock-false; +# "browser.search.suggest.enabled.private" = lock-false; +# "browser.urlbar.suggest.searches" = lock-false; +# "browser.urlbar.showSearchSuggestionsFirst" = lock-false; +# "browser.newtabpage.activity-stream.feeds.section.topstories" = lock-false; +# "browser.newtabpage.activity-stream.feeds.snippets" = lock-false; +# "browser.newtabpage.activity-stream.section.highlights.includePocket" = lock-false; +# "browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = lock-false; +# "browser.newtabpage.activity-stream.section.highlights.includeDownloads" = lock-false; +# "browser.newtabpage.activity-stream.section.highlights.includeVisited" = lock-false; +# "browser.newtabpage.activity-stream.showSponsored" = lock-false; +# "browser.newtabpage.activity-stream.system.showSponsored" = lock-false; +# "browser.newtabpage.activity-stream.showSponsoredTopSites" = lock-false; +# }; +# }; + +# profiles.default = { +# id = 0; +# name = "Default"; +# settings = { +# "browser.startup.homepage" = "about:blank"; +# "browser.shell.didSkipDefaultBrowserCheckOnFirstRun" = true; +# "browser.policies.applied" = true; +# "widget.use-xdg-desktop-portal.file-picker" = 1; +# "widget.use-xdg-desktop-portal.mime-handler" = 1; +# }; +# }; +# } diff --git a/graphical/chat.nix b/graphical/chat.nix index 27f748b..c409a94 100644 --- a/graphical/chat.nix +++ b/graphical/chat.nix @@ -1,18 +1,18 @@ { config, pkgs, ... }: { - home.packages = [ pkgs.fluffychat ]; - hm.programs.firefox.webapps = { - "Microsoft-Teams" = { - url = "https://teams.microsoft.com"; - extraSettings = config.hm.programs.firefox.profiles.default.settings; - name = "Microsoft Teams"; - icon = ../assets/ms_teams.png; - }; - "Facebook-Messenger" = { - url = "https://www.messenger.com"; - extraSettings = config.hm.programs.firefox.profiles.default.settings; - name = "Facebook Messenger"; - icon = ../assets/fb_msg.png; - }; - }; + user.packages = [ pkgs.fluffychat ]; + # hm.programs.firefox.webapps = { + # "Microsoft-Teams" = { + # url = "https://teams.microsoft.com"; + # extraSettings = config.hm.programs.firefox.profiles.default.settings; + # name = "Microsoft Teams"; + # icon = ../assets/ms_teams.png; + # }; + # "Facebook-Messenger" = { + # url = "https://www.messenger.com"; + # extraSettings = config.hm.programs.firefox.profiles.default.settings; + # name = "Facebook Messenger"; + # icon = ../assets/fb_msg.png; + # }; + # }; } diff --git a/graphical/desktop/niri-config.kdl b/graphical/desktop/niri-config.kdl new file mode 100755 index 0000000..8ef00ca --- /dev/null +++ b/graphical/desktop/niri-config.kdl @@ -0,0 +1,108 @@ +input { + keyboard { + xkb { + layout "" + model "" + rules "" + variant "" + } + repeat-delay 600 + repeat-rate 25 + track-layout "global" + } + warp-mouse-to-focus +} +output "DP-1" { + scale 1 + transform "90" +} +output "DP-2" { + scale 1 + transform "normal" + variable-refresh-rate on-demand=false +} +screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png" +prefer-no-csd +layout { + gaps 32 + struts { + left 0 + right 0 + top 0 + bottom 0 + } + focus-ring { + width 4 + active-color "#FFAB5B" + inactive-color "#272A2A" + } + border { off; } + default-column-width { proportion 0.500000; } + preset-column-widths { + proportion 0.666667 + proportion 0.500000 + proportion 0.333333 + } + center-focused-column "never" + always-center-single-column +} +cursor { + xcursor-theme "Afterglow-Recolored-Dracula-Orange" + xcursor-size 16 + hide-when-typing + hide-after-inactive-ms 5000 +} +hotkey-overlay { skip-at-startup; } +binds { + Mod+1 { spawn "tagctl" "toggle-tag" "1"; } + Mod+2 { spawn "tagctl" "toggle-tag" "2"; } + Mod+3 { spawn "tagctl" "toggle-tag" "3"; } + Mod+4 { spawn "tagctl" "toggle-tag" "4"; } + Mod+5 { spawn "tagctl" "toggle-tag" "5"; } + Mod+6 { spawn "tagctl" "toggle-tag" "6"; } + Mod+Ctrl+1 { spawn "tagctl" "exclusive-tag" "1"; } + Mod+Ctrl+2 { spawn "tagctl" "exclusive-tag" "2"; } + Mod+Ctrl+3 { spawn "tagctl" "exclusive-tag" "3"; } + Mod+Ctrl+4 { spawn "tagctl" "exclusive-tag" "4"; } + Mod+Ctrl+5 { spawn "tagctl" "exclusive-tag" "5"; } + Mod+Ctrl+6 { spawn "tagctl" "exclusive-tag" "6"; } + Mod+Ctrl+H { consume-or-expel-window-left; } + Mod+Ctrl+J { move-window-down; } + Mod+Ctrl+K { move-window-up; } + Mod+Ctrl+L { consume-or-expel-window-right; } + Mod+D { spawn "qs" "ipc" "call" "launch" "toggle"; } + Mod+E { spawn "nautilus"; } + Mod+Equal { spawn "bitwarden"; } + Mod+F { spawn "chromium"; } + Mod+H { focus-column-or-monitor-left; } + Mod+J { focus-window-down; } + Mod+K { focus-window-up; } + Mod+L { focus-column-or-monitor-right; } + Mod+R { switch-preset-column-width; } + Mod+Return { spawn "foot"; } + Mod+Shift+1 { spawn "tagctl" "toggle" "1"; } + Mod+Shift+2 { spawn "tagctl" "toggle" "2"; } + Mod+Shift+3 { spawn "tagctl" "toggle" "3"; } + Mod+Shift+4 { spawn "tagctl" "toggle" "4"; } + Mod+Shift+5 { spawn "tagctl" "toggle" "5"; } + Mod+Shift+6 { spawn "tagctl" "toggle" "6"; } + Mod+Shift+E { spawn "qs" "ipc" "call" "logout" "toggle"; } + Mod+Shift+H { move-column-left-or-to-monitor-left; } + Mod+Shift+L { move-column-right-or-to-monitor-right; } + Mod+Shift+Q { close-window; } + Mod+Shift+R { maximize-column; } + Mod+Shift+S { screenshot; } + Mod+Space { toggle-window-floating; } + XF86AudioLowerVolume { spawn "volumectl" "-u" "down"; } + XF86AudioMute { spawn "volumectl" "toggle-mute"; } + XF86AudioNext { spawn "playerctl" "next"; } + XF86AudioPlay { spawn "playerctl" "play-pause"; } + XF86AudioPrev { spawn "playerctl" "previous"; } + XF86AudioRaiseVolume { spawn "volumectl" "-u" "up"; } + XF86AudioStop { spawn "playerctl" "stop"; } +} +window-rule { + geometry-corner-radius 0.000000 10.000000 0.000000 10.000000 + clip-to-geometry true +} +xwayland-satellite { path "/nix/store/dqljjf1m5h6jscfgvc7q9kkn00mx0myj-xwayland-satellite-unstable-2025-08-07-e0d1dad/bin/xwayland-satellite"; } diff --git a/graphical/desktop/quickshell/assets/pathway-m.png b/graphical/desktop/quickshell/assets/pathway-m.png new file mode 100755 index 0000000..bcdd366 Binary files /dev/null and b/graphical/desktop/quickshell/assets/pathway-m.png differ diff --git a/graphical/shell/quickshell/assets/wallpaper.jpg b/graphical/desktop/quickshell/assets/wallpaper.jpg similarity index 100% rename from graphical/shell/quickshell/assets/wallpaper.jpg rename to graphical/desktop/quickshell/assets/wallpaper.jpg diff --git a/graphical/shell/quickshell/bink/Bink.qml b/graphical/desktop/quickshell/bink/Bink.qml similarity index 100% rename from graphical/shell/quickshell/bink/Bink.qml rename to graphical/desktop/quickshell/bink/Bink.qml diff --git a/graphical/shell/quickshell/launcher/Launcher.qml b/graphical/desktop/quickshell/launcher/Launcher.qml similarity index 98% rename from graphical/shell/quickshell/launcher/Launcher.qml rename to graphical/desktop/quickshell/launcher/Launcher.qml index 2a23a9e..8a90179 100644 --- a/graphical/shell/quickshell/launcher/Launcher.qml +++ b/graphical/desktop/quickshell/launcher/Launcher.qml @@ -111,7 +111,7 @@ Singleton { leftMargin: 10 } font { - family: "Inria Sans" + family: "MS W98 UI" pointSize: 12 } color: "#202e2f" @@ -205,7 +205,7 @@ Singleton { Text { font { - family: "Inria Sans" + family: "MS W98 UI" pointSize: 12 } color: "#ffab5b" diff --git a/graphical/desktop/quickshell/logout/Logout.qml b/graphical/desktop/quickshell/logout/Logout.qml new file mode 100644 index 0000000..c2d8283 --- /dev/null +++ b/graphical/desktop/quickshell/logout/Logout.qml @@ -0,0 +1,176 @@ +pragma ComponentBehavior: Bound + +import Quickshell +import QtQuick +import QtQuick.Controls +import Quickshell.Io +import Quickshell.Wayland + +Singleton { + id: topLevel + required property real width + required property real height + property real openTime: 600 + + Timer { + id: closeTimer + interval: topLevel.openTime + running: false + repeat: false + onTriggered: logoutData.active = false + } + + PersistentProperties { + id: logoutData + property bool open: false + property bool active: false + property real openness: 0 + property var buttons: [ + { + name: "Logout", + icon: "", + key: "e", + action: ["loginctl", "terminate-user", "1000"] + }, + { + name: "Suspend", + icon: "", + key: "s", + action: ["systemctl", "suspend"] + }, + { + name: "Shutdown", + icon: "", + key: "d", + action: ["systemctl", "poweroff"] + }, + { + name: "Reboot", + icon: "", + key: "r", + action: ["systemctl", "reboot"] + } + ] + + onOpenChanged: { + if (open) { + openness = 1.0; + logoutData.active = true; + } else { + openness = 0.0; + closeTimer.start(); + } + } + Behavior on openness { + NumberAnimation { + duration: topLevel.openTime + easing.type: Easing.InOutQuad + } + } + } + + IpcHandler { + target: "logout" + function open(): void { + logoutData.open = true; + } + function close(): void { + logoutData.open = false; + } + function toggle(): void { + logoutData.open = !logoutData.open; + } + } + + LazyLoader { + id: loader + activeAsync: logoutData.active + + WlrLayershell { + id: logoutBase + anchors { + top: true + bottom: true + right: true + left: true + } + + color: "transparent" + implicitWidth: topLevel.width + implicitHeight: topLevel.height + layer: WlrLayer.Overlay + namespace: "shell:logout" + keyboardFocus: WlrKeyboardFocus.Exclusive + focusable: true + exclusionMode: ExclusionMode.Ignore + + Rectangle { + id: gridParent + radius: 24 + implicitWidth: parent.width + color: "#1b2021" + border.color: "#ffab5b" + border.width: 2 + property var margins: { + "h": parent.width / 24, + "v": parent.height / 12 + } + property var dims: { + "h": (parent.width - margins.h) / 8, + "v": (parent.height - margins.v) / 8 + } + anchors { + fill: parent + leftMargin: 128 - topLevel.width * (1.0 - logoutData.openness) + rightMargin: 128 + topLevel.width * (1.0 - logoutData.openness) + margins: 128 + } + Column { + spacing: gridParent.margins.v + padding: gridParent.margins.v + + // horizontalItemAlignment: Grid.AlignHCenter + // verticalItemAlignment: Grid.AlignVCenter + anchors { + fill: parent + alignWhenCentered: true + // topMargin: gridParent.margins.v + // bottomMargin: gridParent.margins.v + } + Repeater { + model: logoutData.buttons.length + Button { + id: button + required property int index + + Process { + id: thisProcess + running: false + command: logoutData.buttons[button.index].action + } + + implicitWidth: gridParent.dims.h + implicitHeight: gridParent.dims.v + + font { + family: "MS W98 UI" + pointSize: 12 + } + background: Rectangle { + color: button.hovered ? "#ffb852" : "#272a2a" + border.color: "#ffab5b" + border.width: 2 + radius: 6 + } + text: logoutData.buttons[index].name + onClicked: { + logoutData.open = false; + thisProcess.running = true; + } + } + } + } + } + } + } +} diff --git a/graphical/shell/quickshell/noti/Noti.qml b/graphical/desktop/quickshell/noti/Noti.qml similarity index 100% rename from graphical/shell/quickshell/noti/Noti.qml rename to graphical/desktop/quickshell/noti/Noti.qml diff --git a/graphical/shell/quickshell/particle-test/particle-test.qml b/graphical/desktop/quickshell/particle-test/particle-test.qml similarity index 100% rename from graphical/shell/quickshell/particle-test/particle-test.qml rename to graphical/desktop/quickshell/particle-test/particle-test.qml diff --git a/graphical/shell/quickshell/rice/Colours.qml b/graphical/desktop/quickshell/rice/Colours.qml similarity index 100% rename from graphical/shell/quickshell/rice/Colours.qml rename to graphical/desktop/quickshell/rice/Colours.qml diff --git a/graphical/shell/quickshell/shell.qml b/graphical/desktop/quickshell/shell.qml similarity index 96% rename from graphical/shell/quickshell/shell.qml rename to graphical/desktop/quickshell/shell.qml index 43fb44e..aac9f74 100644 --- a/graphical/shell/quickshell/shell.qml +++ b/graphical/desktop/quickshell/shell.qml @@ -1,6 +1,7 @@ // components import "bink" as Bink import "launcher" as Launcher +import "logout" as Logout // singletons import "title" import "tags" @@ -30,7 +31,7 @@ ShellRoot { asynchronous: true width: 2560 height: 1440 - source: "assets/wallpaper.jpg" + source: "assets/pathway-m.png" } } } @@ -90,7 +91,7 @@ ShellRoot { TextMetrics { id: textInfo font { - family: "Inria Sans" + family: "MS W98 UI" pointSize: 12 } elideWidth: 550 @@ -126,7 +127,7 @@ ShellRoot { color: "transparent" Text { font { - family: "Inria Sans" + family: "MS W98 UI" pointSize: 12 } color: Colours.c.yellow_b @@ -233,4 +234,9 @@ ShellRoot { Launcher.Launcher { width: 190 } + + Logout.Logout { + width: 2560 + height: 1440 + } } diff --git a/graphical/shell/quickshell/tags/Tags.qml b/graphical/desktop/quickshell/tags/Tags.qml similarity index 100% rename from graphical/shell/quickshell/tags/Tags.qml rename to graphical/desktop/quickshell/tags/Tags.qml diff --git a/graphical/shell/quickshell/title/Title.qml b/graphical/desktop/quickshell/title/Title.qml similarity index 100% rename from graphical/shell/quickshell/title/Title.qml rename to graphical/desktop/quickshell/title/Title.qml diff --git a/graphical/dev.nix b/graphical/dev.nix index 08cbec2..2a9a995 100644 --- a/graphical/dev.nix +++ b/graphical/dev.nix @@ -1,27 +1,41 @@ { - pkgs, localPkgs, + scope, ... }: -{ +scope "user" { - home.packages = [ - pkgs.direnv + packages = [ localPkgs.rbw-helper ]; - hm.programs.direnv = { + programs.direnv = { enable = true; - nix-direnv = { - enable = true; - }; - enableFishIntegration = true; + integrations.fish.enable = true; }; - hm.programs.git = { + programs.git = { enable = true; - userName = "atagen"; - userEmail = "boss@atagen.co"; + settings = { + user = { + name = "atagen"; + email = "boss@atagen.co"; + }; + merge = { + conflictstyle = "diff3"; + }; + init = { + defaultBranch = "main"; + }; + url = { + "https://github.com/".insteadOf = "github:"; + "https://git.atagen.co/".insteadOf = "atagen:"; + }; + credential.helper = "rbw"; + }; + integrations = { + difftastic.enable = true; + }; }; } diff --git a/graphical/documents.nix b/graphical/documents.nix index 90fd644..8e6b270 100644 --- a/graphical/documents.nix +++ b/graphical/documents.nix @@ -4,7 +4,7 @@ getPkgs, ... }: -scope "home.packages" +scope "user.packages" <| getPkgs { inherit (pkgs) libreoffice diff --git a/graphical/editor.nix b/graphical/editor.nix index 94bf26d..884867f 100644 --- a/graphical/editor.nix +++ b/graphical/editor.nix @@ -4,4 +4,4 @@ scope, ... }: -scope "home.packages" [ inputs.zedless.packages.${pkgs.system}.default ] +scope "user.packages" [ inputs.zedless.packages.${pkgs.system}.default ] diff --git a/graphical/fm.nix b/graphical/fm.nix index 9697db1..dd8da05 100644 --- a/graphical/fm.nix +++ b/graphical/fm.nix @@ -4,7 +4,7 @@ getPkgs, ... }: -scope "home.packages" +scope "user.packages" <| getPkgs { inherit (pkgs) file-roller diff --git a/graphical/integrations.nix b/graphical/integrations.nix index 7697022..e2b0520 100644 --- a/graphical/integrations.nix +++ b/graphical/integrations.nix @@ -1,32 +1,23 @@ { pkgs, + lib, ... }: { - xdg.autostart.enable = true; - xdg.portal.enable = true; - - hm.xdg = { + xdg.autostart.enable = lib.mkForce false; + xdg.portal = { enable = true; - portal = - let - gtk = pkgs.xdg-desktop-portal-gtk; - gnome = pkgs.xdg-desktop-portal-gnome; - in - { - enable = true; - config = { - common = { - default = [ - "gnome" - ]; - }; - }; - extraPortals = [ - gnome - gtk + config = { + common = { + default = [ + "gnome" ]; }; + }; + extraPortals = [ + pkgs.xdg-desktop-portal-gtk + pkgs.xdg-desktop-portal-gnome + ]; }; environment.pathsToLink = [ diff --git a/graphical/logout.nix b/graphical/logout.nix deleted file mode 100644 index a1b9cf4..0000000 --- a/graphical/logout.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ - pkgs, - config, - scope, - ... -}: -let - inherit (config) rice; - pal = rice.palette.hex; - pkg = pkgs.wlogout; -in -scope "hm" { - programs.wlogout = { - enable = true; - package = pkg; - layout = builtins.fromJSON (builtins.readFile ./logout/layout); - style = - with pal; - (builtins.replaceStrings - [ - "/usr/share/wlogout" - "/etc/wlogout" - "#WINBG" - "#BTNCOL" - "#BTNBG" - "#BTNFOCUSBG" - "#WINLOGO" - ] - [ - "${pkg}/share/wlogout" - "${pkg}/etc/wlogout" - util.bg - bright.yellow - util.bg - normal.black - (builtins.path { - name = "winlogo"; - path = ../assets/winlogo.png; - sha256 = "7c1ff96b553c7a7ca3a7b7cf8efe830ab7feea92355aed288a10ee7347c24108"; - }) - ] - (builtins.readFile ./logout/style.css) - ); - }; - - home.packages = [ pkg ]; -} diff --git a/graphical/logout/layout b/graphical/logout/layout deleted file mode 100644 index b1cfff6..0000000 --- a/graphical/logout/layout +++ /dev/null @@ -1,38 +0,0 @@ -[ - { - "label" : "lock", - "action" : "loginctl lock-session", - "text" : "Lock", - "keybind" : "l" - }, - { - "label" : "logout", - "action" : "loginctl terminate-user $USER", - "text" : "Logout", - "keybind" : "e" - }, - { - "label" : "suspend", - "action" : "systemctl suspend", - "text" : "Suspend", - "keybind" : "s" - }, - { - "label" : "shutdown", - "action" : "systemctl poweroff", - "text" : "Shutdown", - "keybind" : "d" - }, - { - "label" : "reboot", - "action" : "systemctl reboot", - "text" : "Reboot", - "keybind" : "r" - }, - { - "label" : "windows", - "action" : "systemctl reboot --boot-loader-entry=auto-windows", - "text" : "Windows", - "keybind" : "w" - } -] diff --git a/graphical/logout/style.css b/graphical/logout/style.css deleted file mode 100644 index 4689381..0000000 --- a/graphical/logout/style.css +++ /dev/null @@ -1,48 +0,0 @@ -* { - background-image: none; -} -window { - background-color: #WINBG; -} -button { - color: #BTNCOL; - background-color: #BTNBG; - border-style: solid; - border-width: 2px; - background-repeat: no-repeat; - background-position: center; - background-size: 25%; -} - -button:focus, button:active, button:hover { - background-color: #BTNFOCUSBG; - outline-style: none; -} - -#lock { - background-image: image(url("/usr/share/wlogout/assets/lock.png"), url("/usr/local/share/wlogout/assets/lock.png")); -} - -#logout { - background-image: image(url("/usr/share/wlogout/assets/logout.png"), url("/usr/local/share/wlogout/assets/logout.png")); -} - -#suspend { - background-image: image(url("/usr/share/wlogout/assets/suspend.png"), url("/usr/local/share/wlogout/assets/suspend.png")); -} - -#hibernate { - background-image: image(url("/usr/share/wlogout/assets/hibernate.png"), url("/usr/local/share/wlogout/assets/hibernate.png")); -} - -#shutdown { - background-image: image(url("/usr/share/wlogout/assets/shutdown.png"), url("/usr/local/share/wlogout/assets/shutdown.png")); -} - -#reboot { - background-image: image(url("/usr/share/wlogout/assets/reboot.png"), url("/usr/local/share/wlogout/assets/reboot.png")); -} - -#windows { - background-image: image(url("#WINLOGO")) -} diff --git a/graphical/media.nix b/graphical/media.nix index 4b330bc..c2d0c4f 100644 --- a/graphical/media.nix +++ b/graphical/media.nix @@ -4,7 +4,7 @@ getPkgs, ... }: -scope "home.packages" +scope "user.packages" <| getPkgs { inherit (pkgs) mpv diff --git a/graphical/password-manager.nix b/graphical/password-manager.nix index 0225ac0..e71095c 100644 --- a/graphical/password-manager.nix +++ b/graphical/password-manager.nix @@ -1,14 +1,16 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: { - hm.programs.rbw = { - enable = true; - settings = { + user.xdg.config.files."rbw/config.json" = { + generator = lib.generators.toJSON { }; + value = { email = "boss@atagen.co"; - pinentry = pkgs.pinentry-gnome3; + pinentry = lib.getExe pkgs.pinentry-qt; base_url = "https://v.atagen.co"; }; }; - hm.programs.git.extraConfig.credential.helper = "rbw"; - home.packages = [ pkgs.bitwarden ]; + user.packages = [ + pkgs.rbw + pkgs.bitwarden + ]; } diff --git a/graphical/platform-themes.nix b/graphical/platform-themes.nix index ea1ada0..e9e2726 100644 --- a/graphical/platform-themes.nix +++ b/graphical/platform-themes.nix @@ -1,32 +1,31 @@ { pkgs, config, ... }: -let - inherit (config) rice; -in { - # for quickshell - qt.enable = true; - - home.packages = [ + user.packages = [ pkgs.gtk-engine-murrine ]; - hm.fonts.fontconfig.enable = true; - hm.qt = { + qt = { enable = true; - style.name = "adwaita-dark"; - platformTheme.name = "adwaita"; + style = "adwaita-dark"; + platformTheme = "gnome"; }; - hm.gtk = { - enable = true; - theme = { - inherit (rice.gtk-theme) package name; + user.misc.gtk = + let + inherit (config) rice; + in + { + enable = true; + packages = [ + rice.gtk-theme.package + rice.fonts.sans.package + rice.icons.package + ]; + settings = { + application-prefer-dark-theme = true; + font-name = "${rice.fonts.sans.name} ${builtins.toString rice.fonts.sans.size}"; + theme-name = rice.gtk-theme.name; + icon-theme-name = rice.icons.name; + }; }; - iconTheme = { - inherit (rice.icons) package name; - }; - font = { - inherit (rice.fonts.sans) size package name; - }; - }; } diff --git a/graphical/quick-services.nix b/graphical/quick-services.nix index 9e97a4b..1c2b140 100644 --- a/graphical/quick-services.nix +++ b/graphical/quick-services.nix @@ -4,56 +4,55 @@ ... }: { - config.hm.options = { - quickServices = - with lib; - mkOption { - type = with types; attrsOf str; - default = { }; - }; - - quickOneShots = - with lib; - mkOption { - type = with types; attrsOf str; - default = { }; - }; - # for specifying an additional systemd target - extraTarget = - with lib; - mkOption { - type = with types; listOf str; - default = [ ]; - }; + options = { + quick = { + services = + with lib; + mkOption { + type = with types; attrsOf str; + default = { }; + }; + oneShots = + with lib; + mkOption { + type = with types; attrsOf str; + default = { }; + }; + }; }; - config.hm.config = { + config = { systemd.user.services = builtins.mapAttrs (name: cmd: { - Unit = { + unitConfig = { Description = "${name}"; - Requires = [ "graphical-session.target" ] ++ config.hm.extraTarget; - After = [ "graphical-session.target" ] ++ config.hm.extraTarget; + Requires = [ + "graphical-session.target" + ]; + After = [ + "graphical-session.target" + "niri.target" + ]; }; - Service = { + serviceConfig = { ExecStart = cmd; }; - Install = { - WantedBy = [ "graphical-session.target" ] ++ config.hm.extraTarget; - }; - }) config.hm.quickServices + wantedBy = [ "graphical-session.target" ]; + }) config.quick.services // builtins.mapAttrs (name: cmd: { - Unit = { + unitConfig = { Description = "${name}"; - After = [ "graphical-session.target" ] ++ config.extraTarget; + Requires = [ "graphical-session.target" ]; + After = [ + "graphical-session.target" + "niri.target" + ]; }; - Service = { + serviceConfig = { ExecStart = cmd; Type = "oneshot"; }; - Install = { - WantedBy = [ "graphical-session.target" ] ++ config.extraTarget; - }; - }) config.hm.quickOneShots; + wantedBy = [ "graphical-session.target" ]; + }) config.quick.oneShots; }; } diff --git a/graphical/rice.nix b/graphical/rice.nix index 0150cba..57ec2d2 100644 --- a/graphical/rice.nix +++ b/graphical/rice.nix @@ -7,7 +7,7 @@ }: { - home.packages = + user.packages = let inherit (config.rice) icons cursor; in diff --git a/graphical/shell.nix b/graphical/shell.nix index 7467d9e..7e519fc 100644 --- a/graphical/shell.nix +++ b/graphical/shell.nix @@ -3,13 +3,11 @@ lib, inputs, mainUser, - config, getPkgs, ... }: let inherit (lib) getExe getExe'; - inherit (config) rice; in { # quickshell stuff @@ -25,24 +23,27 @@ in }) ]; - hm.systemd.user.services.quickshell = { - Unit.PartOf = [ "graphical-session.target" ]; - Unit.After = [ - "graphical-session.target" - "niri.service" - ]; - Install.WantedBy = [ "graphical-session.target" ]; - Service = { - ExecStart = "${getExe' (inputs.quickshell.packages.${pkgs.system}.default.override { - withHyprland = false; - withI3 = false; - }) "qs"}"; + systemd.user.services.quickshell = { + path = [ inputs.niri.packages.${pkgs.system}.niri-unstable ]; + unitConfig = { + Description = "Quickshell"; + Requires = [ + "graphical-session.target" + ]; + After = [ + "graphical-session.target" + "niri.target" + ]; }; + serviceConfig.ExecStart = "${getExe' (inputs.quickshell.packages.${pkgs.system}.default.override { + withHyprland = false; + withI3 = false; + }) "qs"}"; }; - hm.quickServices = { - "swaync" = "${getExe pkgs.swaynotificationcenter}"; - "swayidle" = + quick.services = { + swaync = "${getExe pkgs.swaynotificationcenter}"; + swayidle = let niri = inputs.niri.packages.${pkgs.system}.niri-unstable; systemctl = getExe' pkgs.systemd "systemctl"; @@ -54,23 +55,9 @@ in ''; }; - hm.systemd.user.targets.tray = { - Unit = { - Description = "Home Manager System Tray"; - Requires = [ "graphical-session.target" ]; - }; - }; - - imports = [ inputs.arbys.nixosModules.arbys ]; - environment = { - arbys = { - enable = true; - clobber = true; - }; - files."/home/${mainUser}/.config/quickshell" = { - source = "/home/${mainUser}/.nix/graphical/shell/quickshell"; - uid = 1000; - gid = 100; - }; + environment.files."/home/${mainUser}/.config/quickshell" = { + source = "/home/${mainUser}/.nix/graphical/desktop/quickshell"; + uid = 1000; + gid = 100; }; } diff --git a/graphical/udisks.nix b/graphical/udisks.nix index 4f2ad7a..936debe 100644 --- a/graphical/udisks.nix +++ b/graphical/udisks.nix @@ -1,17 +1,21 @@ { lib, pkgs, ... }: { services.udisks2.enable = true; - hm.services.udiskie.enable = true; # fix reliance on nonexistent graphical-session-pre.target - hm.systemd.user.services.udiskie = lib.mkForce { - Unit = { + systemd.user.services.udiskie = { + unitConfig = { Description = "udiskie mount daemon"; - After = [ ]; - PartOf = [ "graphical-session.target" ]; + After = [ + "graphical-session.target" + "niri.target" + ]; + PartOf = [ + "sysinit-reactivation.target" + "graphical-session.target" + ]; }; + serviceConfig.ExecStart = [ (lib.getExe' pkgs.udiskie "udiskie") ]; - Service.ExecStart = [ "${pkgs.udiskie}/bin/udiskie --appindicator" ]; - - Install.WantedBy = [ "graphical-session.target" ]; + wantedBy = [ "graphical-session.target" ]; }; } diff --git a/graphical/webapps.nix b/graphical/webapps.nix deleted file mode 100644 index 4559686..0000000 --- a/graphical/webapps.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ config, ... }: -{ - imports = [ - ./webapps/firefox-webapp.nix - ]; - hm.programs.firefox.webapps = { - "Open-WebUI" = { - url = "http://127.0.0.1:8088"; - extraSettings = config.hm.programs.firefox.profiles.default.settings; - name = "Open-WebUI"; - icon = ../assets/openwebui.png; - }; - }; -} diff --git a/graphical/webapps/firefox-webapp.nix b/graphical/webapps/firefox-webapp.nix deleted file mode 100644 index e78d120..0000000 --- a/graphical/webapps/firefox-webapp.nix +++ /dev/null @@ -1,260 +0,0 @@ -{ - config, - lib, - ... -}: -let - inherit (builtins) getAttr stringLength substring; - inherit (lib) - mkOption - getExe - listToAttrs - attrsToList - imap - ; - inherit (lib.attrsets) - mapAttrs - mapAttrs' - nameValuePair - ; - inherit (lib.strings) concatStringsSep toUpper; - - enumerate = - a: - listToAttrs ( - imap ( - id: - { - name, - value, - }: - { - inherit name; - value = value // { - inherit id; - }; - } - ) (attrsToList a) - ); - make-app-profiles = - cfg: - mapAttrs' ( - name: cfg: - nameValuePair "home-manager-webapp-${name}" { - inherit (cfg) id; - userChrome = '' - @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); - - browser { - margin-right: 0px; margin-bottom: 0px; - } - - #TabsToolbar { - visibility: collapse !important; - } - - #nav-bar { - margin-top: 0; - margin-bottom: -42px; - z-index: -100; - } - - #main-window[windowtype="navigator:browser"] { - background-color: transparent !important; - } - - .tab-background[selected="true"] { - background: ${cfg.backgroundColor} !important; - } - ''; - - settings = cfg.extraSettings // { - "browser.startup.homepage" = builtins.toString cfg.url; - "browser.sessionstore.resume_session_once" = false; - "browser.sessionstore.resume_from_crash" = false; - "browser.cache.disk.enable" = false; - "browser.cache.disk.capacity" = 0; - "browser.cache.disk.filesystem_reported" = 1; - "browser.cache.disk.smart_size.enabled" = false; - "browser.cache.disk.smart_size.first_run" = false; - "browser.cache.disk.smart_size.use_old_max" = false; - "browser.ctrlTab.previews" = true; - "browser.tabs.warnOnClose" = false; - "plugin.state.flash" = 2; - "toolkit.legacyUserProfileCustomizations.stylesheets" = true; - "browser.tabs.drawInTitlebar" = false; - "browser.tabs.inTitlebar" = 0; - "browser.contentblocking.category" = "strict"; - "network.cookie.lifetimePolicy" = 0; - "layout.css.prefers-color-scheme.content-override" = getAttr cfg.theme { - dark = 0; - light = 1; - system = 2; - }; - }; - } - ) cfg; -in -{ - config.hm.options.programs.firefox.webapps = mkOption { - default = { }; - - type = - with lib.types; - attrsOf (submodule { - options = { - #################### - # Firefox settings # - #################### - url = mkOption { - type = str; - description = "The URL of the webapp to launch."; - }; - - # id = mkOption { - # type = int; - # description = "The Firefox profile ID to set."; - # }; - - hidden = mkOption { - type = bool; - description = "Hide this webapp from the list of applications (but still generate a .desktop file)."; - default = false; - }; - - extraArgs = mkOption { - type = listOf str; - default = [ ]; - description = "Extra args to launch Firefox with."; - }; - - extraSettings = mkOption { - type = attrsOf (either bool (either int str)); - default = { }; - description = "Additional Firefox profile settings."; - }; - - backgroundColor = mkOption { - type = str; - default = "rgba(0, 0, 0, 0)"; - description = "The background color to use for loading pages."; - }; - - theme = mkOption { - type = enum [ - "dark" - "light" - "system" - ]; - default = "system"; - description = "The application CSS theme to use, if supported."; - }; - - ######################### - # Desktop file settings # - ######################### - - # Copied from xdg.desktopEntries, with slight modification for default settings - name = mkOption { - type = nullOr str; - default = null; - description = "Specific name of the application. Defaults to the capitalized attribute name."; - }; - - mimeType = mkOption { - description = "The MIME type(s) supported by this application."; - type = nullOr (listOf str); - default = [ - "text/html" - "text/xml" - "application/xhtml_xml" - ]; - }; - - # Copied verbatim from xdg.desktopEntries. - genericName = mkOption { - type = nullOr str; - default = null; - description = "Generic name of the application."; - }; - - comment = mkOption { - type = nullOr str; - default = null; - description = "Tooltip for the entry."; - }; - - categories = mkOption { - type = nullOr (listOf str); - default = null; - description = "Categories in which the entry should be shown in a menu."; - }; - - icon = mkOption { - type = nullOr (either str path); - default = null; - description = "Icon to display in file manager, menus, etc."; - }; - - prefersNonDefaultGPU = mkOption { - type = nullOr bool; - default = null; - description = '' - If true, the application prefers to be run on a more - powerful discrete GPU if available. - ''; - }; - }; - }); - - description = "Websites to create special site-specific Firefox instances for."; - }; - - config.hm.config = { - programs.firefox.profiles = make-app-profiles (enumerate config.hm.programs.firefox.webapps); - - xdg.desktopEntries = mapAttrs (name: cfg: { - inherit (cfg) - genericName - comment - categories - icon - mimeType - prefersNonDefaultGPU - ; - - name = - if cfg.name == null then - (toUpper (substring 0 1 name)) + (substring 1 (stringLength name) name) - else - cfg.name; - - startupNotify = true; - terminal = false; - type = "Application"; - - exec = concatStringsSep " " ( - [ - "${getExe config.hm.programs.firefox.package}" - "--name" - "${name}" - "--app-id" - "${name}" - "--class" - "${name}" - "-P" - "${config.hm.programs.firefox.profiles."home-manager-webapp-${name}".path}" - "--no-remote" - ] - ++ cfg.extraArgs - ++ [ "${cfg.url}" ] - ); - - settings = { - X-MultipleArgs = "false"; # Consider enabling, don't know what this does - StartupWMClass = "${name}"; - NoDisplay = lib.boolToString cfg.hidden; - }; - }) config.hm.programs.firefox.webapps; - }; -} diff --git a/graphical/webapps/local-webapp.nix b/graphical/webapps/local-webapp.nix deleted file mode 100644 index 25d1268..0000000 --- a/graphical/webapps/local-webapp.nix +++ /dev/null @@ -1,252 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: -let - inherit (lib) - mkOption - mkForce - getExe - getExe' - listToAttrs - flatten - mapAttrsToList - mapAttrs - mapAttrs' - nameValuePair - toLower - replaceStrings - concatMapStringsSep - ; - partOf = cfg: "${replaceStrings [ " " ] [ "-" ] (toLower cfg.name)}.target"; - # make a firefox webapp + hidden .desktop entry for the client app - make-firefox = - cfg: - mapAttrs' ( - name: cfg: - nameValuePair "${name}-client" { - inherit (cfg) name; - url = "http://127.0.0.1:${builtins.toString cfg.port}"; - extraSettings = config.hm.programs.firefox.profiles.default.settings; - hidden = true; - } - ) cfg; - # make a systemd service for running the frontend - make-systemd-service = - cfg: - mapAttrs' ( - name: cfg: - if (cfg.service != null) then - nameValuePair "${cfg.name}-frontend" { - Unit = { - Description = "${cfg.name} Frontend"; - WantedBy = mkForce [ ]; - }; - - Service = cfg.service; - } - else - nameValuePair "" { } - ) cfg; - # modify systemd units to be PartOf this target - modify-systemd-services = - cfg: - listToAttrs ( - flatten ( - mapAttrsToList ( - name: cfg: - (map (req: { - name = "${req}"; - value = { - Unit = { - PartOf = partOf cfg; - }; - }; - }) cfg.requires.services) - ) cfg - ) - ); - modify-quadlets = - cfg: - listToAttrs ( - flatten ( - mapAttrsToList ( - name: cfg: - (map (req: { - name = "${req}"; - value = { - extraConfig.Unit.PartOf = partOf cfg; - }; - }) cfg.requires.containers) - ) cfg - ) - ); - # make a systemd target to collate dependencies - make-systemd-target = - cfg: - mapAttrs (name: cfg: { - Unit = { - Description = "${cfg.name} Target"; - WantedBy = mkForce [ ]; - Requires = - (map (req: req + ".service") cfg.requires.services) - ++ (map (req: "podman-" + req + ".service") cfg.requires.containers); - }; - }) cfg; - # make desktop shortcuts and a script which will handle starting everything - make-xdg = - cfg: - mapAttrs (name: cfg: { - inherit (cfg) name icon genericName; - type = "Application"; - exec = "${ - let - notify-send = "${getExe' pkgs.libnotify "notify-send"} -a \"${cfg.name}\""; - systemctl = "${getExe' pkgs.systemd "systemctl"}"; - dex = "${getExe pkgs.dex}"; - podman = "${getExe pkgs.podman}"; - makeContainerCheck = - container: ''[ "$(${podman} inspect -f {{.State.Health.Status}} ${container})" == "healthy" ]''; - # makeContainerCheck = container: '' - # [ ${podman} inspect -f {{.State.Status}} ${container})" != "running" ] - # ''; - containerChecks = - if (cfg.requires.containers != [ ]) then - '' - container_checks() { - if '' - + (concatMapStringsSep " && " makeContainerCheck cfg.requires.containers) - + '' - ; then - return 0 - else - return 1 - fi - } - '' - else - '' - container_checks() { - return 0 - } - ''; - in - pkgs.writeShellScript "${name}" '' - set -euo pipefail - - exit_error() { - ${notify-send} -w "Failure" $1 - exit 1 - } - - ${containerChecks} - - ${notify-send} "Launching ${name} backend.." "Please be patient." - ${systemctl} --user start ${name}.target || exit_error "Failed to launch!" - - checks=0 - until container_checks; do - sleep 2 - checks=$((checks+1)) - if [ $((checks%10)) -eq 0 ]; then - ${notify-send} "Waiting for backend." - fi - if [ $checks -ge 60 ]; then - ${systemctl} --no-block --user stop ${name}.target - exit_error "Failed to launch!" - fi - done - - ${notify-send} "Launching ${name}.." - ${dex} -w ~/.nix-profile/share/applications/${name}-client.desktop - - ${notify-send} "Goodbye" "Shutting down." - ${systemctl} --user stop ${name}.target - exit 0 - '' - }"; - }) cfg; - cfg = config.hm.localWebApps; -in -{ - config.hm.options.localWebApps = mkOption { - default = { }; - type = - with lib.types; - attrsOf (submodule { - options = { - name = mkOption { - type = str; - description = "Display name of the webapp."; - }; - - genericName = mkOption { - type = nullOr str; - description = "Generic name of the webapp."; - default = null; - }; - - icon = mkOption { - type = nullOr (either str path); - description = "Path to a file to use for application icon."; - default = null; - }; - - requires = mkOption { - type = nullOr (submodule { - options = { - containers = mkOption { - type = listOf str; - default = [ ]; - }; - services = mkOption { - type = listOf str; - default = [ ]; - }; - }; - }); - default = null; - description = "Containers or services this app requires."; - }; - - service = mkOption { - type = nullOr (submodule { - options = { - execStartPre = mkOption { - type = nullOr str; - default = null; - }; - execStart = mkOption { - type = nullOr str; - default = null; - }; - execStop = mkOption { - type = nullOr str; - default = null; - }; - }; - }); - default = null; - description = "Submodule containing exec[StartPre/Start/Stop] commands for any required systemd service"; - }; - - port = mkOption { - type = int; - description = "Local port the webapp should host on."; - }; - }; - }); - }; - - config.hm.config = { - programs.firefox.webapps = make-firefox cfg; - - systemd.user.targets = make-systemd-target cfg; - systemd.user.services = (make-systemd-service cfg) // (modify-systemd-services cfg); - services.podman.containers = modify-quadlets cfg; - - xdg.desktopEntries = make-xdg cfg; - }; -} diff --git a/graphical/wm.nix b/graphical/wm.nix index cd0f641..675bf34 100644 --- a/graphical/wm.nix +++ b/graphical/wm.nix @@ -1,74 +1,25 @@ { pkgs, - lib, + # lib, mainUser, inputs, - config, + # config, ... }: -let - inherit (config) rice; -in +# let +# inherit (config) rice; +# in { imports = [ inputs.niri.nixosModules.niri inputs.niri-tag.nixosModules.niri-tag ]; - hm.programs.niri.settings = { - input = { - warp-mouse-to-focus.enable = true; - }; - cursor = { - hide-after-inactive-ms = 5000; - hide-when-typing = true; - size = 16; - theme = rice.cursor.name; - }; - layout = { - always-center-single-column = true; - gaps = config.rice.borders.gaps; - default-column-width.proportion = 0.5; - preset-column-widths = map (p: { proportion = p; }) [ - (2.0 / 3.0) - 0.5 - (1.0 / 3.0) - ]; - focus-ring = - let - pal = rice.palette.hex; - in - { - active = { - color = pal.bright.yellow; - }; - inactive = { - color = pal.normal.black; - }; - }; - }; - prefer-no-csd = true; - hotkey-overlay.skip-at-startup = true; - window-rules = - let - v = 10.0; - in - [ - { - geometry-corner-radius = { - bottom-left = v; - bottom-right = 0.0; - top-left = 0.0; - top-right = v; - }; - clip-to-geometry = true; - } - ]; - xwayland-satellite = { - enable = true; - path = lib.getExe inputs.niri.packages.${pkgs.system}.xwayland-satellite-unstable; - }; - }; - + # user.desktops.niri = { + # enable = true; + # configFile = ./desktop/niri-config.kdl; + # }; + user.xdg.config.files."niri/config.kdl".source = ./desktop/niri-config.kdl; + user.packages = [ inputs.niri.packages.${pkgs.system}.niri-unstable ]; services.greetd = { enable = true; restart = false; @@ -91,3 +42,62 @@ in services.niri-tag.enable = true; } + +# old hm config, TODO template from this +# { +# values = { +# input = { +# warp-mouse-to-focus.enable = true; +# }; +# cursor = { +# hide-after-inactive-ms = 5000; +# hide-when-typing = true; +# size = 16; +# theme = rice.cursor.name; +# }; +# layout = { +# always-center-single-column = true; +# gaps = config.rice.borders.gaps; +# default-column-width.proportion = 0.5; +# preset-column-widths = map (p: { proportion = p; }) [ +# (2.0 / 3.0) +# 0.5 +# (1.0 / 3.0) +# ]; +# focus-ring = +# let +# pal = rice.palette.hex; +# in +# { +# active = { +# color = pal.bright.yellow; +# }; +# inactive = { +# color = pal.normal.black; +# }; +# }; +# }; +# prefer-no-csd = true; +# hotkey-overlay.skip-at-startup = true; +# window-rules = +# let +# v = 10.0; +# in +# [ +# { +# geometry-corner-radius = { +# bottom-left = v; +# bottom-right = 0.0; +# top-left = 0.0; +# top-right = v; +# }; +# clip-to-geometry = true; +# } +# ]; +# xwayland-satellite = { +# enable = true; +# path = lib.getExe inputs.niri.packages.${pkgs.system}.xwayland-satellite-unstable; +# }; +# }; +# } +# diff --git a/hosts/quiver/input.nix b/hosts/quiver/input.nix index c5e6399..e44d52e 100644 --- a/hosts/quiver/input.nix +++ b/hosts/quiver/input.nix @@ -7,7 +7,7 @@ accelSpeed = 0.0; }; - hm.quickServices = { + quick.services = { ckb-next = "${lib.getExe pkgs.ckb-next} -c -b"; }; } diff --git a/hosts/quiver/outputs.nix b/hosts/quiver/outputs.nix index 90e7e17..855068b 100644 --- a/hosts/quiver/outputs.nix +++ b/hosts/quiver/outputs.nix @@ -1,11 +1,14 @@ -{ scope, ... }: -scope "hm.programs.niri.settings.outputs" { - "DP-1" = { - transform.rotation = 90; - scale = 1; - }; - "DP-2" = { - variable-refresh-rate = true; - scale = 1; - }; -} +# TODO replace with hjem-rum config +# +# { scope, ... }: +# scope "hm.programs.niri.settings.outputs" { +# "DP-1" = { +# transform.rotation = 90; +# scale = 1; +# }; +# "DP-2" = { +# variable-refresh-rate = true; +# scale = 1; +# }; +# } +_: { } diff --git a/hosts/quiver/stateversion.nix b/hosts/quiver/stateversion.nix index aee74e5..5fe7dd2 100644 --- a/hosts/quiver/stateversion.nix +++ b/hosts/quiver/stateversion.nix @@ -1,5 +1,4 @@ { ... }: { system.stateVersion = "22.11"; - hm.home.stateVersion = "22.11"; } diff --git a/lib/create.nix b/lib/create.nix index ffc7a5f..dc85f97 100644 --- a/lib/create.nix +++ b/lib/create.nix @@ -13,6 +13,7 @@ in specialArgs = { inherit inputs; inherit (info) system; + # annoyingly, this is the only dependency on `system` from the entrypoint localPkgs = lib.packagesFromDirectoryRecursive { inherit (inputs.nixpkgs.legacyPackages.${info.system}) callPackage; directory = ../pkgs; @@ -22,10 +23,22 @@ in getPkgs = builtins.attrValues; }; modules = [ - inputs.home-manager.nixosModules.home-manager + inputs.arbys.nixosModules.arbys inputs.hjem.nixosModules.hjem - (lib.mkAliasOptionModule [ "hm" ] [ "home-manager" "users" info.username ]) - (lib.mkAliasOptionModule [ "home" ] [ "hjem" "users" info.username ]) + ({ scope, ... }: scope "hjem" { + users.${info.username}.enable = true; + extraModules = [ + inputs.hjem-rum.hjemModules.hjem-rum + ] + # alias base hjem options to `rum` so we can alias them all together after + ++ (map (f: lib.mkAliasOptionModule [ "rum" f ] [ f ]) [ + "packages" + "files" + "xdg" + ]); + }) + # alias hjem-rum options to `user` + (lib.mkAliasOptionModule [ "user" ] [ "hjem" "users" info.username "rum" ]) ] ++ (recursivelyImport info.imports); }