Compare commits
No commits in common. "13bacc1ef1fb2f27f381a50d5d95f07e4761fa7d" and "cb29ee3c9f0a3a497bca2e87f8ef7e4c06082f8b" have entirely different histories.
13bacc1ef1
...
cb29ee3c9f
2 changed files with 24 additions and 4 deletions
|
|
@ -25,6 +25,13 @@ in
|
||||||
enable = mkBoolOpt false "Whether or not to manage nix configuration.";
|
enable = mkBoolOpt false "Whether or not to manage nix configuration.";
|
||||||
package = mkOpt package pkgs.nix "Which nix package to use.";
|
package = mkOpt package pkgs.nix "Which nix package to use.";
|
||||||
|
|
||||||
|
default-substituter = {
|
||||||
|
url = mkOpt str "https://cache.nixos.org" "The url for the substituter.";
|
||||||
|
key =
|
||||||
|
mkOpt str "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||||
|
"The trusted public key for the substituter.";
|
||||||
|
};
|
||||||
|
|
||||||
extra-substituters = mkOpt (attrsOf substituters-submodule) { } "Extra substituters to configure.";
|
extra-substituters = mkOpt (attrsOf substituters-submodule) { } "Extra substituters to configure.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -51,6 +58,7 @@ in
|
||||||
nix =
|
nix =
|
||||||
let
|
let
|
||||||
users = [
|
users = [
|
||||||
|
"root"
|
||||||
config.metacfg.user.name
|
config.metacfg.user.name
|
||||||
]
|
]
|
||||||
++ optional config.services.hydra.enable "hydra";
|
++ optional config.services.hydra.enable "hydra";
|
||||||
|
|
@ -67,11 +75,19 @@ in
|
||||||
sandbox = true;
|
sandbox = true;
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
trusted-users = users;
|
trusted-users = users;
|
||||||
allowed-users = [ "@users" ];
|
allowed-users = [
|
||||||
|
"@users"
|
||||||
|
"root"
|
||||||
|
];
|
||||||
|
|
||||||
# NixOS already adds cache.nixos.org by default, only add extra substituters
|
substituters = [
|
||||||
substituters = mapAttrsToList (name: _: name) extra-substituters;
|
cfg.default-substituter.url
|
||||||
trusted-public-keys = mapAttrsToList (_: value: value.key) extra-substituters;
|
]
|
||||||
|
++ (mapAttrsToList (name: value: name) extra-substituters);
|
||||||
|
trusted-public-keys = [
|
||||||
|
cfg.default-substituter.key
|
||||||
|
]
|
||||||
|
++ (mapAttrsToList (name: value: value.key) extra-substituters);
|
||||||
|
|
||||||
}
|
}
|
||||||
// (lib.optionalAttrs config.metacfg.tools.direnv.enable {
|
// (lib.optionalAttrs config.metacfg.tools.direnv.enable {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -18,6 +19,9 @@ with lib.metacfg;
|
||||||
22000
|
22000
|
||||||
];
|
];
|
||||||
|
|
||||||
|
programs.ccache.enable = true;
|
||||||
|
nix.settings.extra-sandbox-paths = [ config.programs.ccache.cacheDir ];
|
||||||
|
|
||||||
services.tailscale.enable = true;
|
services.tailscale.enable = true;
|
||||||
|
|
||||||
services.cratedocs-mcp.enable = true;
|
services.cratedocs-mcp.enable = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue