Working Config With Libs!

This commit is contained in:
2023-03-01 19:14:31 +00:00
parent 10b1faa250
commit 41d73d457e
20 changed files with 88 additions and 198 deletions

View File

@@ -1,53 +1,10 @@
{ config, pkgs, inputs, lib, hostName, util, ... }:
with lib;
with lib.my;
let
inherit
(builtins)
# attrNames
# attrValues
# foldl'
# isPath
# pathExists
readDir
# toString
;
inherit
(lib)
# flatten
filterAttrs
# forEach
# getAttrFromPath
# hasPrefix
# hasSuffix
# id
# mapAttrs'
# mapAttrsToList
# mkIf
# nameValuePair
# removeSuffix
;
cfg = config.custom.keybase;
username = config.home.username;
secretstore = config._secretstore;
# 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}";
}
else nameValuePair "" null) (readDir dir);
filter = name: func: attrs: filterAttrs name (mapAttrs' func attrs);
in {
# imports = [