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
description = "Whether to enable Disnix";
33
};
34
0
0
0
0
0
0
35
useWebServiceInterface = mkOption {
36
default = false;
37
description = "Whether to enable the DisnixWebService interface running on Apache Tomcat";
38
};
39
-
40
package = mkOption {
41
type = types.path;
42
description = "The Disnix package";
···
52
53
config = mkIf cfg.enable {
54
dysnomia.enable = true;
55
-
56
environment.systemPackages = [ pkgs.disnix ] ++ optional cfg.useWebServiceInterface pkgs.DisnixWebService;
57
58
services.dbus.enable = true;
···
71
};
72
73
systemd.services = {
74
-
disnix = {
75
description = "Disnix server";
76
wants = [ "dysnomia.target" ];
77
wantedBy = [ "multi-user.target" ];
···
92
}
93
// (if config.environment.variables ? DYSNOMIA_CONTAINERS_PATH then { inherit (config.environment.variables) DYSNOMIA_CONTAINERS_PATH; } else {})
94
// (if config.environment.variables ? DYSNOMIA_MODULES_PATH then { inherit (config.environment.variables) DYSNOMIA_MODULES_PATH; } else {});
95
-
96
serviceConfig.ExecStart = "${cfg.package}/bin/disnix-service";
97
};
98
···
32
description = "Whether to enable Disnix";
33
};
34
35
+
enableMultiUser = mkOption {
36
+
type = types.bool;
37
+
default = true;
38
+
description = "Whether to support multi-user mode by enabling the Disnix D-Bus service";
39
+
};
40
+
41
useWebServiceInterface = mkOption {
42
default = false;
43
description = "Whether to enable the DisnixWebService interface running on Apache Tomcat";
44
};
45
+
46
package = mkOption {
47
type = types.path;
48
description = "The Disnix package";
···
58
59
config = mkIf cfg.enable {
60
dysnomia.enable = true;
61
+
62
environment.systemPackages = [ pkgs.disnix ] ++ optional cfg.useWebServiceInterface pkgs.DisnixWebService;
63
64
services.dbus.enable = true;
···
77
};
78
79
systemd.services = {
80
+
disnix = mkIf cfg.enableMultiUser {
81
description = "Disnix server";
82
wants = [ "dysnomia.target" ];
83
wantedBy = [ "multi-user.target" ];
···
98
}
99
// (if config.environment.variables ? DYSNOMIA_CONTAINERS_PATH then { inherit (config.environment.variables) DYSNOMIA_CONTAINERS_PATH; } else {})
100
// (if config.environment.variables ? DYSNOMIA_MODULES_PATH then { inherit (config.environment.variables) DYSNOMIA_MODULES_PATH; } else {});
101
+
102
serviceConfig.ExecStart = "${cfg.package}/bin/disnix-service";
103
};
104