nix-config/hosts/patricknix/fs.nix

44 lines
1 KiB
Nix
Raw Normal View History

2023-08-30 20:18:26 +02:00
{
2025-01-14 22:20:08 +01:00
config,
lib,
pkgs,
...
}:
{
2023-08-30 20:18:26 +02:00
disko.devices = {
disk = {
2024-03-02 16:09:11 +01:00
m2-ssd = rec {
2023-08-30 20:18:26 +02:00
type = "disk";
device = "/dev/disk/by-id/${config.secrets.secrets.local.disko.m2-ssd}";
content = with lib.disko.gpt; {
2024-03-02 16:09:11 +01:00
type = "gpt";
partitions = {
2024-07-26 22:12:48 +02:00
boot = (partEfi "1GiB") // {
device = "${device}-part1";
};
swap = (partSwap "16GiB") // {
device = "${device}-part2";
};
rpool = (partLuksZfs "rpool" "rpool" "100%") // {
device = "${device}-part3";
};
2024-03-02 16:09:11 +01:00
};
2023-08-30 20:18:26 +02:00
};
};
};
zpool = with lib.disko.zfs; {
2024-07-26 22:12:48 +02:00
rpool = mkZpool { datasets = impermanenceZfsDatasets; };
2023-05-26 17:30:37 +02:00
};
};
2023-10-15 22:09:08 +02:00
fileSystems."/state".neededForBoot = true;
2023-11-03 22:59:13 +01:00
fileSystems."/persist".neededForBoot = true;
2025-01-14 22:20:08 +01:00
boot.initrd.systemd.extraBin = {
jq = lib.getExe pkgs.jq;
};
2025-01-15 13:11:41 +01:00
systemIdentity = {
enable = true;
pcr15 = "6214de8c3d861c4b451acc8c4e24294c95d55bcec516bbf15c077ca3bffb6547";
2025-01-14 22:20:08 +01:00
};
}