refactor: ponytail audit
This commit is contained in:
1 parent
de8b59ec16
commit
f080ebe36e
57 files changed
+566
-2137
No files matched your search
@@ -1,11 +1,9 @@
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
account = config.facts.account;
|
||||
personalPublicKeys =
|
||||
machines:
|
||||
map (machine: machine.sshKeys.personal.publicKey) (
|
||||
lib.filter (machine: machine.sshKeys ? personal) (builtins.attrValues machines)
|
||||
);
|
||||
personalPublicKeys = map (machine: machine.sshKeys.personal.publicKey) (
|
||||
lib.filter (machine: machine.sshKeys ? personal) (builtins.attrValues config.facts.machines)
|
||||
);
|
||||
in
|
||||
{
|
||||
flake.modules.nixos.sudo-ssh-agent-auth = {
|
||||
@@ -15,18 +13,16 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
flake.modules.nixos.openssh =
|
||||
{ ... }:
|
||||
{
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PermitRootLogin = "no";
|
||||
PasswordAuthentication = false;
|
||||
AllowUsers = [ account.name ];
|
||||
};
|
||||
flake.modules.nixos.openssh = {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PermitRootLogin = "no";
|
||||
PasswordAuthentication = false;
|
||||
AllowUsers = [ account.name ];
|
||||
};
|
||||
|
||||
users.users.${account.name}.openssh.authorizedKeys.keys = personalPublicKeys config.facts.machines;
|
||||
};
|
||||
|
||||
users.users.${account.name}.openssh.authorizedKeys.keys = personalPublicKeys;
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user