diff options
author | tdback <tyler@tdback.net> | 2025-01-26 11:31:00 -0500 |
---|---|---|
committer | tdback <tyler@tdback.net> | 2025-01-26 11:31:00 -0500 |
commit | a7c3d07078d0ca67afadd6fb24ab4b60b38c1109 (patch) | |
tree | b214be5bc6bd1ea67c0499ee54ce3ec06565e929 /hosts/frigg | |
parent | 63883c4dea9ca50a4fd8756323ab04bf66e3dd3d (diff) |
hosts: overhauled host configurations
Diffstat (limited to 'hosts/frigg')
-rw-r--r-- | hosts/frigg/default.nix | 63 | ||||
-rw-r--r-- | hosts/frigg/filesystems/default.nix | 17 | ||||
-rw-r--r-- | hosts/frigg/hardware.nix | 39 | ||||
-rw-r--r-- | hosts/frigg/modules/default.nix | 57 |
4 files changed, 105 insertions, 71 deletions
diff --git a/hosts/frigg/default.nix b/hosts/frigg/default.nix index cde7436..5c29df3 100644 --- a/hosts/frigg/default.nix +++ b/hosts/frigg/default.nix @@ -1,8 +1,34 @@ -{ lib, inputs, ... }: +{ + inputs, + lib, + ... +}: { system.stateVersion = "24.05"; - imports = [ ./hardware.nix ]; + imports = [ + ./filesystems + ./modules + ]; + + hardware = { + enableRedistributableFirmware = true; + cpu.intel.updateMicrocode = true; + }; + + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + boot.initrd.availableKernelModules = [ + "ahci" + "sd_mod" + "sdhci_pci" + "usb_storage" + "xhci_pci" + ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.zfs.extraPools = [ "tank" ]; home-manager = { useGlobalPkgs = true; @@ -14,9 +40,11 @@ }; }; + time.timeZone = "America/Detroit"; networking = { hostName = "frigg"; - hostId = "7a7d723a"; # Required for ZFS support. + # A host ID is required when enabling ZFS. + hostId = "7a7d723a"; nameservers = [ "10.44.0.1" ]; defaultGateway.address = "10.44.0.1"; interfaces.enp59s0 = { @@ -27,33 +55,4 @@ }; }; }; - - time.timeZone = "America/Detroit"; - - boot = { - loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - }; - zfs.extraPools = [ "tank" ]; - }; - - services.zquota = { - enable = true; - quotas = { - "tank/sftpgo" = 512; - }; - }; - - services.sftpgo.dataDir = "/tank/sftpgo"; - - programs.motd = { - enable = true; - networkInterfaces = [ "enp59s0" ]; - servicesToCheck = [ - "caddy" - "sftpgo" - "zfs-zed" - ]; - }; } diff --git a/hosts/frigg/filesystems/default.nix b/hosts/frigg/filesystems/default.nix new file mode 100644 index 0000000..3b390f8 --- /dev/null +++ b/hosts/frigg/filesystems/default.nix @@ -0,0 +1,17 @@ +{ + fileSystems."/" = { + device = "/dev/disk/by-uuid/3e333010-7dae-47cf-9288-85d58ddda699"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/8430-1FF8"; + fsType = "vfat"; + options = [ + "fmask=0022" + "dmask=0022" + ]; + }; + + swapDevices = [ ]; +} diff --git a/hosts/frigg/hardware.nix b/hosts/frigg/hardware.nix deleted file mode 100644 index 3870379..0000000 --- a/hosts/frigg/hardware.nix +++ /dev/null @@ -1,39 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: - -{ - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/3e333010-7dae-47cf-9288-85d58ddda699"; - fsType = "ext4"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/8430-1FF8"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; - - swapDevices = [ ]; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp59s0.useDHCP = lib.mkDefault true; - # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/hosts/frigg/modules/default.nix b/hosts/frigg/modules/default.nix new file mode 100644 index 0000000..68ac7f3 --- /dev/null +++ b/hosts/frigg/modules/default.nix @@ -0,0 +1,57 @@ +{ + config, + ... +}: +{ + modules = { + customs.cgit = { + enable = true; + scanPath = "/tank/git"; + url = "git.tdback.net"; + authorizedKeys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEzLpTEoej7P04KoNzokQ9IOnNZiKyi2+YQ8yU5WSKCb" + ]; + settings = { + root-title = "git.tdback.net"; + root-desc = "tdback's git repositories"; + enable-index-links = 1; + enable-index-owner = 0; + enable-commit-graph = 1; + enable-log-filecount = 1; + enable-log-linecount = 1; + readme = ":README.md"; + }; + }; + services.llm = { + enable = true; + port = 11111; + networkRange = "10.44.0.0/16"; + nvidiaGpu = true; + models = [ + "mistral" + "llama3.2" + ]; + }; + services.sftpgo = { + enable = true; + dataDir = "/tank/sftpgo"; + url = "${config.networking.hostName}.brownbread.net"; + }; + scripts.motd = { + enable = true; + networkInterfaces = [ "enp59s0" ]; + servicesToCheck = [ + "caddy" + "ollama" + "sftpgo" + "zfs-zed" + ]; + }; + scripts.zquota = { + enable = true; + quotas = { + "tank/sftpgo" = 512; + }; + }; + }; +} |