alpha
Login
or
Join now
lass.pds.lassul.us
/
superconfig
Star
0
Fork
1
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
1
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
1
Pipelines
modules.htgen: remove
author
lassulus
date
1 week ago
(Oct 7, 2026, 10:08 AM CEST)
commit
21a1068f
21a1068f836354941b2bb504962eea8671832260
parent
37b05265
37b052659c2a1a8e4646d018d0c17aace64b49a4
-128
2 changed files
Expand all
Collapse all
Unified
Split
modules
default.nix
htgen.nix
-1
modules/default.nix
View file
Reviewed
···
5
5
./sync-containers3.nix
6
6
./parley.nix
7
7
# copied from stockholm, see the header of each
8
8
-
./htgen.nix
9
8
./reaktor2.nix
10
9
./realwallpaper.nix
11
10
];
-127
modules/htgen.nix
Reviewed
···
1
1
-
# Copied from stockholm krebs/3modules/htgen.nix (cc283503); htgen now comes
2
2
-
# from stockholm's packages output instead of its overlay. Users and groups
3
3
-
# get their ids from NixOS instead of stockholm's genid.
4
4
-
{
5
5
-
config,
6
6
-
lib,
7
7
-
pkgs,
8
8
-
self,
9
9
-
...
10
10
-
}:
11
11
-
12
12
-
with lib;
13
13
-
let
14
14
-
optionalAttr = name: value: if name != null then { ${name} = value; } else { };
15
15
-
16
16
-
cfg = config.krebs.htgen;
17
17
-
18
18
-
out = {
19
19
-
options.krebs.htgen = api;
20
20
-
config = imp;
21
21
-
};
22
22
-
23
23
-
api = mkOption {
24
24
-
default = { };
25
25
-
type = types.attrsOf (
26
26
-
types.submodule (
27
27
-
{ config, ... }: {
28
28
-
options = {
29
29
-
enable = mkEnableOption "krebs.htgen-${config._module.args.name}";
30
30
-
31
31
-
name = mkOption {
32
32
-
# POSIX portable filename, like stockholm's types.username
33
33
-
type = types.strMatching "[0-9A-Za-z._][0-9A-Za-z._-]*";
34
34
-
default = config._module.args.name;
35
35
-
};
36
36
-
37
37
-
package = mkOption {
38
38
-
default = self.inputs.stockholm.packages.${pkgs.stdenv.hostPlatform.system}.htgen;
39
39
-
type = types.package;
40
40
-
};
41
41
-
42
42
-
port = mkOption {
43
43
-
type = types.port;
44
44
-
};
45
45
-
46
46
-
script = mkOption {
47
47
-
type = types.nullOr types.str;
48
48
-
default = null;
49
49
-
};
50
50
-
51
51
-
scriptFile = mkOption {
52
52
-
type = types.nullOr (types.either types.package types.path);
53
53
-
default = null;
54
54
-
};
55
55
-
56
56
-
user = mkOption {
57
57
-
type = types.submodule (
58
58
-
{ config, ... }:
59
59
-
{
60
60
-
options = {
61
61
-
name = mkOption {
62
62
-
type = types.strMatching "[0-9A-Za-z._][0-9A-Za-z._-]*";
63
63
-
};
64
64
-
home = mkOption {
65
65
-
type = types.path;
66
66
-
# as stockholm's types.user
67
67
-
default = "/home/${config.name}";
68
68
-
};
69
69
-
};
70
70
-
}
71
71
-
);
72
72
-
default = {
73
73
-
name = "htgen-${config.name}";
74
74
-
home = "/var/lib/htgen-${config.name}";
75
75
-
};
76
76
-
defaultText = {
77
77
-
name = "htgen-‹name›";
78
78
-
home = "/var/lib/htgen-‹name›";
79
79
-
};
80
80
-
};
81
81
-
};
82
82
-
}
83
83
-
)
84
84
-
);
85
85
-
};
86
86
-
imp = {
87
87
-
88
88
-
systemd.services = mapAttrs' (
89
89
-
name: htgen:
90
90
-
nameValuePair "htgen-${name}" {
91
91
-
wantedBy = [ "multi-user.target" ];
92
92
-
after = [ "network.target" ];
93
93
-
environment = {
94
94
-
HTGEN_PORT = toString htgen.port;
95
95
-
}
96
96
-
// optionalAttr "HTGEN_SCRIPT" htgen.script
97
97
-
// optionalAttr "HTGEN_SCRIPT_FILE" htgen.scriptFile;
98
98
-
serviceConfig = {
99
99
-
SyslogIdentifier = "htgen";
100
100
-
User = htgen.user.name;
101
101
-
PrivateTmp = true;
102
102
-
Restart = "always";
103
103
-
ExecStart = "${htgen.package}/bin/htgen --serve";
104
104
-
};
105
105
-
}
106
106
-
) cfg;
107
107
-
108
108
-
users.users = mapAttrs' (
109
109
-
name: htgen:
110
110
-
nameValuePair htgen.user.name {
111
111
-
inherit (htgen.user) home name;
112
112
-
group = htgen.user.name;
113
113
-
createHome = true;
114
114
-
isSystemUser = true;
115
115
-
}
116
116
-
) cfg;
117
117
-
118
118
-
users.groups = mapAttrs' (
119
119
-
_name: htgen:
120
120
-
nameValuePair htgen.user.name {
121
121
-
name = htgen.user.name;
122
122
-
}
123
123
-
) cfg;
124
124
-
125
125
-
};
126
126
-
in
127
127
-
out