summaryrefslogtreecommitdiff
path: root/Biz/Cloud/Git.nix
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2021-01-04 07:51:37 -0500
committerBen Sima <ben@bsima.me>2021-01-04 07:51:37 -0500
commitdd74bbc17c97115df973fe9b9a17f7ce7bb6a99f (patch)
tree4778f5360d180181dbd556dbcef7fe8ac4c3ed03 /Biz/Cloud/Git.nix
parent0f0a1f55c1c7b05926f559661c4154124ea532f7 (diff)
Support multiple keys per user
Every key is just a new line in the $USER.pub file. This is not automatically reflected to gitolite, which uses a separate config, so I'll need to come up with a way to replace gitolite someday.
Diffstat (limited to 'Biz/Cloud/Git.nix')
-rw-r--r--Biz/Cloud/Git.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/Biz/Cloud/Git.nix b/Biz/Cloud/Git.nix
index 82761ce..b35b126 100644
--- a/Biz/Cloud/Git.nix
+++ b/Biz/Cloud/Git.nix
@@ -1,4 +1,4 @@
-{ pkgs, ... }:
+{ pkgs, lib, ... }:
{
services = {
@@ -11,7 +11,11 @@
extraGitoliteRc = ''
$RC{SITE_INFO} = 'a computer is a bicycle for the mind.';
'';
- adminPubkey = builtins.readFile ../Keys/Ben.key;
+ adminPubkey = lib.trivial.pipe ../Keys/Ben.pub [
+ builtins.readFile
+ (lib.strings.splitString "\n")
+ lib.lists.head
+ ];
};
};
}