summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorSander van der Burg <svanderburg@gmail.com>2018-02-28 21:29:24 +0100
committerSander van der Burg <svanderburg@gmail.com>2018-02-28 21:29:24 +0100
commit8fbfd67f1f8064c0febcb556589a40aa70523140 (patch)
tree0776aedb496c59f195d3cf4b4fc4b670d83ff136 /nixos
parent275bc74aa9db358c38549442c50526d7c6736e67 (diff)
downloadnixpkgs-8fbfd67f1f8064c0febcb556589a40aa70523140.tar
nixpkgs-8fbfd67f1f8064c0febcb556589a40aa70523140.tar.gz
nixpkgs-8fbfd67f1f8064c0febcb556589a40aa70523140.tar.bz2
nixpkgs-8fbfd67f1f8064c0febcb556589a40aa70523140.tar.lz
nixpkgs-8fbfd67f1f8064c0febcb556589a40aa70523140.tar.xz
nixpkgs-8fbfd67f1f8064c0febcb556589a40aa70523140.tar.zst
nixpkgs-8fbfd67f1f8064c0febcb556589a40aa70523140.zip
disnix module: make dbus service configurable
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/misc/disnix.nix14
1 files changed, 10 insertions, 4 deletions
diff --git a/nixos/modules/services/misc/disnix.nix b/nixos/modules/services/misc/disnix.nix
index e96645c79c7..39d23610b06 100644
--- a/nixos/modules/services/misc/disnix.nix
+++ b/nixos/modules/services/misc/disnix.nix
@@ -32,11 +32,17 @@ in
         description = "Whether to enable Disnix";
       };
 
+      enableMultiUser = mkOption {
+        type = types.bool;
+        default = true;
+        description = "Whether to support multi-user mode by enabling the Disnix D-Bus service";
+      };
+
       useWebServiceInterface = mkOption {
         default = false;
         description = "Whether to enable the DisnixWebService interface running on Apache Tomcat";
       };
-      
+
       package = mkOption {
         type = types.path;
         description = "The Disnix package";
@@ -52,7 +58,7 @@ in
 
   config = mkIf cfg.enable {
     dysnomia.enable = true;
-    
+
     environment.systemPackages = [ pkgs.disnix ] ++ optional cfg.useWebServiceInterface pkgs.DisnixWebService;
 
     services.dbus.enable = true;
@@ -71,7 +77,7 @@ in
       };
 
     systemd.services = {
-      disnix = {
+      disnix = mkIf cfg.enableMultiUser {
         description = "Disnix server";
         wants = [ "dysnomia.target" ];
         wantedBy = [ "multi-user.target" ];
@@ -92,7 +98,7 @@ in
         }
         // (if config.environment.variables ? DYSNOMIA_CONTAINERS_PATH then { inherit (config.environment.variables) DYSNOMIA_CONTAINERS_PATH; } else {})
         // (if config.environment.variables ? DYSNOMIA_MODULES_PATH then { inherit (config.environment.variables) DYSNOMIA_MODULES_PATH; } else {});
-        
+
         serviceConfig.ExecStart = "${cfg.package}/bin/disnix-service";
       };