From a60d2bcd2858691369406e608e3b8cef470fd5a9 Mon Sep 17 00:00:00 2001 From: John Lancaster <32917998+jsl12@users.noreply.github.com> Date: Sun, 5 Jul 2026 19:01:38 -0500 Subject: [PATCH] moving to john-pc --- modules/features/ssh.nix | 4 ++-- modules/hosts/john-pc/default.nix | 40 +++++++++++++++---------------- modules/programs/sops.nix | 5 ++-- modules/users/john.nix | 8 +++---- 4 files changed, 29 insertions(+), 28 deletions(-) diff --git a/modules/features/ssh.nix b/modules/features/ssh.nix index a4f4d7e..dacc5c3 100644 --- a/modules/features/ssh.nix +++ b/modules/features/ssh.nix @@ -215,8 +215,8 @@ in }; config = { - home.file = lib.mkIf cfg.certificates.enable { - ".ssh/known_hosts".text = knownHostsText; + home.file.".ssh/known_hosts" = lib.mkIf cfg.certificates.enable { + text = knownHostsText; }; programs.ssh = { enable = true; diff --git a/modules/hosts/john-pc/default.nix b/modules/hosts/john-pc/default.nix index b01d7ed..4cb6518 100644 --- a/modules/hosts/john-pc/default.nix +++ b/modules/hosts/john-pc/default.nix @@ -3,11 +3,8 @@ let username = "john"; hostname = "john-pc-ubuntu"; - # testTarget = "fded:fb16:653e:25da:be24:11ff:fe89:1cc3"; # soteria - # testTarget = "fded:fb16:653e:25da:be24:11ff:fea0:753f"; # test-nix testHost = "soteria"; # which host to test build testTarget = "test-nix"; - in { flake.modules.homeManager."${hostname}" = { config, pkgs, lib, ... }: @@ -41,11 +38,7 @@ in home.packages = with pkgs; [ nil # Nix language server selfPkgs.jsl-zsh - # selfPkgs.my-neovim - selfPkgs.ssh-certs - # selfPkgs.step-bootstrap - # selfPkgs.wg-platform - # self'.packages.myWrappedPackage + # selfPkgs.ssh-certs (inputs.self.wrappers.test-push.apply { inherit pkgs flakeDir; host = testHost; @@ -56,20 +49,27 @@ in homeManagerFlakeDir = flakeDir; docker.enable = true; - ssh = { - certificates.enable = true; - knownHosts = [ - "@cert-authority fded:fb16:653e:25da:be24:11ff:* ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNug18oLH0vZxnibXJzMJvTWFPZTnSlhCDDVi+rHhgnIum6ZXQ4SF+VHOOAM5BbzZmMKitNJ5lcrGP15Eur7DzQ=" - ]; - matchSets = { - certs = true; - appdaemon = true; - homelab = true; - dev = true; - tailscale = true; - }; + programs.ssh.settings."*" = { + IdentityAgent = "${config.home.homeDirectory}/.1password/agent.sock"; }; + ssh-new = { + certificates.enable = true; + }; + # ssh = { + # certificates.enable = true; + # knownHosts = [ + # "@cert-authority fded:fb16:653e:25da:be24:11ff:* ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNug18oLH0vZxnibXJzMJvTWFPZTnSlhCDDVi+rHhgnIum6ZXQ4SF+VHOOAM5BbzZmMKitNJ5lcrGP15Eur7DzQ=" + # ]; + # matchSets = { + # certs = true; + # appdaemon = true; + # homelab = true; + # dev = true; + # tailscale = true; + # }; + # }; + # This provides the keys at build time and will be included in the nix store sops.defaultSopsFile = ../../../keys/secrets.yaml; diff --git a/modules/programs/sops.nix b/modules/programs/sops.nix index a8b1929..44dcae4 100644 --- a/modules/programs/sops.nix +++ b/modules/programs/sops.nix @@ -35,9 +35,10 @@ in config = let + identityFile = config.ssh-new.keyFile; my-sops = (inputs.self.wrappers.mySops.apply { inherit pkgs; - sshKey = config.ssh.identityFile; + sshKey = identityFile; }).wrapper; in { @@ -46,7 +47,7 @@ in sops = { defaultSopsFile = ../../keys/secrets.yaml; defaultSopsFormat = "yaml"; - age.sshKeyPaths = [ "${config.ssh.identityFile}" ]; + age.sshKeyPaths = [ identityFile ]; }; home.packages = with pkgs; [ diff --git a/modules/users/john.nix b/modules/users/john.nix index e37bd92..636ea6c 100644 --- a/modules/users/john.nix +++ b/modules/users/john.nix @@ -36,10 +36,10 @@ in selfPkgs = inputs.self.packages.${pkgs.stdenv.hostPlatform.system}; in { home.stateVersion = "25.11"; - imports = [ - inputs.self.modules.homeManager.shell-tools - inputs.self.modules.homeManager.ssh - inputs.self.modules.homeManager.git + imports = with inputs.self.modules.homeManager; [ + ssh-new + shell-tools + git ]; xdg.enable = true; home.packages = [