Files
athenix/fleet/common.nix
UGA Innovation Factory 5875725ca2 refactor: reorganize directory structure (variants -> hw, glue -> fleet)
- Rename variants/ to hw/ for clearer hardware module naming
- Rename glue/ to fleet/ for more intuitive fleet management
- Move boot/fs configuration from glue/boot.nix to separate fleet/boot.nix and fleet/fs.nix
- Improve separation of concerns between boot, filesystem, and common config
2026-01-07 18:11:19 -05:00

52 lines
1.3 KiB
Nix

# ============================================================================
# Common Host Module
# ============================================================================
# This module contains all the common configuration shared by all host types.
# It is automatically imported by the fleet generator for every host.
{
inputs,
config,
lib,
...
}:
{
imports = [
./fs.nix
./boot.nix
./user-config.nix
../sw
../users.nix
];
options.athenix = {
forUser = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
description = ''
Convenience option to configure a host for a specific user.
Automatically enables the user (sets athenix.users.username.enable = true).
Value should be a username from athenix.users.accounts.
'';
};
host.useHostPrefix = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Whether to prepend the host prefix to the hostname (used in inventory and hosts/default.nix).";
};
};
config = lib.mkMerge [
(lib.mkIf (config.athenix.forUser != null) {
athenix.users.${config.athenix.forUser}.enable = true;
})
{
system.stateVersion = "25.11";
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
}
];
}