Split shared host config into dedicated modules
- Add shared modules for boot, hardware, networking, input, and host defaults - Move host-specific TOML flags to new option namespaces - Update SSH and service defaults for the new layout
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkOption types;
|
||||
cfg = config.unexplrd.host;
|
||||
in {
|
||||
options.unexplrd.host = {
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
id = mkOption {
|
||||
type = types.strMatching "[a-z0-9]{8}";
|
||||
};
|
||||
stateVersion = mkOption {
|
||||
type = types.strMatching ''[0-9]{2}\.[0-9]{2}'';
|
||||
};
|
||||
type = mkOption {
|
||||
type = types.enum ["laptop" "server" "workstation"];
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
system.stateVersion = cfg.stateVersion;
|
||||
networking.hostName = cfg.name;
|
||||
networking.hostId = cfg.id;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user