summaryrefslogtreecommitdiff
path: root/config/services/git/shell-commands/default.nix
blob: b88e6b0b429f2e0809169a53c3966e883894614a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
{ 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
  '';
}