slight reorg

This commit is contained in:
John Lancaster
2026-03-15 15:44:24 -05:00
parent da2de12193
commit 9c26c962ff
3 changed files with 9 additions and 17 deletions

View File

@@ -7,9 +7,9 @@ in
#
# NixOS Module
#
flake.modules.nixos.step-client = { config, pkgs, lib, ... }:
flake.modules.nixos.step-ssh-host = { config, pkgs, lib, ... }:
let
cfg = config.step-client;
cfg = config.step-ssh-host;
stepBin = lib.getExe pkgs.step-cli;
rootCertPath = "/etc/step/certs/root_ca.crt";
provisionerPasswordPath = config.sops.secrets."janus/admin_jwk".path;
@@ -18,7 +18,7 @@ in
in
{
# NixOS Options
options.step-client = {
options.step-ssh-host = {
hostname = lib.mkOption {
type = lib.types.str;
};
@@ -41,18 +41,15 @@ in
# NixOS Config
config = {
ssh.certificates.enable = true;
home-manager.sharedModules = with inputs.self.modules; [
homeManager.step-client
];
sops.secrets."janus/admin_jwk" = {
owner = "root";
group = "root";
mode = "0400";
};
networking.nameservers = [ "192.168.1.150" ];
networking.dhcpcd.extraConfig = "nohook resolv.conf";
environment.etc."step/certs/root_ca.crt".source = cfg.rootCertFile;
environment.systemPackages = with pkgs; [
step-cli
(writeShellScriptBin "ssh-host-cert-renew" ''
@@ -66,13 +63,8 @@ in
--principal "${cfg.hostname}.john-stream.com" \
"${cfg.hostname}" "${sshKeyPath}.pub"
'')
(writeShellScriptBin "ssh-host-cert-check" ''
ssh-keygen -Lf ${sshCertPath}
'')
(writeShellScriptBin "ssh-host-cert-check" "${lib.getExe' pkgs.openssh "ssh-keygen"} -Lf ${sshCertPath}")
];
networking.nameservers = [ "192.168.1.150" ];
networking.dhcpcd.extraConfig = "nohook resolv.conf";
};
};