l hilum.r: add usb-flash stick, update disko config
This commit is contained in:
parent
76848d24c2
commit
add9f31613
@ -10,18 +10,14 @@
|
||||
partitions = [
|
||||
{
|
||||
name = "boot";
|
||||
type = "partition";
|
||||
start = "0";
|
||||
end = "1M";
|
||||
part-type = "primary";
|
||||
flags = ["bios_grub"];
|
||||
}
|
||||
{
|
||||
type = "partition";
|
||||
name = "ESP";
|
||||
start = "1MiB";
|
||||
start = "1M";
|
||||
end = "50%";
|
||||
fs-type = "fat32";
|
||||
bootable = true;
|
||||
content = {
|
||||
type = "filesystem";
|
||||
@ -31,19 +27,13 @@
|
||||
}
|
||||
{
|
||||
name = "root";
|
||||
type = "partition";
|
||||
start = "50%";
|
||||
end = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "hilum_luks";
|
||||
keyFile = keyFile;
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "xfs";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
@ -3,9 +3,13 @@ set -efux
|
||||
|
||||
disk=$1
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
export NIXPKGS_ALLOW_UNFREE=1
|
||||
(umask 077; pass show admin/hilum/luks > /tmp/hilum.luks)
|
||||
trap 'rm -f /tmp/hilum.luks' EXIT
|
||||
echo "$disk" > /tmp/hilum-disk
|
||||
trap 'rm -f /tmp/hilum-disk' EXIT
|
||||
|
||||
stockholm_root=$(git rev-parse --show-toplevel)
|
||||
ssh root@localhost -t -- $(nix-build \
|
||||
--no-out-link \
|
||||
@ -31,7 +35,9 @@ $(nix-build \
|
||||
--arg force true
|
||||
)
|
||||
ssh root@localhost << SSH
|
||||
NIXOS_CONFIG=/mnt/hilum/var/src/nixos-config nixos-install --no-root-password --root /mnt/hilum -I /var/src
|
||||
set -efux
|
||||
mkdir -p /mnt/hilum/etc
|
||||
NIXOS_CONFIG=/mnt/hilum/var/src/nixos-config nixos-install --no-bootloader --no-root-password --root /mnt/hilum -I /var/src
|
||||
nixos-enter --root /mnt/hilum -- nixos-rebuild -I /var/src switch --install-bootloader
|
||||
umount -Rv /mnt/hilum
|
||||
SSH
|
||||
|
@ -15,7 +15,7 @@
|
||||
;
|
||||
in lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = tryFile "/etc/hilum-disk" "/dev/sdz";
|
||||
default = tryFile "/etc/hilum-disk" (tryFile "/tmp/hilum-disk" "/dev/sdz");
|
||||
};
|
||||
config.environment.etc.hilum-disk.text = config.mainDisk;
|
||||
}
|
||||
@ -47,4 +47,7 @@
|
||||
|
||||
nix.maxJobs = lib.mkDefault 4;
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
|
||||
#weird bug with nixos-enter
|
||||
services.logrotate.enable = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user