summaryrefslogtreecommitdiff
path: root/os/common/modules/nix.nix
blob: 711ead41870f1ee4cf3933c50a5f6592c884d2e1 (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
26
27
28
29
30
31
32
33
{ config, ... }:
let
  user = config.global.userdata.name;
in
{
  nix = {
    gc = {
      automatic = true;
      dates = "weekly";
      options = "--delete-older-than 30d";
    };

    settings = {
      auto-optimise-store = true;
      use-xdg-base-directories = true;
      trusted-users = [ user ];

      experimental-features = [
        "flakes"
        "nix-command"
      ];

      substituters = [
        "https://nixbin.sinanmohd.com"
        "https://nix-community.cachix.org"
      ];
      trusted-public-keys = [
        "nixbin.sinanmohd.com:dXV3KDPVrm+cGJ2M1ZmTeQJqFGaEapqiVoWHgYDh03k="
        "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
      ];
    };
  };
}