modified: auto-installer/installer.nix
This commit is contained in:
@@ -34,6 +34,11 @@ environment.etc."git-credentials".text =
|
|||||||
description = "Automatic NixOS installation";
|
description = "Automatic NixOS installation";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network-online.target" ];
|
after = [ "network-online.target" ];
|
||||||
|
path = [
|
||||||
|
pkgs.parted
|
||||||
|
pkgs.util-linux
|
||||||
|
pkgs.e2fsprogs
|
||||||
|
];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStart = pkgs.writeShellScript "auto-install.sh" ''
|
ExecStart = pkgs.writeShellScript "auto-install.sh" ''
|
||||||
@@ -57,10 +62,15 @@ environment.etc."git-credentials".text =
|
|||||||
|
|
||||||
#mount nixos partition
|
#mount nixos partition
|
||||||
mount /dev/disk/by-label/nixos /mnt
|
mount /dev/disk/by-label/nixos /mnt
|
||||||
|
# Choose a disk-backed temp directory
|
||||||
|
mkdir -p /mnt/install-tmp
|
||||||
|
export TMPDIR=/mnt/install-tmp
|
||||||
|
|
||||||
nixos-install --flake "$(cat /etc/flake-url)" --no-root-password
|
nixos-install --flake "$(cat /etc/flake-url)" --no-root-password
|
||||||
|
rm -r /mnt/install-tmp
|
||||||
sleep 10
|
sleep 10
|
||||||
reboot
|
reboot
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user