nixos-config/modules/dk1/disk.nix

50 lines
949 B
Nix

{lib, ...}: {
imports = with lib.nixosModules; [disko];
disko.devices.disk.NixOS = {
device = "/dev/nvme0n1";
type = "disk";
content = {
type = "gpt";
partitions = {
ESP = {
type = "EF00";
size = "100M";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/efi";
};
};
Swap = {
type = "8200";
size = "16G";
content.type = "swap";
};
Root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
boot = {
loader = {
grub = {
enable = true;
efiSupport = true;
device = "nodev";
};
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/efi";
};
};
};
}