Charlotte 🦝 Delenk
7e8db3e3af
Some checks reported errors
Hydra nixosConfigurations.container-default-riscv64-linux Hydra build #24261 of nixos-config:pr618:nixosConfigurations.container-default-riscv64-linux
Hydra nixosConfigurations.container-default-x86_64-linux Hydra build #24262 of nixos-config:pr618:nixosConfigurations.container-default-x86_64-linux
Hydra nixosConfigurations.container-default-aarch64-linux Hydra build #24260 of nixos-config:pr618:nixosConfigurations.container-default-aarch64-linux
Hydra nixosConfigurations.thinkrac Hydra build #24267 of nixos-config:pr618:nixosConfigurations.thinkrac
Hydra nixosConfigurations.rainbow-resort Hydra build #24266 of nixos-config:pr618:nixosConfigurations.rainbow-resort
Hydra nixosConfigurations.pc-installer Hydra build #24265 of nixos-config:pr618:nixosConfigurations.pc-installer
Hydra checks.x86_64-linux.containers-default Hydra build #24259 of nixos-config:pr618:checks.x86_64-linux.containers-default
Hydra nixosConfigurations.not522 Hydra build #24263 of nixos-config:pr618:nixosConfigurations.not522
Hydra nixosConfigurations.not522-installer Hydra build #24264 of nixos-config:pr618:nixosConfigurations.not522-installer
61 lines
2 KiB
Nix
61 lines
2 KiB
Nix
{
|
|
config,
|
|
nixos-config,
|
|
lib,
|
|
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 = [
|
|
"${nixos-config}/config"
|
|
./disko.nix
|
|
./grub.nix
|
|
./hardware.nix
|
|
"${nixos-config}/config/networkmanager.nix"
|
|
];
|
|
system.stateVersion = config.system.nixos.version;
|
|
specialisation.graphical = {
|
|
configuration.imports = [
|
|
./graphical.nix
|
|
"${nixos-config}/config/graphical/plymouth.nix"
|
|
{
|
|
nix.auto-update.specialisation = "graphical";
|
|
}
|
|
];
|
|
};
|
|
specialisation.graphical-verbose = {
|
|
configuration.imports = [
|
|
./graphical.nix
|
|
{
|
|
nix.auto-update.specialisation = "graphical-verbose";
|
|
}
|
|
];
|
|
};
|
|
isInstaller = true;
|
|
environment.etc."install-closure".source = "${closureInfo}/store-paths";
|
|
environment.systemPackages = [
|
|
(pkgs.writeShellScriptBin "install-thinkrac-unattended" ''
|
|
set -eux
|
|
exec ${pkgs.disko}/bin/disko-install --flake "${nixos-config}#thinkrac" --disk main "${nixos-config.nixosConfigurations.thinkrac.config.disko.devices.disk.main.device}"
|
|
'')
|
|
(pkgs.writeShellScriptBin "install-rainbow-resort-unattended" ''
|
|
set -eux
|
|
exec ${pkgs.disko}/bin/disko-install --flake "${nixos-config}#rainbow-resort" --disk main "${nixos-config.nixosConfigurations.rainbow-resort.config.disko.devices.disk.main.device}"
|
|
'')
|
|
];
|
|
}
|