summaryrefslogtreecommitdiff
path: root/hosts/poweredge-pro/key.nix
blob: f5074f221bc085719d5429e79a26d29bd7652008 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
	# Nixos root
	boot.initrd.systemd.enable = true;  # Default since 26.05
	boot.initrd.supportedFilesystems.ext4 = true;

	boot.initrd.systemd.mounts = [{
	  what = "/dev/disk/by-label/key";
	  where = "/key";
	  type = "ext4";
	  options = "ro";
	  unitConfig.DefaultDependencies = "no";
	  before = [ "zfs-import-nixos.service" ];
	  requiredBy = [ "zfs-import-nixos.service" ];
	}];

	# Storage
	sops.secrets."zfs-key-storage" = {
		sopsFile = ./resources/secrets/zfs-key.yaml;
		key = "storage";
		path = "/etc/zfs/keys/storage.key";
		mode = "0400";
	};
}