aboutsummaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'hosts')
-rw-r--r--hosts/frigg/default.nix63
-rw-r--r--hosts/frigg/filesystems/default.nix17
-rw-r--r--hosts/frigg/hardware.nix39
-rw-r--r--hosts/frigg/modules/default.nix57
-rw-r--r--hosts/heimdall/default.nix45
-rw-r--r--hosts/heimdall/filesystems/default.nix17
-rw-r--r--hosts/heimdall/hardware.nix38
-rw-r--r--hosts/heimdall/modules/default.nix17
-rw-r--r--hosts/loki/default.nix43
-rw-r--r--hosts/loki/filesystems/default.nix17
-rw-r--r--hosts/loki/hardware.nix37
-rw-r--r--hosts/loki/modules/default.nix23
-rw-r--r--hosts/odin/default.nix67
-rw-r--r--hosts/odin/filesystems/default.nix17
-rw-r--r--hosts/odin/hardware.nix38
-rw-r--r--hosts/odin/modules/default.nix50
-rw-r--r--hosts/sparrow/default.nix46
-rw-r--r--hosts/sparrow/filesystems/default.nix23
-rw-r--r--hosts/sparrow/hardware.nix41
-rw-r--r--hosts/thor/default.nix48
-rw-r--r--hosts/thor/filesystems/default.nix17
-rw-r--r--hosts/thor/hardware.nix39
-rw-r--r--hosts/thor/modules/default.nix26
-rw-r--r--hosts/woodpecker/default.nix45
-rw-r--r--hosts/woodpecker/filesystems/default.nix22
-rw-r--r--hosts/woodpecker/hardware.nix44
26 files changed, 507 insertions, 429 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;
+ };
+ };
+ };
+}
diff --git a/hosts/heimdall/default.nix b/hosts/heimdall/default.nix
index 38b523a..5d6876b 100644
--- a/hosts/heimdall/default.nix
+++ b/hosts/heimdall/default.nix
@@ -1,8 +1,32 @@
-{ 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 = [
+ "xhci_pci"
+ "ehci_pci"
+ "ahci"
+ "sd_mod"
+ ];
+ boot.kernelModules = [ "kvm-intel" ];
home-manager = {
useGlobalPkgs = true;
@@ -14,6 +38,7 @@
};
};
+ time.timeZone = "America/Detroit";
networking = {
hostName = "heimdall";
nameservers = [ "10.44.0.1" ];
@@ -26,20 +51,4 @@
};
};
};
-
- time.timeZone = "America/Detroit";
-
- boot.loader = {
- systemd-boot.enable = true;
- efi.canTouchEfiVariables = true;
- };
-
- programs.motd = {
- enable = true;
- networkInterfaces = [ "eno1" ];
- servicesToCheck = [
- "searx"
- "unbound"
- ];
- };
}
diff --git a/hosts/heimdall/filesystems/default.nix b/hosts/heimdall/filesystems/default.nix
new file mode 100644
index 0000000..a956d2d
--- /dev/null
+++ b/hosts/heimdall/filesystems/default.nix
@@ -0,0 +1,17 @@
+{
+ 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 = [ ];
+}
diff --git a/hosts/heimdall/hardware.nix b/hosts/heimdall/hardware.nix
deleted file mode 100644
index b2a5571..0000000
--- a/hosts/heimdall/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.<interface>.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/heimdall/modules/default.nix b/hosts/heimdall/modules/default.nix
new file mode 100644
index 0000000..814d1ff
--- /dev/null
+++ b/hosts/heimdall/modules/default.nix
@@ -0,0 +1,17 @@
+{
+ modules = {
+ services.dns = {
+ enable = true;
+ subnet = "10.44.0.0/16";
+ };
+ services.searx.enable = true;
+ scripts.motd = {
+ enable = true;
+ networkInterfaces = [ "eno1" ];
+ servicesToCheck = [
+ "searx"
+ "unbound"
+ ];
+ };
+ };
+}
diff --git a/hosts/loki/default.nix b/hosts/loki/default.nix
index ca6edab..b4d0da9 100644
--- a/hosts/loki/default.nix
+++ b/hosts/loki/default.nix
@@ -1,8 +1,28 @@
-{ inputs, ... }:
+{
+ inputs,
+ ...
+}:
{
system.stateVersion = "24.11";
- imports = [ ./hardware.nix ];
+ imports = [
+ ./filesystems
+ ./modules
+ ];
+
+ boot.loader.grub = {
+ enable = true;
+ device = "/dev/sda2";
+ efiSupport = true;
+ };
+ boot.initrd = {
+ availableKernelModules = [
+ "xhci_pci"
+ "virtio_scsi"
+ "sr_mod"
+ ];
+ kernelModules = [ "dm-snapshot" ];
+ };
home-manager = {
useGlobalPkgs = true;
@@ -14,26 +34,9 @@
};
};
+ time.timeZone = "America/Detroit";
networking = {
hostName = "loki";
networkmanager.enable = true;
};
-
- time.timeZone = "America/Detroit";
-
- boot.loader.grub = {
- enable = true;
- device = "/dev/sda2";
- efiSupport = true;
- };
-
- programs.motd = {
- enable = true;
- networkInterfaces = [ "enp1s0" ];
- servicesToCheck = [
- "coturn"
- "matrix"
- "postgresql"
- ];
- };
}
diff --git a/hosts/loki/filesystems/default.nix b/hosts/loki/filesystems/default.nix
new file mode 100644
index 0000000..6157762
--- /dev/null
+++ b/hosts/loki/filesystems/default.nix
@@ -0,0 +1,17 @@
+{
+ fileSystems."/" = {
+ device = "/dev/disk/by-uuid/a3a9fc5f-8809-4db0-b0f3-08e58cb79716";
+ fsType = "ext4";
+ };
+
+ fileSystems."/boot" = {
+ device = "/dev/disk/by-uuid/F4CB-1F7D";
+ fsType = "vfat";
+ options = [
+ "fmask=0022"
+ "dmask=0022"
+ ];
+ };
+
+ swapDevices = [ ];
+}
diff --git a/hosts/loki/hardware.nix b/hosts/loki/hardware.nix
deleted file mode 100644
index 15ed37d..0000000
--- a/hosts/loki/hardware.nix
+++ /dev/null
@@ -1,37 +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 + "/profiles/qemu-guest.nix")
- ];
-
- boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_scsi" "sr_mod" ];
- boot.initrd.kernelModules = [ "dm-snapshot" ];
- boot.kernelModules = [ ];
- boot.extraModulePackages = [ ];
-
- fileSystems."/" =
- { device = "/dev/disk/by-uuid/a3a9fc5f-8809-4db0-b0f3-08e58cb79716";
- fsType = "ext4";
- };
-
- fileSystems."/boot" =
- { device = "/dev/disk/by-uuid/F4CB-1F7D";
- 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.enp1s0.useDHCP = lib.mkDefault true;
-
- nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
-}
diff --git a/hosts/loki/modules/default.nix b/hosts/loki/modules/default.nix
new file mode 100644
index 0000000..fbf0d84
--- /dev/null
+++ b/hosts/loki/modules/default.nix
@@ -0,0 +1,23 @@
+{
+ inputs,
+ ...
+}:
+{
+ modules = {
+ services.matrix = {
+ enable = true;
+ url = "tdback.net";
+ registrationSecret = "${inputs.self}/secrets/synapseRegistration.age";
+ coturnStaticAuth = "${inputs.self}/secrets/coturnStaticAuth.age";
+ };
+ scripts.motd = {
+ enable = true;
+ networkInterfaces = [ "enp1s0" ];
+ servicesToCheck = [
+ "coturn"
+ "matrix"
+ "postgresql"
+ ];
+ };
+ };
+}
diff --git a/hosts/odin/default.nix b/hosts/odin/default.nix
index 52a2ace..e413d07 100644
--- a/hosts/odin/default.nix
+++ b/hosts/odin/default.nix
@@ -1,8 +1,36 @@
-{ 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 = [
+ "xhci_pci"
+ "ehci_pci"
+ "ahci"
+ "usbhid"
+ "usb_storage"
+ "sd_mod"
+ "sr_mod"
+ ];
+ boot.kernelModules = [ "kvm-intel" ];
+ boot.zfs.extraPools = [ "tank" ];
home-manager = {
useGlobalPkgs = true;
@@ -14,9 +42,11 @@
};
};
+ time.timeZone = "America/Detroit";
networking = {
hostName = "odin";
- hostId = "bd03847d"; # Required for ZFS support.
+ # A host ID is required when enabling ZFS.
+ hostId = "bd03847d";
nameservers = [ "10.44.0.1" ];
defaultGateway.address = "10.44.0.1";
interfaces.eno1 = {
@@ -27,35 +57,4 @@
};
};
};
-
- 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 = [ "eno1" ];
- servicesToCheck = [
- "caddy"
- "immich-machine-learning"
- "immich-server"
- "postgresql"
- "redis-immich"
- "zfs-zed"
- ];
- };
}
diff --git a/hosts/odin/filesystems/default.nix b/hosts/odin/filesystems/default.nix
new file mode 100644
index 0000000..410e425
--- /dev/null
+++ b/hosts/odin/filesystems/default.nix
@@ -0,0 +1,17 @@
+{
+ 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 = [ ];
+}
diff --git a/hosts/odin/hardware.nix b/hosts/odin/hardware.nix
deleted file mode 100644
index 00210c4..0000000
--- a/hosts/odin/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.<interface>.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/odin/modules/default.nix b/hosts/odin/modules/default.nix
new file mode 100644
index 0000000..0a7aba1
--- /dev/null
+++ b/hosts/odin/modules/default.nix
@@ -0,0 +1,50 @@
+{
+ modules = {
+ containers.watchtower.enable = true;
+ containers.pinchflat = {
+ enable = true;
+ mediaDir = "/tank/media/yt";
+ };
+ containers.freshrss = {
+ enable = true;
+ url = "fresh.brownbread.net";
+ };
+ containers.lubelogger = {
+ enable = true;
+ url = "garage.brownbread.net";
+ };
+ containers.vaultwarden = {
+ enable = true;
+ url = "steel-mountain.brownbread.net";
+ };
+ containers.jellyfin = {
+ enable = true;
+ url = "buttered.brownbread.net";
+ mediaDir = "/tank/media";
+ };
+ services.immich = {
+ enable = true;
+ url = "photographs.brownbread.net";
+ mediaDir = "/tank/immich";
+ };
+ scripts.motd = {
+ enable = true;
+ networkInterfaces = [ "eno1" ];
+ servicesToCheck = [
+ "caddy"
+ "immich-machine-learning"
+ "immich-server"
+ "postgresql"
+ "redis-immich"
+ "zfs-zed"
+ ];
+ };
+ scripts.zquota = {
+ enable = true;
+ quotas = {
+ "tank/backups" = 512;
+ "tank/media" = 1536;
+ };
+ };
+ };
+}
diff --git a/hosts/sparrow/default.nix b/hosts/sparrow/default.nix
index c7b175f..4eb87b0 100644
--- a/hosts/sparrow/default.nix
+++ b/hosts/sparrow/default.nix
@@ -1,8 +1,34 @@
-{ inputs, pkgs, ... }:
+{
+ inputs,
+ lib,
+ pkgs,
+ ...
+}:
{
system.stateVersion = "24.05";
- imports = [ ./hardware.nix ];
+ imports = [ ./filesystems ];
+
+ hardware = {
+ enableRedistributableFirmware = true;
+ cpu.intel.updateMicrocode = true;
+ };
+
+ boot.loader = {
+ systemd-boot.enable = true;
+ efi.canTouchEfiVariables = true;
+ };
+ boot.initrd.availableKernelModules = [
+ "xhci_pci"
+ "ahci"
+ "usb_storage"
+ "sd_mod"
+ ];
+ boot.kernelModules = [ "kvm-intel" ];
+ boot.binfmt.emulatedSystems = [
+ "aarch64-linux"
+ "riscv64-linux"
+ ];
home-manager = {
useGlobalPkgs = true;
@@ -14,25 +40,13 @@
};
};
+ time.timeZone = "America/Detroit";
networking = {
hostName = "sparrow";
networkmanager.enable = true;
};
- time.timeZone = "America/Detroit";
-
- boot = {
- loader = {
- systemd-boot.enable = true;
- efi.canTouchEfiVariables = true;
- };
- binfmt.emulatedSystems = [
- "aarch64-linux"
- "riscv64-linux"
- ];
- };
-
- # Since I don't always carry my split keyboard, remap CAPS to left CTRL.
+ # Since I don't always use my split keyboard, remap CAPS to left CTRL.
console.useXkbConfig = true;
services = {
xserver.xkb.options = "ctrl:swapcaps";
diff --git a/hosts/sparrow/filesystems/default.nix b/hosts/sparrow/filesystems/default.nix
new file mode 100644
index 0000000..3e83293
--- /dev/null
+++ b/hosts/sparrow/filesystems/default.nix
@@ -0,0 +1,23 @@
+{
+ lib,
+ ...
+}:
+{
+ fileSystems."/" = {
+ device = "/dev/disk/by-uuid/d296f7a3-68d2-406f-963d-8ec39ab0ea64";
+ fsType = "ext4";
+ };
+
+ fileSystems."/boot" = {
+ device = "/dev/disk/by-uuid/B159-723B";
+ fsType = "vfat";
+ options = [
+ "fmask=0022"
+ "dmask=0022"
+ ];
+ };
+
+ swapDevices = lib.singleton {
+ device = "/.swapfile";
+ };
+}
diff --git a/hosts/sparrow/hardware.nix b/hosts/sparrow/hardware.nix
deleted file mode 100644
index d40b232..0000000
--- a/hosts/sparrow/hardware.nix
+++ /dev/null
@@ -1,41 +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" ];
- boot.initrd.kernelModules = [ ];
- boot.kernelModules = [ "kvm-intel" ];
- boot.extraModulePackages = [ ];
-
- fileSystems."/" =
- { device = "/dev/disk/by-uuid/d296f7a3-68d2-406f-963d-8ec39ab0ea64";
- fsType = "ext4";
- };
-
- fileSystems."/boot" =
- { device = "/dev/disk/by-uuid/B159-723B";
- fsType = "vfat";
- options = [ "fmask=0022" "dmask=0022" ];
- };
-
- swapDevices = [{
- device = "/.swapfile";
- }];
-
- # 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.enp0s31f6.useDHCP = lib.mkDefault true;
- # networking.interfaces.wlp59s0.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
index 62071e8..6ded704 100644
--- a/hosts/thor/default.nix
+++ b/hosts/thor/default.nix
@@ -1,8 +1,35 @@
-{ lib, inputs, ... }:
+{
+ inputs,
+ lib,
+ pkgs,
+ ...
+}:
{
system.stateVersion = "24.05";
- imports = [ ./hardware.nix ];
+ imports = [
+ ./filesystems
+ ./modules
+ ];
+
+ hardware = {
+ enableRedistributableFirmware = true;
+ cpu.amd.updateMicrocode = true;
+ };
+
+ boot.loader = {
+ systemd-boot.enable = true;
+ efi.canTouchEfiVariables = true;
+ };
+ boot.initrd.availableKernelModules = [
+ "xhci_pci"
+ "ahci"
+ "ehci_pci"
+ "usb_storage"
+ "usbhid"
+ "sd_mod"
+ ];
+ boot.kernelModules = [ "kvm-amd" ];
home-manager = {
useGlobalPkgs = true;
@@ -14,6 +41,7 @@
};
};
+ time.timeZone = "America/Detroit";
networking = {
hostName = "thor";
nameservers = [ "10.44.0.1" ];
@@ -26,20 +54,4 @@
};
};
};
-
- time.timeZone = "America/Detroit";
-
- boot.loader = {
- systemd-boot.enable = true;
- efi.canTouchEfiVariables = true;
- };
-
- programs.motd = {
- enable = true;
- networkInterfaces = [ "eno1" ];
- servicesToCheck = [
- "caddy"
- "gotosocial"
- ];
- };
}
diff --git a/hosts/thor/filesystems/default.nix b/hosts/thor/filesystems/default.nix
new file mode 100644
index 0000000..cf86dda
--- /dev/null
+++ b/hosts/thor/filesystems/default.nix
@@ -0,0 +1,17 @@
+{
+ 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 = [ ];
+}
diff --git a/hosts/thor/hardware.nix b/hosts/thor/hardware.nix
deleted file mode 100644
index 9e7a2f0..0000000
--- a/hosts/thor/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.<interface>.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/thor/modules/default.nix b/hosts/thor/modules/default.nix
new file mode 100644
index 0000000..77fca5d
--- /dev/null
+++ b/hosts/thor/modules/default.nix
@@ -0,0 +1,26 @@
+{
+ pkgs,
+ ...
+}:
+{
+ modules = {
+ services.fediverse = {
+ enable = true;
+ package = pkgs.unstable.gotosocial;
+ url = "social.tdback.net";
+ };
+ services.website = {
+ enable = true;
+ url = "tdback.net";
+ federating = true;
+ };
+ scripts.motd = {
+ enable = true;
+ networkInterfaces = [ "eno1" ];
+ servicesToCheck = [
+ "caddy"
+ "gotosocial"
+ ];
+ };
+ };
+}
diff --git a/hosts/woodpecker/default.nix b/hosts/woodpecker/default.nix
index b049cab..81a6715 100644
--- a/hosts/woodpecker/default.nix
+++ b/hosts/woodpecker/default.nix
@@ -1,8 +1,35 @@
-{ lib, inputs, ... }:
+{
+ inputs,
+ lib,
+ ...
+}:
{
system.stateVersion = "24.05";
- imports = [ ./hardware.nix ];
+ imports = [ ./filesystems ];
+
+ hardware = {
+ enableRedistributableFirmware = true;
+ cpu.amd.updateMicrocode = true;
+ };
+
+ boot.loader = {
+ systemd-boot.enable = true;
+ efi.canTouchEfiVariables = true;
+ };
+ boot.initrd.availableKernelModules = [
+ "nvme"
+ "xhci_pci"
+ "ahci"
+ "usb_storage"
+ "usbhid"
+ "sd_mod"
+ ];
+ boot.kernelModules = [ "kvm-amd" ];
+ boot.binfmt.emulatedSystems = [
+ "aarch64-linux"
+ "riscv64-linux"
+ ];
home-manager = {
useGlobalPkgs = true;
@@ -14,6 +41,7 @@
};
};
+ time.timeZone = "America/Detroit";
networking = {
hostName = "woodpecker";
nameservers = [ "10.44.0.1" ];
@@ -26,17 +54,4 @@
};
};
};
-
- time.timeZone = "America/Detroit";
-
- boot = {
- loader = {
- systemd-boot.enable = true;
- efi.canTouchEfiVariables = true;
- };
- binfmt.emulatedSystems = [
- "aarch64-linux"
- "riscv64-linux"
- ];
- };
}
diff --git a/hosts/woodpecker/filesystems/default.nix b/hosts/woodpecker/filesystems/default.nix
new file mode 100644
index 0000000..4c17479
--- /dev/null
+++ b/hosts/woodpecker/filesystems/default.nix
@@ -0,0 +1,22 @@
+{
+ fileSystems."/" = {
+ device = "/dev/disk/by-uuid/90ec7fc1-192e-4bb5-9bb5-5e2776435f8d";
+ fsType = "ext4";
+ };
+
+ fileSystems."/boot" = {
+ device = "/dev/disk/by-uuid/3A26-C3FB";
+ fsType = "vfat";
+ options = [
+ "fmask=0022"
+ "dmask=0022"
+ ];
+ };
+
+ fileSystems."/home" = {
+ device = "/dev/disk/by-uuid/cd7e081e-cd0b-4dc5-b41c-8dda26437a78";
+ fsType = "ext4";
+ };
+
+ swapDevices = [ ];
+}
diff --git a/hosts/woodpecker/hardware.nix b/hosts/woodpecker/hardware.nix
deleted file mode 100644
index 3fc71e9..0000000
--- a/hosts/woodpecker/hardware.nix
+++ /dev/null
@@ -1,44 +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 = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
- boot.initrd.kernelModules = [ ];
- boot.kernelModules = [ "kvm-amd" ];
- boot.extraModulePackages = [ ];
-
- fileSystems."/" =
- { device = "/dev/disk/by-uuid/90ec7fc1-192e-4bb5-9bb5-5e2776435f8d";
- fsType = "ext4";
- };
-
- fileSystems."/boot" =
- { device = "/dev/disk/by-uuid/3A26-C3FB";
- fsType = "vfat";
- options = [ "fmask=0022" "dmask=0022" ];
- };
-
- fileSystems."/home" =
- { device = "/dev/disk/by-uuid/cd7e081e-cd0b-4dc5-b41c-8dda26437a78";
- fsType = "ext4";
- };
-
- 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.enp42s0.useDHCP = lib.mkDefault true;
- # networking.interfaces.enp5s0.useDHCP = lib.mkDefault true;
-
- nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
- hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
-}