updates / experimental TC setup
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
cfg = config.az.tc;
|
||||
in {
|
||||
imports = [
|
||||
../../sites
|
||||
./hardware
|
||||
./session
|
||||
./identity
|
||||
@@ -44,13 +45,18 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
site = lib.mkOption {
|
||||
features = lib.genAttrs ["ad" "wifi" "netbird" "rustdesk" "monitoring"] (name:
|
||||
lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Whether the ${name} integration is enabled for this Thin Client.";
|
||||
});
|
||||
|
||||
ageIdentityPath = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "default";
|
||||
description = ''
|
||||
Site identifier (e.g. "BER", "MUC"). Currently informational;
|
||||
reserved for per-site printer maps or branding variations.
|
||||
'';
|
||||
default = "/var/lib/agenix/identity.age";
|
||||
readOnly = true;
|
||||
description = "Dedicated per-host age identity injected during provisioning.";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -69,7 +75,13 @@ in {
|
||||
nix = {
|
||||
settings = {
|
||||
experimental-features = "nix-command flakes";
|
||||
trusted-users = ["root"];
|
||||
# @wheel is required so admins can deploy via
|
||||
# `nixos-rebuild --target-host ... --sudo` — the SSH user copies
|
||||
# the closure as themselves (not root), and the remote daemon
|
||||
# rejects unsigned locally-built paths (e.g. etc files) unless
|
||||
# the receiving user is trusted. Both break-glass admins are in
|
||||
# wheel (see identity/local-users.nix).
|
||||
trusted-users = ["root" "@wheel"];
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
@@ -82,6 +94,8 @@ in {
|
||||
# Thin Clients are managed centrally; users do not run nix commands.
|
||||
users.defaultUserShell = pkgs.bash;
|
||||
|
||||
age.identityPaths = lib.mkForce [cfg.ageIdentityPath];
|
||||
|
||||
# Console / i18n / time — matches AZ-LT-NIX conventions.
|
||||
i18n.defaultLocale = "de_DE.UTF-8";
|
||||
time.timeZone = "Europe/Berlin";
|
||||
@@ -114,7 +128,7 @@ in {
|
||||
message = "az.tc.enable requires networking.hostName to be set (e.g. 'AZ-TC-01').";
|
||||
}
|
||||
{
|
||||
assertion = cfg.enable -> config.az.tc.wifi.ssid != "AZ-CORP" || config.az.tc.site == "staging";
|
||||
assertion = (!cfg.features.wifi) || config.az.tc.wifi.ssid != "AZ-CORP";
|
||||
message = ''
|
||||
az.tc.wifi.ssid is still the placeholder 'AZ-CORP'. Set the
|
||||
real corp WiFi SSID in hosts/AZ-TC-NN/default.nix (or set
|
||||
@@ -122,11 +136,11 @@ in {
|
||||
'';
|
||||
}
|
||||
{
|
||||
assertion = cfg.enable -> config.az.tc.branding.hotline != "+49 30 1234567" || config.az.tc.site == "staging";
|
||||
assertion = cfg.site == "staging" || config.az.tc.branding.hotline != "+49 30 1234567";
|
||||
message = "az.tc.branding.hotline is still the placeholder — set the real IT-Hotline number.";
|
||||
}
|
||||
{
|
||||
assertion = cfg.enable -> config.az.tc.branding.company != "AzIntec GmbH" || config.az.tc.site == "staging";
|
||||
assertion = cfg.site == "staging" || config.az.tc.branding.company != "AzIntec GmbH";
|
||||
message = "az.tc.branding.company is still the placeholder 'AzIntec GmbH' — set the real company name.";
|
||||
}
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user