64
modules/common/host-spec.nix
Normal file
64
modules/common/host-spec.nix
Normal file
@@ -0,0 +1,64 @@
|
||||
# Specifications For Differentiating Hosts
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.hostSpec = {
|
||||
username = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "The username of the host";
|
||||
};
|
||||
hostName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "The hostname of the host";
|
||||
};
|
||||
email = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.str;
|
||||
description = "The email of the user";
|
||||
};
|
||||
networking = lib.mkOption {
|
||||
default = { };
|
||||
type = lib.types.attrsOf lib.types.anything;
|
||||
description = "An attribute set of networking information";
|
||||
};
|
||||
domain = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "The domain of the host";
|
||||
};
|
||||
userFullName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "The full name of the user";
|
||||
};
|
||||
handle = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "The handle of the user (eg: github user)";
|
||||
};
|
||||
home = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "The home directory of the user";
|
||||
default = "/home/${config.hostSpec.username}";
|
||||
};
|
||||
useYubikey = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Used to indicate if the host uses a yubikey";
|
||||
};
|
||||
hdr = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Used to indicate a host that uses HDR";
|
||||
};
|
||||
scaling = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "1";
|
||||
description = "Used to indicate what scaling to use. Floating point number";
|
||||
};
|
||||
font = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "ComicCodeLigatures";
|
||||
description = "Used to specify the system font";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user