tangled
alpha
login
or
join now
tjh.dev
/
nixpkgs
Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
0
fork
atom
overview
issues
pulls
pipelines
disnix module: make dbus service configurable
Sander van der Burg
8 years ago
8fbfd67f
275bc74a
+10
-4
1 changed file
expand all
collapse all
unified
split
nixos
modules
services
misc
disnix.nix
+10
-4
nixos/modules/services/misc/disnix.nix
···
32
32
description = "Whether to enable Disnix";
33
33
};
34
34
35
35
+
enableMultiUser = mkOption {
36
36
+
type = types.bool;
37
37
+
default = true;
38
38
+
description = "Whether to support multi-user mode by enabling the Disnix D-Bus service";
39
39
+
};
40
40
+
35
41
useWebServiceInterface = mkOption {
36
42
default = false;
37
43
description = "Whether to enable the DisnixWebService interface running on Apache Tomcat";
38
44
};
39
39
-
45
45
+
40
46
package = mkOption {
41
47
type = types.path;
42
48
description = "The Disnix package";
···
52
58
53
59
config = mkIf cfg.enable {
54
60
dysnomia.enable = true;
55
55
-
61
61
+
56
62
environment.systemPackages = [ pkgs.disnix ] ++ optional cfg.useWebServiceInterface pkgs.DisnixWebService;
57
63
58
64
services.dbus.enable = true;
···
71
77
};
72
78
73
79
systemd.services = {
74
74
-
disnix = {
80
80
+
disnix = mkIf cfg.enableMultiUser {
75
81
description = "Disnix server";
76
82
wants = [ "dysnomia.target" ];
77
83
wantedBy = [ "multi-user.target" ];
···
92
98
}
93
99
// (if config.environment.variables ? DYSNOMIA_CONTAINERS_PATH then { inherit (config.environment.variables) DYSNOMIA_CONTAINERS_PATH; } else {})
94
100
// (if config.environment.variables ? DYSNOMIA_MODULES_PATH then { inherit (config.environment.variables) DYSNOMIA_MODULES_PATH; } else {});
95
95
-
101
101
+
96
102
serviceConfig.ExecStart = "${cfg.package}/bin/disnix-service";
97
103
};
98
104