26 lines
840 B
Nix
26 lines
840 B
Nix
|
{ config, lib, ... }: with lib;
|
||
|
{
|
||
|
options.saturn = {
|
||
|
user = mkOption {
|
||
|
type = types.str;
|
||
|
default = "saturn";
|
||
|
description = mdDoc "The name of the user of the system.";
|
||
|
};
|
||
|
hostname = mkOption {
|
||
|
type = types.strMatching
|
||
|
"[a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?";
|
||
|
default = "saturnOS-device";
|
||
|
description = mdDoc "The network hostname of the system, which must only contain letters,
|
||
|
numbers, and dashes, and cannot start or end with a dash.";
|
||
|
};
|
||
|
prettyHostname = mkOption {
|
||
|
type = types.str;
|
||
|
default = "🪐 saturnOS";
|
||
|
description = mdDoc "The pretty hostname is used for things like bluetooth pairing,
|
||
|
device sharing, and is fully unicode.";
|
||
|
};
|
||
|
};
|
||
|
config.networking.hostName = config.saturn.hostname;
|
||
|
config.environment.machineInfo.prettyHostname = config.saturn.prettyHostname;
|
||
|
}
|