-
Notifications
You must be signed in to change notification settings - Fork 0
/
nielx.nix
115 lines (94 loc) · 1.98 KB
/
nielx.nix
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.nielx;
in
{
imports =
[ ./nielx/sshserver.nix
./nielx/services.nix
./nielx/duplicity.nix
./nielx/duplicity-local.nix
./nielx/longview.nix
./nielx/matrix.nix
./nielx/feedmael.nix
./nielx/roundworm.nix
./nielx/irc.nix
./nielx/postfix_relayhost.nix
./nielx/gitea.nix
./nielx/webhooks.nix
./nielx/apps.nix
./nielx/path-scripts.nix
./nielx/simple-emacs.nix
./nielx/geomyidae.nix
];
options.nielx = {
# Main values. Should always be set.
user = mkOption {
type = types.str;
example = "niels";
};
fullName = mkOption {
type = types.str;
};
email = mkOption {
type = types.str;
example = "niels@example.com";
};
hostname = mkOption {
type = types.str;
};
nixos_config_directory = mkOption {
type = types.str;
};
gpgKey = mkOption {
type = types.str;
};
root = mkOption {
type = types.str;
example = "/home/niels/config/nielx";
};
shellPromptColor = mkOption {
type = types.str;
};
commonBash = mkOption {
type = types.str;
};
commonShellAliases = mkOption {
type = types.attrs;
};
www = {
acmeSSL = mkOption {
type = types.bool;
};
domain = mkOption {
type = types.str;
description = "main domain";
example = "example.com";
};
};
graphics = {
timeToLock = mkOption {
type = types.int;
};
timeToLockOnWifi = mkOption {
type = types.int;
};
lockUnlessWifi = mkOption {
type = types.str;
};
};
# Derived values.
home = mkOption {
type = types.str;
example = "/home/niels";
};
stateDir = mkOption {
type = types.str;
};
};
config = {
nielx.home = "/home/${cfg.user}";
nielx.stateDir = "/home/${cfg.user}/state";
};
}