Parameterize

This commit is contained in:
Daniel Flanagan 2024-07-17 20:34:36 -05:00
parent 78c2222162
commit e21b0f019e

View file

@ -1,6 +1,7 @@
{ {
standardWithHibernateSwap = { standardWithHibernateSwap = {
disks ? ["/dev/sda"], disks ? ["/dev/sda"],
extraSubvolumes ? {},
swapSize, swapSize,
... ...
}: { }: {
@ -9,8 +10,6 @@
# it includes an LUKS-encrypted btrfs volume # it includes an LUKS-encrypted btrfs volume
# a swap partition big enough to dump all the machine's RAM into # a swap partition big enough to dump all the machine's RAM into
# this is my standard partitioning scheme for my machines: an LUKS-encrypted
# btrfs volume
disko.devices = { disko.devices = {
disk = { disk = {
primary = { primary = {
@ -22,7 +21,7 @@
ESP = { ESP = {
label = "EFI"; label = "EFI";
name = "ESP"; name = "ESP";
size = "1G"; size = "4G";
type = "EF00"; type = "EF00";
content = { content = {
type = "filesystem"; type = "filesystem";
@ -55,8 +54,9 @@
content = { content = {
type = "btrfs"; type = "btrfs";
extraArgs = ["-f"]; extraArgs = ["-f"];
subvolumes = { subvolumes =
"/root" = { {
"/nixos" = {
mountpoint = "/"; mountpoint = "/";
mountOptions = ["compress=zstd" "noatime"]; mountOptions = ["compress=zstd" "noatime"];
}; };
@ -68,7 +68,8 @@
mountpoint = "/nix"; mountpoint = "/nix";
mountOptions = ["compress=zstd" "noatime"]; mountOptions = ["compress=zstd" "noatime"];
}; };
}; }
// extraSubvolumes;
}; };
}; };
}; };