diff --git a/flake.lock b/flake.lock index b988ac7..743b63f 100644 --- a/flake.lock +++ b/flake.lock @@ -45,11 +45,11 @@ ] }, "locked": { - "lastModified": 1716080827, - "narHash": "sha256-2R9LBCR8TlMuK4Md9ELwPVuwRQWI3pAh7Nj9e318Hk4=", + "lastModified": 1718078026, + "narHash": "sha256-LbQabH6h86ZzTvDnaZHmMwedRZNB2jYtUQzmoqWQoJ8=", "owner": "ipetkov", "repo": "crane", - "rev": "a7146b04405d93b24a1bac76d93270787872c8be", + "rev": "a3f0c63eed74a516298932b9b1627dd80b9c3892", "type": "github" }, "original": { @@ -89,11 +89,11 @@ }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1716523398, - "narHash": "sha256-21xkaFKGaemklawPst+6FDcJUTaHYWBkJSVnreJEnRU=", + "lastModified": 1718078599, + "narHash": "sha256-M9mpMKEkbUlABh5oWPfECo3fxkNICUDnZtS5nRUcLas=", "owner": "rycee", "repo": "nur-expressions", - "rev": "c90137a4cd0e332ebd1f5f8051863d28eba45fdc", + "rev": "ae1539401cb36215599e079ee3d41c50895c4307", "type": "gitlab" }, "original": { @@ -110,11 +110,11 @@ ] }, "locked": { - "lastModified": 1715865404, - "narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=", + "lastModified": 1717285511, + "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9", + "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", "type": "github" }, "original": { @@ -194,7 +194,7 @@ }, "flake-utils_3": { "inputs": { - "systems": "systems_8" + "systems": "systems_7" }, "locked": { "lastModified": 1710146030, @@ -212,7 +212,7 @@ }, "flake-utils_4": { "inputs": { - "systems": "systems_9" + "systems": "systems_8" }, "locked": { "lastModified": 1701680307, @@ -230,7 +230,7 @@ }, "flake-utils_5": { "inputs": { - "systems": "systems_12" + "systems": "systems_11" }, "locked": { "lastModified": 1710146030, @@ -256,11 +256,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1716520196, - "narHash": "sha256-OdZe7n3+cHUnN3Lq5Ou89OEJq0kMdbnFMJeKCE+CFnc=", + "lastModified": 1718059146, + "narHash": "sha256-NRTN1Fxlj6upu68uD1ajANd6OEPzprgq65Z3hTzGV7A=", "owner": "helix-editor", "repo": "helix", - "rev": "f1c9580e4b636d014fefb61080d8d019c14e37b7", + "rev": "265608a3d8d0497fbbec86721fdd548931132839", "type": "github" }, "original": { @@ -276,11 +276,11 @@ ] }, "locked": { - "lastModified": 1716457508, - "narHash": "sha256-ZxzffLuWRyuMrkVVq7wastNUqeO0HJL9xqfY1QsYaqo=", + "lastModified": 1717931644, + "narHash": "sha256-Sz8Wh9cAiD5FhL8UWvZxBfnvxETSCVZlqWSYWaCPyu0=", "owner": "nix-community", "repo": "home-manager", - "rev": "850cb322046ef1a268449cf1ceda5fd24d930b05", + "rev": "3d65009effd77cb0d6e7520b68b039836a7606cf", "type": "github" }, "original": { @@ -376,18 +376,25 @@ }, "hyprlang_2": { "inputs": { + "hyprutils": [ + "hyprlock", + "hyprutils" + ], "nixpkgs": [ "hyprlock", "nixpkgs" ], - "systems": "systems_4" + "systems": [ + "hyprlock", + "systems" + ] }, "locked": { - "lastModified": 1713121246, - "narHash": "sha256-502X0Q0fhN6tJK7iEUA8CghONKSatW/Mqj4Wappd++0=", + "lastModified": 1717881852, + "narHash": "sha256-XeeVoKHQgfKuXoP6q90sUqKyl7EYy3ol2dVZGM+Jj94=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "78fcaa27ae9e1d782faa3ff06c8ea55ddce63706", + "rev": "ec6938c66253429192274d612912649a0cfe4d28", "type": "github" }, "original": { @@ -399,7 +406,7 @@ "hyprlang_3": { "inputs": { "nixpkgs": "nixpkgs_4", - "systems": "systems_6" + "systems": "systems_5" }, "locked": { "lastModified": 1713121246, @@ -421,7 +428,7 @@ "xdg-portal-hyprland", "nixpkgs" ], - "systems": "systems_10" + "systems": "systems_9" }, "locked": { "lastModified": 1713121246, @@ -440,15 +447,16 @@ "hyprlock": { "inputs": { "hyprlang": "hyprlang_2", + "hyprutils": "hyprutils", "nixpkgs": "nixpkgs_3", - "systems": "systems_5" + "systems": "systems_4" }, "locked": { - "lastModified": 1716461934, - "narHash": "sha256-5j/GfBVkgqGTlEA7s/6CBn0pKK6ohXQi38lkKeno/mA=", + "lastModified": 1717883389, + "narHash": "sha256-2A4Q56JFd3t9j3Xpa0kxw2fjv8nNqgNBOA34rRcLA8I=", "owner": "hyprwm", "repo": "hyprlock", - "rev": "972c1c27e6b057e5e891b6ae9f5b2c83bac1e087", + "rev": "c5b8ad03d03ddbd2b0ff8615c2f6dba31374b6a8", "type": "github" }, "original": { @@ -461,14 +469,14 @@ "inputs": { "hyprlang": "hyprlang_3", "nixpkgs": "nixpkgs_5", - "systems": "systems_7" + "systems": "systems_6" }, "locked": { - "lastModified": 1716311836, - "narHash": "sha256-HWsl4uUqEOvrvm8QCNKJWBP2xB3irsy+xMvyvLVHITk=", + "lastModified": 1717919427, + "narHash": "sha256-50HWM67p81v+dhvcOS0UFQiPGh8McUHs40UGqkz6s9I=", "owner": "hyprwm", "repo": "hyprpaper", - "rev": "678d0e8959cf7adbc3825d578595e82305573991", + "rev": "f4abf5902f3f0c51d2aab8a521f7c1b1b08afd64", "type": "github" }, "original": { @@ -477,6 +485,31 @@ "type": "github" } }, + "hyprutils": { + "inputs": { + "nixpkgs": [ + "hyprlock", + "nixpkgs" + ], + "systems": [ + "hyprlock", + "systems" + ] + }, + "locked": { + "lastModified": 1717881334, + "narHash": "sha256-a0inRgJhPL6v9v7RPM/rx1kbXdfe3xJA1c9z0ZkYnh4=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "0693f9398ab693d89c9a0aa3b3d062dd61b7a60e", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, "nh": { "inputs": { "nixpkgs": [ @@ -484,11 +517,11 @@ ] }, "locked": { - "lastModified": 1714905986, - "narHash": "sha256-Vj7iFkLrd7MDeeMVVol5uHTcaLwDq4a3vNx+6Sy1FLU=", + "lastModified": 1717227663, + "narHash": "sha256-f6wh1HMkW7Ks9PKOsS95odyCjZOMuiK6B9NJTRsMApg=", "owner": "viperML", "repo": "nh", - "rev": "127a23c82aa41091e97466092d2547c08c2a9a9d", + "rev": "0d76479fcdec0243ea560d1e2fde854337787e3a", "type": "github" }, "original": { @@ -506,11 +539,11 @@ "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1714571717, - "narHash": "sha256-o4tqlTzi9kcVub167kTGXgCac9jM3kW4+v9MH/ue4Hk=", + "lastModified": 1717086091, + "narHash": "sha256-GmsEQa4HZeMfec37LZnwG/Lt/XmqFLXsjv5QWojeNiM=", "owner": "oxalica", "repo": "nil", - "rev": "2f3ed6348bbf1440fcd1ab0411271497a0fbbfa4", + "rev": "ab3ddb8f063774cf7e22eb610f5ecfdb77309f3c", "type": "github" }, "original": { @@ -568,11 +601,11 @@ ] }, "locked": { - "lastModified": 1717297675, - "narHash": "sha256-43UmlS1Ifx17y93/Vc258U7bOlAAIZbu8dsGDHOIIr0=", + "lastModified": 1718011381, + "narHash": "sha256-sFXI+ZANp/OC+MwfJoZgPSf4xMdtzQMe1pS3FGti4C8=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "972a52bee3991ae1f1899e6452e0d7c01ee566d9", + "rev": "88ad3d7501e22b2401dd72734b032b7baa794434", "type": "github" }, "original": { @@ -697,11 +730,11 @@ }, "nixpkgs-small": { "locked": { - "lastModified": 1716479278, - "narHash": "sha256-2eh7rYxQOntkUjFXtlPH7lBuUDd4isu/YHRjNJW7u1Q=", + "lastModified": 1718083092, + "narHash": "sha256-EQsPXycAbmby4meQUNLYfFaGOiqz2J9AlwFRV4UiHnY=", "owner": "Nixos", "repo": "nixpkgs", - "rev": "2ee89d5a0167a8aa0f2a5615d2b8aefb1f299cd4", + "rev": "aa1ebdaf49a606e21c06e0f6ed7aece9a41831c3", "type": "github" }, "original": { @@ -713,11 +746,11 @@ }, "nixpkgs_10": { "locked": { - "lastModified": 1716097317, - "narHash": "sha256-1UMrLtgzielG/Sop6gl6oTSM4pDt7rF9j9VuxhDWDlY=", + "lastModified": 1717893485, + "narHash": "sha256-WMU6ZRZrBgEUDIF0siu2aIyVAXcxfElSwzZtS/mSpN4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8535fb92661f37ff9f0da3007fbc942f7d134b41", + "rev": "3bcedce9f4de37570242faf16e1e143583407eab", "type": "github" }, "original": { @@ -745,11 +778,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1712963716, - "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "lastModified": 1717602782, + "narHash": "sha256-pL9jeus5QpX5R+9rsp3hhZ+uplVHscNJh8n8VpqscM0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "rev": "e8057b67ebf307f01bdcc8fba94d94f75039d1f6", "type": "github" }, "original": { @@ -809,11 +842,11 @@ }, "nixpkgs_7": { "locked": { - "lastModified": 1716330097, - "narHash": "sha256-8BO3B7e3BiyIDsaKA0tY8O88rClYRTjvAp66y+VBUeU=", + "lastModified": 1717974879, + "narHash": "sha256-GTO3C88+5DX171F/gVS3Qga/hOs/eRMxPFpiHq2t+D8=", "owner": "Nixos", "repo": "nixpkgs", - "rev": "5710852ba686cc1fd0d3b8e22b3117d43ba374c2", + "rev": "c7b821ba2e1e635ba5a76d299af62821cbcb09f3", "type": "github" }, "original": { @@ -987,11 +1020,11 @@ ] }, "locked": { - "lastModified": 1714529851, - "narHash": "sha256-YMKJW880f7LHXVRzu93xa6Ek+QLECIu0IRQbXbzZe38=", + "lastModified": 1717035469, + "narHash": "sha256-MzH+yjKULH3HCRj9QCTwBvqq4LZkR0ZqRE/QfGOGC2E=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "9ca720fdcf7865385ae3b93ecdf65f1a64cb475e", + "rev": "095702e63a40e86f339d11864da9dc965b70a01e", "type": "github" }, "original": { @@ -1012,11 +1045,11 @@ ] }, "locked": { - "lastModified": 1716085073, - "narHash": "sha256-3+9gI93XxszWA2+9S2xZfws1QArPX/MC6nahOGpcMB4=", + "lastModified": 1718072316, + "narHash": "sha256-p33h73iQ1HkLalCplV5MH0oP3HXRaH3zufnFqb5//ps=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "cfc8776011bd83508324115d353222475e1601c0", + "rev": "bedc47af18fc41bb7d2edc2b212d59ca36253f59", "type": "github" }, "original": { @@ -1072,21 +1105,6 @@ } }, "systems_11": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_12": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1178,16 +1196,16 @@ }, "systems_7": { "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default-linux", + "repo": "default", "type": "github" } }, @@ -1208,16 +1226,16 @@ }, "systems_9": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default", + "repo": "default-linux", "type": "github" } }, @@ -1268,14 +1286,14 @@ "hyprland-protocols": "hyprland-protocols", "hyprlang": "hyprlang_4", "nixpkgs": "nixpkgs_9", - "systems": "systems_11" + "systems": "systems_10" }, "locked": { - "lastModified": 1716290197, - "narHash": "sha256-1u9Exrc7yx9qtES2brDh7/DDZ8w8ap1nboIOAtCgeuM=", + "lastModified": 1717918856, + "narHash": "sha256-I38bmPLqamvOfVSArd1hhZtkVRAYBK38fOHZCU1P9Qg=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "91e48d6acd8a5a611d26f925e51559ab743bc438", + "rev": "72907822c19afc0983c69d59d299204381623725", "type": "github" }, "original": { @@ -1292,11 +1310,11 @@ "rust-overlay": "rust-overlay_3" }, "locked": { - "lastModified": 1716477488, - "narHash": "sha256-uOw+L0rrppQqhus1X49v3AnTGfU49HB4IVdpQ+pUEjc=", + "lastModified": 1718092736, + "narHash": "sha256-UO2+Lfgv0qBlOW1oddarZV5OEufm+Im5RMqbGdJHvGI=", "owner": "dj95", "repo": "zjstatus", - "rev": "61b35de31ab03a4de317c8bd8be1f6922a52e823", + "rev": "eed126b31e7a94d16bc4aa7ef5c2d81e45a28569", "type": "github" }, "original": { diff --git a/home/modules/appearance/wallpaper.nix b/home/modules/appearance/wallpaper.nix index 9fd5649..2e8b3ca 100644 --- a/home/modules/appearance/wallpaper.nix +++ b/home/modules/appearance/wallpaper.nix @@ -4,11 +4,11 @@ let inherit (lib) mkDefault mkIf; monitors = osConfig.ooknet.host.hardware.monitors; - cfg = config.ooknet.theme.wallpaper; + cfg = config.ooknet.wallpaper; in { config = mkIf cfg.enable { - ooknet.theme.wallpaper.path = + ooknet.wallpaper.path = let largest = f: xs: builtins.head (builtins.sort (a: b: a > b) (map f xs)); largestWidth = largest (x: x.width) monitors; diff --git a/home/modules/base/default.nix b/home/modules/base/default.nix new file mode 100644 index 0000000..41b5392 --- /dev/null +++ b/home/modules/base/default.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./home-manager.nix + ./mime-apps.nix + ./user-dirs.nix + ]; +} diff --git a/home/modules/base/user-dirs.nix b/home/modules/base/user-dirs.nix index 129b50d..72d21f1 100644 --- a/home/modules/base/user-dirs.nix +++ b/home/modules/base/user-dirs.nix @@ -12,11 +12,15 @@ enable = true; createDirectories = true; desktop = "${config.home.homeDirectory}/Desktop"; - code = "${config.home.homeDirectory}/Code"; documents = "${config.home.homeDirectory}/Documents"; music = "${config.home.homeDirectory}/Media/Music"; videos = "${config.home.homeDirectory}/Media/Videos"; pictures = "${config.home.homeDirectory}/Media/Pictures"; + extraConfig = { + XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots"; + XDG_CODE_DIR = "${config.home.homeDirectory}/Code"; + XDG_RECORDINGs_DIR = "${config.xdg.userDirs.videos}/Recordings"; + }; }; }; } diff --git a/home/modules/console/default.nix b/home/modules/console/default.nix index 41ce7ac..33daef5 100644 --- a/home/modules/console/default.nix +++ b/home/modules/console/default.nix @@ -1,10 +1,8 @@ { imports = [ ./editor # Still need to implement nvim - ./fileManager ./multiplexer # Still need to implement tmux and screen - ./prompt # only Starship is currently implemented ./shell - ./utility + ./tools ]; } diff --git a/home/modules/console/editor/default.nix b/home/modules/console/editor/default.nix index 3e3c85c..cf00117 100644 --- a/home/modules/console/editor/default.nix +++ b/home/modules/console/editor/default.nix @@ -1,27 +1,6 @@ -{ lib, ... }: { - imports = [ ./helix # ./nvim ]; - - options.ooknet.console.editor = { - helix = { - enable = lib.mkEnableOption "Enable helix text editor"; - default = lib.mkOption { - type = lib.types.bool; - default = false; - description = "Set helix as the default text editor in environment variables"; - }; - }; - nvim = { - enable = lib.mkEnableOption "Enable nvim text editor"; - default = lib.mkOption { - type = lib.types.bool; - default = false; - description = "Set nvim as the default text editor in environment variables"; - }; - }; - }; } diff --git a/home/modules/console/multiplexer/default.nix b/home/modules/console/multiplexer/default.nix index efcc864..b3dfa15 100644 --- a/home/modules/console/multiplexer/default.nix +++ b/home/modules/console/multiplexer/default.nix @@ -1,17 +1,7 @@ -{ lib, config, ... }: { imports = [ ./zellij #./screen ./tmux ]; - - options.ooknet.console.multiplexer = { - zellij = { - enable = lib.mkEnableOption "Enable zellij multiplexer"; - }; - tmux = { - enable = lib.mkEnableOption "Enable tmux multiplexer"; - }; - }; } diff --git a/home/modules/console/tools/fzf.nix b/home/modules/console/tools/fzf.nix index 1ba347d..1f09b5b 100644 --- a/home/modules/console/tools/fzf.nix +++ b/home/modules/console/tools/fzf.nix @@ -8,7 +8,7 @@ in { config = mkIf cfg.enable { - fzf = { + programs.fzf = { enable = true; enableFishIntegration = mkIf (admin.shell == "fish") true; defaultCommand = "rg --files --hidden"; diff --git a/home/modules/console/tools/utils.nix b/home/modules/console/tools/utils.nix index e8d99b4..8b90d3d 100644 --- a/home/modules/console/tools/utils.nix +++ b/home/modules/console/tools/utils.nix @@ -1,7 +1,9 @@ { pkgs, lib, config, ... }: + let - cfg = config.ooknet.console.utility.tools; + cfg = config.ooknet.tools.utils; in + { config = lib.mkIf cfg.enable { home.packages = with pkgs; [ diff --git a/home/modules/desktop/communication/discord/default.nix b/home/modules/desktop/communication/discord/default.nix index 676a4ab..6947bd8 100644 --- a/home/modules/desktop/communication/discord/default.nix +++ b/home/modules/desktop/communication/discord/default.nix @@ -1,5 +1,5 @@ { imports = [ ./vesktop.nix - ] + ]; } diff --git a/home/modules/desktop/communication/discord/vesktop.nix b/home/modules/desktop/communication/discord/vesktop.nix index 105a038..d0d2ddc 100644 --- a/home/modules/desktop/communication/discord/vesktop.nix +++ b/home/modules/desktop/communication/discord/vesktop.nix @@ -5,7 +5,7 @@ let inherit (lib) mkIf; cfg = config.ooknet.communication.discord; discord = config.ooknet.desktop.discord; - fonts = config.ooknet.theme.fonts; + fonts = config.ooknet.fonts; in { @@ -20,7 +20,6 @@ in */ :root { - /* Palette */ --nix-bg1: #${palette.base00}; --nix-bg2: #${palette.base01}; --nix-bg3: #${palette.base02}; diff --git a/home/modules/desktop/gaming/wine.nix b/home/modules/desktop/gaming/wine.nix new file mode 100644 index 0000000..542dfa3 --- /dev/null +++ b/home/modules/desktop/gaming/wine.nix @@ -0,0 +1,17 @@ +{ lib, config, pkgs, ... }: + +let + inherit (lib) mkIf; + cfg = config.ooknet.gaming.wine; +in + +{ + config = mkIf cfg.enable { + home.packages = with pkgs; [ + winetricks + protontricks + protonup-qt + wineWowPackages.full + ]; + }; +} diff --git a/home/modules/desktop/media/music/default.nix b/home/modules/desktop/media/music/default.nix index 9365467..1abe08b 100644 --- a/home/modules/desktop/media/music/default.nix +++ b/home/modules/desktop/media/music/default.nix @@ -1,6 +1,6 @@ { imports = [ #./spotify --- still needs to be implemented - ./tui + ./tui.nix ]; } diff --git a/home/modules/desktop/media/music/tui.nix b/home/modules/desktop/media/music/tui.nix index e782d7f..1045f3a 100644 --- a/home/modules/desktop/media/music/tui.nix +++ b/home/modules/desktop/media/music/tui.nix @@ -4,7 +4,7 @@ let inherit (config.colorscheme) palette; inherit (lib) mkIf; - cfg = config.ooknet.desktop.media.music.tui; + cfg = config.ooknet.media.music.tui; zellij = config.ooknet.multiplexer.zellij; multiplexer= config.ooknet.console.multiplexer; diff --git a/home/modules/desktop/terminal/foot.nix b/home/modules/desktop/terminal/foot.nix index 11cd2f5..8e4af63 100644 --- a/home/modules/desktop/terminal/foot.nix +++ b/home/modules/desktop/terminal/foot.nix @@ -4,7 +4,7 @@ let inherit (config.colorscheme) palette; inherit (lib) mkIf; fonts = config.ooknet.fonts; - cfg = config.ooknet.desktop.terminal.foot; + cfg = config.ooknet.terminal.foot; terminal = config.ooknet.desktop.terminal; in diff --git a/home/modules/desktop/tools/kdeconnect.nix b/home/modules/desktop/tools/kdeconnect.nix index e2091d3..0968668 100644 --- a/home/modules/desktop/tools/kdeconnect.nix +++ b/home/modules/desktop/tools/kdeconnect.nix @@ -1,13 +1,12 @@ -{ lib, config, osConfig, ... }: +{ lib, osConfig, ... }: let inherit (lib) mkIf; - inherit (builtins) elem; - host = osConfig.ooknet.host; + cfg = osConfig.ooknet.programs.kdeconnect; in { - config = mkIf (elem "workstation" host.function) { + config = mkIf cfg.enable { services.kdeconnect = { enable = true; indicator = true; diff --git a/home/modules/desktop/tools/ookpower.nix b/home/modules/desktop/tools/ookpower.nix index bafe2c4..2133665 100644 --- a/home/modules/desktop/tools/ookpower.nix +++ b/home/modules/desktop/tools/ookpower.nix @@ -9,6 +9,6 @@ in { config = mkIf (launcher == "rofi") { home.packages = [ inputs.ooks-scripts.packages.${pkgs.system}.powermenu ]; - ooknet.binds.powermenu = "powermenu -c dmenu"; + ooknet.binds.powerMenu = "powermenu -c dmenu"; }; } diff --git a/home/modules/desktop/wayland/compositor/hyprland/settings/binds.nix b/home/modules/desktop/wayland/compositor/hyprland/settings/binds.nix index 41fcf8c..fbd0506 100644 --- a/home/modules/desktop/wayland/compositor/hyprland/settings/binds.nix +++ b/home/modules/desktop/wayland/compositor/hyprland/settings/binds.nix @@ -20,30 +20,24 @@ in "SUPERSHIFT, S, exec, ${binds.steam}" "SUPER, escape, exec, ${binds.terminalLaunch} --title=BTOP btop" "SUPER CTRL, return, exec, ${binds.zellijMenu}" - - "SUPER, delete, exec, ${binds.powermenu}" - - + "SUPER, delete, exec, ${binds.powerMenu}" # Spotify PLayer Controls - - "SUPER, bracketright, exec, ${spotifyctl} playback next" - "SUPER, bracketleft, exec, ${spotifyctl} playback previous" - "SUPER, backslash, exec, ${spotifyctl} playback play-pause" + "SUPER, M, exec, ${binds.spotify.launch}" + "SUPER, bracketright, exec, ${binds.spotify.next}" + "SUPER, bracketleft, exec, ${binds.spotify.previous}" + "SUPER, backslash, exec, ${binds.spotify.play}" # Brightness - ",XF86MonBrightnessUp, exec, hyprbrightness up" ",XF86MonBrightnessDown, exec, hyprbrightness down" # Volume - ",XF86AudioRaiseVolume, exec, hyprvolume up" ",XF86AudioLowerVolume, exec, hyprvolume down" ",XF86AudioMute, exec, hyprvolume mute" # Window Management - "SUPER, Q, killactive" "SUPER CTRL, backspace, killactive" "SUPERSHIFT ALT, delete, exec, hyprkillsession" @@ -54,28 +48,24 @@ in "SUPER, S, togglesplit" # dwindle # Focus - "SUPER, left, movefocus,l" "SUPER, right, movefocus,r" "SUPER, up, movefocus,u" "SUPER, down, movefocus,d" # Move - "SUPERSHIFT, left, movewindow,l" "SUPERSHIFT, right, movewindow,r" "SUPERSHIFT, up, movewindow,u" "SUPERSHIFT, down, movewindow,d" #Resize - "SUPER CTRL, left, resizeactive,-20 0" "SUPERCTRL, right, resizeactive,20 0" "SUPER CTRL, up, resizeactive,0 -20" "SUPERCTRL, down, resizeactive,0 20" # Switch workspace - "SUPER, 1, workspace,1" "SUPER, 2, workspace,2" "SUPER, 3, workspace,3" @@ -91,7 +81,6 @@ in "SUPER, tab, focusCurrentOrLast" # Move workspace - "SUPERSHIFT, 1, movetoworkspace,1" "SUPERSHIFT, 2, movetoworkspace,2" "SUPERSHIFT, 3, movetoworkspace,3" diff --git a/home/modules/desktop/wayland/default.nix b/home/modules/desktop/wayland/default.nix index c731570..49e58aa 100644 --- a/home/modules/desktop/wayland/default.nix +++ b/home/modules/desktop/wayland/default.nix @@ -1,37 +1,11 @@ -{ lib, config, osConfig, ... }: - -let - inherit (lib) mkIf; - cfg = config.ooknet.desktop.wayland; - gpu = osConfig.ooknet.host.hardware.gpu; -in - { imports = [ ./bar + ./compositor + ./launcher ./lockscreen ./notification ./utility - ./windowManager - ./launcher + ./variables.nix ]; - - config = mkIf cfg.enable { - home.sessionVariables = { - CLUTTER_BACKEND = "wayland"; - NIXOS_OZONE_WL = "1"; - GDK_BACKEND = "wayland"; - QT_QPA_PLATFORM = "wayland"; - QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; - MOZ_ENABLE_WAYLAND = "1"; - MOZ_DBUS_REMOTE = "1"; - XDG_SESSION_TYPE = "wayland"; - SDL_VIDEODRIVER = "wayland"; - } // mkIf (gpu == "nvidia") { - LIBVA_DRIVER_NAME = "nvidia"; - GBM_BACKEND = "nvidia-drm"; - __GLX_VENDOR_LIBRARY_NAME = "nvidia"; - WLR_NO_HARDWARE_CURSORS = "1"; - }; - }; } diff --git a/home/modules/desktop/wayland/lockscreen/hyprlock.nix b/home/modules/desktop/wayland/lockscreen/hyprlock.nix index b4658d2..dbe6167 100644 --- a/home/modules/desktop/wayland/lockscreen/hyprlock.nix +++ b/home/modules/desktop/wayland/lockscreen/hyprlock.nix @@ -9,7 +9,7 @@ in { config = mkIf (wayland.locker == "hyprlock") { - ooknet.binds.locker = "hyprlock"; + ooknet.binds.lock = "hyprlock"; programs.hyprlock = { settings = { enable = true; diff --git a/home/modules/desktop/wayland/lockscreen/swaylock.nix b/home/modules/desktop/wayland/lockscreen/swaylock.nix index 63883a4..04b2cca 100644 --- a/home/modules/desktop/wayland/lockscreen/swaylock.nix +++ b/home/modules/desktop/wayland/lockscreen/swaylock.nix @@ -9,7 +9,7 @@ let in { config = mkIf (wayland.locker == "swaylock") { - ooknet.binds.locker = "swaylock"; + ooknet.binds.lock = "swaylock"; programs.swaylock = { enable = true; settings = { diff --git a/home/modules/desktop/wayland/variables.nix b/home/modules/desktop/wayland/variables.nix new file mode 100644 index 0000000..b86e6ec --- /dev/null +++ b/home/modules/desktop/wayland/variables.nix @@ -0,0 +1,28 @@ +{ lib, config, osConfig, ... }: + +let + inherit (lib) mkIf; + cfg = config.ooknet.wayland; + gpu = osConfig.ooknet.host.hardware.gpu; +in + +{ + config = mkIf cfg.enable { + home.sessionVariables = { + CLUTTER_BACKEND = "wayland"; + NIXOS_OZONE_WL = "1"; + GDK_BACKEND = "wayland"; + QT_QPA_PLATFORM = "wayland"; + QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; + MOZ_ENABLE_WAYLAND = "1"; + MOZ_DBUS_REMOTE = "1"; + XDG_SESSION_TYPE = "wayland"; + SDL_VIDEODRIVER = "wayland"; + } // mkIf (gpu == "nvidia") { + LIBVA_DRIVER_NAME = "nvidia"; + GBM_BACKEND = "nvidia-drm"; + __GLX_VENDOR_LIBRARY_NAME = "nvidia"; + WLR_NO_HARDWARE_CURSORS = "1"; + }; + }; +} diff --git a/home/options/appearance/default.nix b/home/options/appearance/default.nix new file mode 100644 index 0000000..9a933de --- /dev/null +++ b/home/options/appearance/default.nix @@ -0,0 +1,10 @@ +{ + imports = [ + ./cursor.nix + ./fonts.nix + ./gtk.nix + ./qt.nix + ./theme.nix + ./wallpaper.nix + ]; +} diff --git a/home/options/appearance/fonts.nix b/home/options/appearance/fonts.nix index a72dee1..4a982f8 100644 --- a/home/options/appearance/fonts.nix +++ b/home/options/appearance/fonts.nix @@ -17,7 +17,7 @@ let }; in { - options.ooknet.theme.fonts = { + options.ooknet.fonts = { enable = lib.mkEnableOption "Whether to enable font profiles"; monospace = mkFontOption "monospace"; regular = mkFontOption "regular"; diff --git a/home/options/appearance/gtk.nix b/home/options/appearance/gtk.nix index 4ad413a..98f218d 100644 --- a/home/options/appearance/gtk.nix +++ b/home/options/appearance/gtk.nix @@ -5,5 +5,5 @@ let in { - options.ooknet.gtk.enable = mkEnableOption; + options.ooknet.gtk.enable = mkEnableOption ""; } diff --git a/home/options/console/default.nix b/home/options/console/default.nix new file mode 100644 index 0000000..773712e --- /dev/null +++ b/home/options/console/default.nix @@ -0,0 +1,8 @@ +{ + imports = [ + ./editor.nix + ./multiplexer.nix + ./shell.nix + ./tools.nix + ]; +} diff --git a/home/options/default.nix b/home/options/default.nix new file mode 100644 index 0000000..8b07201 --- /dev/null +++ b/home/options/default.nix @@ -0,0 +1,8 @@ +{ + imports = [ + ./appearance + ./console + ./desktop + ./profiles + ]; +} diff --git a/home/options/desktop/default.nix b/home/options/desktop/default.nix new file mode 100644 index 0000000..ce40f0b --- /dev/null +++ b/home/options/desktop/default.nix @@ -0,0 +1,15 @@ +{ + imports = [ + ./binds.nix + ./browser.nix + ./communication.nix + ./creative.nix + ./gaming.nix + ./media.nix + ./productivity.nix + ./security.nix + ./terminal.nix + ./tools.nix + ./wayland.nix + ]; +} diff --git a/home/options/desktop/gaming.nix b/home/options/desktop/gaming.nix index 5130fb1..c4eec4e 100644 --- a/home/options/desktop/gaming.nix +++ b/home/options/desktop/gaming.nix @@ -9,5 +9,6 @@ in factorio.enable = mkEnableOption ""; bottles.enable = mkEnableOption ""; lutris.enable = mkEnableOption ""; + wine.enable = mkEnableOption ""; }; } diff --git a/home/options/desktop/terminal.nix b/home/options/desktop/terminal.nix index 023eae9..dbde488 100644 --- a/home/options/desktop/terminal.nix +++ b/home/options/desktop/terminal.nix @@ -7,5 +7,6 @@ in { options.ooknet.terminal = { foot.enable = mkEnableOption ""; + kitty.enable = mkEnableOption ""; }; } diff --git a/home/options/desktop/wayland.nix b/home/options/desktop/wayland.nix index 2138636..268b0c7 100644 --- a/home/options/desktop/wayland.nix +++ b/home/options/desktop/wayland.nix @@ -6,7 +6,7 @@ let in { - ooknet.wayland = { + options.ooknet.wayland = { enable = mkEnableOption ""; compositor = mkOption { type = nullOr (enum [ "hyprland" ]); diff --git a/home/options/profiles/default.nix b/home/options/profiles/default.nix new file mode 100644 index 0000000..d333040 --- /dev/null +++ b/home/options/profiles/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./desktop.nix + ./console.nix + ]; +} diff --git a/home/profiles/default.nix b/home/profiles/default.nix index 04e3a5c..7e0142f 100644 --- a/home/profiles/default.nix +++ b/home/profiles/default.nix @@ -1,42 +1,7 @@ -{ lib, config, ... }: - -let - profileEnabler = let - reducer = l: r: {"${r}".enable = true;} // l; - in - builtins.foldl' reducer {} config.activeProfiles; -in { imports = [ - ./base - ./hyprland - #./creative - ./productivity - ./gaming + ./desktop-environments ./themes + ./suites ]; - - options = { - activeProfiles = lib.mkOption { - type = lib.types.listOf lib.types.str; - default = []; - }; - - profiles = { - base = { - enable = lib.mkEnableOption "Enable the base profile"; - }; - hyprland = { - enable = lib.mkEnableOption "Enable the hyprland profile"; - }; - gaming = { - enable = lib.mkEnableOption "Enable the gaming profile"; - }; - productivity = { - enable = lib.mkEnableOption "Enable the productivity profile"; - }; - }; - }; - - config.profiles = profileEnabler; } diff --git a/nixos/modules/roles/media-server/default.nix b/home/profiles/desktop-environments/default.nix similarity index 54% rename from nixos/modules/roles/media-server/default.nix rename to home/profiles/desktop-environments/default.nix index f35bfde..96e5300 100644 --- a/nixos/modules/roles/media-server/default.nix +++ b/home/profiles/desktop-environments/default.nix @@ -1,5 +1,5 @@ { imports = [ - ./services + ./hyprland.nix ]; } diff --git a/home/profiles/suites/create.nix b/home/profiles/suites/create.nix deleted file mode 100644 index e69de29..0000000 diff --git a/home/profiles/suites/creative.nix b/home/profiles/suites/creative.nix new file mode 100644 index 0000000..f6a4488 --- /dev/null +++ b/home/profiles/suites/creative.nix @@ -0,0 +1,16 @@ +{ osConfig, lib, ... }: + +let + inherit (lib) mkIf; + inherit (builtins) elem; + profiles = osConfig.ooknet.host.profiles; +in + +{ + config = mkIf (elem "creative" profiles) { + ooknet.creative = { + audacity.enable = true; + inkscape.enable = true; + }; + }; +} diff --git a/home/profiles/suites/default.nix b/home/profiles/suites/default.nix new file mode 100644 index 0000000..8a618f0 --- /dev/null +++ b/home/profiles/suites/default.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./gaming.nix + ./creative.nix + ./productivity.nix + ]; +} diff --git a/home/profiles/suites/gaming.nix b/home/profiles/suites/gaming.nix index 92dff77..6db97b6 100644 --- a/home/profiles/suites/gaming.nix +++ b/home/profiles/suites/gaming.nix @@ -1,25 +1,16 @@ -{ config, lib, pkgs, ... }: -let - cfg = config.profiles.gaming; -in -{ +{ osConfig, lib, ... }: - imports = [ - ../../modules - ]; - - config = lib.mkIf cfg.enable { - homeModules.desktop = { - gaming = { - lutris.enable = false; - }; +let + inherit (lib) mkIf; + inherit (builtins) elem; + profiles = osConfig.ooknet.host.profiles; +in + +{ + config = mkIf (elem "gaming" profiles) { + ooknet.gaming = { + wine.enable = true; + bottles.enable = true; }; - home.packages = with pkgs; [ - bottles - winetricks - protontricks - protonup-qt - wineWowPackages.full - ]; }; } diff --git a/home/profiles/suites/productivity.nix b/home/profiles/suites/productivity.nix index b86306b..ed77753 100644 --- a/home/profiles/suites/productivity.nix +++ b/home/profiles/suites/productivity.nix @@ -1,20 +1,17 @@ -{ config, lib, ... }: -let - cfg = config.profiles.productivity; -in -{ +{ osConfig, lib, ... }: - imports = [ - ../../modules - ]; - - config = lib.mkIf cfg.enable { - homeModules.desktop = { - productivity = { - obsidian.enable = true; - zathura.enable = true; - office.enable = true; - }; +let + inherit (lib) mkIf; + inherit (builtins) elem; + profiles = osConfig.ooknet.host.profiles; +in + +{ + config = mkIf (elem "productiviy" profiles) { + ooknet.productivity = { + notes.obsidian.enable = true; + office.libreoffice.enable = true; + pdf.zathura.enable = true; }; }; } diff --git a/home/profiles/themes/default.nix b/home/profiles/themes/default.nix index 77e4642..a5310d5 100644 --- a/home/profiles/themes/default.nix +++ b/home/profiles/themes/default.nix @@ -1,29 +1,6 @@ -{ lib, config, ... }: - -# let -# cfg = config.theme; -# in - { imports = [ - ./minimal - ./phone + ./minimal.nix + # ./phone.nix ]; - - options.theme = { - minimal.enable = lib.mkEnableOption "enable minimal theme"; - phone.enable = lib.mkEnableOption "Enable phone theme"; - }; - - # config = { - # assertions = [ - # { - # assertion = - # (lib.length (lib.filter (x: x) [ - # cfg.minimal or false - # cfg.OTHERTHEMEHERE or false - # ]) <= 1); - # } - # ]; - # }; } diff --git a/home/profiles/themes/phone.nix b/home/profiles/themes/phone.nix index 3e1cf7d..19be48a 100644 --- a/home/profiles/themes/phone.nix +++ b/home/profiles/themes/phone.nix @@ -7,7 +7,6 @@ let in { - imports = [ inputs.nix-colors.homeManagerModule ]; config = mkIf (theme == "phone") { colorscheme = colorSchemes.gruvbox-material-dark-soft; diff --git a/hosts/ooksdesk/default.nix b/hosts/ooksdesk/default.nix index e0f6781..6e18a2b 100644 --- a/hosts/ooksdesk/default.nix +++ b/hosts/ooksdesk/default.nix @@ -13,7 +13,7 @@ in name = "ooksdesk"; type = "desktop"; role = "workstation"; - profiles = [ "gaming" "creativity" ]; + profiles = [ "gaming" "creative" ]; admin = { name = "ooks"; shell = "fish"; diff --git a/nixos/default.nix b/nixos/default.nix new file mode 100644 index 0000000..4f1ffa0 --- /dev/null +++ b/nixos/default.nix @@ -0,0 +1,8 @@ +{ + imports = [ + ./modules + ./options + ./profiles + ./roles + ]; +} diff --git a/nixos/modules/base/default.nix b/nixos/modules/base/default.nix index 7b630db..27f62e3 100644 --- a/nixos/modules/base/default.nix +++ b/nixos/modules/base/default.nix @@ -1,23 +1,11 @@ -{ lib, ... }: - { imports = [ - ./shell ./boot - ./nix ./displayManager ./networking - ./locale.nix - ./virtualization + ./nix ./security - ./services - ./host + ./shell + ./locale.nix ]; - - - options.ooknet = { - virtualisation = { - enable = lib.mkEnableOption "Enable virtualisation module"; - }; - }; } diff --git a/nixos/modules/base/services/default.nix b/nixos/modules/base/services/default.nix deleted file mode 100644 index 1365ae9..0000000 --- a/nixos/modules/base/services/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - imports = [ - ./system76Scheduler.nix - ./dbus.nix - ./gnome.nix - ./gvfs.nix - ]; -} diff --git a/nixos/modules/default.nix b/nixos/modules/default.nix new file mode 100644 index 0000000..204ae88 --- /dev/null +++ b/nixos/modules/default.nix @@ -0,0 +1,9 @@ +{ + imports = [ + ./base + ./gaming + ./host + ./programs + ./services + ]; +} diff --git a/nixos/modules/gaming/default.nix b/nixos/modules/gaming/default.nix new file mode 100644 index 0000000..89bbbab --- /dev/null +++ b/nixos/modules/gaming/default.nix @@ -0,0 +1,8 @@ +{ + imports = [ + ./steam.nix + ./gamemode.nix + ./gamescope.nix + ./openPorts.nix + ]; +} diff --git a/nixos/modules/gaming/gamemode.nix b/nixos/modules/gaming/gamemode.nix new file mode 100644 index 0000000..fa186e3 --- /dev/null +++ b/nixos/modules/gaming/gamemode.nix @@ -0,0 +1,24 @@ +{ lib, config, pkgs, ... }: + +let + inherit (lib) mkIf; + cfg = config.ooknet.gaming.gamemode; +in + +{ + config = mkIf cfg.enable { + programs.gamemode = { + enable = true; + settings = { + general = { + renice = 15; + softrealtime = "auto"; + }; + custom = { + start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'"; + end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'"; + }; + }; + }; + }; +} diff --git a/nixos/modules/gaming/gamescope.nix b/nixos/modules/gaming/gamescope.nix new file mode 100644 index 0000000..dc8f5b5 --- /dev/null +++ b/nixos/modules/gaming/gamescope.nix @@ -0,0 +1,16 @@ +{ lib, config, pkgs, ... }: + +let + inherit (lib) mkIf; + cfg = config.ooknet.gaming.gamescope; +in + +{ + config = mkIf cfg.enable { + hardware.opengl.extraPackages = [ pkgs.gamescope ]; + programs.gamescope = { + enable = true; + capSysNice = true; + }; + }; +} diff --git a/nixos/modules/gaming/openPorts.nix b/nixos/modules/gaming/openPorts.nix new file mode 100644 index 0000000..165c0f7 --- /dev/null +++ b/nixos/modules/gaming/openPorts.nix @@ -0,0 +1,22 @@ +{ lib, config, ... }: + +let + inherit (lib) mkIf; + cfg = config.ooknet.gaming.openPorts; +in + +{ + config = mkIf cfg.enable { + networking.firewall = { + allowedTCPPorts = [ 3074 ]; + allowedUDPPorts = [ + 88 + 500 + 3074 + 2075 + 3544 + 4500 + ]; + }; + }; +} diff --git a/nixos/modules/gaming/steam.nix b/nixos/modules/gaming/steam.nix new file mode 100644 index 0000000..583f8a4 --- /dev/null +++ b/nixos/modules/gaming/steam.nix @@ -0,0 +1,35 @@ +{ lib, config, pkgs, ... }: + +let + inherit (lib) mkIf; + cfg = config.ooknet.gaming.steam; + steamFix = pkgs.steam.override { + extraPkgs = pkgs: with pkgs; [ + xorg.libXcursor + xorg.libXi + xorg.libXinerama + xorg.libXScrnSaver + libpng + libpulseaudio + libvorbis + stdenv.cc.cc.lib + libkrb5 + keyutils + mangohud + winetricks + protontricks + gtk3 + gtk3-x11 + ]; + }; +in + +{ + config = mkIf cfg.enable { + programs.steam = { + enable = true; + package = steamFix; + extraCompatPackages = [ pkgs.proton-ge-bin.steamcompattool ]; + }; + }; +} diff --git a/nixos/modules/base/host/admin.nix b/nixos/modules/host/admin.nix similarity index 100% rename from nixos/modules/base/host/admin.nix rename to nixos/modules/host/admin.nix diff --git a/nixos/modules/base/host/default.nix b/nixos/modules/host/default.nix similarity index 69% rename from nixos/modules/base/host/default.nix rename to nixos/modules/host/default.nix index 968834b..08e3027 100644 --- a/nixos/modules/base/host/default.nix +++ b/nixos/modules/host/default.nix @@ -2,8 +2,6 @@ imports = [ ./admin.nix ./name.nix - ./type.nix - ./role.nix ./hardware ]; } diff --git a/nixos/modules/base/host/hardware/common.nix b/nixos/modules/host/hardware/common.nix similarity index 100% rename from nixos/modules/base/host/hardware/common.nix rename to nixos/modules/host/hardware/common.nix diff --git a/nixos/modules/base/host/hardware/cpu/amd.nix b/nixos/modules/host/hardware/cpu/amd.nix similarity index 100% rename from nixos/modules/base/host/hardware/cpu/amd.nix rename to nixos/modules/host/hardware/cpu/amd.nix diff --git a/nixos/modules/base/host/hardware/cpu/default.nix b/nixos/modules/host/hardware/cpu/default.nix similarity index 100% rename from nixos/modules/base/host/hardware/cpu/default.nix rename to nixos/modules/host/hardware/cpu/default.nix diff --git a/nixos/modules/base/host/hardware/cpu/intel.nix b/nixos/modules/host/hardware/cpu/intel.nix similarity index 100% rename from nixos/modules/base/host/hardware/cpu/intel.nix rename to nixos/modules/host/hardware/cpu/intel.nix diff --git a/nixos/modules/base/host/hardware/default.nix b/nixos/modules/host/hardware/default.nix similarity index 79% rename from nixos/modules/base/host/hardware/default.nix rename to nixos/modules/host/hardware/default.nix index addabe8..710bbc1 100644 --- a/nixos/modules/base/host/hardware/default.nix +++ b/nixos/modules/host/hardware/default.nix @@ -4,6 +4,5 @@ ./gpu ./features ./common.nix - ./monitors.nix ]; } diff --git a/nixos/modules/base/host/hardware/features/audio.nix b/nixos/modules/host/hardware/features/audio.nix similarity index 100% rename from nixos/modules/base/host/hardware/features/audio.nix rename to nixos/modules/host/hardware/features/audio.nix diff --git a/nixos/modules/base/host/hardware/features/backlight.nix b/nixos/modules/host/hardware/features/backlight.nix similarity index 100% rename from nixos/modules/base/host/hardware/features/backlight.nix rename to nixos/modules/host/hardware/features/backlight.nix diff --git a/nixos/modules/base/host/hardware/features/battery.nix b/nixos/modules/host/hardware/features/battery.nix similarity index 100% rename from nixos/modules/base/host/hardware/features/battery.nix rename to nixos/modules/host/hardware/features/battery.nix diff --git a/nixos/modules/base/host/hardware/features/bluetooth.nix b/nixos/modules/host/hardware/features/bluetooth.nix similarity index 100% rename from nixos/modules/base/host/hardware/features/bluetooth.nix rename to nixos/modules/host/hardware/features/bluetooth.nix diff --git a/nixos/modules/base/host/hardware/features/default.nix b/nixos/modules/host/hardware/features/default.nix similarity index 100% rename from nixos/modules/base/host/hardware/features/default.nix rename to nixos/modules/host/hardware/features/default.nix diff --git a/nixos/modules/base/host/hardware/features/ssd.nix b/nixos/modules/host/hardware/features/ssd.nix similarity index 100% rename from nixos/modules/base/host/hardware/features/ssd.nix rename to nixos/modules/host/hardware/features/ssd.nix diff --git a/nixos/modules/base/host/hardware/features/video.nix b/nixos/modules/host/hardware/features/video.nix similarity index 100% rename from nixos/modules/base/host/hardware/features/video.nix rename to nixos/modules/host/hardware/features/video.nix diff --git a/nixos/modules/base/host/hardware/gpu/amd.nix b/nixos/modules/host/hardware/gpu/amd.nix similarity index 100% rename from nixos/modules/base/host/hardware/gpu/amd.nix rename to nixos/modules/host/hardware/gpu/amd.nix diff --git a/nixos/modules/base/host/hardware/gpu/default.nix b/nixos/modules/host/hardware/gpu/default.nix similarity index 100% rename from nixos/modules/base/host/hardware/gpu/default.nix rename to nixos/modules/host/hardware/gpu/default.nix diff --git a/nixos/modules/base/host/hardware/gpu/intel.nix b/nixos/modules/host/hardware/gpu/intel.nix similarity index 100% rename from nixos/modules/base/host/hardware/gpu/intel.nix rename to nixos/modules/host/hardware/gpu/intel.nix diff --git a/nixos/modules/base/host/hardware/gpu/nvidia.nix b/nixos/modules/host/hardware/gpu/nvidia.nix similarity index 100% rename from nixos/modules/base/host/hardware/gpu/nvidia.nix rename to nixos/modules/host/hardware/gpu/nvidia.nix diff --git a/nixos/modules/base/host/name.nix b/nixos/modules/host/name.nix similarity index 100% rename from nixos/modules/base/host/name.nix rename to nixos/modules/host/name.nix diff --git a/nixos/modules/roles/workstation/programs/1password.nix b/nixos/modules/programs/1password.nix similarity index 52% rename from nixos/modules/roles/workstation/programs/1password.nix rename to nixos/modules/programs/1password.nix index 7e3c6c4..fd6fde0 100644 --- a/nixos/modules/roles/workstation/programs/1password.nix +++ b/nixos/modules/programs/1password.nix @@ -2,16 +2,17 @@ let inherit (lib) mkIf; - host = config.ooknet.host; + admin = config.ooknet.host.admin; + cfg = config.ooknet.programs._1password; in { - config = mkIf (host.type != "phone") { + config = mkIf cfg.enable { programs = { _1password.enable = true; _1password-gui = { enable = true; - polkitPolicyOwners = [ "${host.admin.name}" ]; + polkitPolicyOwners = [ "${admin.name}" ]; }; }; }; diff --git a/nixos/modules/programs/dconf.nix b/nixos/modules/programs/dconf.nix new file mode 100644 index 0000000..4a7eea1 --- /dev/null +++ b/nixos/modules/programs/dconf.nix @@ -0,0 +1,12 @@ +{ lib, config, ... }: + +let + inherit (lib) mkIf; + cfg = config.ooknet.programs.dconf; +in + +{ + config = mkIf cfg.enable { + programs.dconf.enable = true; + }; +} diff --git a/nixos/modules/roles/workstation/programs/default.nix b/nixos/modules/programs/default.nix similarity index 100% rename from nixos/modules/roles/workstation/programs/default.nix rename to nixos/modules/programs/default.nix diff --git a/nixos/modules/programs/kdeconnect.nix b/nixos/modules/programs/kdeconnect.nix new file mode 100644 index 0000000..a5989f9 --- /dev/null +++ b/nixos/modules/programs/kdeconnect.nix @@ -0,0 +1,14 @@ +{ lib, config, ... }: + +let + inherit (lib) mkIf; + cfg = config.ooknet.programs.kdeconnect; +in + +{ + config = mkIf cfg.enable { + programs.kdeconnect = { + enable = true; + }; + }; +} diff --git a/nixos/modules/roles/gaming/default.nix b/nixos/modules/roles/gaming/default.nix deleted file mode 100644 index 86783c3..0000000 --- a/nixos/modules/roles/gaming/default.nix +++ /dev/null @@ -1,69 +0,0 @@ -{ lib, config, pkgs, ... }: - -let - inherit (lib) mkIf; - inherit (builtins) elem; - steamFix = pkgs.steam.override { - extraPkgs = pkgs: with pkgs; [ - xorg.libXcursor - xorg.libXi - xorg.libXinerama - xorg.libXScrnSaver - libpng - libpulseaudio - libvorbis - stdenv.cc.cc.lib - libkrb5 - keyutils - mangohud - winetricks - protontricks - gtk3 - gtk3-x11 - ]; - }; - host = config.ooknet.host; -in - -{ - config = mkIf (elem "gaming" host.function) { - hardware.opengl.extraPackages = [ pkgs.gamescope ]; - services.flatpak.enable = true; - programs = { - steam = { - enable = true; - package = steamFix; - extraCompatPackages = [ pkgs.proton-ge-bin.steamcompattool ]; - }; - gamescope = { - enable = true; - capSysNice = true; - }; - gamemode = { - enable = true; - settings = { - general = { - renice = 15; - softrealtime = "auto"; - }; - custom = { - start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'"; - end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'"; - }; - }; - }; - }; - networking.firewall = { - allowedTCPPorts = [ 3074 ]; - allowedUDPPorts = [ - 88 - 500 - 3074 - 2075 - 3544 - 4500 - ]; - }; - }; -} - diff --git a/nixos/modules/roles/media-server/services/default.nix b/nixos/modules/roles/media-server/services/default.nix deleted file mode 100644 index 17f57b8..0000000 --- a/nixos/modules/roles/media-server/services/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - imports = [ - ./nixarr.nix - ]; -} diff --git a/nixos/modules/roles/media-server/services/nixarr.nix b/nixos/modules/roles/media-server/services/nixarr.nix deleted file mode 100644 index 63d7157..0000000 --- a/nixos/modules/roles/media-server/services/nixarr.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ config, inputs, ... }: - -let - admin = config.ooknet.host.admin; -in - -{ - imports = [ inputs.nixarr.nixosModules.default ]; - nixarr = { - enable = true; - mediaDir = "/jellyfin"; - stateDir = "/var/lib/nixarr"; - mediaUsers = ["${admin.name}"]; - - jellyfin.enable = true; - sonarr.enable = true; - radarr.enable = true; - prowlarr.enable = true; - transmission.enable = true; - }; - fileSystems."/jellyfin" = { - device = "/dev/disk/by-label/jellyfin"; - fsType = "btrfs"; - }; -} diff --git a/nixos/modules/roles/workstation/default.nix b/nixos/modules/roles/workstation/default.nix deleted file mode 100644 index 5d85a74..0000000 --- a/nixos/modules/roles/workstation/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - imports = [ - ./programs - ]; -} diff --git a/nixos/modules/roles/workstation/programs/dconf.nix b/nixos/modules/roles/workstation/programs/dconf.nix deleted file mode 100644 index ecbd75f..0000000 --- a/nixos/modules/roles/workstation/programs/dconf.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ lib, config, ... }: - -let - inherit (lib) mkIf; - inherit (builtins) elem; - host = config.ooknet.host; -in - -{ - config = mkIf (elem "workstation" host.function){ - programs.dconf.enable = true; - }; -} diff --git a/nixos/modules/roles/workstation/programs/kdeconnect.nix b/nixos/modules/roles/workstation/programs/kdeconnect.nix deleted file mode 100644 index 697aaba..0000000 --- a/nixos/modules/roles/workstation/programs/kdeconnect.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: - -{ - programs.kdeconnect = { - enable = true; - }; -} diff --git a/nixos/modules/base/services/dbus.nix b/nixos/modules/services/dbus.nix similarity index 57% rename from nixos/modules/base/services/dbus.nix rename to nixos/modules/services/dbus.nix index da92ade..889d4e9 100644 --- a/nixos/modules/base/services/dbus.nix +++ b/nixos/modules/services/dbus.nix @@ -2,12 +2,11 @@ let inherit (lib) mkIf; - inherit (lib.lists) any elem; - hasFunction = f: elem f config.ooknet.host.function; + cfg = config.ooknet.services.dbus; in { - config = mkIf (any hasFunction ["workstation" "gaming"]) { + config = mkIf cfg.enable { services.dbus = { enable = true; packages = with pkgs; [ dconf gcr udisks2 ]; diff --git a/nixos/modules/services/default.nix b/nixos/modules/services/default.nix new file mode 100644 index 0000000..a743cb2 --- /dev/null +++ b/nixos/modules/services/default.nix @@ -0,0 +1,10 @@ +{ + imports = [ + ./system76Scheduler.nix + ./dbus.nix + ./gnome.nix + ./gvfs.nix + # ./nixarr.nix + ./flatpak.nix + ]; +} diff --git a/nixos/modules/services/flatpak.nix b/nixos/modules/services/flatpak.nix new file mode 100644 index 0000000..ab9f6ed --- /dev/null +++ b/nixos/modules/services/flatpak.nix @@ -0,0 +1,12 @@ +{ lib, config, ... }: + +let + inherit (lib) mkIf; + cfg = config.ooknet.services.flatpak; +in + +{ + config = mkIf cfg.enable { + services.flatpak.enable = true; + }; +} diff --git a/nixos/modules/base/services/gnome.nix b/nixos/modules/services/gnome.nix similarity index 72% rename from nixos/modules/base/services/gnome.nix rename to nixos/modules/services/gnome.nix index c1d65b0..610887e 100644 --- a/nixos/modules/base/services/gnome.nix +++ b/nixos/modules/services/gnome.nix @@ -2,11 +2,11 @@ let inherit (lib) mkIf; - host = config.ooknet.host; + cfg = config.ooknet.services.gnomeServices; in { - config = mkIf (host.type != "phone" && host.type != "server") { + config = mkIf cfg.enable { services = { gnome = { glib-networking.enable = true; diff --git a/nixos/modules/base/services/gvfs.nix b/nixos/modules/services/gvfs.nix similarity index 57% rename from nixos/modules/base/services/gvfs.nix rename to nixos/modules/services/gvfs.nix index 2dddc0a..08a75b8 100644 --- a/nixos/modules/base/services/gvfs.nix +++ b/nixos/modules/services/gvfs.nix @@ -2,11 +2,11 @@ let inherit (lib) mkIf; - host = config.ooknet.host; + cfg = config.ooknet.services.gvfs; in { - config = mkIf ( host.type != "phone") { + config = mkIf cfg.enable { services.gvfs.enable = true; }; } diff --git a/nixos/modules/services/nixarr.nix b/nixos/modules/services/nixarr.nix new file mode 100644 index 0000000..6e50f97 --- /dev/null +++ b/nixos/modules/services/nixarr.nix @@ -0,0 +1,29 @@ +{ config, inputs, lib, ... }: + +let + inherit (lib) mkIf; + admin = config.ooknet.host.admin; + cfg = config.ooknet.services.nixarr; +in + +{ + imports = [ inputs.nixarr.nixosModules.default ]; + config = mkIf cfg.enable { + nixarr = { + enable = true; + mediaDir = "/jellyfin"; + stateDir = "/var/lib/nixarr"; + mediaUsers = ["${admin.name}"]; + + jellyfin.enable = true; + sonarr.enable = true; + radarr.enable = true; + prowlarr.enable = true; + transmission.enable = true; + }; + fileSystems."/jellyfin" = { + device = "/dev/disk/by-label/jellyfin"; + fsType = "btrfs"; + }; + }; +} diff --git a/nixos/modules/base/services/system76Scheduler.nix b/nixos/modules/services/system76Scheduler.nix similarity index 79% rename from nixos/modules/base/services/system76Scheduler.nix rename to nixos/modules/services/system76Scheduler.nix index aba328a..a19f238 100644 --- a/nixos/modules/base/services/system76Scheduler.nix +++ b/nixos/modules/services/system76Scheduler.nix @@ -2,12 +2,11 @@ let inherit (lib) mkIf; - host = config.ooknet.host; + cfg = config.ooknet.services.system76Scheduler; in { - config = mkIf (host.type != "phone") { - + config = mkIf cfg.enable { services.system76-scheduler = { enable = true; }; diff --git a/nixos/modules/base/virtualization/default.nix b/nixos/modules/virtualization/default.nix similarity index 100% rename from nixos/modules/base/virtualization/default.nix rename to nixos/modules/virtualization/default.nix diff --git a/nixos/options/default.nix b/nixos/options/default.nix new file mode 100644 index 0000000..b47f5c6 --- /dev/null +++ b/nixos/options/default.nix @@ -0,0 +1,8 @@ +{ + imports = [ + ./gaming.nix + ./host.nix + ./programs.nix + ./services.nix + ]; +} diff --git a/nixos/options/gaming.nix b/nixos/options/gaming.nix new file mode 100644 index 0000000..d0b59ef --- /dev/null +++ b/nixos/options/gaming.nix @@ -0,0 +1,14 @@ +{ lib, ... }: + +let + inherit (lib) mkEnableOption; +in + +{ + options.ooknet.gaming = { + steam.enable = mkEnableOption ""; + gamescope.enable = mkEnableOption ""; + gamemode.enable = mkEnableOption ""; + openPorts.enable = mkEnableOption ""; + }; +} diff --git a/nixos/options/host.nix b/nixos/options/host.nix index 044ef05..98f7552 100644 --- a/nixos/options/host.nix +++ b/nixos/options/host.nix @@ -24,7 +24,7 @@ in }; profiles = mkOption { - type = listOf (enum ["gaming" "creativity" "media-server"]); + type = listOf (enum ["gaming" "creative" "productivity" "media-server"]); default = []; }; diff --git a/nixos/options/programs.nix b/nixos/options/programs.nix new file mode 100644 index 0000000..fa1a71c --- /dev/null +++ b/nixos/options/programs.nix @@ -0,0 +1,13 @@ +{ lib, ... }: + +let + inherit (lib) mkEnableOption; +in + +{ + options.ooknet.programs = { + _1password.enable = mkEnableOption ""; + dconf.enable = mkEnableOption ""; + kdeconnect.enable = mkEnableOption ""; + }; +} diff --git a/nixos/options/services.nix b/nixos/options/services.nix new file mode 100644 index 0000000..8a21457 --- /dev/null +++ b/nixos/options/services.nix @@ -0,0 +1,16 @@ +{ lib, ... }: + +let + inherit (lib) mkEnableOption; +in + +{ + options.ooknet.services = { + nixarr.enable = mkEnableOption ""; + gnomeServices.enable = mkEnableOption ""; + gvfs.enable = mkEnableOption ""; + dbus.enable = mkEnableOption ""; + system76Scheduler.enable = mkEnableOption ""; + flatpak.enable = mkEnableOption ""; + }; +} diff --git a/nixos/profiles/default.nix b/nixos/profiles/default.nix new file mode 100644 index 0000000..733bd37 --- /dev/null +++ b/nixos/profiles/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./gaming.nix + ./media-server.nix + ]; +} diff --git a/nixos/profiles/gaming.nix b/nixos/profiles/gaming.nix new file mode 100644 index 0000000..875c6ea --- /dev/null +++ b/nixos/profiles/gaming.nix @@ -0,0 +1,18 @@ +{ lib, config, ... }: + +let + inherit (lib) mkIf; + inherit (builtins) elem; + profiles = config.ooknet.host.profiles; +in + +{ + config = mkIf (elem "gaming" profiles) { + ooknet.gaming = { + steam.enable = true; + gamescope.enable = true; + gamemode.enable = true; + }; + ooknet.services.flatpak.enable = true; + }; +} diff --git a/nixos/profiles/media-server.nix b/nixos/profiles/media-server.nix new file mode 100644 index 0000000..6e576d9 --- /dev/null +++ b/nixos/profiles/media-server.nix @@ -0,0 +1,13 @@ +{ lib, config, ... }: + +let + inherit (lib) mkIf; + inherit (builtins) elem; + profiles = config.ooknet.host.profiles; +in + +{ + config = mkIf (elem "media-server" profiles) { + ooknet.services.nixarr.enable = true; + }; +} diff --git a/nixos/roles/default.nix b/nixos/roles/default.nix new file mode 100644 index 0000000..8301ca8 --- /dev/null +++ b/nixos/roles/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./desktop-workstation.nix + ]; +} diff --git a/nixos/roles/desktop-workstation.nix b/nixos/roles/desktop-workstation.nix new file mode 100644 index 0000000..bc92212 --- /dev/null +++ b/nixos/roles/desktop-workstation.nix @@ -0,0 +1,24 @@ +{ lib, config, ... }: + +let + inherit (lib) mkIf; + host = config.ooknet.host; +in + +{ + config = mkIf (host.type == "desktop" && host.role == "workstation") { + ooknet = { + services = { + gnomeServices.enable = true; + gvfs.enable = true; + dbus.enable = true; + system76Scheduler.enable = true; + }; + programs = { + _1password.enable = true; + dconf.enable = true; + kdeconnect.enable = true; + }; + }; + }; +} diff --git a/outputs/nixos.nix b/outputs/nixos.nix index befcba0..3e1fed7 100644 --- a/outputs/nixos.nix +++ b/outputs/nixos.nix @@ -5,17 +5,9 @@ let hm = inputs.home-manager.nixosModules.home-manager; - sys = "${self}/sys"; + nixosModules = "${self}/nixos"; hosts = "${self}/hosts"; - base = "${sys}/modules/base"; - roles = "${sys}/modules/roles"; - gaming = "${roles}/gaming"; - workstation = "${roles}/workstation"; - media-server = "${roles}/media-server"; - - - specialArgs = {inherit inputs self;}; in @@ -27,9 +19,7 @@ in modules = [ "${hosts}/ooksdesk" hm - base - gaming - workstation + nixosModules ]; }; ookst480s = nixosSystem { @@ -38,9 +28,7 @@ in modules = [ "${hosts}/ookst480s" hm - base - - workstation + nixosModules ]; }; ooksmedia = nixosSystem { @@ -49,11 +37,7 @@ in modules = [ "${hosts}/ooksmedia" hm - base - - gaming - workstation - media-server + nixosModules ]; }; };