From 32ffdec22d91045de2df59e60fd4b95de148d2b0 Mon Sep 17 00:00:00 2001 From: Filippo Berto Date: Tue, 20 Dec 2022 23:36:53 +0100 Subject: [PATCH] Move installerModules to top --- flake.nix | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/flake.nix b/flake.nix index b7c38f0..e916f3d 100644 --- a/flake.nix +++ b/flake.nix @@ -125,6 +125,26 @@ ./nixos_modules/zerotier.nix ]; + installerModules = [ + # Nix configuration + { + nixpkgs = { inherit overlays config; }; + nix = { + extraOptions = "experimental-features = nix-command flakes"; + registry = { + stable = { from = { id = "stable"; type = "indirect"; }; flake = nixpkgs; }; + unstable = { from = { id = "unstable"; type = "indirect"; }; flake = nixpkgs-u; }; + }; + }; + } + + ./nixos_modules/bertof_user.nix + ./nixos_modules/distributed.nix + ./nixos_modules/extended_registry.nix + ./nixos_modules/zerotier.nix + ./nixos_modules/installer.nix + ]; + thorConfig = { nixosConfigurations = { thor = nixpkgs.lib.nixosSystem rec { @@ -250,40 +270,20 @@ }; }; - images = with flake-utils.lib; let - installerModules = [ - # Nix configuration - { - nixpkgs = { inherit overlays config; }; - nix = { - extraOptions = "experimental-features = nix-command flakes"; - registry = { - stable = { from = { id = "stable"; type = "indirect"; }; flake = nixpkgs; }; - unstable = { from = { id = "unstable"; type = "indirect"; }; flake = nixpkgs-u; }; - }; - }; - } - - ./nixos_modules/bertof_user.nix - ./nixos_modules/distributed.nix - ./nixos_modules/extended_registry.nix - ./nixos_modules/zerotier.nix - ]; - in - eachSystem [ system.x86_64-linux system.aarch64-linux ] (system: + images = with flake-utils.lib; eachSystem [ system.x86_64-linux system.aarch64-linux ] (system: { packages = { # Installer ISO install-iso = nixos-generators.nixosGenerate { inherit system; - modules = installerModules ++ [ ./nixos_modules/installer.nix ]; + modules = installerModules; format = "install-iso"; }; # Installer DigitalOcean do = nixos-generators.nixosGenerate { inherit system; - modules = installerModules ++ [ ./nixos_modules/installer.nix ]; + modules = installerModules; format = "do"; }; };