tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
nixos/services.peerflix: remove `with lib;`
Felix Buehler
1 year ago
336a76b1
4db4628f
+8
-11
1 changed file
expand all
collapse all
unified
split
nixos
modules
services
torrent
peerflix.nix
+8
-11
nixos/modules/services/torrent/peerflix.nix
···
5
5
pkgs,
6
6
...
7
7
}:
8
8
-
9
9
-
with lib;
10
10
-
11
8
let
12
9
cfg = config.services.peerflix;
13
10
opt = options.services.peerflix;
···
25
22
###### interface
26
23
27
24
options.services.peerflix = {
28
28
-
enable = mkOption {
25
25
+
enable = lib.mkOption {
29
26
description = "Whether to enable peerflix service.";
30
27
default = false;
31
31
-
type = types.bool;
28
28
+
type = lib.types.bool;
32
29
};
33
30
34
34
-
stateDir = mkOption {
31
31
+
stateDir = lib.mkOption {
35
32
description = "Peerflix state directory.";
36
33
default = "/var/lib/peerflix";
37
37
-
type = types.path;
34
34
+
type = lib.types.path;
38
35
};
39
36
40
40
-
downloadDir = mkOption {
37
37
+
downloadDir = lib.mkOption {
41
38
description = "Peerflix temporary download directory.";
42
39
default = "${cfg.stateDir}/torrents";
43
43
-
defaultText = literalExpression ''"''${config.${opt.stateDir}}/torrents"'';
44
44
-
type = types.path;
40
40
+
defaultText = lib.literalExpression ''"''${config.${opt.stateDir}}/torrents"'';
41
41
+
type = lib.types.path;
45
42
};
46
43
};
47
44
48
45
###### implementation
49
46
50
50
-
config = mkIf cfg.enable {
47
47
+
config = lib.mkIf cfg.enable {
51
48
systemd.tmpfiles.rules = [
52
49
"d '${cfg.stateDir}' - peerflix - - -"
53
50
];