All checks were successful
CI / Format Check (push) Successful in 2s
CI / Flake Check (push) Successful in 1m34s
CI / Evaluate Key Configurations (nix-builder) (push) Successful in 8s
CI / Evaluate Key Configurations (nix-desktop1) (push) Successful in 6s
CI / Evaluate Key Configurations (nix-laptop1) (push) Successful in 6s
CI / Evaluate Artifacts (installer-iso-nix-laptop1) (push) Successful in 13s
CI / Evaluate Artifacts (lxc-nix-builder) (push) Successful in 7s
51 lines
1.3 KiB
Nix
51 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.
|
|
|
|
{
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
{
|
|
imports = [
|
|
./fs.nix
|
|
./boot.nix
|
|
./user-config.nix
|
|
./fleet-option.nix
|
|
../sw
|
|
];
|
|
|
|
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"
|
|
];
|
|
}
|
|
];
|
|
}
|