nix-config/hosts/patricknix/fs.nix

31 lines
831 B
Nix
Raw Normal View History

2024-07-26 22:12:48 +02:00
{ config, lib, ... }:
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;
}