109 lines
3.0 KiB
Nix
109 lines
3.0 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
inputs,
|
|
...
|
|
}:
|
|
|
|
# ============================================================================
|
|
# Software Module Entry Point
|
|
# ============================================================================
|
|
# This module manages the software configuration for the system. It provides
|
|
# enable options for each system type (desktop, headless, builders, etc.)
|
|
# that can be enabled independently or in combination. Each type is a proper
|
|
# NixOS submodule with its own enable flag and type-specific options.
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.athenix.sw;
|
|
in
|
|
{
|
|
imports = [
|
|
./python.nix
|
|
./ghostty.nix
|
|
./gc.nix
|
|
./updater.nix
|
|
./update-ref.nix
|
|
./desktop
|
|
./headless
|
|
./builders
|
|
./tablet-kiosk
|
|
./stateless-kiosk
|
|
inputs.home-manager.nixosModules.home-manager
|
|
inputs.agenix.nixosModules.default
|
|
inputs.disko.nixosModules.disko
|
|
];
|
|
|
|
options.athenix.sw = {
|
|
enable = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
description = ''
|
|
Enable standard workstation configuration with base packages.
|
|
|
|
Provides:
|
|
- Base CLI tools (htop, git, binutils)
|
|
- Shell configuration (Zsh)
|
|
- Secret management (agenix)
|
|
- Oh My Posh shell theme
|
|
|
|
This is typically enabled automatically when any sw type is enabled.
|
|
'';
|
|
};
|
|
|
|
# DEPRECATED: Backwards compatibility for external modules
|
|
# Use athenix.sw.<type>.enable instead
|
|
type = mkOption {
|
|
type = types.nullOr (types.either types.str (types.listOf types.str));
|
|
default = null;
|
|
description = "DEPRECATED: Use athenix.sw.<type>.enable instead. Legacy type selection.";
|
|
visible = false;
|
|
};
|
|
|
|
extraPackages = mkOption {
|
|
type = types.listOf types.package;
|
|
default = [ ];
|
|
description = ''
|
|
Additional system packages to install beyond the defaults.
|
|
These packages are added to environment.systemPackages.
|
|
'';
|
|
example = lib.literalExpression "[ pkgs.vim pkgs.wget pkgs.curl ]";
|
|
};
|
|
|
|
excludePackages = mkOption {
|
|
type = types.listOf types.package;
|
|
default = [ ];
|
|
description = ''
|
|
Packages to exclude from the default package list.
|
|
Useful for removing unwanted default packages.
|
|
'';
|
|
example = lib.literalExpression "[ pkgs.htop ]";
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
# ========== System-Wide Configuration ==========
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
# ========== Shell Configuration ==========
|
|
programs.zsh.enable = true;
|
|
programs.nix-ld.enable = true; # Allow running non-NixOS binaries
|
|
|
|
# ========== Base Packages ==========
|
|
environment.systemPackages =
|
|
with pkgs;
|
|
subtractLists cfg.excludePackages [
|
|
htop # System monitor
|
|
binutils # Binary utilities
|
|
zsh # Z shell
|
|
git # Version control
|
|
oh-my-posh # Shell prompt theme
|
|
age # Simple file encryption tool
|
|
age-plugin-fido2-hmac # age FIDO2 support
|
|
inputs.agenix.packages.${stdenv.hostPlatform.system}.default # Secret management
|
|
];
|
|
};
|
|
}
|