Files
dendritic/modules/hosts/test-nix.nix
John Lancaster 026f413e7b started SSH certs
2026-03-12 13:22:40 -05:00

46 lines
1.1 KiB
Nix

{ inputs, ... }:
let
username = "john";
hostname = "test-nix";
in
{
flake.modules.nixos."${hostname}" = { pkgs, lib, ...}: {
networking.hostName = "${hostname}";
services.openssh = {
enable = true;
# require public key authentication for better security
settings.PasswordAuthentication = false;
settings.KbdInteractiveAuthentication = false;
};
};
flake.nixosConfigurations."${hostname}" = inputs.nixpkgs.lib.nixosSystem {
modules = with inputs.self.modules; [
inputs.home-manager.nixosModules.home-manager
nixos."${username}"
nixos.lxc
# nixos.sudo
nixos.zsh
nixos.docker
nixos.step-client
{
users.users."${username}" = {
extraGroups = [ "docker" ];
};
home-manager.users."${username}" = {
# imports = with inputs.self.modules.homeManager; [
# step-client
# ];
shell.program = "zsh";
docker.enable = true;
ssh.matchSets = {
certs = true;
homelab = true;
};
};
}
];
};
}