make the pc-installer evaluatable again

This commit is contained in:
Charlotte 🦝 Delenk 2024-11-14 15:55:23 +01:00
parent f473d23700
commit 1e7da7fe8d
2 changed files with 9 additions and 18 deletions

View file

@ -2,24 +2,8 @@
config,
nixos-config,
pkgs,
pureInputs,
...
}:
let
getDeps = name: [
nixos-config.nixosConfigurations.${name}.config.system.build.toplevel
nixos-config.nixosConfigurations.${name}.config.system.build.diskoScript
nixos-config.nixosConfigurations.${name}.config.system.build.diskoScript.drvPath
nixos-config.nixosConfigurations.${name}.pkgs.stdenv.drvPath
(nixos-config.nixosConfigurations.${name}.pkgs.closureInfo { rootPaths = [ ]; }).drvPath
];
dependencies =
(getDeps "rainbow-resort")
++ (getDeps "thinkrac")
++ map (i: i.outPath) (builtins.filter builtins.isAttrs (builtins.attrValues pureInputs));
closureInfo = pkgs.closureInfo { rootPaths = dependencies; };
in
{
networking.hostName = "pc-installer";
imports = [
@ -48,7 +32,14 @@ in
];
};
isInstaller = true;
environment.etc."install-closure".source = "${closureInfo}/store-paths";
environment.etc."system/rainbow-resort".source = "${nixos-config.nixosConfigurations.rainbow-resort.config.system.build.toplevel
}";
environment.etc."system/rainbow-resort-disko".source = "${nixos-config.nixosConfigurations.rainbow-resort.config.system.build.diskoScript
}";
environment.etc."system/thinkrac".source = "${nixos-config.nixosConfigurations.thinkrac.config.system.build.toplevel
}";
environment.etc."system/thinkrac-disko".source = "${nixos-config.nixosConfigurations.thinkrac.config.system.build.diskoScript
}";
environment.systemPackages = [
(pkgs.writeShellScriptBin "install-thinkrac-unattended" ''
set -eux

View file

@ -40,7 +40,7 @@ with lib;
};
};
config.nix.auto-update.enable = mkDefault config.nix.enable;
#config.nix.auto-update.enable = mkDefault config.nix.enable;
config.nix.auto-update.reboot = mkDefault true;
config.systemd.services.nixos-upgrade = mkIf config.nix.enable {
description = "NixOS Upgrade";