blob: 00f0e13a922ed00c91b549b5bd762e43a4947cc3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
{ config, lib, ... }:
let
inherit (lib) mkOption types mdDoc;
cfg = config.userdata;
in
{
options.userdata = {
user = mkOption {
type = types.str;
default = "sinan";
description = mdDoc "Owner's username";
};
domain = mkOption {
type = types.str;
default = "sinanmohd.com";
description = mdDoc "Owner's domain";
};
email = mkOption {
type = types.str;
default = "sinan@${cfg.domain}";
description = mdDoc "Owner's email";
};
};
config.users.users.${cfg.user} = {
uid = 1000;
isNormalUser = true;
description = cfg.email;
};
}
|