summaryrefslogtreecommitdiff
path: root/modules/nixos/nix-common.nix
blob: 80556a644cbfa92e463c4f24cd38f71911c0f024 (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
{ config, pkgs, ... }: {
  imports = [./lix.nix];

  # Manage nix installation with helper script
  programs.nh = {
    enable = true;
    clean.enable = true;
    clean.extraArgs = "--keep-since 30d --keep 3";
    flake = "/home/defin/.flake"; 
  };

  nix = {
    settings = {
      # Users allowed to run nix
      allowed-users = [ "root" "@wheel" "@builders" "@video" ];
      experimental-features = [ "nix-command" "flakes" ];
      extra-substituters = [ "https://cache.lix.systems" ];
      trusted-public-keys = [ "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o=" ];
    };

    # Clean up old generations after 30 days
    # gc = {
    #   automatic = true;
    #   dates = "weekly";
    #   options = "--delete-older-than 30d";
    # };
  };
}