mirror of
https://github.com/Unkn0wnCat/dotfiles.git
synced 2025-05-13 15:56:36 +02:00
21 lines
503 B
Nix
21 lines
503 B
Nix
{ lib, pkgs, config, ... }:
|
|
with lib;
|
|
let
|
|
cfg = config.kevin.ssh;
|
|
in {
|
|
options.kevin.ssh = {
|
|
server.enable = mkEnableOption "kevins ssh";
|
|
authorized.kevin = mkEnableOption "set authorized for kevin";
|
|
};
|
|
|
|
config = mkMerge [
|
|
(mkIf cfg.server.enable {
|
|
kevin.networking.ssh.enable = true;
|
|
})
|
|
(mkIf cfg.authorized.kevin {
|
|
users.users."kevin".openssh.authorizedKeys.keyFiles = [
|
|
/etc/nixos/ssh/kevin/authorized_keys
|
|
];
|
|
})
|
|
];
|
|
}
|