mirror of
https://codeberg.org/privacy1st/nix-git
synced 2025-04-02 16:55:59 +02:00
50 lines
1.5 KiB
Nix
50 lines
1.5 KiB
Nix
# https://l-lin.github.io/nix/share-variables-between-Nix-modules
|
|
|
|
{ config, lib, pkgs, ... }:
|
|
let
|
|
defaultUser = "yoda";
|
|
|
|
defaultName = "Daniel Langbein";
|
|
defaultEmail = "daniel@systemli.org";
|
|
defaultMaintainer = "langbeindaniel";
|
|
defaultFingerprint = "94F3D3DDAC22802258FC044B6C47C753F0823002";
|
|
in
|
|
{
|
|
options.yoda.user = lib.mkOption {
|
|
# You can find the exhaustive list of types here: https://nlewo.github.io/nixos-manual-sphinx/development/option-types.xml.html
|
|
type = lib.types.str;
|
|
default = defaultUser;
|
|
description = "Primary Linux user name. Must not include regex special characters.";
|
|
};
|
|
options.yoda.name = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = defaultName;
|
|
description = "Personal name of primary user.";
|
|
};
|
|
options.yoda.email = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = defaultEmail;
|
|
description = "Personal email address of primary user.";
|
|
};
|
|
options.yoda.maintainer = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = defaultMaintainer;
|
|
description = "Personal nix maintainer identifier of primary user";
|
|
};
|
|
options.yoda.fingerprint = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = defaultFingerprint;
|
|
description = "Personal key fingerprint of primary user as listed by `gpg --list-keys`.";
|
|
};
|
|
|
|
config = {
|
|
lib.maintainers."${defaultMaintainer}" = {
|
|
name = defaultName;
|
|
email = defaultEmail;
|
|
keys = [{
|
|
fingerprint = defaultFingerprint;
|
|
}];
|
|
};
|
|
};
|
|
}
|