made nix-secrets input comment-out-able.

This commit is contained in:
Gabe Venberg 2024-06-12 14:40:04 -05:00
parent f27b5ac056
commit 6147ddb903
10 changed files with 51 additions and 27 deletions

View file

@ -16,8 +16,11 @@
kitty.terminfo
];
users.users.root.openssh.authorizedKeys.keys =
lib.mkDefault (configLib.dirToStrings "${inputs.nix-secrets}/public-keys");
users.users.root.openssh.authorizedKeys.keys = lib.mkDefault (
if inputs ? nix-secrets
then (configLib.dirToStrings "${inputs.nix-secrets}/public-keys")
else []
);
# if it can log into root, it should also be able to log in to the main user.
users.users.${config.host.user}.openssh.authorizedKeys.keys =
config.users.users.root.openssh.authorizedKeys.keys;