summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/git.nix
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/3modules/git.nix')
-rw-r--r--krebs/3modules/git.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/krebs/3modules/git.nix b/krebs/3modules/git.nix
index 6a03b4638..20907a3ed 100644
--- a/krebs/3modules/git.nix
+++ b/krebs/3modules/git.nix
@@ -6,7 +6,7 @@
# TODO when authorized_keys changes, then restart ssh
# (or kill already connected users somehow)
-with config.krebs.lib;
+with import <stockholm/lib>;
let
cfg = config.krebs.git;
@@ -97,7 +97,7 @@ let
singleton {
user = [ config.krebs.users.tv ];
repo = [ testing ]; # see literal example of repos
- perm = push "refs/*" (with config.krebs.lib.git; [
+ perm = push "refs/*" (with git; [
non-fast-forward create delete merge
]);
}
@@ -389,6 +389,12 @@ let
mapAttrsToList repo-to-cgitrc cfg.repos
));
+ environment.systemPackages = [
+ (pkgs.writeDashBin "cgit-clear-cache" ''
+ ${pkgs.coreutils}/bin/rm -f ${cfg.cgit.settings.cache-root}/*
+ '')
+ ];
+
system.activationScripts.cgit = ''
mkdir -m 0700 -p ${cfg.cgit.settings.cache-root}
chown ${toString cfg.cgit.fcgiwrap.user.uid}:${toString cfg.cgit.fcgiwrap.group.gid} ${cfg.cgit.settings.cache-root}