nix-config/modules/nix-settings.nix

43 lines
1.3 KiB
Nix
Raw Normal View History

2025-04-03 13:02:31 +02:00
{ pkgs, username, lib, ... }:
2025-04-03 12:50:08 +02:00
{
# given the users in this list the right to specify additional substituters via:
# 1. `nixConfig.substituers` in `flake.nix`
# 2. command line args `--options substituers http://xxx`
nix.settings.trusted-users = [username];
# customise /etc/nix/nix.conf declaratively via `nix.settings`
nix.settings = {
# enable flakes globally
experimental-features = ["nix-command" "flakes"];
auto-optimise-store = true;
substituters = [
"https://cache.nixos.org"
"https://hyprland.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
];
builders-use-substitutes = true;
2025-04-11 11:05:41 +02:00
download-buffer-size = 524288000;
2025-04-03 12:50:08 +02:00
};
# do garbage collection weekly to keep disk usage low
nix.gc = {
automatic = lib.mkDefault true;
2025-04-03 13:02:31 +02:00
dates = lib.mkDefault "1 h";
2025-04-03 12:50:08 +02:00
options = lib.mkDefault "--delete-older-than +3";
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
nixpkgs.config.allowBroken = true;
2025-04-03 13:06:51 +02:00
nixpkgs.config.permittedInsecurePackages = [
"dotnet-sdk-6.0.428"
2025-04-04 09:50:31 +02:00
"dotnet-runtime-6.0.36"
2025-04-03 13:06:51 +02:00
];
2025-04-03 12:50:08 +02:00
}