Skip to content

Commit

Permalink
nixos: copy inputs to /etc for easy grepping through all sources
Browse files Browse the repository at this point in the history
  • Loading branch information
Lillecarl committed Jan 17, 2025
1 parent 3650b1e commit 6c25a02
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions hosts/_shared/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
lib,
config,
pkgs,
inputs,
...
}:
let
Expand Down Expand Up @@ -55,6 +56,15 @@ in
};

config = lib.mkIf cfg.enable {
# Reference flake inputs in /etc. Prevents Nix collecting flake inputs as garbage.
# I find it weird this isn't the default behaviour
environment.etc = lib.mapAttrs' (key: val: {
name = "flakeinputs/${key}";
value = {
source = "${val}";
};
}) inputs;

boot = {
kernelPackages = pkgs.linuxPackages_latest;
kernel.sysctl = {
Expand Down

0 comments on commit 6c25a02

Please sign in to comment.