nixos-laptop/machines/gamepc/configuration.nix

99 lines
1.9 KiB
Nix
Raw Normal View History

2024-11-09 15:54:33 +00:00
{
config,
lib,
...
}: {
2024-11-07 19:47:40 +00:00
config = {
pim = {
cinnamon.enable = true;
};
facter.reportPath = ./facter.json;
networking.hostName = "gamepc";
2024-11-10 11:16:05 +00:00
services = {
openssh.enable = true;
tailscale.enable = true;
};
2024-11-09 15:54:33 +00:00
users.users = {
root.password = "";
pim = {
openssh.authorizedKeys.keys = config.pim.ssh.keys.pim;
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";
};
};
};
};
};
};
};
}