formatting
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user