moved openssh config into home manager configs
This commit is contained in:
parent
d760992a06
commit
2d5e37b1eb
|
@ -105,6 +105,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
bash.enable = true;
|
bash.enable = true;
|
||||||
|
|
||||||
|
openssh.authorizedKeys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJHeItmt8TRW43uNcOC+eIurYC7Eunc0V3LGocQqLaYj leyla@horizon"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
dconf = {
|
dconf = {
|
||||||
|
|
|
@ -3,5 +3,6 @@
|
||||||
imports = [
|
imports = [
|
||||||
./flipperzero.nix
|
./flipperzero.nix
|
||||||
./i18n.nix
|
./i18n.nix
|
||||||
|
./openssh.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
8
modules/home-manager-modules/openssh.nix
Normal file
8
modules/home-manager-modules/openssh.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{lib, ...}: {
|
||||||
|
options.programs = {
|
||||||
|
openssh.authorizedKeys = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
|
default = [];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -3,5 +3,6 @@
|
||||||
imports = [
|
imports = [
|
||||||
./flipperzero.nix
|
./flipperzero.nix
|
||||||
./i18n.nix
|
./i18n.nix
|
||||||
|
./openssh.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
11
modules/nixos-modules/home-manager/openssh.nix
Normal file
11
modules/nixos-modules/home-manager/openssh.nix
Normal 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;
|
||||||
|
}
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue