summaryrefslogtreecommitdiff
path: root/config/services/git/shell-commands/default.nix
blob: c27bf9c73192c0c10940cd1235677763926901a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
{ lib, pkgs, ... }:

let
  repo = import ./repo { inherit lib pkgs; };
  gitShellCommands = "/srv/git/git-shell-commands";
in
{
  system.activationScripts.buildGitShell.text = ''
    install --mode u=rX,g=,o= --owner git --group git --directory ${gitShellCommands}
    rm -rf ${gitShellCommands}/*
    ln -s ${repo} ${gitShellCommands}/repo
  '';
}