63 lines
1.7 KiB
Nix
63 lines
1.7 KiB
Nix
|
|
{ config, lib, ... }: with lib; {
|
||
|
|
options.constants = {
|
||
|
|
domain = mkOption {
|
||
|
|
type = types.str;
|
||
|
|
default = "invariantspace.com";
|
||
|
|
description = ''
|
||
|
|
Store the default domain for all devices.
|
||
|
|
'';
|
||
|
|
};
|
||
|
|
homeDir = mkOption {
|
||
|
|
type = types.str;
|
||
|
|
default = "/home/${config.constants.userName}";
|
||
|
|
description = ''
|
||
|
|
The default home directory for the default user.
|
||
|
|
'';
|
||
|
|
};
|
||
|
|
localhost = mkOption {
|
||
|
|
type = types.str;
|
||
|
|
default = "127.0.0.1";
|
||
|
|
description = ''
|
||
|
|
Store the default localhost address.
|
||
|
|
'';
|
||
|
|
};
|
||
|
|
postMaster = mkOption {
|
||
|
|
type = types.str;
|
||
|
|
default = "trivial@${config.constants.domain}";
|
||
|
|
description = ''
|
||
|
|
Store the default post master email address.
|
||
|
|
'';
|
||
|
|
};
|
||
|
|
publicKeys = mkOption {
|
||
|
|
type = types.listOf types.str;
|
||
|
|
default = [
|
||
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHPT/zRq5fffcUmjxcwG2cTr09fOa9O4rBUb6ob2CyNy macronova@blitzar"
|
||
|
|
];
|
||
|
|
description = ''
|
||
|
|
The public keys for SSH authentication.
|
||
|
|
'';
|
||
|
|
};
|
||
|
|
privateKeyFiles = mkOption {
|
||
|
|
type = types.listOf types.str;
|
||
|
|
default = if config.services.openssh.enable then builtins.map (key: key.path) config.services.openssh.hostKeys else [ "/root/.ssh/${config.networking.hostName}" ];
|
||
|
|
description = ''
|
||
|
|
The private key files for sops.
|
||
|
|
'';
|
||
|
|
};
|
||
|
|
sopsFile = mkOption {
|
||
|
|
type = types.path;
|
||
|
|
default = ./secrets.yaml;
|
||
|
|
description = ''
|
||
|
|
The secrets file for device.
|
||
|
|
'';
|
||
|
|
};
|
||
|
|
userName = mkOption {
|
||
|
|
type = types.str;
|
||
|
|
default = "macronova";
|
||
|
|
description = ''
|
||
|
|
The default username across all devices.
|
||
|
|
'';
|
||
|
|
};
|
||
|
|
};
|
||
|
|
}
|