Skip to content

Commit

Permalink
nixos/accountsservice: reduce amounts of rebuild units when only chan…
Browse files Browse the repository at this point in the history
…ging environment.systemPackages
  • Loading branch information
SuperSandro2000 committed Sep 17, 2024
1 parent ef7eea6 commit 88d1a62
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions nixos/modules/services/desktops/accountsservice.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
# AccountsService daemon.
{ config, lib, pkgs, ... }:
{
meta = {
maintainers = lib.teams.freedesktop.members;
};

###### interface
options = {

services.accounts-daemon = {

enable = lib.mkOption {
type = lib.types.bool;
default = false;
Expand All @@ -18,14 +14,10 @@
the list of user accounts and information attached to those accounts.
'';
};

};

};

###### implementation
config = lib.mkIf config.services.accounts-daemon.enable {

environment.systemPackages = [ pkgs.accountsservice ];

# Accounts daemon looks for dbus interfaces in $XDG_DATA_DIRS/accountsservice
Expand All @@ -36,15 +28,12 @@
systemd.packages = [ pkgs.accountsservice ];

systemd.services.accounts-daemon = lib.recursiveUpdate {

wantedBy = [ "graphical.target" ];

# Accounts daemon looks for dbus interfaces in $XDG_DATA_DIRS/accountsservice
environment.XDG_DATA_DIRS = "${config.system.path}/share";

environment.XDG_DATA_DIRS = "/run/current-system/sw/share";
} (lib.optionalAttrs (!config.users.mutableUsers) {
environment.NIXOS_USERS_PURE = "true";
});
};

}

0 comments on commit 88d1a62

Please sign in to comment.