/ modules / nix / default.nix
default.nix
 1  { inputs, config, pkgs, lib, self, ... }: let
 2  
 3    nix = config.modules.nix;
 4  
 5  in {
 6    imports = [
 7      ./system.nix
 8    ];
 9  
10    options.modules.nix = {
11  
12    };
13  
14    config = {
15      nix = {
16        channel.enable = false;
17        distributedBuilds = true;
18        buildMachines = [
19    #       {
20    #
21    #
22    #       }
23        ];
24        settings = {
25          sandbox = true;
26          allowed-users = [ "@wheel" "enroll" ];
27          experimental-features = [ "nix-command" "flakes"]; # Enable the Flakes feature and the accompanying new nix command-line tool.
28          auto-optimise-store = true;
29          require-sigs = true;
30          substituters = ["https://hyprland.cachix.org"];
31          trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
32        };
33        registry = {
34  
35        };
36        extraOptions = ''
37          builders-use-substitutes = true
38        '';
39        gc = {
40          automatic = true;
41          persistent = true;
42          dates = "weekly";
43          randomizedDelaySec = "45min";
44          options = "--delete-older-than 30d";
45        };
46        optimise = {
47          automatic = true;
48          dates = [ "01:00" ];
49        };
50        nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
51      };
52  
53      programs = {
54        command-not-found.enable = false;
55      };
56  
57      nixpkgs = {
58        config.allowUnfree = true;
59        overlays = [
60          ( import ../../overlays/nixos-rebuild.nix )
61          #inputs.resign-roots.overlays.cacert
62        ];
63      };
64      # always keep a reference to the source flake that generated each generations
65      environment.etc."current-nixos-flake".source = self;
66    };
67  }