From 024e1668bae906859fc55f891fb2909f92d173d2 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Mon, 8 Jan 2024 23:40:47 +0530 Subject: common: enable ssh --- common.nix | 4 ++++ hosts/cez/configuration.nix | 4 ---- hosts/kay/configuration.nix | 5 ----- hosts/mox/configuration.nix | 7 +------ 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/common.nix b/common.nix index 5b5450e..d8946d7 100644 --- a/common.nix +++ b/common.nix @@ -73,6 +73,10 @@ in grep = "grep --color=auto"; }; }; + services.openssh = { + enable = true; + settings.PasswordAuthentication = false; + }; programs.bash.promptInit = '' if [ "$UID" -ne 0 ]; then PROMPT_COLOR="1;32m" diff --git a/hosts/cez/configuration.nix b/hosts/cez/configuration.nix index 05c3b9f..6a801b0 100644 --- a/hosts/cez/configuration.nix +++ b/hosts/cez/configuration.nix @@ -32,10 +32,6 @@ in enable = true; pulse.enable = true; }; - openssh = { - enable = true; - settings.PasswordAuthentication = false; - }; getty.autologinUser = user; }; diff --git a/hosts/kay/configuration.nix b/hosts/kay/configuration.nix index b2a530e..a21f3a3 100644 --- a/hosts/kay/configuration.nix +++ b/hosts/kay/configuration.nix @@ -9,11 +9,6 @@ ../../common.nix ]; - services.openssh = { - enable = true; - settings.PasswordAuthentication = false; - }; - boot.consoleLogLevel = 3; networking.hostName = "kay"; } diff --git a/hosts/mox/configuration.nix b/hosts/mox/configuration.nix index 9b8c314..e3d0f04 100644 --- a/hosts/mox/configuration.nix +++ b/hosts/mox/configuration.nix @@ -7,12 +7,7 @@ ../../common.nix ]; - services.openssh = { - enable = true; - ports = [ 22 465 ]; - settings.PasswordAuthentication = false; - }; - + services.openssh.ports = [ 22 465 ]; boot.consoleLogLevel = 3; networking.hostName = "mox"; } -- cgit v1.2.3