Add common hosts config
This commit is contained in:
49
hosts/common/global/nix.nix
Normal file
49
hosts/common/global/nix.nix
Normal file
@ -0,0 +1,49 @@
|
||||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
nix.settings.auto-optimise-store = lib.mkDefault true;
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
"ca-derivations"
|
||||
];
|
||||
# warn-dirty = false;
|
||||
|
||||
# Setup binary caches
|
||||
nix.settings = {
|
||||
substituters = [
|
||||
"https://nix-community.cachix.org"
|
||||
"https://cache.nixos.org/"
|
||||
"https://hyprland.cachix.org"
|
||||
"http://binarycache.julian-mutter.de"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"binarycache.julian-mutter.de:oJ67uRFwRhNPKL58CHzy3QQLv38Kx7OA1K+6xlEPu7E="
|
||||
];
|
||||
|
||||
trusted-users = [
|
||||
"root"
|
||||
"@wheel"
|
||||
]; # needed for devenv to add custom caches
|
||||
};
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
# Keep the last 3 generations
|
||||
options = "--delete-older-than +3";
|
||||
};
|
||||
|
||||
programs.nix-ld.enable = true;
|
||||
|
||||
# TODO: is this useful?, what does it do?
|
||||
# nix.settings.flake-registry = ""; # Disable global flake registry
|
||||
# Add each flake input as a registry and nix_path
|
||||
# registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs;
|
||||
# nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
|
||||
|
||||
}
|
Reference in New Issue
Block a user