formatting
This commit is contained in:
@@ -6,27 +6,29 @@ let
|
|||||||
fingerprint = "2036c44f7b5901566ff7611ea6c927291ecc6d2dd00779c0eead70ec77fa10d6";
|
fingerprint = "2036c44f7b5901566ff7611ea6c927291ecc6d2dd00779c0eead70ec77fa10d6";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
flake.modules.nixos.janus-ca = { config, lib, ... }:
|
flake.modules.nixos.janus-ca =
|
||||||
let
|
{ config, lib, ... }:
|
||||||
johnHome = lib.attrByPath [ "users" "users" username "home" ] "/home/${username}" config;
|
let
|
||||||
johnGroup = lib.attrByPath [ "users" "users" username "group" ] username config;
|
johnHome = lib.attrByPath [ "users" "users" username "home" ] "/home/${username}" config;
|
||||||
mkStepRules = home: user: group: [
|
johnGroup = lib.attrByPath [ "users" "users" username "group" ] username config;
|
||||||
"d ${home}/.step 0700 ${user} ${group} -"
|
mkStepRules = home: user: group: [
|
||||||
"d ${home}/.step/config 0700 ${user} ${group} -"
|
"d ${home}/.step 0700 ${user} ${group} -"
|
||||||
"d ${home}/.step/certs 0700 ${user} ${group} -"
|
"d ${home}/.step/config 0700 ${user} ${group} -"
|
||||||
"L+ ${home}/.step/config/defaults.json - - - - /etc/step/config/defaults.json"
|
"d ${home}/.step/certs 0700 ${user} ${group} -"
|
||||||
"L+ ${home}/.step/certs/root_ca.crt - - - - /etc/step/certs/root_ca.crt"
|
"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 {
|
in
|
||||||
inherit ca-url fingerprint;
|
{
|
||||||
root = "/etc/step/certs/root_ca.crt";
|
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, ... }: {
|
flake.modules.homeManager.janus-ca = { config, ... }: {
|
||||||
home.file.".step/config/defaults.json".text = builtins.toJSON {
|
home.file.".step/config/defaults.json".text = builtins.toJSON {
|
||||||
@@ -73,7 +75,6 @@ in
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
flake-file.inputs = {
|
flake-file.inputs = {
|
||||||
wrappers = {
|
wrappers = {
|
||||||
url = "github:lassulus/wrappers";
|
url = "github:lassulus/wrappers";
|
||||||
|
|||||||
Reference in New Issue
Block a user