Add two new servers
This commit is contained in:
parent
26fd8569fe
commit
51044e15eb
25 changed files with 208 additions and 78 deletions
|
@ -1,10 +1,11 @@
|
|||
{ ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_hardened;
|
||||
kernelParams = [
|
||||
"amdgpu.si_support=1"
|
||||
"radeon.si_support=0"
|
||||
];
|
||||
lanzaboote.enable = true;
|
||||
loader.systemd-boot.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -5,13 +5,16 @@
|
|||
./disko
|
||||
./filesystems
|
||||
./hardware
|
||||
./user
|
||||
];
|
||||
|
||||
system = {
|
||||
nixos.tags = [ "pc" ];
|
||||
nixos.tags = [ "server" ];
|
||||
stateVersion = "25.05";
|
||||
};
|
||||
|
||||
deployment.targetHost = "";
|
||||
deployment.targetHost = "5dd:9cd7:f286:e2c7:4c3b:c2e1:7832:97a3";
|
||||
|
||||
networking.hostId = "0917a5c1";
|
||||
|
||||
services.nfs.server.enable = true;
|
||||
}
|
||||
|
|
|
@ -24,17 +24,11 @@
|
|||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
main = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "${config.networking.hostName}-disk";
|
||||
settings.allowDiscards = true;
|
||||
passwordFile = "/tmp/secret.key";
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
vg = "${config.networking.hostName}";
|
||||
};
|
||||
type = "lvm_pv";
|
||||
vg = "${config.networking.hostName}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -78,7 +72,7 @@
|
|||
# Impermanence
|
||||
"/persist" = {
|
||||
mountpoint = "/persist";
|
||||
mountOptions = [
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"ssd"
|
||||
];
|
||||
|
@ -90,7 +84,7 @@
|
|||
};
|
||||
};
|
||||
swap = {
|
||||
size = "8G";
|
||||
size = "2G";
|
||||
content = {
|
||||
type = "swap";
|
||||
discardPolicy = "both";
|
||||
|
|
|
@ -11,9 +11,6 @@
|
|||
];
|
||||
};
|
||||
|
||||
# Network mounts
|
||||
"kitty".enable = true;
|
||||
"midas".enable = true;
|
||||
"prophet".enable = true;
|
||||
"detritus".enable = false;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBQE+a1E88+ELJ5cDOMPlc9lnV1ysVndchgJ4MxCjeWd
|
|
@ -1,11 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
home-manager.users."${config.vars.mainUser}" = {
|
||||
home = {
|
||||
desktop.enable = true;
|
||||
gaming.enable = true;
|
||||
};
|
||||
|
||||
wayland.windowManager.sway.package = pkgs.swayfx;
|
||||
};
|
||||
}
|
11
hosts/elder/boot/default.nix
Normal file
11
hosts/elder/boot/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_hardened;
|
||||
kernelParams = [
|
||||
"amdgpu.si_support=1"
|
||||
"radeon.si_support=0"
|
||||
];
|
||||
loader.grub.enable = true;
|
||||
};
|
||||
}
|
20
hosts/elder/default.nix
Normal file
20
hosts/elder/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./boot
|
||||
./disko
|
||||
./filesystems
|
||||
./hardware
|
||||
];
|
||||
|
||||
system = {
|
||||
nixos.tags = [ "server" ];
|
||||
stateVersion = "25.05";
|
||||
};
|
||||
|
||||
deployment.targetHost = "570:3651:7f2:c26b:bccd:725b:be00:8a18";
|
||||
|
||||
networking.hostId = "447645a9";
|
||||
|
||||
services.nfs.server.enable = true;
|
||||
}
|
100
hosts/elder/disko/default.nix
Normal file
100
hosts/elder/disko/default.nix
Normal file
|
@ -0,0 +1,100 @@
|
|||
{ config, disko, ... }:
|
||||
{
|
||||
imports = [ disko.nixosModules.disko ];
|
||||
|
||||
disko.devices = {
|
||||
disk = {
|
||||
"${config.networking.hostName}" = {
|
||||
type = "disk";
|
||||
device = "/dev/sda";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
size = "1M";
|
||||
type = "EF02";
|
||||
};
|
||||
ESP = {
|
||||
size = "2G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
main = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
vg = "${config.networking.hostName}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
lvm_vg = {
|
||||
"${config.networking.hostName}" = {
|
||||
type = "lvm_vg";
|
||||
lvs = {
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ];
|
||||
subvolumes = {
|
||||
"/root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"ssd"
|
||||
];
|
||||
};
|
||||
"/prev" = {
|
||||
mountpoint = "/prev";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noexec"
|
||||
"ssd"
|
||||
];
|
||||
};
|
||||
"/nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"ssd"
|
||||
];
|
||||
};
|
||||
|
||||
# Impermanence
|
||||
"/persist" = {
|
||||
mountpoint = "/persist";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"ssd"
|
||||
];
|
||||
};
|
||||
"/persist/.snapshots" = { };
|
||||
"/persist/home" = { };
|
||||
"/persist/home/.snapshots" = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
swap = {
|
||||
size = "8G";
|
||||
content = {
|
||||
type = "swap";
|
||||
discardPolicy = "both";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Needed for impermanence
|
||||
fileSystems."/persist".neededForBoot = true;
|
||||
}
|
16
hosts/elder/filesystems/default.nix
Normal file
16
hosts/elder/filesystems/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ ... }:
|
||||
{
|
||||
fileSystems = {
|
||||
"/persist/storage" = {
|
||||
device = "/dev/disk/by-uuid/5c3c533b-1c70-4411-854a-37fa794fc17c";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"nofail"
|
||||
"nosuid"
|
||||
"subvol=storage"
|
||||
];
|
||||
};
|
||||
|
||||
"elder".enable = false;
|
||||
};
|
||||
}
|
23
hosts/elder/hardware/default.nix
Normal file
23
hosts/elder/hardware/default.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ modulesPath, ... }:
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
"ahci"
|
||||
"ehci_pci"
|
||||
"sd_mod"
|
||||
"sr_mod"
|
||||
"uhci_hcd"
|
||||
"usbhid"
|
||||
];
|
||||
kernelModules = [ "dm-snapshot" ];
|
||||
};
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
};
|
||||
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
}
|
|
@ -3,7 +3,6 @@
|
|||
imports = [
|
||||
./boot
|
||||
./disko
|
||||
./filesystems
|
||||
./hardware
|
||||
./user
|
||||
];
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
fileSystems = {
|
||||
# Network mounts
|
||||
"kitty".enable = true;
|
||||
"midas".enable = true;
|
||||
"prophet".enable = true;
|
||||
};
|
||||
}
|
|
@ -9,10 +9,5 @@
|
|||
"nosuid"
|
||||
];
|
||||
};
|
||||
|
||||
# Network mounts
|
||||
"kitty".enable = !config.system.steamdeck.enable;
|
||||
"midas".enable = !config.system.steamdeck.enable;
|
||||
"prophet".enable = !config.system.steamdeck.enable;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
];
|
||||
};
|
||||
|
||||
# Network mounts
|
||||
"midas".enable = true;
|
||||
"prophet".enable = true;
|
||||
"kitty".enable = false;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDOBa+Wz1FqFEnMeXflP0CPt2wnN819T+FdSCIwFLJjN
|
|
@ -11,8 +11,6 @@
|
|||
];
|
||||
};
|
||||
|
||||
# Network mounts
|
||||
"kitty".enable = true;
|
||||
"prophet".enable = true;
|
||||
"midas".enable = false;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIFGHaxdTeC1xnTx2BY5LLR5LxhdSkmYoWuOeEuRIz0k
|
|
@ -10,8 +10,6 @@
|
|||
];
|
||||
};
|
||||
|
||||
# Network mounts
|
||||
"kitty".enable = true;
|
||||
"midas".enable = true;
|
||||
"prophet".enable = false;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDXU+mo+lkFaGBV7wuzrGnlII15YS3/MkkG3KmGJRT0j
|
|
@ -37,10 +37,5 @@
|
|||
"subvol=libvirt"
|
||||
];
|
||||
};
|
||||
|
||||
# Network mounts
|
||||
"kitty".enable = true;
|
||||
"midas".enable = true;
|
||||
"prophet".enable = true;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue