refactor: complete overhaul

This commit is contained in:
Nick 2024-11-10 01:29:37 -06:00
parent fb3e6fed86
commit 0541b3d61f
154 changed files with 936 additions and 904 deletions

25
config/instances/default.nix Executable file
View file

@ -0,0 +1,25 @@
let
configPath = ./config;
instancesFunctions = {
jellyfinLabel = "Jellyfin";
jellyfinName = "jellyfin";
domain0 = "cloudbert.fun";
domain1 = "the-nutrivore.social";
domain2 = "the-nutrivore.com";
servicePath = "/mnt/media/NAS1";
sopsPath = "/var/lib/secrets";
sslPath = "/var/lib/acme";
varLib = "/var/lib";
};
instances = builtins.listToAttrs (map (name: {
name = builtins.substring 0 (builtins.stringLength name - 4) name; # Remove the last 4 characters (".nix")
value = import (configPath + "/${name}") {inherit instancesFunctions;};
})
(builtins.filter (name:
builtins.match ".*\\.nix$" name != null) (builtins.attrNames
(builtins.readDir configPath))));
in {
instances = instances;
}