diff options
| author | Caroline Larimore <caroline@larimo.re> | 2025-02-03 19:30:44 -0800 |
|---|---|---|
| committer | Caroline Larimore <caroline@larimo.re> | 2025-04-14 18:58:17 -0700 |
| commit | 5a0a36726756bc2a88770f8fd65418b6d3ce007b (patch) | |
| tree | c6eac6d1e52f6171d5dcb6b06b706329e3239618 /snowfall/modules/nixos/system/default.nix | |
| parent | ffc499cddd42ff4bea818718ae0b2f12d0e5dfbb (diff) | |
migration: barebones c-pc config
Diffstat (limited to 'snowfall/modules/nixos/system/default.nix')
| -rw-r--r-- | snowfall/modules/nixos/system/default.nix | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/snowfall/modules/nixos/system/default.nix b/snowfall/modules/nixos/system/default.nix new file mode 100644 index 0000000..a6a570b --- /dev/null +++ b/snowfall/modules/nixos/system/default.nix @@ -0,0 +1,21 @@ +{ options, config, lib, namespace, ... }: + +with lib; with lib.${namespace}; let + cfg = config.${namespace}.system; +in { + options.${namespace}.system = with types; { + hostname = mkOption { + type = strMatching "^$|^[[:alnum:]]([[:alnum:]_-]{0,61}[[:alnum:]])?$"; + }; + + id = mkOption { + default = null; + type = nullOr str; + }; + }; + + config = { + networking.hostName = cfg.hostname; + networking.hostId = cfg.id; + }; +}
\ No newline at end of file |