remove the hive-c0re forge-credential chain nothing reads any more
With no nix build on the hive, the boot publish of the forge token for nix has no reader. Removes the ForgeSweep node, the token file, the git credential helper and hive-c0re's forge gitconfig sections.
This commit is contained in:
parent
6b800600e2
commit
221c3f35a1
1 changed files with 69 additions and 310 deletions
|
|
@ -35,26 +35,18 @@ let
|
|||
gatewayCfg = config.services.hyperhive.gateway;
|
||||
};
|
||||
|
||||
forgeGit = import ../lib/hive-forge-git.nix {
|
||||
inherit pkgs;
|
||||
forgeDomain = config.services.hyperhive.swarm.forge.domain;
|
||||
};
|
||||
|
||||
# Privsep splits ownership across users, so git/libgit2's dubious-
|
||||
# ownership guard trips on legitimate cross-user reads: hive-c0re
|
||||
# (hive-core) fetches the agent-owned proposed-config repos. The process is
|
||||
# trusted and can already read the files; this gitconfig only satisfies the
|
||||
# ownership guard. libgit2 honours the literal `*` (mid-path globs aren't
|
||||
# supported, so per-agent repos can't be listed); in practice this process
|
||||
# only ever touches hyperhive's own repos.
|
||||
#
|
||||
# The forge sections (`forgeGit.config`) answer for the `git+http` forge
|
||||
# fetches nix makes: the agent config inputs and `internal/meta`. hive-c0re's
|
||||
# own forge reads use `forge::reader_token()` instead.
|
||||
# only ever touches hyperhive's own repos. Its forge reads authenticate with
|
||||
# `forge::reader_token()`, handed to git per command, so no credential helper
|
||||
# is configured.
|
||||
safeDirGitconfig = pkgs.writeText "hyperhive-safe-gitconfig" ''
|
||||
[safe]
|
||||
directory = *
|
||||
${forgeGit.config}
|
||||
[http]
|
||||
# Abort a stalled fetch instead of blocking startup indefinitely. If a
|
||||
# git http transfer from the forge (e.g. filling an applied mirror)
|
||||
|
|
@ -251,9 +243,6 @@ in
|
|||
after = [ "hive-c0re.socket" ];
|
||||
path = [
|
||||
pkgs.git
|
||||
# `git-credential-hive-forge` on PATH so git finds it for git+http
|
||||
# fetches from the forge (helper = hive-forge).
|
||||
forgeGit.credentialHelper
|
||||
"/run/current-system/sw"
|
||||
];
|
||||
environment = import ./environment.nix { inherit lib config pkgs; };
|
||||
|
|
|
|||
Loading…
Reference in a new issue