From dbd85672a39af8bc7a1d7f94fcde7e9b7fc41e1b Mon Sep 17 00:00:00 2001 From: Corwin Perren Date: Sun, 7 Dec 2025 17:28:12 -0800 Subject: [PATCH] Deduplicate cluster config --- hosts/cap-clust-01/configuration.nix | 33 ++-------------------------- modules/host-groups/cluster.nix | 32 +++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 31 deletions(-) create mode 100644 modules/host-groups/cluster.nix diff --git a/hosts/cap-clust-01/configuration.nix b/hosts/cap-clust-01/configuration.nix index 9864e1b..628d33b 100644 --- a/hosts/cap-clust-01/configuration.nix +++ b/hosts/cap-clust-01/configuration.nix @@ -1,41 +1,12 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page -# and in the NixOS manual (accessible by running ‘nixos-help’). - { config, pkgs, ... }: - { imports = [ # Hardware Scan ./hardware-configuration.nix - # Users - ../../users/cluster-admin/cluster-admin.nix - - - # System Configuration - ../../modules/system/cpu-amd.nix - ../../modules/system/fonts.nix - ../../modules/system/gpu-amd.nix - ../../modules/system/home-manager-settings.nix - ../../modules/system/internationalization.nix - ../../modules/system/networking.nix - ../../modules/system/nix-settings.nix - ../../modules/system/security.nix - ../../modules/system/systemd-boot.nix - - # Application Groups - ../../modules/application-groups/system-utilities-cluster.nix + # Host Groups + ../../modules/host-groups/cluster.nix ]; networking.hostName = "cap-clust-01"; - time.timeZone = "America/Los_Angeles"; - - # This value determines the NixOS release from which the default - # settings for stateful data, like file locations and database versions - # on your system were taken. It‘s perfectly fine and recommended to leave - # this value at the release version of the first install of this system. - # Before changing this value read the documentation for this option - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "25.11"; # Did you read the comment? } diff --git a/modules/host-groups/cluster.nix b/modules/host-groups/cluster.nix new file mode 100644 index 0000000..f3eec0e --- /dev/null +++ b/modules/host-groups/cluster.nix @@ -0,0 +1,32 @@ +{ config, pkgs, ... }: + +{ + imports = [ + # Users + ../../users/cluster-admin/cluster-admin.nix + + # System Configuration + ../system/cpu-amd.nix + ../system/fonts.nix + ../system/gpu-amd.nix + ../system/home-manager-settings.nix + ../system/internationalization.nix + ../system/networking.nix + ../system/nix-settings.nix + ../system/security.nix + ../system/systemd-boot.nix + + # Application Groups + ../application-groups/system-utilities-cluster.nix + ]; + + time.timeZone = "America/Los_Angeles"; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "25.11"; # Did you read the comment? +}