From c978457f3a591188b6273e93fdf397896322c9d5 Mon Sep 17 00:00:00 2001
From: Alexander Foremny <aforemny@posteo.de>
Date: Tue, 7 May 2024 09:43:19 +0200
Subject: git: add kirchner's alternative ssh key

---
 apps/cgit/appspec.nix     | 6 +++---
 apps/cgit/integration.nix | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

(limited to 'apps/cgit')

diff --git a/apps/cgit/appspec.nix b/apps/cgit/appspec.nix
index a7744d5..4790a21 100644
--- a/apps/cgit/appspec.nix
+++ b/apps/cgit/appspec.nix
@@ -26,11 +26,11 @@
     };
     users = lib.mkOption {
       type = lib.types.attrsOf (lib.types.submodule {
-        options.publicKeyFile = lib.mkOption {
-          type = lib.types.nullOr lib.types.str;
+        options.publicKeyFiles = lib.mkOption {
+          type = lib.types.listOf lib.types.str;
         };
       });
-      default = { };
+      default = [ ];
     };
   };
 }
diff --git a/apps/cgit/integration.nix b/apps/cgit/integration.nix
index 8190c2a..608c29f 100644
--- a/apps/cgit/integration.nix
+++ b/apps/cgit/integration.nix
@@ -4,9 +4,9 @@
   users.users.git.createHome = true;
   users.users.git.shell = "${pkgs.git}/bin/git-shell";
   users.users.git.openssh.authorizedKeys.keyFiles =
-    lib.optionals (appConfig.users != null) (lib.mapAttrsToList
-      (name: attrs: attrs.publicKeyFile)
-      appConfig.users);
+    lib.optionals (appConfig.users != null) (lib.concatLists (lib.mapAttrsToList
+      (name: attrs: attrs.publicKeyFiles)
+      appConfig.users));
 
   bindMounts."/var/lib/git".isReadOnly = false;
 
-- 
cgit v1.2.3