ssh module reorg

This commit is contained in:
John Lancaster
2026-03-10 22:18:28 -05:00
parent 7eaa32f161
commit 20f72768c5
4 changed files with 15 additions and 16 deletions

View File

@@ -4,7 +4,6 @@
{
imports = with inputs.self.homeModules; [
rebuild
# ssh
git
shell-tools
];

View File

@@ -3,6 +3,19 @@ let
userName = "john";
in
{
flake.modules.nixos.ssh = {
services.openssh = {
enable = true;
# require public key authentication for better security
settings.PasswordAuthentication = false;
settings.KbdInteractiveAuthentication = false;
};
home-manager.sharedModules = with inputs.self.homeModules; [
ssh
];
};
flake.homeModules.ssh = { pkgs, config, lib, ... }:
{
options.ssh = {
@@ -117,17 +130,4 @@ in
};
};
};
flake.modules.nixos.ssh = {
services.openssh = {
enable = true;
# require public key authentication for better security
settings.PasswordAuthentication = false;
settings.KbdInteractiveAuthentication = false;
};
home-manager.sharedModules = with inputs.self.homeModules; [
ssh
];
};
}

View File

@@ -7,13 +7,13 @@ in
flake.modules.nixos."${hostname}" = { pkgs, ... }: {
imports = [
inputs.self.modules.nixos.lxc
inputs.home-manager.nixosModules.home-manager
inputs.self.modules.nixos."${username}"
# inputs.self.modules.nixos.step-ca
inputs.self.modules.nixos.docker
];
home-manager.users."${username}" = {
imports = with inputs.self.homeModules; [
ssh
];
docker.enable = true;
ssh.matchSets = {
@@ -26,7 +26,6 @@ in
flake.nixosConfigurations."${hostname}" = inputs.nixpkgs.lib.nixosSystem {
modules = [
inputs.self.modules.nixos."${hostname}"
inputs.home-manager.nixosModules.home-manager
];
};
}

View File

@@ -14,6 +14,7 @@
flake.nixosConfigurations.lxc = inputs.nixpkgs.lib.nixosSystem {
modules = [
inputs.self.modules.nixos.lxc
inputs.self.modules.nixos.ssh
];
};
}