summaryrefslogtreecommitdiffstats
path: root/lass
diff options
context:
space:
mode:
authorlassulus <git@lassul.us>2023-07-08 15:14:05 +0200
committerlassulus <git@lassul.us>2023-07-08 15:14:05 +0200
commitadd9f3161321417da7493ff2c22c643c44e28c47 (patch)
treeefc9771e424a4c3ef0fb550bc22339427b95c47a /lass
parent76848d24c224b3a88b1e2ead3e9b895ed9319006 (diff)
l hilum.r: add usb-flash stick, update disko config
Diffstat (limited to 'lass')
-rw-r--r--lass/1systems/hilum/disk.nix18
-rwxr-xr-xlass/1systems/hilum/flash-stick.sh8
-rw-r--r--lass/1systems/hilum/physical.nix5
3 files changed, 15 insertions, 16 deletions
diff --git a/lass/1systems/hilum/disk.nix b/lass/1systems/hilum/disk.nix
index 92640164..b5199d43 100644
--- a/lass/1systems/hilum/disk.nix
+++ b/lass/1systems/hilum/disk.nix
@@ -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,18 +27,12 @@
}
{
name = "root";
- type = "partition";
start = "50%";
end = "100%";
content = {
- type = "luks";
- name = "hilum_luks";
- keyFile = keyFile;
- content = {
- type = "filesystem";
- format = "xfs";
- mountpoint = "/";
- };
+ type = "filesystem";
+ format = "ext4";
+ mountpoint = "/";
};
}
];
diff --git a/lass/1systems/hilum/flash-stick.sh b/lass/1systems/hilum/flash-stick.sh
index 17a5fc58..9846ea08 100755
--- a/lass/1systems/hilum/flash-stick.sh
+++ b/lass/1systems/hilum/flash-stick.sh
@@ -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
diff --git a/lass/1systems/hilum/physical.nix b/lass/1systems/hilum/physical.nix
index 6f160062..9caf8e53 100644
--- a/lass/1systems/hilum/physical.nix
+++ b/lass/1systems/hilum/physical.nix
@@ -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;
}