From 51e03e438c2e6c6534ac5750fb511e6bae6ce395 Mon Sep 17 00:00:00 2001 From: Drew Haven Date: Sat, 29 Mar 2025 10:45:18 -0700 Subject: [PATCH] [ssh] Adds authorized keys --- system/authorized-keys.nix | 7 +++++++ system/hosts/drew-desktop/default.nix | 1 + system/hosts/mcp/configuration.nix | 2 +- system/hosts/mcp/default.nix | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 system/authorized-keys.nix diff --git a/system/authorized-keys.nix b/system/authorized-keys.nix new file mode 100644 index 0000000..9869a9a --- /dev/null +++ b/system/authorized-keys.nix @@ -0,0 +1,7 @@ +{ ... }: +{ + users.users.drew.openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPL+uF46A1oe+TgYoCcBQFcWtx5UJMdgczX+/rG/i55t drew@drew-desktop" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB0NbnQByo8sFmzsX5/0I6kWh+unTKxns2TsEPSzgYbD drew@mcp" + ]; +} diff --git a/system/hosts/drew-desktop/default.nix b/system/hosts/drew-desktop/default.nix index b13bca1..883c146 100644 --- a/system/hosts/drew-desktop/default.nix +++ b/system/hosts/drew-desktop/default.nix @@ -4,6 +4,7 @@ nixpkgs.lib.nixosSystem { modules = [ ./configuration.nix ./hardware-configuration.nix + ../../authorized-keys.nix inputs.home-manager.nixosModules.home-manager { nixpkgs.config.allowUnfree = true; diff --git a/system/hosts/mcp/configuration.nix b/system/hosts/mcp/configuration.nix index 422e813..29493fa 100644 --- a/system/hosts/mcp/configuration.nix +++ b/system/hosts/mcp/configuration.nix @@ -117,7 +117,7 @@ # networking.firewall.allowedUDPPorts = [ ... ]; # Or disable the firewall altogether. # networking.firewall.enable = false; - + ### Secrets sops = { defaultSopsFile = ../../../secrets/mcp.yaml; diff --git a/system/hosts/mcp/default.nix b/system/hosts/mcp/default.nix index d2756a5..aae84b4 100644 --- a/system/hosts/mcp/default.nix +++ b/system/hosts/mcp/default.nix @@ -4,6 +4,7 @@ nixpkgs.lib.nixosSystem { modules = [ ./configuration.nix ./hardware-configuration.nix + ../../authorized-keys.nix inputs.home-manager.nixosModules.home-manager inputs.sops-nix.nixosModules.sops {