From 88ae1b258d0840975720848f149f4203ef86bb1e Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Sun, 31 Dec 2023 21:28:43 +0100 Subject: [PATCH] add ssh --- modules/nix/default.nix | 1 + modules/users/jopejoe1/default.nix | 3 +++ modules/users/root/default.nix | 7 ++++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/nix/default.nix b/modules/nix/default.nix index edfdaa7..3c51db9 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -59,6 +59,7 @@ in { }; system.stateVersion = "24.05"; + services.openssh.enable = enable; }; } diff --git a/modules/users/jopejoe1/default.nix b/modules/users/jopejoe1/default.nix index 9e77d47..aa705ce 100644 --- a/modules/users/jopejoe1/default.nix +++ b/modules/users/jopejoe1/default.nix @@ -13,6 +13,9 @@ in { initialPassword = "password"; extraGroups = [ "wheel" "networkmanager" "pipewire" "audio" ]; uid = 1000; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB8oyMpS2hK3gQXyHIIVS6oilgMpemLmfhKKJ6RBMwUh johannes@joens.email" + ]; packages = with pkgs; [ libsForQt5.kate libsForQt5.ark texlive.combined.scheme-full ] ++ lib.optionals (config.system == "x86_64-linux") [ diff --git a/modules/users/root/default.nix b/modules/users/root/default.nix index 4e41246..7784003 100644 --- a/modules/users/root/default.nix +++ b/modules/users/root/default.nix @@ -5,7 +5,12 @@ in { options.jopejoe1.root = { enable = lib.mkEnableOption "Enable root user"; }; config = lib.mkIf cfg.enable { - users.users.root = { initialPassword = "password"; }; + users.users.root = { i + nitialPassword = "password"; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB8oyMpS2hK3gQXyHIIVS6oilgMpemLmfhKKJ6RBMwUh johannes@joens.email" + ]; + }; }; imports = [ ./home.nix ]; }