From a7b65e4eeedc61fc3248236a7801234751fef81c Mon Sep 17 00:00:00 2001 From: John Lancaster <32917998+jsl12@users.noreply.github.com> Date: Wed, 1 Apr 2026 20:44:40 -0500 Subject: [PATCH] formatting --- modules/hosts/janus/default.nix | 43 +++++++++++++++++---------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/modules/hosts/janus/default.nix b/modules/hosts/janus/default.nix index 2877987..a89c3ca 100644 --- a/modules/hosts/janus/default.nix +++ b/modules/hosts/janus/default.nix @@ -6,27 +6,29 @@ let fingerprint = "2036c44f7b5901566ff7611ea6c927291ecc6d2dd00779c0eead70ec77fa10d6"; in { - flake.modules.nixos.janus-ca = { config, lib, ... }: - let - johnHome = lib.attrByPath [ "users" "users" username "home" ] "/home/${username}" config; - johnGroup = lib.attrByPath [ "users" "users" username "group" ] username config; - mkStepRules = home: user: group: [ - "d ${home}/.step 0700 ${user} ${group} -" - "d ${home}/.step/config 0700 ${user} ${group} -" - "d ${home}/.step/certs 0700 ${user} ${group} -" - "L+ ${home}/.step/config/defaults.json - - - - /etc/step/config/defaults.json" - "L+ ${home}/.step/certs/root_ca.crt - - - - /etc/step/certs/root_ca.crt" - ]; - in { - environment.etc."step/config/defaults.json".text = builtins.toJSON { - inherit ca-url fingerprint; - root = "/etc/step/certs/root_ca.crt"; + flake.modules.nixos.janus-ca = + { config, lib, ... }: + let + johnHome = lib.attrByPath [ "users" "users" username "home" ] "/home/${username}" config; + johnGroup = lib.attrByPath [ "users" "users" username "group" ] username config; + mkStepRules = home: user: group: [ + "d ${home}/.step 0700 ${user} ${group} -" + "d ${home}/.step/config 0700 ${user} ${group} -" + "d ${home}/.step/certs 0700 ${user} ${group} -" + "L+ ${home}/.step/config/defaults.json - - - - /etc/step/config/defaults.json" + "L+ ${home}/.step/certs/root_ca.crt - - - - /etc/step/certs/root_ca.crt" + ]; + in + { + environment.etc."step/config/defaults.json".text = builtins.toJSON { + inherit ca-url fingerprint; + root = "/etc/step-ca/certs/root_ca.crt"; + }; + environment.etc."step-ca/certs/root_ca.crt".source = ./root_ca.crt; + systemd.tmpfiles.rules = + mkStepRules johnHome username johnGroup + ++ mkStepRules "/root" "root" "root"; }; - environment.etc."step/certs/root_ca.crt".source = ./root_ca.crt; - systemd.tmpfiles.rules = - mkStepRules johnHome username johnGroup - ++ mkStepRules "/root" "root" "root"; - }; flake.modules.homeManager.janus-ca = { config, ... }: { home.file.".step/config/defaults.json".text = builtins.toJSON { @@ -73,7 +75,6 @@ in ]; }; - flake-file.inputs = { wrappers = { url = "github:lassulus/wrappers";