refactor: rename utils to lib'
check / lint (push) Successful in 15s

This commit is contained in:
hektor committed 2026-11-06 14:35:01 +01:00
1 parent 1947ee0c9f
commit 6fa74fead8
22 files changed
+116 -144

No files matched your search

+3 -3
View File
@@ -2,21 +2,21 @@
config,
lib,
pkgs,
myUtils,
lib',
osConfig ? null,
inputs ? null,
...
}:
let
sops = myUtils.sopsAvailability config osConfig;
sops = lib'.sopsAvailability config osConfig;
standalone = osConfig == null;
in
{
config = lib.mkIf config.ai-tools.opencode.enable (
lib.optionalAttrs standalone {
sops = {
secrets = myUtils.mkSopsSecrets "${toString inputs.nix-secrets}/secrets" {
secrets = lib'.mkSopsSecrets "${toString inputs.nix-secrets}/secrets" null {
opencode = [ "api-key" ];
};
templates."opencode/auth.json" = {
+3 -3
View File
@@ -2,7 +2,7 @@
config,
lib,
pkgs,
myUtils,
lib',
osConfig ? null,
inputs ? null,
...
@@ -10,7 +10,7 @@
let
cfg = config.anki;
sops = myUtils.sopsAvailability config osConfig;
sops = lib'.sopsAvailability config osConfig;
standalone = osConfig == null;
in
{
@@ -18,7 +18,7 @@ in
config = lib.mkIf cfg.enable (
lib.optionalAttrs standalone {
sops.secrets = myUtils.mkSopsSecrets "${toString inputs.nix-secrets}/secrets" {
sops.secrets = lib'.mkSopsSecrets "${toString inputs.nix-secrets}/secrets" null {
anki = [
"sync-user"
"sync-key"
+2 -2
View File
@@ -2,14 +2,14 @@
config,
lib,
pkgs,
myUtils,
lib',
...
}:
{
imports =
let
dirs = myUtils.dirNames ./.;
dirs = lib'.dirNames ./.;
hasDef = name: builtins.pathExists ./${name}/default.nix;
in
map (name: ./${name}) (builtins.filter hasDef dirs);
+4 -5
View File
@@ -3,23 +3,22 @@
lib,
pkgs,
inputs,
myUtils,
paths,
lib',
...
}:
let
cfg = config.deploy;
hostNames = myUtils.dirNames paths.hosts;
inherit (lib') hostNames;
hostsWithKeys = lib.filter (
hostname: builtins.pathExists (paths.hosts + "/${hostname}/ssh_host.pub")
hostname: builtins.pathExists (lib'.hostsPath + "/${hostname}/ssh_host.pub")
) hostNames;
colmena = inputs.colmena.packages.${pkgs.stdenv.hostPlatform.system}.colmena;
deployRs = inputs.deploy-rs.packages.${pkgs.stdenv.hostPlatform.system}.default;
hostTags = hostname: (myUtils.hostMeta (paths.hosts + "/${hostname}")).tags;
hostTags = hostname: (lib'.hostMeta hostname).tags;
nodeTagsDecl = ''
declare -A _colmena_node_tags=(
${lib.concatMapStringsSep "\n" (
+3 -3
View File
@@ -2,14 +2,14 @@
config,
inputs,
lib,
myUtils,
lib',
osConfig ? null,
...
}:
let
cfg = config.git;
sops = myUtils.sopsAvailability config osConfig;
sops = lib'.sopsAvailability config osConfig;
standalone = osConfig == null;
personalEmail = sops.templates.".gitconfig.email".path;
@@ -50,7 +50,7 @@ in
config = lib.mkIf cfg.enable (
lib.optionalAttrs standalone {
sops = {
secrets = myUtils.mkSopsSecrets "${toString inputs.nix-secrets}/secrets" {
secrets = lib'.mkSopsSecrets "${toString inputs.nix-secrets}/secrets" null {
email = [
"personal"
"work"
+2 -2
View File
@@ -1,7 +1,7 @@
{
config,
lib,
paths,
lib',
...
}:
@@ -66,6 +66,6 @@ in
'';
};
home.sessionPath = lib.optional cfg.addBinToPath "${paths.dots}/.bin";
home.sessionPath = lib.optional cfg.addBinToPath "${lib'.dotsPath}/.bin";
};
}
+5 -6
View File
@@ -2,17 +2,16 @@
config,
lib,
pkgs,
myUtils,
paths,
lib',
...
}:
let
cfg = config.ssh;
hostNames = myUtils.dirNames paths.hosts;
hostsWithKeys = lib.filter (
hostname: builtins.pathExists (paths.hosts + "/${hostname}/ssh_host.pub")
) hostNames;
hostname: builtins.pathExists (lib'.hostsPath + "/${hostname}/ssh_host.pub")
) lib'.hostNames;
in
{
options.ssh.enable = lib.mkEnableOption "ssh";
@@ -37,7 +36,7 @@ in
lib.genAttrs hostsWithKeys (
hostname:
let
meta = myUtils.hostMeta (paths.hosts + "/${hostname}");
meta = lib'.hostMeta hostname;
in
{
User = meta.host.username;
+3 -3
View File
@@ -2,14 +2,14 @@
config,
lib,
pkgs,
myUtils,
lib',
osConfig ? null,
inputs ? null,
...
}:
let
sops = myUtils.sopsAvailability config osConfig;
sops = lib'.sopsAvailability config osConfig;
standalone = osConfig == null;
syncHook = pkgs.writers.writePython3 "on-exit.sync.py" { flakeIgnore = [ "E501" ]; } ''
@@ -64,7 +64,7 @@ in
config = lib.mkIf config.taskwarrior.enable (
lib.optionalAttrs standalone {
sops = {
secrets = myUtils.mkSopsSecrets "${toString inputs.nix-secrets}/secrets" {
secrets = lib'.mkSopsSecrets "${toString inputs.nix-secrets}/secrets" null {
taskwarrior = [
"sync-server-url"
"sync-server-client-id"