From 5ab93d24b0a8aaa5197f7d79040a5e88590742a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Sat, 8 Jun 2019 14:59:43 +0200 Subject: [PATCH] catullus: create user kfm, run ssh on 22022 --- configs/ssh.nix | 3 ++- deploy.nix | 2 +- systems/catullus/configuration.nix | 22 +++++++++++++++++++--- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/configs/ssh.nix b/configs/ssh.nix index 489a5d8..f1f24f3 100644 --- a/configs/ssh.nix +++ b/configs/ssh.nix @@ -41,7 +41,8 @@ in { }; catullus = { hostname = "catullus.r"; - user = "root"; + user = "kfm"; + port = sshPort; }; menstruation-logs = { user = "root"; diff --git a/deploy.nix b/deploy.nix index 3b263ab..1e1c020 100644 --- a/deploy.nix +++ b/deploy.nix @@ -1,4 +1,4 @@ -{ catullus-ssh ? "root@catullus.r" +{ catullus-ssh ? "root@catullus.r:22022" , scardanelli-ssh ? "root@scardanelli.r:22022" , homeros-ssh ? "root@homeros.r:22022" }: diff --git a/systems/catullus/configuration.nix b/systems/catullus/configuration.nix index 2992fd9..e45ea02 100644 --- a/systems/catullus/configuration.nix +++ b/systems/catullus/configuration.nix @@ -51,23 +51,39 @@ in { environment.variables.TERM = "linux"; environment.variables.HTOPRC = toString ; - programs.tmux.enable = true; - environment.systemPackages = with pkgs; [ git vim htop wget + reptyr ]; users.mutableUsers = false; + users.users.me = { + name = "kfm"; + home = "/home/kfm"; + createHome = true; + group = "users"; + hashedPassword = "$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/"; + shell = pkgs.bash; + }; + + services.openssh = { + enable = true; + ports = [ 22022 ]; + }; - services.openssh.enable = true; users.users.root.openssh.authorizedKeys.keys = [ sshKey.homeros sshKey.scardanelli ]; + users.users.me.openssh.authorizedKeys.keys = [ + sshKey.homeros + sshKey.scardanelli + ]; + networking.retiolum = { ipv4 = "10.243.2.3"; ipv6 = "42:0:3c46:3ec0:7aad:d1d5:9842:da4c";