forked from Fediversity/Fediversity
Reviewed-on: Fediversity/Fediversity#297 Co-authored-by: Kiara Grouwstra <kiara@procolix.eu> Co-committed-by: Kiara Grouwstra <kiara@procolix.eu>
This commit is contained in:
parent
ea8c61a712
commit
c69f1f52e0
8 changed files with 47 additions and 7 deletions
|
@ -54,6 +54,10 @@ in
|
||||||
|
|
||||||
## FIXME: Remove direct root authentication once the NixOps4 NixOS provider
|
## FIXME: Remove direct root authentication once the NixOps4 NixOS provider
|
||||||
## supports users with password-less sudo.
|
## supports users with password-less sudo.
|
||||||
users.users.root.openssh.authorizedKeys.keys = attrValues keys.contributors;
|
users.users.root.openssh.authorizedKeys.keys = attrValues keys.contributors ++ [
|
||||||
|
# allow our panel vm access to the test machines
|
||||||
|
keys.panel
|
||||||
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,10 +22,26 @@ let
|
||||||
{ vmName, isTestVm }:
|
{ vmName, isTestVm }:
|
||||||
{
|
{
|
||||||
_module.args = { inherit inputs; };
|
_module.args = { inherit inputs; };
|
||||||
imports = [
|
imports =
|
||||||
./common/resource.nix
|
[
|
||||||
(if isTestVm then ./test-machines + "/${vmName}" else ./machines + "/${vmName}")
|
./common/resource.nix
|
||||||
];
|
]
|
||||||
|
++ (
|
||||||
|
if isTestVm then
|
||||||
|
[
|
||||||
|
./test-machines/${vmName}
|
||||||
|
{
|
||||||
|
nixos.module.users.users.root.openssh.authorizedKeys.keys = [
|
||||||
|
# allow our panel vm access to the test machines
|
||||||
|
(import ../keys).panel
|
||||||
|
];
|
||||||
|
}
|
||||||
|
]
|
||||||
|
else
|
||||||
|
[
|
||||||
|
./machines/${vmName}
|
||||||
|
]
|
||||||
|
);
|
||||||
fediversityVm.name = vmName;
|
fediversityVm.name = vmName;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,24 @@ in
|
||||||
defaults.email = "beheer@procolix.com";
|
defaults.email = "beheer@procolix.com";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
age.secrets.panel-ssh-key = {
|
||||||
|
owner = name;
|
||||||
|
mode = "400";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.ssh.startAgent = true;
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
users.${name}.home = {
|
||||||
|
stateVersion = "25.05";
|
||||||
|
file.".ssh/config" = {
|
||||||
|
text = ''
|
||||||
|
IdentityFile ${config.age.secrets.panel-ssh-key.path}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
services.${name} = {
|
services.${name} = {
|
||||||
enable = true;
|
enable = true;
|
||||||
production = true;
|
production = true;
|
||||||
|
|
|
@ -34,4 +34,5 @@ in
|
||||||
{
|
{
|
||||||
contributors = collectKeys ./contributors;
|
contributors = collectKeys ./contributors;
|
||||||
systems = collectKeys ./systems;
|
systems = collectKeys ./systems;
|
||||||
|
panel = removeTrailingWhitespace (readFile ./panel-ssh-key.pub);
|
||||||
}
|
}
|
||||||
|
|
1
keys/panel-ssh-key.pub
Normal file
1
keys/panel-ssh-key.pub
Normal file
|
@ -0,0 +1 @@
|
||||||
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICWfTPs64ImqGh3c/Y+3zqB9YVr5ApsKiS/aTLGXUTzb panel@fedi201
|
|
@ -158,8 +158,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.${name} = {
|
users.users.${name} = {
|
||||||
isSystemUser = true;
|
isNormalUser = true;
|
||||||
group = name;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
users.groups.${name} = { };
|
users.groups.${name} = { };
|
||||||
|
|
BIN
secrets/panel-ssh-key.age
Normal file
BIN
secrets/panel-ssh-key.age
Normal file
Binary file not shown.
|
@ -28,6 +28,7 @@ concatMapAttrs
|
||||||
forgejo-email-password = [ vm02116 ];
|
forgejo-email-password = [ vm02116 ];
|
||||||
forgejo-runner-token = [ ];
|
forgejo-runner-token = [ ];
|
||||||
panel-secret-key = [ fedi201 ];
|
panel-secret-key = [ fedi201 ];
|
||||||
|
panel-ssh-key = [ fedi201 ];
|
||||||
wiki-basicauth-htpasswd = [ vm02187 ];
|
wiki-basicauth-htpasswd = [ vm02187 ];
|
||||||
wiki-password = [ vm02187 ];
|
wiki-password = [ vm02187 ];
|
||||||
wiki-smtp-password = [ vm02187 ];
|
wiki-smtp-password = [ vm02187 ];
|
||||||
|
|
Loading…
Add table
Reference in a new issue