aboutsummaryrefslogtreecommitdiffstats
path: root/apps/cgit/integration.nix
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2024-02-23 03:33:41 +0100
committerLibravatar Alexander Foremny <aforemny@posteo.de>2024-02-26 04:36:24 +0100
commitd2873fe0f6a117d7157c2a6f204a864f9edeb668 (patch)
treef05455745906bbc5e20bb78cf74360ade55fdfb9 /apps/cgit/integration.nix
parent323973ecbb71b6186290a798af1c8a2c91299e18 (diff)
apps/cgit: add `users` option
Diffstat (limited to 'apps/cgit/integration.nix')
-rw-r--r--apps/cgit/integration.nix9
1 files changed, 4 insertions, 5 deletions
diff --git a/apps/cgit/integration.nix b/apps/cgit/integration.nix
index ffa5b3e..8190c2a 100644
--- a/apps/cgit/integration.nix
+++ b/apps/cgit/integration.nix
@@ -1,13 +1,12 @@
{ appConfig, lib, pkgs, ... }:
{
- # TODO references ../../public
users.users.git.home = "/var/lib/git";
users.users.git.createHome = true;
users.users.git.shell = "${pkgs.git}/bin/git-shell";
- users.users.git.openssh.authorizedKeys.keyFiles = [
- ../../public/aforemny.id_rsa.pub
- ../../public/kirchner.id_rsa.pub
- ];
+ users.users.git.openssh.authorizedKeys.keyFiles =
+ lib.optionals (appConfig.users != null) (lib.mapAttrsToList
+ (name: attrs: attrs.publicKeyFile)
+ appConfig.users);
bindMounts."/var/lib/git".isReadOnly = false;