diff options
| author | Seth Flynn <[email protected]> | 2025-02-13 18:48:58 -0500 |
|---|---|---|
| committer | Seth Flynn <[email protected]> | 2025-02-13 22:09:11 -0500 |
| commit | 3a2a22f50343b887a85cf18fca4720f751eeafb8 (patch) | |
| tree | 3369a32ed7e409f54a1e68e9fa648be4e73efbe5 /modules/shared/services/determinate.nix | |
| parent | 3b4a9dc47ad660cd4d99bd66aed336abad5185b5 (diff) | |
modules/determinate: make dedicated module
Diffstat (limited to 'modules/shared/services/determinate.nix')
| -rw-r--r-- | modules/shared/services/determinate.nix | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/modules/shared/services/determinate.nix b/modules/shared/services/determinate.nix new file mode 100644 index 0000000..469306e --- /dev/null +++ b/modules/shared/services/determinate.nix @@ -0,0 +1,51 @@ +{ + config, + lib, + pkgs, + inputs, + ... +}: + +let + cfg = config.services.determinate; + + nixPackage = inputs.determinate.inputs.nix.packages.${pkgs.stdenv.hostPlatform.system}.default; +in + +{ + options.services.determinate = { + enable = lib.mkEnableOption "Determinate with a bit less Determinate"; + + determinate-nix.enable = lib.mkEnableOption "Determinate Nix"; + determinate-nixd.enable = lib.mkEnableOption "determinate-nixd" // { + default = true; + }; + flakehub-cache.enable = lib.mkEnableOption "the FlakeHub cache" // { + default = true; + }; + }; + + config = lib.mkIf cfg.enable ( + lib.mkMerge [ + (lib.mkIf cfg.determinate-nix.enable { + nix.package = lib.mkDefault nixPackage; + }) + + (lib.mkIf cfg.flakehub-cache.enable { + nix.settings = { + extra-substituters = [ "https://cache.flakehub.com" ]; + extra-trusted-public-keys = [ + "cache.flakehub.com-3:hJuILl5sVK4iKm86JzgdXW12Y2Hwd5G07qKtHTOcDCM=" + "cache.flakehub.com-4:Asi8qIv291s0aYLyH6IOnr5Kf6+OF14WVjkE6t3xMio=" + "cache.flakehub.com-5:zB96CRlL7tiPtzA9/WKyPkp3A2vqxqgdgyTVNGShPDU=" + "cache.flakehub.com-6:W4EGFwAGgBj3he7c5fNh9NkOXw0PUVaxygCVKeuvaqU=" + "cache.flakehub.com-7:mvxJ2DZVHn/kRxlIaxYNMuDG1OvMckZu32um1TadOR8=" + "cache.flakehub.com-8:moO+OVS0mnTjBTcOUh2kYLQEd59ExzyoW1QgQ8XAARQ=" + "cache.flakehub.com-9:wChaSeTI6TeCuV/Sg2513ZIM9i0qJaYsF+lZCXg0J6o=" + "cache.flakehub.com-10:2GqeNlIp6AKp4EF2MVbE1kBOp9iBSyo0UPR9KoR0o1Y=" + ]; + }; + }) + ] + ); +} |
