diff --git a/flake.nix b/flake.nix index 4649828..f91d77b 100644 --- a/flake.nix +++ b/flake.nix @@ -145,6 +145,7 @@ docker = nixpkgs.lib.nixosSystem { linode-minimal = nixpkgs.lib.nixosSystem { inherit system; modules = [ + inputs.disko.nixosModules.disko ./hosts/linode/configuration.nix ./modules/hardware-configuration/vm/linode.nix diff --git a/hosts/linode/configuration.nix b/hosts/linode/configuration.nix index e478fa3..5c4e280 100644 --- a/hosts/linode/configuration.nix +++ b/hosts/linode/configuration.nix @@ -8,6 +8,7 @@ imports = [ # Include the results of the hardware scan. ../../modules/common/configuration.nix + ../../modules/disko/linode.nix ]; # Use the GRUB 2 boot loader. @@ -42,7 +43,7 @@ # services.xserver.enable = true; - + # Configure keymap in X11 # services.xserver.xkb.layout = "us"; diff --git a/modules/disko/linode.nix b/modules/disko/linode.nix new file mode 100644 index 0000000..b63ad96 --- /dev/null +++ b/modules/disko/linode.nix @@ -0,0 +1,55 @@ +{ ... }: + +{ + disko.devices = { + disk.main = { + type = "disk"; + device = "/dev/sda"; + + content = { +# type = "gpt"; + + partitions = { + root = { + priority = 1; + size = "100%"; + + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + extraArgs = [ + "-L" + "nixos" + ]; + }; + }; + }; + }; + }; + + disk.swap = { + type = "disk"; + device = "/dev/sdb"; + + content = { +# type = "gpt"; + + partitions = { + swap = { + priority = 1; + size = "100%"; + + content = { + type = "swap"; + extraArgs = [ + "-L" + "swap" + ]; + }; + }; + }; + }; + }; + }; +} \ No newline at end of file