nixcfg/modules/nixos/services/build/default.nix
2026-02-24 13:25:42 +01:00

24 lines
419 B
Nix

{
config,
lib,
pkgs,
...
}:
with lib;
with lib.metacfg;
let
cfg = config.metacfg.build;
in
{
options.metacfg.build = with types; {
enable = mkBoolOpt false "Whether or not to enable the build config.";
};
config = mkIf cfg.enable {
programs.ccache.enable = true;
nix.settings.extra-sandbox-paths = [ "/var/cache/ccache" ];
environment.systemPackages = [
pkgs.ccache
];
};
}