From 5a0a36726756bc2a88770f8fd65418b6d3ce007b Mon Sep 17 00:00:00 2001 From: Caroline Larimore Date: Mon, 3 Feb 2025 19:30:44 -0800 Subject: migration: barebones c-pc config --- snowfall/modules/nixos/system/default.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 snowfall/modules/nixos/system/default.nix (limited to 'snowfall/modules/nixos') 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 -- cgit v1.2.3