diff options
Diffstat (limited to 'hosts/enode/disko.nix')
| -rw-r--r-- | hosts/enode/disko.nix | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/hosts/enode/disko.nix b/hosts/enode/disko.nix index 2f51ab4..259e805 100644 --- a/hosts/enode/disko.nix +++ b/hosts/enode/disko.nix @@ -1,12 +1,4 @@ let - espPartition = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - mountOptions = [ - "umask=0077" - ]; - }; rootPartition = { type = "btrfs"; extraArgs = [ "-f" ]; # override existing partition @@ -84,9 +76,30 @@ in label = "boot"; size = "1G"; type = "EF00"; - content = espPartition; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ + "umask=0077" + ]; + }; + }; + swap = { + priority = 2; + name = "swap"; + label = "swap"; + size = "4G"; + content = { + type = "swap"; + discardPolicy = "both"; + postCreateHook = '' + swapon "$device" + ''; + }; }; root = { + priority = 3; size = "100%"; name = "root"; label = "root"; |
