summaryrefslogtreecommitdiffstats
path: root/lass/1systems/hilum
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2023-07-25 20:39:35 +0200
committertv <tv@krebsco.de>2023-07-25 20:39:35 +0200
commit5d1b0675cf179f863a5b34b67661a953197b6057 (patch)
treedd9c83dff894fd97cee61dd1b2df3eaeecbbd740 /lass/1systems/hilum
parenta2c9ad05b2e8237b915a100e1e38ca0f3d18526c (diff)
parent8eab63eaa81717391269a61355cb7fb64341fd1a (diff)
Merge remote-tracking branch 'orange/master'
Diffstat (limited to 'lass/1systems/hilum')
-rw-r--r--lass/1systems/hilum/config.nix5
-rw-r--r--lass/1systems/hilum/disk.nix18
-rwxr-xr-xlass/1systems/hilum/flash-stick.sh8
-rw-r--r--lass/1systems/hilum/physical.nix5
4 files changed, 15 insertions, 21 deletions
diff --git a/lass/1systems/hilum/config.nix b/lass/1systems/hilum/config.nix
index 3f25991d9..953b5d0d4 100644
--- a/lass/1systems/hilum/config.nix
+++ b/lass/1systems/hilum/config.nix
@@ -4,13 +4,8 @@
<stockholm/lass>
<stockholm/lass/2configs/retiolum.nix>
- <stockholm/lass/2configs/baseX.nix>
- <stockholm/lass/2configs/browsers.nix>
- <stockholm/lass/2configs/programs.nix>
<stockholm/lass/2configs/network-manager.nix>
- <stockholm/lass/2configs/mail.nix>
<stockholm/lass/2configs/syncthing.nix>
- <stockholm/lass/2configs/nfs-dl.nix>
];
krebs.build.host = config.krebs.hosts.hilum;
diff --git a/lass/1systems/hilum/disk.nix b/lass/1systems/hilum/disk.nix
index 926401648..b5199d432 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 17a5fc580..9846ea087 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 6f160062d..9caf8e531 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;
}