moved openssh config into home manager configs

This commit is contained in:
Leyla Becker 2024-12-24 16:01:37 -06:00
parent d760992a06
commit 2d5e37b1eb
6 changed files with 26 additions and 9 deletions

View file

@ -105,6 +105,10 @@
}; };
}; };
bash.enable = true; bash.enable = true;
openssh.authorizedKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJHeItmt8TRW43uNcOC+eIurYC7Eunc0V3LGocQqLaYj leyla@horizon"
];
}; };
dconf = { dconf = {

View file

@ -3,5 +3,6 @@
imports = [ imports = [
./flipperzero.nix ./flipperzero.nix
./i18n.nix ./i18n.nix
./openssh.nix
]; ];
} }

View file

@ -0,0 +1,8 @@
{lib, ...}: {
options.programs = {
openssh.authorizedKeys = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [];
};
};
}

View file

@ -3,5 +3,6 @@
imports = [ imports = [
./flipperzero.nix ./flipperzero.nix
./i18n.nix ./i18n.nix
./openssh.nix
]; ];
} }

View file

@ -0,0 +1,11 @@
{
config,
lib,
...
}: {
users.users =
lib.attrsets.mapAttrs (name: value: {
openssh.authorizedKeys.keys = value.programs.openssh.authorizedKeys;
})
config.home-manager.users;
}

View file

@ -1,12 +1,4 @@
{ {...}: {
lib,
config,
...
}: {
users.users.leyla.openssh.authorizedKeys.keys = lib.mkIf config.host.users.leyla.isTerminalUser [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJHeItmt8TRW43uNcOC+eIurYC7Eunc0V3LGocQqLaYj leyla@horizon"
];
services = { services = {
openssh = { openssh = {
enable = true; enable = true;