feat(ssh): adopt the client key as a secret and declare who may reach each machine (task 0019) #9

Merged
alexion merged 3 commits from task-0019-user-ssh-keys-and-access-policy into main 2026-07-20 13:07:08 -04:00
3 changed files with 11 additions and 13 deletions
Showing only changes of commit 78081143cf - Show all commits

View File

@@ -49,7 +49,7 @@
{ self, nixpkgs, ... }@inputs:
let
inherit (nixpkgs) lib;
my = import ./lib { inherit lib inputs self; };
my = import ./lib.nix { inherit lib inputs self; };
in
{
# Helper functions for discovering and building hosts.

View File

@@ -46,17 +46,15 @@ let
inherit inputs;
my = self.lib;
};
modules =
(collectNixFiles (self + "/modules"))
++ [
inputs.home-manager.nixosModules.home-manager
inputs.chaotic.nixosModules.default
inputs.disko.nixosModules.disko
inputs.sops-nix.nixosModules.sops
(self + "/system")
(self + "/hosts/${hostName}")
{ networking.hostName = hostName; }
];
modules = (collectNixFiles (self + "/modules")) ++ [
inputs.home-manager.nixosModules.home-manager
inputs.chaotic.nixosModules.default
inputs.disko.nixosModules.disko
inputs.sops-nix.nixosModules.sops
(self + "/system.nix")
(self + "/hosts/${hostName}")
{ networking.hostName = hostName; }
];
};
# Discover every host (a subdirectory of `hostsDir`) and build each one.

View File

@@ -93,7 +93,7 @@ in
# satisfy the secret below.
# Clearing both `sshKeyPaths` defaults keeps the SSH host keys out of the
# decryption path.
sops.defaultSopsFile = ../secrets/shared.yaml;
sops.defaultSopsFile = ./secrets/shared.yaml;
sops.age.keyFile = "/var/lib/sops-nix/key.txt";
sops.age.sshKeyPaths = [ ];
sops.gnupg.sshKeyPaths = [ ];