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/loki | |
parent | 63883c4dea9ca50a4fd8756323ab04bf66e3dd3d (diff) |
hosts: overhauled host configurations
Diffstat (limited to 'hosts/loki')
-rw-r--r-- | hosts/loki/default.nix | 43 | ||||
-rw-r--r-- | hosts/loki/filesystems/default.nix | 17 | ||||
-rw-r--r-- | hosts/loki/hardware.nix | 37 | ||||
-rw-r--r-- | hosts/loki/modules/default.nix | 23 |
4 files changed, 63 insertions, 57 deletions
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" + ]; + }; + }; +} |