aboutsummaryrefslogtreecommitdiff
path: root/modules/nix/nixos/default.nix
blob: 7116371a9d77acafeeb5395bfdfab19fe7f2616f (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
{
  inputs,
  config,
  pkgs,
  ...
}: {
  nix = {
    # package = inputs.determinate.packages.${pkgs.system}.default;

    gc.automatic = false; # use nh cleaner instead

    # Make builds run with low priority so my system stays responsive
    daemonCPUSchedPolicy = "idle";
    daemonIOSchedClass = "idle";

    settings = {
      extra-experimental-features = ["nix-command" "flakes" "pipe-operators"];
      auto-optimise-store = true;
      use-xdg-base-directories = true;
    };

    # Disable channels
    channel.enable = false;
  };

  nixpkgs.config.allowUnfree = true;

  programs.nh = {
    enable = true;
    flake = "/home/collin/nixos";
    clean.enable = true;
  };

  hjem.users."${config.collinux.user.name}".packages = [pkgs.cached-nix-shell];
}