2023-07-11 14:16:56 +00:00
|
|
|
{ lib, pkgs, ... }: {
|
2023-05-16 19:10:41 +00:00
|
|
|
# restrict nix command to sudoers
|
|
|
|
nix.settings.allowed-users = [ "@wheel" ];
|
|
|
|
|
|
|
|
# experimental features
|
|
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
|
|
|
|
# optimizations
|
|
|
|
nix.settings.auto-optimise-store = true;
|
|
|
|
|
|
|
|
# garbage collection
|
|
|
|
nix.gc = {
|
|
|
|
automatic = true;
|
|
|
|
dates = "weekly";
|
|
|
|
options = "--delete-older-than 30d";
|
|
|
|
};
|
|
|
|
|
2023-06-19 18:51:00 +00:00
|
|
|
# binary caches
|
2023-06-03 18:22:57 +00:00
|
|
|
nix.settings = {
|
2023-08-12 18:23:45 +00:00
|
|
|
substituters =
|
|
|
|
[ "https://hyprland.cachix.org" "https://nix-community.cachix.org" ];
|
|
|
|
trusted-public-keys = [
|
|
|
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
|
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
|
|
];
|
2023-06-03 18:22:57 +00:00
|
|
|
};
|
2023-06-19 18:51:00 +00:00
|
|
|
|
|
|
|
# list of allowed unfree packages
|
|
|
|
nixpkgs.config.allowUnfreePredicate = pkg:
|
|
|
|
builtins.elem (lib.getName pkg) [
|
|
|
|
"vscode"
|
|
|
|
"vscode-extension-github-copilot"
|
|
|
|
"vscode-extension-github-copilot-chat"
|
|
|
|
"vscode-extension-ms-vsliveshare-vsliveshare"
|
|
|
|
];
|
2023-07-09 16:20:58 +00:00
|
|
|
|
|
|
|
system.activationScripts.nvd-report-changes = ''
|
|
|
|
PATH=$PATH:${lib.makeBinPath [ pkgs.nvd pkgs.nix ]}
|
|
|
|
nvd diff $(ls -dv /nix/var/nix/profiles/system-*-link | tail -2)
|
|
|
|
'';
|
2023-05-16 19:10:41 +00:00
|
|
|
}
|