summaryrefslogtreecommitdiff
path: root/hosts/base.nix
blob: 43103c5da91b01dc85276ea7c3656bb25436ef4a (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
{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://cuda-maintainers.cachix.org"
        "https://nix-community.cachix.org"
        "https://nix-gaming.cachix.org"
      ];
      trusted-public-keys = [
        "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
        "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
        "cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
        "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;
}