summaryrefslogtreecommitdiff
path: root/options.nix
diff options
context:
space:
mode:
authorAlexander Kassouni <alex@kassouni.net>2026-09-25 22:40:15 -0700
committerAlexander Kassouni <alex@kassouni.net>2026-09-25 22:40:15 -0700
commit505db4048338db9a5115526054b79e20fde7b25a (patch)
treeaa9d23918cb416e6afcd98e46635eda22fe9a2a5 /options.nix
parent1fecb146a94823abc6738bfee1551b062c5d7d3b (diff)
options, git
Diffstat (limited to 'options.nix')
-rw-r--r--options.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/options.nix b/options.nix
new file mode 100644
index 0000000..ad62721
--- /dev/null
+++ b/options.nix
@@ -0,0 +1,29 @@
+{config, lib, ...}: let
+ alex = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGBmhTnNG0ym84RJzbIcDCwGmPFVaFPkSYiUtNQrrnV6";
+in {
+ options.my = {
+ adminKeys = lib.mkOption {
+ type = with lib.types; listOf singleLineStr;
+ description = ''
+ Keys granted an interactive shell in the wheel group, i.e. root by way
+ of sudo. Only add a key you would trust with the whole machine.
+ '';
+ };
+
+ gitKeys = lib.mkOption {
+ type = with lib.types; listOf singleLineStr;
+ description = ''
+ Keys granted git-shell access to the repositories under /srv/git.
+ No interactive shell and no sudo, so this is the list to grow when
+ someone needs to push.
+ '';
+ };
+ };
+
+ config.my = {
+ adminKeys = [ alex ];
+
+ # Admins push too; collaborator keys belong here and nowhere else.
+ gitKeys = config.my.adminKeys;
+ };
+}