summary refs log tree commit diff stats
path: root/modules/by-name/ns/nscd/module.nix
blob: 428ae3b87eb3680271f2a206627c242af3695adc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
  config,
  lib,
  ...
}: let
  cfg = config.vhack.nscd;
in {
  options.vhack.nscd = {
    # NOTE(@bpeetz): This is enabled by default in NixOS.
    # Because of this reason:
    # > Whether to enable the Name Service Cache Daemon. Disabling this is
    # > strongly discouraged, as this effectively disables NSS Lookups from
    # > all non-glibc NSS modules, including the ones provided by systemd.
    #
    # As such we should also always enable it. <2024-12-25>
    enable = (lib.mkEnableOption "nscd") // {default = true;};
  };

  config = lib.mkIf cfg.enable {
    users = {
      users.nscd.uid = config.vhack.constants.ids.uids.nscd;
      groups.nscd.gid = config.vhack.constants.ids.gids.nscd;
    };
  };
}