2023-11-28 17:41:58 +03:00
|
|
|
{ pkgs, inputs, ... }:
|
2022-12-30 19:19:35 +03:00
|
|
|
let
|
2023-01-12 23:26:17 +03:00
|
|
|
disko = inputs.disko;
|
|
|
|
kexec-installer = inputs.kexec-installer;
|
2022-12-30 19:19:35 +03:00
|
|
|
system-to-install = pkgs.nixos [
|
|
|
|
./system-to-install.nix
|
|
|
|
disko
|
|
|
|
];
|
|
|
|
in
|
|
|
|
{
|
2023-01-04 11:31:47 +03:00
|
|
|
system.activationScripts.rsa-key = ''
|
2023-05-10 11:56:29 +03:00
|
|
|
${pkgs.coreutils}/bin/install -D -m600 ${./ssh-keys/ssh} /root/.ssh/install_key
|
2023-01-04 11:31:47 +03:00
|
|
|
'';
|
2022-12-30 19:19:35 +03:00
|
|
|
|
2023-02-01 21:49:46 +03:00
|
|
|
environment.systemPackages = [ inputs.nixos-anywhere ];
|
2023-01-10 21:50:35 +03:00
|
|
|
|
2022-12-30 19:19:35 +03:00
|
|
|
environment.etc = {
|
2023-06-02 14:35:12 +03:00
|
|
|
"nixos-anywhere/disko".source = system-to-install.config.system.build.diskoScript;
|
2023-02-01 21:49:46 +03:00
|
|
|
"nixos-anywhere/system-to-install".source = system-to-install.config.system.build.toplevel;
|
|
|
|
"nixos-anywhere/kexec-installer".source = kexec-installer;
|
2022-12-30 19:19:35 +03:00
|
|
|
};
|
|
|
|
}
|