tadpole: Add authorized ssh key for pinwheel
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
{ lib, config, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
let
|
let
|
||||||
enabled = config.mod.ssh.enable;
|
enabled = config.mod.ssh.enable;
|
||||||
|
|
||||||
|
authorizedKeysPath = "/home/alex/.ssh/authorized-keys";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
@@ -23,7 +25,22 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment.etc."ssh/authorized_keys_command" = {
|
||||||
|
mode = "0755";
|
||||||
|
text = ''
|
||||||
|
#!${pkgs.bash}/bin/bash
|
||||||
|
for file in ${authorizedKeysPath}/*; do
|
||||||
|
${pkgs.coreutils}/bin/cat "$file"
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
age.secrets = {
|
age.secrets = {
|
||||||
|
"alex.pinwheel-tadpole.pub" = {
|
||||||
|
file = ../../../../secrets/pinwheel/alex.pinwheel-tadpole.pub.age;
|
||||||
|
path = "${authorizedKeysPath}/alex.pinwheel-tadpole.pub";
|
||||||
|
};
|
||||||
|
|
||||||
"alex.tadpole-codeberg.org" = {
|
"alex.tadpole-codeberg.org" = {
|
||||||
file = ../../../../secrets/tadpole/alex.tadpole-codeberg.org.age;
|
file = ../../../../secrets/tadpole/alex.tadpole-codeberg.org.age;
|
||||||
path = "/home/alex/.ssh/alex.tadpole-codeberg.org";
|
path = "/home/alex/.ssh/alex.tadpole-codeberg.org";
|
||||||
@@ -47,6 +64,14 @@ in
|
|||||||
path = "/etc/ssh/tadpole";
|
path = "/etc/ssh/tadpole";
|
||||||
type = "ed25519";
|
type = "ed25519";
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
KbdInteractiveAuthentication = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
authorizedKeysCommand = "/etc/ssh/authorized_keys_command";
|
||||||
|
authorizedKeysCommandUser = "root";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
BIN
secrets/pinwheel/alex.pinwheel-tadpole.age
Normal file
BIN
secrets/pinwheel/alex.pinwheel-tadpole.age
Normal file
Binary file not shown.
BIN
secrets/pinwheel/alex.pinwheel-tadpole.pub.age
Normal file
BIN
secrets/pinwheel/alex.pinwheel-tadpole.pub.age
Normal file
Binary file not shown.
@@ -11,6 +11,8 @@ in {
|
|||||||
"pinwheel/mullvad-account-history.age".publicKeys = [ pinwheel alex ];
|
"pinwheel/mullvad-account-history.age".publicKeys = [ pinwheel alex ];
|
||||||
"pinwheel/alex.pinwheel-sombrero.age".publicKeys = [ pinwheel alex ];
|
"pinwheel/alex.pinwheel-sombrero.age".publicKeys = [ pinwheel alex ];
|
||||||
"pinwheel/alex.pinwheel-sombrero.pub.age".publicKeys = [ pinwheel sombrero alex ];
|
"pinwheel/alex.pinwheel-sombrero.pub.age".publicKeys = [ pinwheel sombrero alex ];
|
||||||
|
"pinwheel/alex.pinwheel-tadpole.age".publicKeys = [ pinwheel alex ];
|
||||||
|
"pinwheel/alex.pinwheel-tadpole.pub.age".publicKeys = [ pinwheel tadpole alex ];
|
||||||
"pinwheel/alex.pinwheel-github.com.age".publicKeys = [ pinwheel alex ];
|
"pinwheel/alex.pinwheel-github.com.age".publicKeys = [ pinwheel alex ];
|
||||||
"pinwheel/alex.pinwheel-github.com.pub.age".publicKeys = [ pinwheel alex ];
|
"pinwheel/alex.pinwheel-github.com.pub.age".publicKeys = [ pinwheel alex ];
|
||||||
"pinwheel/alex.pinwheel-andromeda.age".publicKeys = [ pinwheel alex ];
|
"pinwheel/alex.pinwheel-andromeda.age".publicKeys = [ pinwheel alex ];
|
||||||
|
|||||||
Reference in New Issue
Block a user