diff --git a/hosts/lappy-t495/lappy-t495.nix b/hosts/lappy-t495/lappy-t495.nix index 16946ac..82a2fa0 100644 --- a/hosts/lappy-t495/lappy-t495.nix +++ b/hosts/lappy-t495/lappy-t495.nix @@ -9,53 +9,37 @@ in { users.root users.chaos - presets.home-manager.root-base - (with tree.presets.nixos; [ - desktopGnome + desktopGui laptop + gaming encryptedUSB ]) (with tree.profiles.nixos; [ cross.arm64 remoteBuilders + ]) - gaming.steam + (with presets.home-manager.by-user; [ + root.base + chaos.guiDevDesktop + chaos.gaming ]) ./secrets.nix ./hardware.nix ]); - home-manager.users.root.home.stateVersion = "24.05"; - - home-manager.users.chaos = { - imports = with tree.profiles.home-manager; [ - base - dev.all - reversing - homeFolders - musicLibrary - - programming.editors.nano - programming.editors.vscode - programming.languages.rust - programming.languages.nix - - gaming.platforms.steam - gaming.platforms.lutris - ]; - home.stateVersion = "24.05"; + networking.firewall = { + enable = true; + allowPing = true; }; - networking.firewall.enable = true; - networking.firewall.allowPing = true; - - networking.firewall.allowedTCPPorts = [8088]; - networking.hostName = "lappy-t495"; time.timeZone = "Europe/London"; system.stateVersion = "24.05"; + home-manager.users.root.home.stateVersion = "24.05"; + home-manager.users.chaos.home.stateVersion = "24.05"; } diff --git a/hosts/nixos.nix b/hosts/nixos.nix index e97958c..1b72ad2 100644 --- a/hosts/nixos.nix +++ b/hosts/nixos.nix @@ -3,7 +3,6 @@ nixpkgs-unstable, ... } @ inputs: let - inherit (nixpkgs-unstable.lib) forEach; mkTree = inputs.tree-input.tree; metaTree = mkTree ((import ../treeConfig.nix {}) // {inherit inputs;}); diff --git a/presets/home-manager/base.nix b/presets/home-manager/base.nix new file mode 100644 index 0000000..d6bfaf7 --- /dev/null +++ b/presets/home-manager/base.nix @@ -0,0 +1,5 @@ +{tree, ...}: { + imports = with tree.profiles.home-manager; [ + base + ]; +} diff --git a/presets/home-manager/by-user/chaos/gaming.nix b/presets/home-manager/by-user/chaos/gaming.nix new file mode 100644 index 0000000..f97e02d --- /dev/null +++ b/presets/home-manager/by-user/chaos/gaming.nix @@ -0,0 +1,7 @@ +{tree, ...}: { + home-manager.users.chaos = { + imports = with tree.presets.home-manager; [ + gaming + ]; + }; +} diff --git a/presets/home-manager/by-user/chaos/guiDesktop.nix b/presets/home-manager/by-user/chaos/guiDesktop.nix new file mode 100644 index 0000000..a18d8dd --- /dev/null +++ b/presets/home-manager/by-user/chaos/guiDesktop.nix @@ -0,0 +1,7 @@ +{tree, ...}: { + home-manager.users.chaos = { + imports = with tree.presets.home-manager; [ + guiDesktop + ]; + }; +} diff --git a/presets/home-manager/by-user/chaos/guiDevDesktop.nix b/presets/home-manager/by-user/chaos/guiDevDesktop.nix new file mode 100644 index 0000000..f15ec96 --- /dev/null +++ b/presets/home-manager/by-user/chaos/guiDevDesktop.nix @@ -0,0 +1,20 @@ +{ + tree, + lib, + ... +}: let + inherit (lib.lists) flatten; +in { + home-manager.users.chaos = { + imports = flatten (with tree; [ + (with presets.home-manager; [ + guiDesktop + devGui + ]) + + (with profiles.home-manager; [ + reversing + ]) + ]); + }; +} diff --git a/presets/home-manager/root-base.nix b/presets/home-manager/by-user/root/base.nix similarity index 58% rename from presets/home-manager/root-base.nix rename to presets/home-manager/by-user/root/base.nix index 00b3a90..aea4fd3 100644 --- a/presets/home-manager/root-base.nix +++ b/presets/home-manager/by-user/root/base.nix @@ -1,6 +1,6 @@ {tree, ...}: { home-manager.users.root = { - imports = with tree.profiles.home-manager; [ + imports = with tree.presets.home-manager; [ base ]; }; diff --git a/presets/home-manager/by-user/root/minimalServer.nix b/presets/home-manager/by-user/root/minimalServer.nix new file mode 100644 index 0000000..85d1410 --- /dev/null +++ b/presets/home-manager/by-user/root/minimalServer.nix @@ -0,0 +1,7 @@ +{tree, ...}: { + home-manager.users.root = { + imports = with tree.presets.home-manager; [ + minimalServer + ]; + }; +} diff --git a/presets/home-manager/devBase.nix b/presets/home-manager/devBase.nix new file mode 100644 index 0000000..6363d97 --- /dev/null +++ b/presets/home-manager/devBase.nix @@ -0,0 +1,9 @@ +{tree, ...}: { + imports = with tree.profiles.home-manager; [ + dev.all + + programming.editors.nano + programming.languages.rust + programming.languages.nix + ]; +} diff --git a/presets/home-manager/devGui.nix b/presets/home-manager/devGui.nix new file mode 100644 index 0000000..7c52359 --- /dev/null +++ b/presets/home-manager/devGui.nix @@ -0,0 +1,17 @@ +{ + lib, + tree, + ... +}: let + inherit (lib.lists) flatten; +in { + imports = flatten (with tree; [ + (with presets.home-manager; [ + devBase + ]) + + (with profiles.home-manager; [ + programming.editors.vscode + ]) + ]); +} diff --git a/presets/home-manager/gaming.nix b/presets/home-manager/gaming.nix new file mode 100644 index 0000000..96e2c3f --- /dev/null +++ b/presets/home-manager/gaming.nix @@ -0,0 +1,6 @@ +{tree, ...}: { + imports = with tree.profiles.home-manager; [ + gaming.steam + gaming.lutris + ]; +} diff --git a/presets/home-manager/guiDesktop.nix b/presets/home-manager/guiDesktop.nix new file mode 100644 index 0000000..004a2d2 --- /dev/null +++ b/presets/home-manager/guiDesktop.nix @@ -0,0 +1,30 @@ +{tree, ...}: { + imports = with tree.profiles.home-manager; [ + gui.base + gui.environments.gnome + + homeFolders + musicLibrary + + apps.fileRoller + apps.nautilus + apps.pavucontrol + apps.mpv + + apps.firefox + apps.telegram + apps.thunderbird + apps.toot-cli + + apps.obsidian + apps.libreoffice + + apps.nicotine-plus + apps.musicutil + + apps.mullvad + apps.aria2 + apps.rclone + apps.restic + ]; +} diff --git a/presets/home-manager/minimalServer.nix b/presets/home-manager/minimalServer.nix new file mode 100644 index 0000000..bbc96a2 --- /dev/null +++ b/presets/home-manager/minimalServer.nix @@ -0,0 +1,7 @@ +{tree, ...}: { + imports = with tree.profiles.home-manager; [ + base.zsh + base.age-encryption + dev.small + ]; +} diff --git a/presets/home-manager/root-minimalServer.nix b/presets/home-manager/root-minimalServer.nix deleted file mode 100644 index 3a911c0..0000000 --- a/presets/home-manager/root-minimalServer.nix +++ /dev/null @@ -1,9 +0,0 @@ -{tree, ...}: { - home-manager.users.root = { - imports = with tree.profiles.home-manager; [ - base.zsh - base.age-encryption - dev.small - ]; - }; -} diff --git a/presets/nixos/containerBase.nix b/presets/nixos/containerBase.nix index 290c5cc..30aaa53 100644 --- a/presets/nixos/containerBase.nix +++ b/presets/nixos/containerBase.nix @@ -8,7 +8,7 @@ profiles.nixos.base users.root - presets.home-manager.root-minimalServer + presets.home-manager.by-user.root.minimalServer modules.nixos.rcloneServe modules.nixos.rcloneSync diff --git a/presets/nixos/desktopBase.nix b/presets/nixos/desktopBase.nix deleted file mode 100644 index f8d7cd4..0000000 --- a/presets/nixos/desktopBase.nix +++ /dev/null @@ -1,38 +0,0 @@ -{tree, ...}: { - imports = with tree.profiles.nixos; [ - wifiHardware - - sound.base - sound.pipewire - gui.base - - mullvad - ]; - - home-manager.users.chaos = { - imports = with tree.profiles.home-manager; [ - gui.base - - apps.fileRoller - apps.nautilus - apps.pavucontrol - apps.mpv - - apps.firefox - apps.telegram - apps.thunderbird - apps.toot-cli - - apps.obsidian - apps.libreoffice - - apps.nicotine-plus - apps.musicutil - - apps.mullvad - apps.aria2 - apps.rclone - apps.restic - ]; - }; -} diff --git a/presets/nixos/desktopGnome.nix b/presets/nixos/desktopGnome.nix deleted file mode 100644 index 1602ecc..0000000 --- a/presets/nixos/desktopGnome.nix +++ /dev/null @@ -1,12 +0,0 @@ -{tree, ...}: { - imports = with tree; [ - presets.nixos.desktopBase - - profiles.nixos.gui.environments.gnome - ]; - home-manager.users.chaos = { - imports = with tree; [ - profiles.home-manager.gui.environments.gnome - ]; - }; -} diff --git a/presets/nixos/desktopGui.nix b/presets/nixos/desktopGui.nix new file mode 100644 index 0000000..2a45aea --- /dev/null +++ b/presets/nixos/desktopGui.nix @@ -0,0 +1,25 @@ +{ + lib, + tree, + ... +}: let + inherit (lib.lists) flatten; +in { + imports = flatten (with tree; [ + (with profiles.nixos; [ + gui.base + gui.environments.gnome + + sound.base + sound.pipewire + + wifiHardware + + mullvad + ]) + + (with presets.home-manager; [ + by-user.chaos.guiDesktop + ]) + ]); +} diff --git a/presets/nixos/gaming.nix b/presets/nixos/gaming.nix new file mode 100644 index 0000000..8277192 --- /dev/null +++ b/presets/nixos/gaming.nix @@ -0,0 +1,5 @@ +{tree, ...}: { + imports = with tree.profiles.nixos; [ + gaming.steam + ]; +} diff --git a/presets/nixos/serverBase.nix b/presets/nixos/serverBase.nix index 286fa90..101ef29 100644 --- a/presets/nixos/serverBase.nix +++ b/presets/nixos/serverBase.nix @@ -1,7 +1,7 @@ {tree, ...}: { imports = with tree; [ users.root - presets.home-manager.root-minimalServer + presets.home-manager.by-user.root.minimalServer profiles.nixos.sshd diff --git a/profiles/home-manager/gaming/emulators/ds.nix b/profiles/home-manager/gaming/emulators/ds.nix deleted file mode 100644 index 3165976..0000000 --- a/profiles/home-manager/gaming/emulators/ds.nix +++ /dev/null @@ -1 +0,0 @@ -{pkgs, ...}: {home.packages = with pkgs; [melonDS];} diff --git a/profiles/home-manager/gaming/games/minecraft.nix b/profiles/home-manager/gaming/games/minecraft.nix deleted file mode 100644 index f16225c..0000000 --- a/profiles/home-manager/gaming/games/minecraft.nix +++ /dev/null @@ -1 +0,0 @@ -{pkgs, ...}: {home.packages = with pkgs; [multimc jdk17];} diff --git a/profiles/home-manager/gaming/games/osu.nix b/profiles/home-manager/gaming/games/osu.nix deleted file mode 100644 index f7c3f8c..0000000 --- a/profiles/home-manager/gaming/games/osu.nix +++ /dev/null @@ -1 +0,0 @@ -{pkgs, ...}: {home.packages = with pkgs; [osu-lazer];} diff --git a/profiles/home-manager/gaming/lutris.nix b/profiles/home-manager/gaming/lutris.nix new file mode 100644 index 0000000..8dd113b --- /dev/null +++ b/profiles/home-manager/gaming/lutris.nix @@ -0,0 +1,9 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + (lutris.override { + extraPkgs = pkgs: with pkgs; [gamescope]; + }) + gamescope + wineWowPackages.staging + ]; +} diff --git a/profiles/home-manager/gaming/platforms/lutris.nix b/profiles/home-manager/gaming/platforms/lutris.nix deleted file mode 100644 index 14ab9b4..0000000 --- a/profiles/home-manager/gaming/platforms/lutris.nix +++ /dev/null @@ -1,3 +0,0 @@ -{pkgs, ...}: { - home.packages = with pkgs; [(lutris.override {extraPkgs = pkgs: with pkgs; [gamescope];}) wineWowPackages.staging]; -} diff --git a/profiles/home-manager/gaming/platforms/steam.nix b/profiles/home-manager/gaming/platforms/steam.nix deleted file mode 100644 index 927c94c..0000000 --- a/profiles/home-manager/gaming/platforms/steam.nix +++ /dev/null @@ -1 +0,0 @@ -{pkgs, ...}: {home.packages = with pkgs; [steam];} diff --git a/profiles/home-manager/gaming/steam.nix b/profiles/home-manager/gaming/steam.nix new file mode 100644 index 0000000..84fa128 --- /dev/null +++ b/profiles/home-manager/gaming/steam.nix @@ -0,0 +1,5 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + steam + ]; +} diff --git a/profiles/nixos/base/home.nix b/profiles/nixos/base/home.nix index d2bd906..8010099 100644 --- a/profiles/nixos/base/home.nix +++ b/profiles/nixos/base/home.nix @@ -19,7 +19,7 @@ in { }; }); }; - + config = { home-manager = { useGlobalPkgs = true;