summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/git.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2016-10-24 14:14:58 +0200
committermakefu <github@syntax-fehler.de>2016-10-24 14:14:58 +0200
commit36cbb3d300eb18330a62ba20e35f80d515f5bc5f (patch)
treededf23acdc5763b59b5853b07dd297b88fb15636 /krebs/3modules/git.nix
parent3fa63a4f312a885d353177db911f8a52ce7a1e1c (diff)
parent08c7671fc51270e582e16cbe49aa896f8bff7685 (diff)
Merge remote-tracking branch 'cd/master'
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}