From 94fcff9396a287b3cb1fb9865fb96177e49d3485 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 11 May 2026 02:33:48 +0200 Subject: [PATCH] feat: adds `flora` --- hosts/flora/default.nix | 66 ++++++++++++++++++++++++++ hosts/flora/hardware-configuration.nix | 65 +++++++++++++++++++++++++ 2 files changed, 131 insertions(+) create mode 100644 hosts/flora/default.nix create mode 100644 hosts/flora/hardware-configuration.nix diff --git a/hosts/flora/default.nix b/hosts/flora/default.nix new file mode 100644 index 0000000..178a8fe --- /dev/null +++ b/hosts/flora/default.nix @@ -0,0 +1,66 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + imports = [ + ./hardware-configuration.nix + ./../../modules/core/default.server.nix + ./../../modules/services/docker.nix + ./../../modules/services/home-assistant.nix + ./../../modules/services/monitoring.nix + ./../../modules/services/smart-monitoring.nix + ./../../modules/services/tailscale.nix + ./../../modules/services/nfs.nix + ./../../modules/services/hd-idle.nix + ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + services = { + vnstat.enable = true; + smartd = { + enable = true; + autodetect = true; + }; + zfs = { + autoScrub.enable = true; + autoScrub.interval = "weekly"; + trim.enable = true; + }; + }; + + networking = { + hostName = "flora"; + networkmanager.enable = true; + firewall = { + allowedTCPPorts = [ + 80 + 443 + 25565 + 25567 + 5201 + ]; + allowedUDPPorts = [ + 5201 + ]; + }; + }; + + # services.xserver.videoDrivers = [ "nvidia" ]; # --> put this in roles/nvidia.nix + # liv.nvidia.enable = true; + + environment.systemPackages = [ + pkgs.kitty + pkgs.foot + ]; + + time.timeZone = "Europe/Amsterdam"; + i18n.defaultLocale = "en_US.UTF-8"; + + system.stateVersion = "25.11"; # Did you read the comment? +} diff --git a/hosts/flora/hardware-configuration.nix b/hosts/flora/hardware-configuration.nix new file mode 100644 index 0000000..72b3667 --- /dev/null +++ b/hosts/flora/hardware-configuration.nix @@ -0,0 +1,65 @@ +{ + config, + lib, + pkgs, + modulesPath, + ... +}: + +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.zfs.extraPools = [ + "main" + "spinners" + ]; + + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "usb_storage" + "usbhid" + "sd_mod" + ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + networking.hostId = "1e9d632b"; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/2AF3-68DF"; + fsType = "vfat"; + options = [ + "fmask=0022" + "dmask=0022" + ]; + }; + + fileSystems."/" = { + device = "rpool/root"; + fsType = "zfs"; + }; + + fileSystems."/nix" = { + device = "rpool/nix"; + fsType = "zfs"; + }; + + fileSystems."/var" = { + device = "rpool/var"; + fsType = "zfs"; + }; + + fileSystems."/home" = { + device = "rpool/home"; + fsType = "zfs"; + }; + + swapDevices = [ ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}