test-nix update

This commit is contained in:
John Lancaster
2026-03-12 09:41:15 -05:00
parent cae2ce81f4
commit c0b20ece01

View File

@@ -1,36 +1,40 @@
{ inputs, ... }: { inputs, ... }:
let let
name = "test-nix";
username = "john"; username = "john";
hostname = "test-nix";
in in
{ {
flake.modules.nixos."${name}" = { pkgs, lib, ...}: { flake.modules.nixos."${hostname}" = { pkgs, lib, ...}: {
networking.hostName = "${name}"; networking.hostName = "${hostname}";
services.openssh = { services.openssh = {
enable = true; enable = true;
# require public key authentication for better security # require public key authentication for better security
settings.PasswordAuthentication = false; settings.PasswordAuthentication = false;
settings.KbdInteractiveAuthentication = false; settings.KbdInteractiveAuthentication = false;
}; };
virtualisation.docker = {
enable = true;
};
home-manager.users."${username}" = {
docker.enable = true;
};
users.users.john = {
extraGroups = [ "docker" ];
};
}; };
# Generic bootstrapping lxc, use a specific host file for more flake.nixosConfigurations."${hostname}" = inputs.nixpkgs.lib.nixosSystem {
flake.nixosConfigurations."${name}" = inputs.nixpkgs.lib.nixosSystem {
modules = [ modules = [
inputs.self.modules.nixos.lxc inputs.self.modules.nixos.lxc
inputs.self.modules.nixos.zsh
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
inputs.self.modules.nixos."${name}" inputs.self.modules.nixos."${username}"
inputs.self.modules.nixos.john inputs.self.modules.nixos.docker
{
users.users."${username}" = {
extraGroups = [ "docker" ];
};
home-manager.users."${username}" = {
shell.program = "zsh";
docker.enable = true;
ssh.matchSets = {
certs = true;
homelab = true;
};
};
}
]; ];
}; };
} }