47 lines
1.2 KiB
Nix
Raw Normal View History

2024-04-01 14:21:20 +02:00
# Common configuration for all hosts
2024-04-06 06:12:36 +02:00
{ lib, inputs, outputs, ... }: {
nixpkgs = {
# You can add overlays here
overlays = [
# Add overlays your own flake exports (from overlays and pkgs dir):
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.stable-packages
# You can also add overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
# Or define it inline, for example:
# (final: prev: {
# hi = final.hello.overrideAttrs (oldAttrs: {
# patches = [ ./change-hello-to-hi.patch ];
# });
# })
];
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
allowUnfree = true;
};
};
2024-04-01 14:21:20 +02:00
nix = {
settings = {
experimental-features = "nix-command flakes";
2024-04-06 06:12:36 +02:00
trusted-users = [
"root"
"your-user"
]; # Set users that are allowed to use the flake command
2024-04-01 14:21:20 +02:00
};
gc = {
automatic = true;
options = "--delete-older-than 30d";
};
optimise.automatic = true;
registry = (lib.mapAttrs (_: flake: { inherit flake; }))
((lib.filterAttrs (_: lib.isType "flake")) inputs);
nixPath = [ "/etc/nix/path" ];
};
}