diff --git a/lib/modules/partition.nix b/lib/modules/partition.nix index 16c0e246..0fc88601 100644 --- a/lib/modules/partition.nix +++ b/lib/modules/partition.nix @@ -7,6 +7,7 @@ fs = { ext4 = "ext4"; + swap = "swap"; ntfs = "ntfs"; fat32 = "fat32"; }; @@ -99,12 +100,14 @@ formatScripts = { ${fs.ext4} = "mkfs.ext4 -F ${diskVar}"; + ${fs.swap} = "mkswap ${diskVar}"; ${fs.ntfs} = "mkfs.ntfs -F ${diskVar}"; ${fs.fat32} = "mkfs.fat -F 32 ${diskVar}"; }; labelScripts = { ${fs.ext4} = label: "e2label ${diskVar} ${label}"; + ${fs.swap} = label: "swaplabel ${diskVar} ${label}"; ${fs.ntfs} = label: "ntfslabel ${diskVar} ${label}"; ${fs.fat32} = label: "fatlabel ${diskVar} ${label}"; };