diff --git a/disko/ext4-swap.nix b/disko/ext4-swap.nix index 27ef05d..e8677df 100644 --- a/disko/ext4-swap.nix +++ b/disko/ext4-swap.nix @@ -1,4 +1,4 @@ -{ device, swapSize ? 16 }: +{ device, swapSize ? "16G" }: { disko.devices = { disk.${device} = { @@ -31,7 +31,7 @@ type = "lvm_vg"; lvs = { # lvcreate swap = { # Logical Volume = "swap", /dev/vg1/swap - size = "${swapSize}G"; + size = swapSize; content = { type = "swap"; }; diff --git a/flake.nix b/flake.nix index c3edc0e..0460c90 100644 --- a/flake.nix +++ b/flake.nix @@ -196,7 +196,7 @@ system = x86; pkgs = andrej-pc-pkgs nixpkgs; modules = [ - (import ./disko/ext4-swap.nix {device = "/dev/sda"; swapSize = 16;}) + (import ./disko/ext4-swap.nix {device = "/dev/sda"; swapSize = "16G";}) (import ./disko/ext4.nix {device = "/dev/sdb";}) ./nixos/hosts/andrej-pc/configuration.nix ];