summaryrefslogtreecommitdiff
path: root/config/services/git/shell-commands/default.nix
diff options
context:
space:
mode:
authorquentin@aristote.fr <quentin@aristote.fr>2026-11-29 17:24:18 +0100
committerquentin@aristote.fr <quentin@aristote.fr>2026-11-29 17:42:35 +0100
commitce831333a24011d0692f6871047fe74eab9fab8c (patch)
tree9bb971e2afe0a4b22c73274e8b8e8d05d014401d /config/services/git/shell-commands/default.nix
downloadhermaphroditos-ce831333a24011d0692f6871047fe74eab9fab8c.tar.gz
hermaphroditos-ce831333a24011d0692f6871047fe74eab9fab8c.tar.bz2
hermaphroditos-ce831333a24011d0692f6871047fe74eab9fab8c.tar.xz
initial commit
Diffstat (limited to 'config/services/git/shell-commands/default.nix')
-rw-r--r--config/services/git/shell-commands/default.nix13
1 files changed, 13 insertions, 0 deletions
diff --git a/config/services/git/shell-commands/default.nix b/config/services/git/shell-commands/default.nix
new file mode 100644
index 0000000..c27bf9c
--- /dev/null
+++ b/config/services/git/shell-commands/default.nix
@@ -0,0 +1,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
+ '';
+}