2022-12-30 19:19:35 +03:00
{ config , lib , pkgs , inputs , . . . }:
let
disko = inputs . disko ; #or "${builtins.fetchTarball "https://github.com/nix-community/disko/archive/master.tar.gz"}/module.nix";
kexec-installer = inputs . kexec-installer ; # or builtins.fetchurl "https://github.com/nix-community/nixos-images/releases/download/nixos-unstable/nixos-kexec-installer-${pkgs.stdenv.hostPlatform.system}.tar.gz";
system-to-install = pkgs . nixos [
./system-to-install.nix
disko
] ;
in
{
2023-01-04 11:31:47 +03:00
system . activationScripts . rsa-key = ''
$ { pkgs . coreutils } /bin/install - D - m600 $ { ./ssh-keys/ssh } /root/.ssh/id_rsa
'' ;
2022-12-30 19:19:35 +03:00
environment . etc = {
" n i x o s - r e m o t e / d i s k o " . source = system-to-install . config . system . build . disko ;
" n i x o s - r e m o t e / s y s t e m - t o - i n s t a l l " . source = system-to-install . config . system . build . toplevel ;
" n i x o s - r e m o t e / k e x e c - i n s t a l l e r " . source = kexec-installer ;
} ;
}