feat(servers): add init cluster hw configs
All checks were successful
Discord / discord commits (push) Successful in 27s
All checks were successful
Discord / discord commits (push) Successful in 27s
This commit is contained in:
parent
78d7ef4206
commit
4ea15b6a9c
4 changed files with 92 additions and 0 deletions
|
@ -67,6 +67,7 @@
|
|||
|
||||
virtualisation = {
|
||||
libvirtd.enable = true;
|
||||
spiceUSBRedirection.enable = true;
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
qemu
|
||||
|
|
43
devices/cluster/default.nix
Normal file
43
devices/cluster/default.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
deviceName: {config, ...}: let
|
||||
inherit (config.vars) mainUser hostName;
|
||||
in {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
|
||||
../../modules/kmscon.nix
|
||||
../../modules/sshd.nix
|
||||
../../modules/tailscale.nix
|
||||
];
|
||||
|
||||
vars = {
|
||||
mainUser = "matt";
|
||||
hostName = deviceName;
|
||||
};
|
||||
|
||||
users.users.${mainUser} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"adm"
|
||||
];
|
||||
};
|
||||
|
||||
home-manager.users.${mainUser} = {
|
||||
imports = [];
|
||||
|
||||
# No touchy
|
||||
home.stateVersion = "24.05";
|
||||
};
|
||||
|
||||
networking = {
|
||||
inherit hostName;
|
||||
resolvconf.enable = true;
|
||||
firewall.enable = false;
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Montreal";
|
||||
|
||||
# No touchy
|
||||
system.stateVersion = "24.05";
|
||||
}
|
48
devices/cluster/hardware-configuration.nix
Normal file
48
devices/cluster/hardware-configuration.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
config,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||
|
||||
boot = {
|
||||
loader = {
|
||||
timeout = 2;
|
||||
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-label/NIXROOT";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-label/NIXBOOT";
|
||||
fsType = "vfat";
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/var/lib/swapfile";
|
||||
size = 16 * 1024;
|
||||
}
|
||||
];
|
||||
|
||||
zramSwap.enable = true;
|
||||
|
||||
hardware.cpu.intel.updateMicrocode = config.hardware.enableRedistributableFirmware;
|
||||
}
|
BIN
flake.nix
BIN
flake.nix
Binary file not shown.
Loading…
Reference in a new issue