nixos-configuration/modules/nix.nix
Jakob Lechner 6ac6d3f89d Add git as system package
This should fix
    error: executing 'git': No such file or directory

The error occurs sometimes for flake inputs.
2025-07-17 03:13:52 +02:00

57 lines
1.2 KiB
Nix

{ lib, pkgs, inputs, system, ... }:
{
nix = {
daemonCPUSchedPolicy = "idle";
daemonIOSchedClass = "idle";
daemonIOSchedPriority = 7;
nixPath = [
"nixpkgs=${inputs.nixpkgs}"
];
settings = {
experimental-features = [
"nix-command"
"flakes"
];
trusted-users = [ "@wheel" ];
auto-optimise-store = true;
allowed-users = [ "@wheel" ];
log-lines = lib.mkDefault 25;
# Avoid disk full issues
max-free = lib.mkDefault (3000 * 1024 * 1024);
min-free = lib.mkDefault (512 * 1024 * 10);
download-buffer-size = lib.mkDefault (512 * 1024 * 1024);
};
gc = {
automatic = true;
options = "--delete-older-than 30d";
randomizedDelaySec = "60 min";
};
};
systemd.services.nix-daemon.serviceConfig.OOMScoreAdjust = 250;
nixpkgs.config.permittedInsecurePackages = [
"olm-3.2.16"
];
nixpkgs.overlays = [
inputs.self.overlays.default
(_: prev: {
master = import inputs.nixpkgsMaster {
inherit system;
inherit (prev) config;
};
})
];
environment.systemPackages = with pkgs; [
cached-nix-shell
git
];
}