From 1529641b5228265e80aca63f84890c2840b53d50 Mon Sep 17 00:00:00 2001 From: Alexander Ried Date: Wed, 1 Jun 2016 13:02:26 +0200 Subject: accountsservice: add support for mutableUsers = false Add code to accountsservice that returns an error if the environment variable NIXOS_USERS_PURE is set. This variable is set from the nixos accountsservice module if mutableUsers = false --- nixos/modules/services/desktops/accountsservice.nix | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'nixos/modules') diff --git a/nixos/modules/services/desktops/accountsservice.nix b/nixos/modules/services/desktops/accountsservice.nix index c28c27295761..2a7450669ea0 100644 --- a/nixos/modules/services/desktops/accountsservice.nix +++ b/nixos/modules/services/desktops/accountsservice.nix @@ -35,6 +35,14 @@ with lib; services.dbus.packages = [ pkgs.accountsservice ]; systemd.packages = [ pkgs.accountsservice ]; + + systemd.services.accounts-daemon= { + + wantedBy = [ "graphical.target" ]; + + } // (mkIf (!config.users.mutableUsers) { + environment.NIXOS_USERS_PURE = "true"; + }); }; } -- cgit 1.4.1