summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Helgesson <robert@rycee.net>2020-10-22 20:24:41 +0200
committerRobert Helgesson <robert@rycee.net>2020-10-24 23:01:00 +0200
commit94819fdb5f0b624fd4e8233a064c0eaa1479c170 (patch)
treee3c9bd703db71077c3eaa919a5b914dc3bec1559
parentabcdffb6a272de657c3d1a423dda44f9037229b3 (diff)
nixos/dbus: re-add a dummy socketActivated option
If set, then issue a warning instead of an error as previously.
-rw-r--r--nixos/modules/services/system/dbus.nix26
1 files changed, 18 insertions, 8 deletions
diff --git a/nixos/modules/services/system/dbus.nix b/nixos/modules/services/system/dbus.nix
index d9dd26f0f189..f8d909a4a3cc 100644
--- a/nixos/modules/services/system/dbus.nix
+++ b/nixos/modules/services/system/dbus.nix
@@ -1,6 +1,6 @@
# D-Bus configuration and system bus daemon.
-{ config, lib, pkgs, ... }:
+{ config, lib, options, pkgs, ... }:
with lib;
@@ -18,13 +18,6 @@ let
in
{
-
- imports = [
- (mkRemovedOptionModule
- [ "services" "dbus" "socketActivated" ]
- "The user D-Bus session is now always socket activated and this option can safely be removed.")
- ];
-
###### interface
options = {
@@ -57,12 +50,29 @@ in
<filename><replaceable>pkg</replaceable>/share/dbus-1/services</filename>
'';
};
+
+ socketActivated = mkOption {
+ type = types.nullOr types.bool;
+ default = null;
+ visible = false;
+ description = ''
+ Removed option, do not use.
+ '';
+ };
};
};
###### implementation
config = mkIf cfg.enable {
+ warnings = optional (cfg.socketActivated != null) (
+ let
+ files = showFiles options.services.dbus.socketActivated.files;
+ in
+ "The option 'services.dbus.socketActivated' in ${files} no longer has"
+ + " any effect and can be safely removed: the user D-Bus session is"
+ + " now always socket activated."
+ );
environment.systemPackages = [ pkgs.dbus.daemon pkgs.dbus ];