mirror of
https://github.com/tuxdotrs/tawm.git
synced 2025-07-06 21:16:35 +05:30
feat: add new host capella for game server hosting
This commit is contained in:
32
hosts/capella/default.nix
Normal file
32
hosts/capella/default.nix
Normal 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
54
hosts/capella/disko.nix
Normal 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
7
hosts/capella/home.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{...}: {
|
||||
imports = [
|
||||
../common/home.nix
|
||||
];
|
||||
|
||||
home.stateVersion = "24.11";
|
||||
}
|
Reference in New Issue
Block a user