summaryrefslogtreecommitdiff
path: root/hosts/base.nix
blob: 5a65df7edffad93755829ccd49e81cf1b567a199 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{pkgs, ...}: {
  # fucking linux vulnerability
  # enable flakes
  nix = {
    # gc =
    #   {
    #     automatic = true;
    #     options = "--delete-older-than 7d";
    #   }
    #   // (
    #     if pkgs.stdenv.isDarwin
    #     then {
    #       interval = {
    #         Weekday = 0;
    #         Hour = 20;
    #         Minute = 0;
    #       };
    #     }
    #     else {dates = "weekly";}
    #   );
    # package = pkgs.nixFlakes;
    extraOptions = ''
      experimental-features = nix-command flakes
    '';
    settings = {
      substituters = [
        "https://cache.nixos.org"
        "https://polwex.cachix.org"
        "https://nix-community.cachix.org"
        "https://nix-gaming.cachix.org"
      ];
      trusted-public-keys = [
        "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
        "polwex.cachix.org-1:6Qk8lW0wZ9omwmURpPQUEDUHAb6Nsb+f+pdH2hppBZY="
        "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
        "nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
      ];

      keep-outputs = true;
      keep-derivations = true;
      trusted-users = ["root" "y"];
    };
  };
  programs.nh = {
    enable = true;
    clean.enable = true;
    clean.extraArgs = "--keep-since 4d --keep 3";
    # flake = "/home/user/my-nixos-config";
  };

  #direnv
  # programs.direnv.enable = true;
}