From cea12431ffb5a6d48b0c8929f4f71bcd2018506b Mon Sep 17 00:00:00 2001 From: alisceon Date: Tue, 10 Mar 2026 21:11:52 +0100 Subject: [PATCH] highly vibed modularization --- flake.nix | 26 +++++++++++++------------- hosts/base.nix | 6 ++++++ hosts/default.nix | 6 ++++++ hosts/hosts/electra.nix | 6 ++++++ hosts/hosts/nuc.nix | 6 ++++++ hosts/hosts/tesla-nixos.nix | 6 ++++++ hosts/hosts/tower.nix | 6 ++++++ hosts/modules/stylix.nix | 6 ++++++ hosts/modules/wm/gnome/default.nix | 6 ++++++ hosts/modules/wm/sway/default.nix | 6 ++++++ hosts/server.nix | 6 ++++++ hosts/workstation.nix | 6 ++++++ 12 files changed, 79 insertions(+), 13 deletions(-) create mode 100644 hosts/base.nix create mode 100644 hosts/default.nix create mode 100644 hosts/hosts/electra.nix create mode 100644 hosts/hosts/nuc.nix create mode 100644 hosts/hosts/tesla-nixos.nix create mode 100644 hosts/hosts/tower.nix create mode 100644 hosts/modules/stylix.nix create mode 100644 hosts/modules/wm/gnome/default.nix create mode 100644 hosts/modules/wm/sway/default.nix create mode 100644 hosts/server.nix create mode 100644 hosts/workstation.nix diff --git a/flake.nix b/flake.nix index 533c056..8ca6bf9 100644 --- a/flake.nix +++ b/flake.nix @@ -43,7 +43,7 @@ inherit inputs; }; sharedModules = [ - ./hosts/common/default.nix + ./hosts/base.nix stylix.nixosModules.stylix home-manager.nixosModules.home-manager ({ config, ...}: { @@ -64,10 +64,10 @@ inherit pkgs; specialArgs = sharedSpecialArgs // {}; modules = sharedModules ++ [ - ./hosts/electra/configuration.nix - ./hosts/common/workstation.nix - ./hosts/common/wm/sway.nix - ./hosts/common/stylix.nix + ./hosts/hosts/electra.nix + ./hosts/workstation.nix + ./hosts/modules/wm/sway/default.nix + ./hosts/modules/stylix.nix home-manager.nixosModules.home-manager ({ config, ...}: { home-manager.users.alisceon.imports = [ @@ -87,10 +87,10 @@ inherit pkgs; specialArgs = sharedSpecialArgs // {}; modules = sharedModules ++ [ - ./hosts/tower/configuration.nix - ./hosts/common/workstation.nix - ./hosts/common/wm/sway.nix - ./hosts/common/stylix.nix + ./hosts/hosts/tower.nix + ./hosts/workstation.nix + ./hosts/modules/wm/sway/default.nix + ./hosts/modules/stylix.nix home-manager.nixosModules.home-manager ({ config, ...}: { home-manager.users.alisceon.imports = [ @@ -110,8 +110,8 @@ inherit pkgs; specialArgs = sharedSpecialArgs // {}; modules = sharedModules ++ [ - ./hosts/common/server.nix - ./hosts/tesla-nixos/configuration.nix + ./hosts/server.nix + ./hosts/hosts/tesla-nixos.nix nix-minecraft.nixosModules.minecraft-servers { nixpkgs.overlays = [ inputs.nix-minecraft.overlay ]; } home-manager.nixosModules.home-manager @@ -131,8 +131,8 @@ inherit pkgs; specialArgs = sharedSpecialArgs // {}; modules = sharedModules ++ [ - ./hosts/common/server.nix - ./hosts/nuc/configuration.nix + ./hosts/server.nix + ./hosts/hosts/nuc.nix home-manager.nixosModules.home-manager ({ config, ...}: { home-manager.users.alisceon.imports = [ diff --git a/hosts/base.nix b/hosts/base.nix new file mode 100644 index 0000000..60e690e --- /dev/null +++ b/hosts/base.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + imports = [ + ./default.nix + ]; +} # end file diff --git a/hosts/default.nix b/hosts/default.nix new file mode 100644 index 0000000..2298c2a --- /dev/null +++ b/hosts/default.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + imports = [ + ./common/default.nix + ]; +} # end file diff --git a/hosts/hosts/electra.nix b/hosts/hosts/electra.nix new file mode 100644 index 0000000..59f212e --- /dev/null +++ b/hosts/hosts/electra.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + imports = [ + ../electra/configuration.nix + ]; +} # end file diff --git a/hosts/hosts/nuc.nix b/hosts/hosts/nuc.nix new file mode 100644 index 0000000..43a83d6 --- /dev/null +++ b/hosts/hosts/nuc.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + imports = [ + ../nuc/configuration.nix + ]; +} # end file diff --git a/hosts/hosts/tesla-nixos.nix b/hosts/hosts/tesla-nixos.nix new file mode 100644 index 0000000..907ef89 --- /dev/null +++ b/hosts/hosts/tesla-nixos.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + imports = [ + ../tesla-nixos/configuration.nix + ]; +} # end file diff --git a/hosts/hosts/tower.nix b/hosts/hosts/tower.nix new file mode 100644 index 0000000..d07dea1 --- /dev/null +++ b/hosts/hosts/tower.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + imports = [ + ../tower/configuration.nix + ]; +} # end file diff --git a/hosts/modules/stylix.nix b/hosts/modules/stylix.nix new file mode 100644 index 0000000..5efaf2e --- /dev/null +++ b/hosts/modules/stylix.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + imports = [ + ../common/stylix.nix + ]; +} # end file diff --git a/hosts/modules/wm/gnome/default.nix b/hosts/modules/wm/gnome/default.nix new file mode 100644 index 0000000..00f6f21 --- /dev/null +++ b/hosts/modules/wm/gnome/default.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + imports = [ + ../../../common/wm/gnome.nix + ]; +} # end file diff --git a/hosts/modules/wm/sway/default.nix b/hosts/modules/wm/sway/default.nix new file mode 100644 index 0000000..f37f1ea --- /dev/null +++ b/hosts/modules/wm/sway/default.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + imports = [ + ../../../common/wm/sway.nix + ]; +} # end file diff --git a/hosts/server.nix b/hosts/server.nix new file mode 100644 index 0000000..9f9f72a --- /dev/null +++ b/hosts/server.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + imports = [ + ./common/server.nix + ]; +} # end file diff --git a/hosts/workstation.nix b/hosts/workstation.nix new file mode 100644 index 0000000..48d9422 --- /dev/null +++ b/hosts/workstation.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + imports = [ + ./common/workstation.nix + ]; +} # end file