nixos-laptop/machines/gamepc/configuration.nix

84 lines
1.7 KiB
Nix
Raw Normal View History

2024-11-07 19:47:40 +00:00
{lib, ...}: {
config = {
pim = {
cinnamon.enable = true;
};
facter.reportPath = ./facter.json;
networking.hostName = "gamepc";
users.users.pim.password = "";
users.users.root.password = "";
2024-11-09 09:29:18 +00:00
boot.loader.grub = {
enable = true;
efiSupport = true;
efiInstallAsRemovable = true;
2024-11-07 19:47:40 +00:00
};
disko.devices.disk = lib.genAttrs ["0" "1"] (name: {
type = "disk";
device = "/dev/nvme${name}n1";
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02"; # for grub MBR
};
2024-11-07 19:47:40 +00:00
ESP = {
2024-11-09 09:29:18 +00:00
size = "500M";
type = "EF00";
2024-11-07 19:47:40 +00:00
content = {
type = "mdraid";
name = "boot";
2024-11-07 19:47:40 +00:00
};
};
mdadm = {
size = "100%";
content = {
type = "mdraid";
name = "raid0";
};
};
};
};
});
disko.devices.mdadm = {
boot = {
type = "mdadm";
level = 1;
metadata = "1.0";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
2024-11-07 19:47:40 +00:00
raid0 = {
type = "mdadm";
level = 0;
content = {
type = "gpt";
partitions = {
primary = {
end = "-4G";
2024-11-07 19:47:40 +00:00
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
swap = {
size = "100%";
content = {
type = "swap";
};
};
};
};
};
};
};
}