2024-10-20 00:30:58 +02:00
|
|
|
# Common configuration for all hosts
|
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
inputs,
|
|
|
|
outputs,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
imports = [
|
|
|
|
./extraServices
|
|
|
|
./users
|
|
|
|
inputs.home-manager.nixosModules.home-manager
|
|
|
|
];
|
|
|
|
|
2025-02-12 11:12:32 +01:00
|
|
|
environment.pathsToLink = [
|
|
|
|
"/share/xdg-desktop-portal"
|
|
|
|
"/share/applications"
|
|
|
|
];
|
|
|
|
|
2024-10-20 00:30:58 +02:00
|
|
|
home-manager = {
|
|
|
|
useUserPackages = true;
|
|
|
|
extraSpecialArgs = {inherit 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
|
2024-11-07 10:50:13 +01:00
|
|
|
outputs.overlays.pinned-packages
|
|
|
|
outputs.overlays.master-packages
|
2024-10-20 00:30:58 +02:00
|
|
|
|
|
|
|
# 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;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nix = {
|
|
|
|
settings = {
|
|
|
|
experimental-features = "nix-command flakes";
|
2024-11-07 10:50:13 +01:00
|
|
|
cores = 2;
|
|
|
|
max-jobs = 8;
|
2024-10-20 00:30:58 +02:00
|
|
|
trusted-users = [
|
|
|
|
"root"
|
|
|
|
"m3tam3re"
|
|
|
|
]; # Set users that are allowed to use the flake command
|
|
|
|
};
|
|
|
|
gc = {
|
|
|
|
automatic = true;
|
2024-11-07 10:50:13 +01:00
|
|
|
dates = "weekly";
|
2024-10-20 00:30:58 +02:00
|
|
|
options = "--delete-older-than 30d";
|
|
|
|
};
|
|
|
|
optimise.automatic = true;
|
|
|
|
registry =
|
|
|
|
(lib.mapAttrs (_: flake: {inherit flake;}))
|
|
|
|
((lib.filterAttrs (_: lib.isType "flake")) inputs);
|
|
|
|
nixPath = ["/etc/nix/path"];
|
|
|
|
};
|
|
|
|
users.defaultUserShell = pkgs.fish;
|
|
|
|
}
|