diff options
-rw-r--r-- | flake.lock | bin | 25904 -> 25401 bytes | |||
-rw-r--r-- | flake.nix | 79 | ||||
-rw-r--r-- | nodes/snorlax/configuration.nix (renamed from modules/snorlax/default.nix) | 11 | ||||
-rw-r--r-- | nodes/snorlax/disk-config.nix (renamed from modules/snorlax/disk-config.nix) | 0 | ||||
-rw-r--r-- | nodes/snorlax/facter.json (renamed from modules/snorlax/facter.json) | 0 | ||||
-rw-r--r-- | nodes/snorlax/git.nix (renamed from modules/snorlax/git.nix) | 0 | ||||
-rw-r--r-- | nodes/snorlax/networking.nix (renamed from modules/snorlax/networking.nix) | 0 | ||||
-rw-r--r-- | nodes/snorlax/nginx.nix (renamed from modules/snorlax/nginx.nix) | 0 | ||||
-rw-r--r-- | nodes/snorlax/samba.nix (renamed from modules/snorlax/samba.nix) | 0 | ||||
-rw-r--r-- | nodes/snorlax/syncoid.nix (renamed from modules/snorlax/syncoid.nix) | 0 | ||||
-rw-r--r-- | nodes/snorlax/uvm-guests/cpanel.nix (renamed from modules/snorlax/uvm-guests/cpanel.nix) | 0 | ||||
-rw-r--r-- | nodes/snorlax/uvm-guests/default.nix (renamed from modules/snorlax/uvm-guests/default.nix) | 0 | ||||
-rw-r--r-- | nodes/tarrel/configuration.nix (renamed from modules/tarrel/default.nix) | 10 | ||||
-rw-r--r-- | nodes/tarrel/hardware-configuration.nix (renamed from modules/tarrel/hardware-configuration.nix) | 0 | ||||
-rw-r--r-- | nodes/tarrel/home-manager.nix (renamed from modules/tarrel/home-manager.nix) | 6 | ||||
-rw-r--r-- | nodes/work/configuration.nix (renamed from modules/work/default.nix) | 11 | ||||
-rw-r--r-- | nodes/work/hardware-configuration.nix (renamed from modules/work/hardware-configuration.nix) | 0 | ||||
-rw-r--r-- | nodes/work/home-manager.nix (renamed from modules/work/home-manager.nix) | 13 | ||||
-rw-r--r-- | nodes/work/networking.nix (renamed from modules/work/networking.nix) | 0 | ||||
-rw-r--r-- | nodes/work/secrets.nix (renamed from modules/work/secrets.nix) | 0 |
20 files changed, 42 insertions, 88 deletions
Binary files differ @@ -30,76 +30,15 @@ update-systemd-resolved.inputs.nixpkgs.follows = "nixpkgs"; }; - outputs = inputs@{ - self, - agenix, - disko, - home-manager, - microvm, - nixpkgs, - nixos-facter-modules, - update-systemd-resolved, - ... - }: - let - coreModules = [ - home-manager.nixosModules.home-manager - agenix.nixosModules.default - ./modules/core - ]; - - # These should at some point be included in coreModules - deviceMgmtModules = [ - disko.nixosModules.disko - nixos-facter-modules.nixosModules.facter - ]; - - mkServer = import ./lib/mkserver.nix { - inherit nixpkgs inputs; - }; - in + outputs = inputs@{ self, nixpkgs, ... }: { - nixosConfigurations.work = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs; }; - modules = coreModules ++ [ - update-systemd-resolved.nixosModules.update-systemd-resolved - { - environment.systemPackages = [ - agenix.packages."x86_64-linux".default - ]; - } - - ./modules/work - ]; - }; - - nixosConfigurations.tarrel = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs; }; - modules = coreModules ++ [ - { - environment.systemPackages = [ - agenix.packages."x86_64-linux".default - ]; - } - - ./modules/tarrel - ]; - }; - - nixosConfigurations.snorlax = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs; }; - - modules = coreModules ++ deviceMgmtModules ++ [ - microvm.nixosModules.host - - { config.facter.reportPath = ./modules/snorlax/facter.json; } - ./modules/snorlax - ]; - }; - - nixosConfigurations.backup = mkServer "backup.jras.nl"; + nixosConfigurations = builtins.listToAttrs (builtins.map (name: { + name = name; + value = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit inputs; }; + modules = [ ./nodes/${name}/configuration.nix ]; + }; + }) (builtins.attrNames (builtins.readDir ./nodes))); }; } diff --git a/modules/snorlax/default.nix b/nodes/snorlax/configuration.nix index ee47d83..743894e 100644 --- a/modules/snorlax/default.nix +++ b/nodes/snorlax/configuration.nix @@ -1,6 +1,11 @@ -{ lib, ... }: +{ inputs, lib, ... }: { imports = [ + inputs.home-manager.nixosModules.home-manager + inputs.agenix.nixosModules.default + inputs.disko.nixosModules.disko + inputs.nixos-facter-modules.nixosModules.facter + ./disk-config.nix ./syncoid.nix ./git.nix @@ -9,11 +14,13 @@ # ./uvm-guests ./networking.nix - ../core + ../../modules/core ]; system.stateVersion = "24.11"; + facter.reportPath = ./facter.json; + boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; boot.initrd.postDeviceCommands = lib.mkAfter '' diff --git a/modules/snorlax/disk-config.nix b/nodes/snorlax/disk-config.nix index 39a9ccf..39a9ccf 100644 --- a/modules/snorlax/disk-config.nix +++ b/nodes/snorlax/disk-config.nix diff --git a/modules/snorlax/facter.json b/nodes/snorlax/facter.json index 572dc4c..572dc4c 100644 --- a/modules/snorlax/facter.json +++ b/nodes/snorlax/facter.json diff --git a/modules/snorlax/git.nix b/nodes/snorlax/git.nix index e91afcb..e91afcb 100644 --- a/modules/snorlax/git.nix +++ b/nodes/snorlax/git.nix diff --git a/modules/snorlax/networking.nix b/nodes/snorlax/networking.nix index ec0cdcc..ec0cdcc 100644 --- a/modules/snorlax/networking.nix +++ b/nodes/snorlax/networking.nix diff --git a/modules/snorlax/nginx.nix b/nodes/snorlax/nginx.nix index bb09cd2..bb09cd2 100644 --- a/modules/snorlax/nginx.nix +++ b/nodes/snorlax/nginx.nix diff --git a/modules/snorlax/samba.nix b/nodes/snorlax/samba.nix index c7b692b..c7b692b 100644 --- a/modules/snorlax/samba.nix +++ b/nodes/snorlax/samba.nix diff --git a/modules/snorlax/syncoid.nix b/nodes/snorlax/syncoid.nix index 435e040..435e040 100644 --- a/modules/snorlax/syncoid.nix +++ b/nodes/snorlax/syncoid.nix diff --git a/modules/snorlax/uvm-guests/cpanel.nix b/nodes/snorlax/uvm-guests/cpanel.nix index b7fb4c3..b7fb4c3 100644 --- a/modules/snorlax/uvm-guests/cpanel.nix +++ b/nodes/snorlax/uvm-guests/cpanel.nix diff --git a/modules/snorlax/uvm-guests/default.nix b/nodes/snorlax/uvm-guests/default.nix index 39b0611..39b0611 100644 --- a/modules/snorlax/uvm-guests/default.nix +++ b/nodes/snorlax/uvm-guests/default.nix diff --git a/modules/tarrel/default.nix b/nodes/tarrel/configuration.nix index 9741d28..04bc978 100644 --- a/modules/tarrel/default.nix +++ b/nodes/tarrel/configuration.nix @@ -1,11 +1,15 @@ -{ config, ... }: +{ config, inputs, ... }: { imports = [ + inputs.home-manager.nixosModules.home-manager + inputs.agenix.nixosModules.default + inputs.disko.nixosModules.disko + ./hardware-configuration.nix ./home-manager.nix - ../core - ../hyprland.nix + ../../modules/core + ../../modules/hyprland.nix ]; system.stateVersion = "24.05"; diff --git a/modules/tarrel/hardware-configuration.nix b/nodes/tarrel/hardware-configuration.nix index 4604fcd..4604fcd 100644 --- a/modules/tarrel/hardware-configuration.nix +++ b/nodes/tarrel/hardware-configuration.nix diff --git a/modules/tarrel/home-manager.nix b/nodes/tarrel/home-manager.nix index 04187e9..c40238b 100644 --- a/modules/tarrel/home-manager.nix +++ b/nodes/tarrel/home-manager.nix @@ -5,9 +5,9 @@ home-manager.extraSpecialArgs = { inherit inputs; }; home-manager.users.jras = { imports = [ - ../home-manager/core - ../home-manager/hyprland.nix - ../home-manager/python.nix + ../../modules/home-manager/core + ../../modules/home-manager/hyprland.nix + ../../modules/home-manager/python.nix ]; home.username = "jras"; diff --git a/modules/work/default.nix b/nodes/work/configuration.nix index af28423..6d970b2 100644 --- a/modules/work/default.nix +++ b/nodes/work/configuration.nix @@ -1,8 +1,13 @@ -{ lib, pkgs, ... }: +{ lib, pkgs, inputs, ... }: { imports = [ - ../core - ../hyprland.nix + inputs.home-manager.nixosModules.home-manager + inputs.agenix.nixosModules.default + inputs.disko.nixosModules.disko + inputs.update-systemd-resolved.nixosModules.update-systemd-resolved + + ../../modules/core + ../../modules/hyprland.nix ./hardware-configuration.nix ./home-manager.nix diff --git a/modules/work/hardware-configuration.nix b/nodes/work/hardware-configuration.nix index 9c8c4b1..9c8c4b1 100644 --- a/modules/work/hardware-configuration.nix +++ b/nodes/work/hardware-configuration.nix diff --git a/modules/work/home-manager.nix b/nodes/work/home-manager.nix index c3ee4d9..c0d94bf 100644 --- a/modules/work/home-manager.nix +++ b/nodes/work/home-manager.nix @@ -5,13 +5,12 @@ home-manager.extraSpecialArgs = { inherit inputs; }; home-manager.users.jras = { imports = [ - ../home-manager/core - - ../home-manager/hyprland.nix - ../home-manager/hostnet.nix - ../home-manager/php.nix - ../home-manager/ansible.nix - ../home-manager/python.nix + ../../modules/home-manager/core + ../../modules/home-manager/hyprland.nix + ../../modules/home-manager/hostnet.nix + ../../modules/home-manager/php.nix + ../../modules/home-manager/ansible.nix + ../../modules/home-manager/python.nix ]; home.username = "jras"; diff --git a/modules/work/networking.nix b/nodes/work/networking.nix index 99ba8d7..99ba8d7 100644 --- a/modules/work/networking.nix +++ b/nodes/work/networking.nix diff --git a/modules/work/secrets.nix b/nodes/work/secrets.nix index d13599d..d13599d 100644 --- a/modules/work/secrets.nix +++ b/nodes/work/secrets.nix |