mirror of
https://github.com/sstent/vmimages.git
synced 2026-01-25 14:41:44 +00:00
sync
This commit is contained in:
@@ -2,21 +2,21 @@
|
||||
with lib;
|
||||
|
||||
let
|
||||
# inherit
|
||||
# (builtins)
|
||||
inherit
|
||||
(builtins)
|
||||
# attrNames
|
||||
# attrValues
|
||||
# foldl'
|
||||
# isPath
|
||||
# pathExists
|
||||
# readDir
|
||||
readDir
|
||||
# toString
|
||||
# ;
|
||||
;
|
||||
|
||||
# inherit
|
||||
# (lib)
|
||||
inherit
|
||||
(lib)
|
||||
# flatten
|
||||
# filterAttrs
|
||||
filterAttrs
|
||||
# forEach
|
||||
# getAttrFromPath
|
||||
# hasPrefix
|
||||
@@ -27,26 +27,26 @@ let
|
||||
# mkIf
|
||||
# nameValuePair
|
||||
# removeSuffix
|
||||
# ;
|
||||
;
|
||||
cfg = config.custom.keybase;
|
||||
username = config.home.username;
|
||||
secretstore = config._secretstore;
|
||||
util = import "${inputs.self}/lib";
|
||||
# map = import "${inputs.self}/lib/map.nix";
|
||||
|
||||
# # 'sops' Encrypted Secrets
|
||||
# hm_secrets = dir: out_dir:
|
||||
# filter (name: type: type != null && !(hasPrefix "_" name)) (name: type:
|
||||
# if type == "regular"
|
||||
# then
|
||||
# nameValuePair name {
|
||||
# sopsFile = dir + "/${name}";
|
||||
# format = "binary";
|
||||
# path = out_dir + "/${name}";
|
||||
# 'sops' Encrypted Secrets
|
||||
hm_secrets = dir: out_dir:
|
||||
filter (name: type: type != null && !(hasPrefix "_" name)) (name: type:
|
||||
if type == "regular"
|
||||
then
|
||||
nameValuePair name {
|
||||
sopsFile = dir + "/${name}";
|
||||
format = "binary";
|
||||
path = out_dir + "/${name}";
|
||||
|
||||
# }
|
||||
# else nameValuePair "" null) (readDir dir);
|
||||
}
|
||||
else nameValuePair "" null) (readDir dir);
|
||||
|
||||
# filter = name: func: attrs: filterAttrs name (mapAttrs' func attrs);
|
||||
filter = name: func: attrs: filterAttrs name (mapAttrs' func attrs);
|
||||
|
||||
|
||||
in {
|
||||
@@ -70,7 +70,7 @@ in {
|
||||
systemd.user.services.kbfs.Unit.After = [ "sops-nix.service" ];
|
||||
|
||||
sops = {
|
||||
secrets = util.map.hm_secrets "${secretstore}/user_dotfiles/${username}@${hostName}/keybase/" "${config.xdg.configHome}/keybase/";
|
||||
secrets = hm_secrets "${secretstore}/user_dotfiles/${username}@${hostName}/keybase/" "${config.xdg.configHome}/keybase/";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user