forked from mirrors/nixpkgs
systemd-userdbd: add option to enable
This service is shipped as a part of upstream systemd but not currently incldued in NixOS. This change adds a configuration option which may be used to enable it
This commit is contained in:
parent
97ffa54184
commit
090fc517e2
|
@ -1286,6 +1286,7 @@
|
||||||
./system/boot/systemd/shutdown.nix
|
./system/boot/systemd/shutdown.nix
|
||||||
./system/boot/systemd/tmpfiles.nix
|
./system/boot/systemd/tmpfiles.nix
|
||||||
./system/boot/systemd/user.nix
|
./system/boot/systemd/user.nix
|
||||||
|
./system/boot/systemd/userdbd.nix
|
||||||
./system/boot/timesyncd.nix
|
./system/boot/timesyncd.nix
|
||||||
./system/boot/tmp.nix
|
./system/boot/tmp.nix
|
||||||
./system/boot/uvesafb.nix
|
./system/boot/uvesafb.nix
|
||||||
|
|
26
nixos/modules/system/boot/systemd/userdbd.nix
Normal file
26
nixos/modules/system/boot/systemd/userdbd.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{ config, lib, pkgs, utils, ... }:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.systemd.userdbd;
|
||||||
|
systemd = config.systemd.package;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
systemd.userdbd.enable = mkOption {
|
||||||
|
default = false;
|
||||||
|
type = types.bool;
|
||||||
|
description = ''
|
||||||
|
Whether to enable the systemd-userdbd user/group DB lookup service
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
systemd.additionalUpstreamSystemUnits = [
|
||||||
|
"systemd-userdbd.socket"
|
||||||
|
"systemd-userdbd.service"
|
||||||
|
];
|
||||||
|
|
||||||
|
systemd.sockets.systemd-userdbd.wantedBy = [ "sockets.target" ];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue