Move installerModules to top

This commit is contained in:
Filippo Berto 2022-12-20 23:36:53 +01:00
parent 5956d8480a
commit 32ffdec22d
Signed by: bertof
GPG key ID: 9DBF7E6A1D2CE9ED

View file

@ -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";
};
};