separate ssh client and server config and move to common
This commit is contained in:
parent
7c29e984ae
commit
496a9ac3bc
4 changed files with 25 additions and 14 deletions
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./ssh
|
||||||
|
|
||||||
./boot.nix
|
./boot.nix
|
||||||
./home-manager.nix
|
./home-manager.nix
|
||||||
./locales.nix
|
./locales.nix
|
||||||
|
|
|
||||||
|
|
@ -19,21 +19,8 @@
|
||||||
";
|
";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.openssh = {
|
|
||||||
enable = true;
|
|
||||||
ports = [ 8743 ];
|
|
||||||
settings = {
|
|
||||||
PasswordAuthentication = false;
|
|
||||||
KbdInteractiveAuthentication = false;
|
|
||||||
PermitRootLogin = "no";
|
|
||||||
AllowUsers = [ "wo2w" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
systemPackages = if config.services.desktopManager.plasma6.enable then with pkgs; [ kdePackages.ksshaskpass ] else [];
|
systemPackages = if config.services.desktopManager.plasma6.enable then with pkgs; [ kdePackages.ksshaskpass ] else [];
|
||||||
variables = {
|
variables.SSH_ASKPASS_REQUIRE = "prefer";
|
||||||
SSH_ASKPASS_REQUIRE = "prefer";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
8
common/ssh/default.nix
Normal file
8
common/ssh/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./client.nix
|
||||||
|
./server.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
14
common/ssh/server.nix
Normal file
14
common/ssh/server.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{ config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
ports = [ 8743 ];
|
||||||
|
settings = {
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
KbdInteractiveAuthentication = false;
|
||||||
|
PermitRootLogin = "no";
|
||||||
|
AllowUsers = [ "wo2w" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue