summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriel Ebner <gebner@gebner.org>2020-10-25 09:16:28 +0100
committerGitHub <noreply@github.com>2020-10-25 09:16:28 +0100
commita8a018ddc0a8b5c3d4fa94c94b672c37356bc075 (patch)
treec60999f4a725d12a1c60abf9853e09651ccce99d
parent0fc4bba48e1e02fd91169461adb72b72cd455012 (diff)
parente0fa72d04d75f7d7e5a0b3d45a69825f209589f9 (diff)
Merge pull request #101409 from rycee/dbus-warning
-rw-r--r--lib/modules.nix2
-rw-r--r--nixos/modules/services/system/dbus.nix26
2 files changed, 19 insertions, 9 deletions
diff --git a/lib/modules.nix b/lib/modules.nix
index df3a2ad17e5f..103a22ed1312 100644
--- a/lib/modules.nix
+++ b/lib/modules.nix
@@ -719,7 +719,7 @@ rec {
mkRemovedOptionModule [ "boot" "loader" "grub" "bootDevice" ] "<replacement instructions>"
- causes a warning if the user defines boot.loader.grub.bootDevice.
+ causes a assertion if the user defines boot.loader.grub.bootDevice.
replacementInstructions is a string that provides instructions on
how to achieve the same functionality without the removed option,
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 ];