summaryrefslogtreecommitdiffstats
path: root/krebs/2configs/nscd-fix.nix
blob: 8e5909e723fdb1fd6b66703cd7fd8c18d8d7ba41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
with import <stockholm/lib>;
{ pkgs, ... }: let

  enable = versionOlderThan "19.03";

  versionOlderThan = v:
    compareVersions
      (versions.majorMinor version)
      (versions.majorMinor v)
      == -1;

  warning = ''
    Using custom services.nscd.config because
    https://github.com/NixOS/nixpkgs/pull/50316
  '';

in
  optionalAttrs enable (trace warning {
    services.nscd.enable = mkForce true;
    services.nscd.config = mkForce (readFile (pkgs.fetchurl {
      url = https://raw.githubusercontent.com/arianvp/nixpkgs/1d5f4cb/nixos/modules/services/system/nscd.conf;
      sha256 = "1jlddk38lyynjn51zx3xi1nc29ahajyh0qg48qbq6dqlsrn3wxqs";
    }));
  })