From 21a405e977754d31215244cbd4be5eb928732e69 Mon Sep 17 00:00:00 2001 From: tdback Date: Sun, 5 Jan 2025 12:38:26 -0500 Subject: update server hostnames --- README.md | 9 ++- flake.nix | 142 ++++++++++++++++++++++++-------------------- hosts/eden/default.nix | 61 ------------------- hosts/eden/hardware.nix | 38 ------------ hosts/frigg/default.nix | 53 +++++++++++++++++ hosts/frigg/hardware.nix | 39 ++++++++++++ hosts/heimdall/default.nix | 42 +++++++++++++ hosts/heimdall/hardware.nix | 38 ++++++++++++ hosts/hive/default.nix | 42 ------------- hosts/hive/hardware.nix | 39 ------------ hosts/oasis/default.nix | 53 ----------------- hosts/oasis/hardware.nix | 39 ------------ hosts/odin/default.nix | 61 +++++++++++++++++++ hosts/odin/hardware.nix | 38 ++++++++++++ hosts/raindog/default.nix | 42 ------------- hosts/raindog/hardware.nix | 38 ------------ hosts/thor/default.nix | 42 +++++++++++++ hosts/thor/hardware.nix | 39 ++++++++++++ secrets/secrets.nix | 8 +-- 19 files changed, 439 insertions(+), 424 deletions(-) delete mode 100644 hosts/eden/default.nix delete mode 100644 hosts/eden/hardware.nix create mode 100644 hosts/frigg/default.nix create mode 100644 hosts/frigg/hardware.nix create mode 100644 hosts/heimdall/default.nix create mode 100644 hosts/heimdall/hardware.nix delete mode 100644 hosts/hive/default.nix delete mode 100644 hosts/hive/hardware.nix delete mode 100644 hosts/oasis/default.nix delete mode 100644 hosts/oasis/hardware.nix create mode 100644 hosts/odin/default.nix create mode 100644 hosts/odin/hardware.nix delete mode 100644 hosts/raindog/default.nix delete mode 100644 hosts/raindog/hardware.nix create mode 100644 hosts/thor/default.nix create mode 100644 hosts/thor/hardware.nix diff --git a/README.md b/README.md index 057ba18..3d28b7b 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,11 @@ # Flake Layout - `hosts/` - - `eden/` - my media server and makeshift NAS. Media is stored in a RAID-Z2 + - `odin/` - my media server and makeshift NAS. Media is stored in a RAID-Z2 ZFS pool for redundancy, with a caching drive for increased read performance. - - `hive/` - my "social" server, responsible for hosting my fediverse server + - `thor/` - my "social" server, responsible for hosting my fediverse server and a few websites. - - `oasis/` - my git and SFTP server. - - `raindog/` - my DNS server and SearXNG host. The name is inspired by one of - my beautiful dogs, Rainey. + - `frigg/` - my git and SFTP server. + - `heimdall/` - my DNS server and SearXNG host. - `sparrow/` - my laptop. - `woodpecker/` - my desktop. - `modules/` diff --git a/flake.nix b/flake.nix index 9040957..bcef212 100644 --- a/flake.nix +++ b/flake.nix @@ -12,67 +12,83 @@ }; }; - outputs = { ... }@inputs: - let - helpers = import ./modules { inherit inputs; }; - inherit (helpers) mergeSets mkSystem; - in - { - nixosConfigurations = mergeSets [ - (mkSystem "woodpecker" inputs.nixpkgs [ - { - type = "profiles"; - modules = [ "common" "fstrim" "libvirtd" "nvidia" "pipewire" "security" "steam" "wireshark" "x11" ]; - } - ]) - (mkSystem "sparrow" inputs.nixpkgs [ - { - type = "profiles"; - modules = [ "common" "pipewire" "security" "vpn" "x11" ]; - } - ]) - (mkSystem "raindog" inputs.nixpkgs [ - { - type = "profiles"; - modules = [ "common" "security" "upgrade" ]; - } - { type = "scripts"; modules = [ "motd" "pushover" ]; } - { type = "services"; modules = [ "blocky" "searx" "ssh" ]; } - ]) - (mkSystem "oasis" inputs.nixpkgs [ - { - type = "profiles"; - modules = [ "common" "podman" "security" "upgrade" "wireguard" "zfs" ]; - } - { type = "scripts"; modules = [ "motd" "pushover" "zquota" ]; } - { - type = "services"; - modules = [ "cgit" "proxy" "sftpgo" "ssh" ]; - } - ]) - (mkSystem "hive" inputs.nixpkgs [ - { - type = "profiles"; - modules = [ "common" "security" "upgrade" "wireguard" ]; - } - { type = "scripts"; modules = [ "motd" "pushover" ]; } - { - type = "services"; - modules = [ "fediverse" "proxy" "ssh" "web" ]; - } - ]) - (mkSystem "eden" inputs.nixpkgs [ - { - type = "containers"; - modules = [ "freshrss" "jellyfin" "lubelogger" "pinchflat" "vaultwarden" "watchtower" ]; - } - { - type = "profiles"; - modules = [ "common" "podman" "security" "share" "upgrade" "wireguard" "zfs" ]; - } - { type = "scripts"; modules = [ "motd" "pushover" "zquota" ]; } - { type = "services"; modules = [ "immich" "proxy" "ssh" ]; } - ]) - ]; - }; + outputs = { ... } @ inputs: let + helpers = import ./modules { inherit inputs; }; + inherit (helpers) mergeSets mkSystem; + in { + nixosConfigurations = mergeSets [ + (mkSystem "woodpecker" inputs.nixpkgs [ + { + type = "profiles"; + modules = [ "common" "fstrim" "libvirtd" "nvidia" "pipewire" "security" "steam" "wireshark" "x11" ]; + } + ]) + (mkSystem "sparrow" inputs.nixpkgs [ + { + type = "profiles"; + modules = [ "common" "pipewire" "security" "vpn" "x11" ]; + } + ]) + (mkSystem "frigg" inputs.nixpkgs [ + { + type = "profiles"; + modules = [ "common" "podman" "security" "upgrade" "wireguard" "zfs" ]; + } + { + type = "scripts"; + modules = [ "motd" "pushover" "zquota" ]; + } + { + type = "services"; + modules = [ "cgit" "proxy" "sftpgo" "ssh" ]; + } + ]) + (mkSystem "heimdall" inputs.nixpkgs [ + { + type = "profiles"; + modules = [ "common" "security" "upgrade" ]; + } + { + type = "scripts"; + modules = [ "motd" "pushover" ]; + } + { + type = "services"; + modules = [ "blocky" "searx" "ssh" ]; + } + ]) + (mkSystem "odin" inputs.nixpkgs [ + { + type = "containers"; + modules = [ "freshrss" "jellyfin" "lubelogger" "pinchflat" "vaultwarden" "watchtower" ]; + } + { + type = "profiles"; + modules = [ "common" "podman" "security" "share" "upgrade" "wireguard" "zfs" ]; + } + { + type = "scripts"; + modules = [ "motd" "pushover" "zquota" ]; + } + { + type = "services"; + modules = [ "immich" "proxy" "ssh" ]; + } + ]) + (mkSystem "thor" inputs.nixpkgs [ + { + type = "profiles"; + modules = [ "common" "security" "upgrade" "wireguard" ]; + } + { + type = "scripts"; + modules = [ "motd" "pushover"]; + } + { + type = "services"; + modules = [ "fediverse" "proxy" "ssh" "web" ]; + } + ]) + ]; + }; } diff --git a/hosts/eden/default.nix b/hosts/eden/default.nix deleted file mode 100644 index bb39dbe..0000000 --- a/hosts/eden/default.nix +++ /dev/null @@ -1,61 +0,0 @@ -{ lib, inputs, ... }: -{ - system.stateVersion = "24.05"; - - imports = [ ./hardware.nix ]; - - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - users = import "${inputs.self}/users"; - extraSpecialArgs = { - inherit inputs; - headless = true; - }; - }; - - networking = { - hostName = "eden"; - hostId = "bd03847d"; # Required for ZFS support. - nameservers = [ "10.44.0.1" ]; - defaultGateway.address = "10.44.0.1"; - interfaces.eno1 = { - useDHCP = false; - ipv4.addresses = [{ - address = "10.44.4.101"; - prefixLength = 16; - }]; - }; - }; - - time.timeZone = "America/Detroit"; - - boot = { - loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - }; - zfs.extraPools = [ "tank" ]; - }; - - services.zquota = { - enable = true; - quotas = { - "tank/backups" = 512; - "tank/media" = 1536; - }; - }; - - programs.motd = { - enable = true; - networkInterfaces = lib.lists.singleton "eno1"; - servicesToCheck = [ - "caddy" - "immich-machine-learning" - "immich-server" - "postgresql" - "redis-immich" - "zfs-zed" - ]; - }; -} diff --git a/hosts/eden/hardware.nix b/hosts/eden/hardware.nix deleted file mode 100644 index 00210c4..0000000 --- a/hosts/eden/hardware.nix +++ /dev/null @@ -1,38 +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" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/f3bedccb-3f2b-49ae-9be4-5ec9fe683027"; - fsType = "ext4"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/78C3-E7F8"; - 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..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.eno1.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/default.nix b/hosts/frigg/default.nix new file mode 100644 index 0000000..4803133 --- /dev/null +++ b/hosts/frigg/default.nix @@ -0,0 +1,53 @@ +{ lib, inputs, ... }: +{ + system.stateVersion = "24.05"; + + imports = [ ./hardware.nix ]; + + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users = import "${inputs.self}/users"; + extraSpecialArgs = { + inherit inputs; + headless = true; + }; + }; + + networking = { + hostName = "frigg"; + hostId = "7a7d723a"; # Required for ZFS support. + nameservers = [ "10.44.0.1" ]; + defaultGateway.address = "10.44.0.1"; + interfaces.enp59s0 = { + useDHCP = false; + ipv4.addresses = [{ + address = "10.44.4.103"; + prefixLength = 16; + }]; + }; + }; + + 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 = lib.lists.singleton "enp59s0"; + servicesToCheck = [ "caddy" "sftpgo" "zfs-zed" ]; + }; +} diff --git a/hosts/frigg/hardware.nix b/hosts/frigg/hardware.nix new file mode 100644 index 0000000..3870379 --- /dev/null +++ b/hosts/frigg/hardware.nix @@ -0,0 +1,39 @@ +# 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..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/heimdall/default.nix b/hosts/heimdall/default.nix new file mode 100644 index 0000000..50bbbaf --- /dev/null +++ b/hosts/heimdall/default.nix @@ -0,0 +1,42 @@ +{ lib, inputs, ... }: +{ + system.stateVersion = "24.05"; + + imports = [ ./hardware.nix ]; + + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users = import "${inputs.self}/users"; + extraSpecialArgs = { + inherit inputs; + headless = true; + }; + }; + + networking = { + hostName = "heimdall"; + nameservers = [ "10.44.0.1" ]; + defaultGateway.address = "10.44.0.1"; + interfaces.eno1 = { + useDHCP = false; + ipv4.addresses = [{ + address = "10.44.4.100"; + prefixLength = 16; + }]; + }; + }; + + time.timeZone = "America/Detroit"; + + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + + programs.motd = { + enable = true; + networkInterfaces = lib.lists.singleton "eno1"; + servicesToCheck = [ "blocky" "searx" ]; + }; +} diff --git a/hosts/heimdall/hardware.nix b/hosts/heimdall/hardware.nix new file mode 100644 index 0000000..b2a5571 --- /dev/null +++ b/hosts/heimdall/hardware.nix @@ -0,0 +1,38 @@ +# 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" "ehci_pci" "ahci" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/d62103eb-e154-4b71-b813-54ca76815a80"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/5972-1878"; + 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/hive/default.nix b/hosts/hive/default.nix deleted file mode 100644 index 61b8193..0000000 --- a/hosts/hive/default.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ lib, inputs, ... }: -{ - system.stateVersion = "24.05"; - - imports = [ ./hardware.nix ]; - - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - users = import "${inputs.self}/users"; - extraSpecialArgs = { - inherit inputs; - headless = true; - }; - }; - - networking = { - hostName = "hive"; - nameservers = [ "10.44.0.1" ]; - defaultGateway.address = "10.44.0.1"; - interfaces.eno1 = { - useDHCP = false; - ipv4.addresses = [{ - address = "10.44.4.102"; - prefixLength = 16; - }]; - }; - }; - - time.timeZone = "America/Detroit"; - - boot.loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - }; - - programs.motd = { - enable = true; - networkInterfaces = lib.lists.singleton "eno1"; - servicesToCheck = [ "caddy" "gotosocial" ]; - }; -} diff --git a/hosts/hive/hardware.nix b/hosts/hive/hardware.nix deleted file mode 100644 index 9e7a2f0..0000000 --- a/hosts/hive/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" "ehci_pci" "usb_storage" "usbhid" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/e336b96d-b3b4-4098-a0ca-9001fd381f88"; - fsType = "ext4"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/F804-40A9"; - 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..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.eno1.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp6s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/hosts/oasis/default.nix b/hosts/oasis/default.nix deleted file mode 100644 index 5b8ebb3..0000000 --- a/hosts/oasis/default.nix +++ /dev/null @@ -1,53 +0,0 @@ -{ lib, inputs, ... }: -{ - system.stateVersion = "24.05"; - - imports = [ ./hardware.nix ]; - - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - users = import "${inputs.self}/users"; - extraSpecialArgs = { - inherit inputs; - headless = true; - }; - }; - - networking = { - hostName = "oasis"; - hostId = "7a7d723a"; # Required for ZFS support. - nameservers = [ "10.44.0.1" ]; - defaultGateway.address = "10.44.0.1"; - interfaces.enp59s0 = { - useDHCP = false; - ipv4.addresses = [{ - address = "10.44.4.103"; - prefixLength = 16; - }]; - }; - }; - - 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 = lib.lists.singleton "enp59s0"; - servicesToCheck = [ "caddy" "sftpgo" "zfs-zed" ]; - }; -} diff --git a/hosts/oasis/hardware.nix b/hosts/oasis/hardware.nix deleted file mode 100644 index 3870379..0000000 --- a/hosts/oasis/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..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/odin/default.nix b/hosts/odin/default.nix new file mode 100644 index 0000000..47515e8 --- /dev/null +++ b/hosts/odin/default.nix @@ -0,0 +1,61 @@ +{ lib, inputs, ... }: +{ + system.stateVersion = "24.05"; + + imports = [ ./hardware.nix ]; + + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users = import "${inputs.self}/users"; + extraSpecialArgs = { + inherit inputs; + headless = true; + }; + }; + + networking = { + hostName = "odin"; + hostId = "bd03847d"; # Required for ZFS support. + nameservers = [ "10.44.0.1" ]; + defaultGateway.address = "10.44.0.1"; + interfaces.eno1 = { + useDHCP = false; + ipv4.addresses = [{ + address = "10.44.4.101"; + prefixLength = 16; + }]; + }; + }; + + time.timeZone = "America/Detroit"; + + boot = { + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + zfs.extraPools = [ "tank" ]; + }; + + services.zquota = { + enable = true; + quotas = { + "tank/backups" = 512; + "tank/media" = 1536; + }; + }; + + programs.motd = { + enable = true; + networkInterfaces = lib.lists.singleton "eno1"; + servicesToCheck = [ + "caddy" + "immich-machine-learning" + "immich-server" + "postgresql" + "redis-immich" + "zfs-zed" + ]; + }; +} diff --git a/hosts/odin/hardware.nix b/hosts/odin/hardware.nix new file mode 100644 index 0000000..00210c4 --- /dev/null +++ b/hosts/odin/hardware.nix @@ -0,0 +1,38 @@ +# 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" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/f3bedccb-3f2b-49ae-9be4-5ec9fe683027"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/78C3-E7F8"; + 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/raindog/default.nix b/hosts/raindog/default.nix deleted file mode 100644 index ac66068..0000000 --- a/hosts/raindog/default.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ lib, inputs, ... }: -{ - system.stateVersion = "24.05"; - - imports = [ ./hardware.nix ]; - - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - users = import "${inputs.self}/users"; - extraSpecialArgs = { - inherit inputs; - headless = true; - }; - }; - - networking = { - hostName = "raindog"; - nameservers = [ "10.44.0.1" ]; - defaultGateway.address = "10.44.0.1"; - interfaces.eno1 = { - useDHCP = false; - ipv4.addresses = [{ - address = "10.44.4.100"; - prefixLength = 16; - }]; - }; - }; - - time.timeZone = "America/Detroit"; - - boot.loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - }; - - programs.motd = { - enable = true; - networkInterfaces = lib.lists.singleton "eno1"; - servicesToCheck = [ "blocky" "searx" ]; - }; -} diff --git a/hosts/raindog/hardware.nix b/hosts/raindog/hardware.nix deleted file mode 100644 index b2a5571..0000000 --- a/hosts/raindog/hardware.nix +++ /dev/null @@ -1,38 +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" "ehci_pci" "ahci" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/d62103eb-e154-4b71-b813-54ca76815a80"; - fsType = "ext4"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/5972-1878"; - 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..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.eno1.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/hosts/thor/default.nix b/hosts/thor/default.nix new file mode 100644 index 0000000..0ec2fa9 --- /dev/null +++ b/hosts/thor/default.nix @@ -0,0 +1,42 @@ +{ lib, inputs, ... }: +{ + system.stateVersion = "24.05"; + + imports = [ ./hardware.nix ]; + + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users = import "${inputs.self}/users"; + extraSpecialArgs = { + inherit inputs; + headless = true; + }; + }; + + networking = { + hostName = "thor"; + nameservers = [ "10.44.0.1" ]; + defaultGateway.address = "10.44.0.1"; + interfaces.eno1 = { + useDHCP = false; + ipv4.addresses = [{ + address = "10.44.4.102"; + prefixLength = 16; + }]; + }; + }; + + time.timeZone = "America/Detroit"; + + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + + programs.motd = { + enable = true; + networkInterfaces = lib.lists.singleton "eno1"; + servicesToCheck = [ "caddy" "gotosocial" ]; + }; +} diff --git a/hosts/thor/hardware.nix b/hosts/thor/hardware.nix new file mode 100644 index 0000000..9e7a2f0 --- /dev/null +++ b/hosts/thor/hardware.nix @@ -0,0 +1,39 @@ +# 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" "ehci_pci" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/e336b96d-b3b4-4098-a0ca-9001fd381f88"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/F804-40A9"; + 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp6s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/secrets/secrets.nix b/secrets/secrets.nix index f007165..e1f4cbe 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -1,9 +1,9 @@ let systems = { - eden = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIByi8x1IgXBC6iw6MJoO7xIkkU4bdIaQ3Mi6zEtm+IJh"; - hive = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGEn+C6ktSqvvwNVf1zUeNKKtZJ1QgLVhQjU83+0RvSY"; - oasis = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICCvgPNEJrWjeCUmF/izLhIzaAwSNYHW9o5meYmGHGzj"; - raindog = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINq0rMkFlizGPijlHKMYS9CGWJ2T1ZJHqaLozWdoySz2"; + odin = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIByi8x1IgXBC6iw6MJoO7xIkkU4bdIaQ3Mi6zEtm+IJh"; + thor = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGEn+C6ktSqvvwNVf1zUeNKKtZJ1QgLVhQjU83+0RvSY"; + frigg = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICCvgPNEJrWjeCUmF/izLhIzaAwSNYHW9o5meYmGHGzj"; + heimdall = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINq0rMkFlizGPijlHKMYS9CGWJ2T1ZJHqaLozWdoySz2"; }; users = { -- cgit v1.2.3