From c0b20ece01308a082d354518620296e4f76c746a Mon Sep 17 00:00:00 2001 From: John Lancaster <32917998+jsl12@users.noreply.github.com> Date: Thu, 12 Mar 2026 09:41:15 -0500 Subject: [PATCH] test-nix update --- modules/hosts/test-nix.nix | 40 +++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/modules/hosts/test-nix.nix b/modules/hosts/test-nix.nix index 09a20ae..97d4148 100644 --- a/modules/hosts/test-nix.nix +++ b/modules/hosts/test-nix.nix @@ -1,36 +1,40 @@ { inputs, ... }: let - name = "test-nix"; username = "john"; + hostname = "test-nix"; in { - flake.modules.nixos."${name}" = { pkgs, lib, ...}: { - networking.hostName = "${name}"; + 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; }; + }; - 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."${name}" = inputs.nixpkgs.lib.nixosSystem { + flake.nixosConfigurations."${hostname}" = inputs.nixpkgs.lib.nixosSystem { modules = [ inputs.self.modules.nixos.lxc + inputs.self.modules.nixos.zsh inputs.home-manager.nixosModules.home-manager - inputs.self.modules.nixos."${name}" - inputs.self.modules.nixos.john + inputs.self.modules.nixos."${username}" + 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; + }; + }; + } ]; }; }