feat: add new host capella for game server hosting

This commit is contained in:
2024-10-21 02:05:53 +05:30
parent 68de1ae948
commit 29520393c8
6 changed files with 156 additions and 33 deletions

32
hosts/capella/default.nix Normal file
View File

@ -0,0 +1,32 @@
{
modulesPath,
inputs,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
(modulesPath + "/profiles/qemu-guest.nix")
inputs.disko.nixosModules.default
(import ./disko.nix {device = "/dev/sda";})
../common
];
nixpkgs.hostPlatform = "x86_64-linux";
networking = {
hostName = "capella";
firewall.enable = false;
};
boot.loader.grub = {
efiSupport = true;
efiInstallAsRemovable = true;
};
environment.persistence."/persist" = {
enable = false;
};
system.stateVersion = "24.11";
}

54
hosts/capella/disko.nix Normal file
View File

@ -0,0 +1,54 @@
{device ? throw "Set this to the disk device, e.g. /dev/nvme0n1", ...}: {
disko.devices = {
disk.primary = {
inherit device;
type = "disk";
content = {
type = "gpt";
partitions = {
boot = {
name = "boot";
size = "1M";
type = "EF02";
};
esp = {
name = "ESP";
size = "500M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
name = "root";
size = "100%";
content = {
type = "lvm_pv";
vg = "pool";
};
};
};
};
};
lvm_vg = {
pool = {
type = "lvm_vg";
lvs = {
root = {
size = "100%FREE";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
mountOptions = [
"defaults"
];
};
};
};
};
};
};
}

7
hosts/capella/home.nix Normal file
View File

@ -0,0 +1,7 @@
{...}: {
imports = [
../common/home.nix
];
home.stateVersion = "24.11";
}