dotfiles/hosts/common/global/default.nix

69 lines
1.4 KiB
Nix

# Common config for all hosts
{
inputs,
outputs,
...
}:
{
imports =
[
./fish.nix # fish for admin
./locale.nix
./nix.nix
./openssh.nix
./podman.nix
./sops.nix
./xserver.nix
]
++ [
inputs.home-manager.nixosModules.home-manager
]
++ (builtins.attrValues outputs.nixosModules);
home-manager.useGlobalPkgs = true;
home-manager.extraSpecialArgs = {
inherit inputs outputs;
};
# Apply overlays
nixpkgs = {
overlays = builtins.attrValues outputs.overlays;
config = {
allowUnfree = true;
};
};
nix.settings.auto-optimise-store = true;
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# 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 = [ "@wheel" ]; # needed for devenv to add custom caches
};
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
programs.nix-ld.enable = true;
}