From 1c71bf099e266abae0ba4b7bc2829f9ebf894a2c Mon Sep 17 00:00:00 2001 From: UGA Innovation Factory Date: Mon, 15 Dec 2025 17:21:55 -0500 Subject: [PATCH] feat: Add sw types as modules --- installer/modules.nix | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/installer/modules.nix b/installer/modules.nix index ea6fba1..cb304d1 100644 --- a/installer/modules.nix +++ b/installer/modules.nix @@ -1,20 +1,43 @@ # ============================================================================ -# Host Type Modules Export +# NixOS Modules Export # ============================================================================ -# This file exposes each host type as a reusable NixOS module that can be -# imported by external flakes or configurations. +# This file exposes host types and software configurations as reusable NixOS +# modules that can be imported by external flakes or configurations. # # Usage in another flake: +# # Full host type configurations (includes hardware + software + system config) # inputs.nixos-systems.nixosModules.nix-desktop # inputs.nixos-systems.nixosModules.nix-laptop -# etc. +# +# # Software-only configurations (for custom hardware setups) +# inputs.nixos-systems.nixosModules.sw-desktop +# inputs.nixos-systems.nixosModules.sw-headless { inputs }: +let + # Software modules with their dependencies bundled + mkSwModule = swType: { config, lib, pkgs, ... }: { + imports = [ + ../sw/ghostty.nix + ../sw/nvim.nix + ../sw/python.nix + ../sw/theme.nix + (import ../sw/${swType} { inherit config lib pkgs inputs; }) + ]; + }; +in { + # Host type modules (full system configurations) nix-desktop = import ../hosts/types/nix-desktop.nix { inherit inputs; }; nix-laptop = import ../hosts/types/nix-laptop.nix { inherit inputs; }; nix-surface = import ../hosts/types/nix-surface.nix { inherit inputs; }; nix-lxc = import ../hosts/types/nix-lxc.nix { inherit inputs; }; nix-wsl = import ../hosts/types/nix-wsl.nix { inherit inputs; }; nix-ephemeral = import ../hosts/types/nix-ephemeral.nix { inherit inputs; }; + + # Software-only modules (for mixing with custom hardware configs) + sw-desktop = mkSwModule "desktop"; + sw-headless = mkSwModule "headless"; + sw-stateless-kiosk = mkSwModule "stateless-kiosk"; + sw-tablet-kiosk = mkSwModule "tablet-kiosk"; }