re-arrange and add zfs exporter

This commit is contained in:
Joseph Hanson 2024-10-21 17:07:48 -05:00
parent 8270ec8689
commit ea716bd3a6
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o

View file

@ -15,9 +15,6 @@ in
inputs.nix-minecraft.nixosModules.minecraft-servers inputs.nix-minecraft.nixosModules.minecraft-servers
]; ];
# Debug
# boot.zfs.forceImportRoot = lib.mkForce true;
boot = { boot = {
initrd = { initrd = {
kernelModules = [ "nfs" ]; kernelModules = [ "nfs" ];
@ -29,28 +26,30 @@ in
kernelParams = [ "zfs.zfs_arc_max=107374182400" ]; # 100GB kernelParams = [ "zfs.zfs_arc_max=107374182400" ]; # 100GB
}; };
swapDevices = [ ];
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
users.users.root.openssh.authorizedKeys.keys = [ users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAGSFTSVPt43PBpSMSF1dGTzN2JbxztDZUml7g4+PnWe CSI-Driver@talos" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAGSFTSVPt43PBpSMSF1dGTzN2JbxztDZUml7g4+PnWe CSI-Driver@talos"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBROTzSefJGJeCNUgNLbE5l4sHHg2fHUO4sCwqvP+zAd root@Gollum" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBROTzSefJGJeCNUgNLbE5l4sHHg2fHUO4sCwqvP+zAd root@Gollum"
]; ];
programs = { # Network settings
_1password.enable = true; networking = {
# VSCode Compatibility Settings hostName = "shadowfax";
nix-ld.enable = true; hostId = "a885fabe";
useDHCP = false; # needed for bridge
networkmanager.enable = true;
firewall.enable = false;
interfaces = {
"enp36s0f0".useDHCP = true;
"enp36s0f1".useDHCP = true;
};
}; };
services = { sops = {
# Soft Serve secrets = { };
soft-serve = {
enable = true;
settings = import ./config/soft-serve.nix { };
};
# VSCode Compatibility Settings
vscode-server = {
enable = true;
};
}; };
# Home Manager # Home Manager
@ -71,37 +70,18 @@ in
}; };
}; };
# Network settings programs = {
networking = { # 1Password cli
hostName = "shadowfax"; _1password.enable = true;
hostId = "a885fabe";
useDHCP = false; # needed for bridge
networkmanager.enable = true;
firewall.enable = false;
interfaces = {
"enp36s0f0".useDHCP = true;
"enp36s0f1".useDHCP = true;
};
};
swapDevices = [ ]; # VSCode Compatibility Settings
nix-ld.enable = true;
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
sops = {
secrets = { };
}; };
services = { services = {
smartd = {
devices = smartdDevices;
# Short test every day at 2:00 AM and long test every Sunday at 4:00 AM.
defaults.monitored = "-a -o on -s (S/../.././02|L/../../7/04)";
};
};
## Minecraft # Minecraft
services.minecraft-servers = { minecraft-servers = {
# Me cc858467-2744-4c22-8514-86568fefd03b # Me cc858467-2744-4c22-8514-86568fefd03b
enable = true; enable = true;
eula = true; eula = true;
@ -114,6 +94,28 @@ in
}; };
}; };
# Smart daemon for monitoring disk health.
smartd = {
devices = smartdDevices;
# Short test every day at 2:00 AM and long test every Sunday at 4:00 AM.
defaults.monitored = "-a -o on -s (S/../.././02|L/../../7/04)";
};
# Soft Serve - SSH git server
soft-serve = {
enable = true;
settings = import ./config/soft-serve.nix { };
};
# VSCode Compatibility Settings
vscode-server = {
enable = true;
};
# ZFS Exporter
prometheus.exporters.zfs.enable = true;
};
# System settings and services. # System settings and services.
mySystem = { mySystem = {
purpose = "Production"; purpose = "Production";