summaryrefslogtreecommitdiff
path: root/modules/nixos/base/nix.nix
blob: 720a0749cb6e03df26d27faef558b014967e7aaf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
  config,
  lib,
  inputs,
  ...
}: let
  cfg = config.base.nixSettings;
  enable = config.base.enable && cfg.enable;
in {
  config = lib.mkIf enable {
    # not sure why i can't use this on darwin?
    environment.etc."nix/inputs/nixpkgs".source = lib.mkDefault inputs.nixpkgs.outPath;

    nix = {
      channel.enable = lib.mkDefault false;
      gc.dates = lib.mkDefault "weekly";
      settings.trusted-users = ["root" "@wheel"];
    };
  };
}