mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-08-10 05:44:38 -05:00
feat: server test
This commit is contained in:
parent
0b802c39ad
commit
38ba756246
5 changed files with 42 additions and 17 deletions
|
@ -1,7 +1,5 @@
|
||||||
let
|
let
|
||||||
modulesPath = ./modules;
|
modulesPath = ./modules;
|
||||||
servicePath = modulesPath + "/services";
|
|
||||||
|
|
||||||
moduleImport = path: nameTransform:
|
moduleImport = path: nameTransform:
|
||||||
builtins.listToAttrs (
|
builtins.listToAttrs (
|
||||||
map
|
map
|
||||||
|
@ -15,10 +13,22 @@ let
|
||||||
(builtins.attrNames (builtins.readDir path))
|
(builtins.attrNames (builtins.readDir path))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
modules =
|
modules =
|
||||||
moduleImport modulesPath (name: builtins.replaceStrings [".nix"] [""] name)
|
moduleImport modulesPath (name: builtins.replaceStrings [".nix"] [""] name)
|
||||||
// moduleImport servicePath (name: builtins.replaceStrings [".nix"] [""] name);
|
// (path:
|
||||||
|
builtins.listToAttrs (
|
||||||
|
map
|
||||||
|
(name: {
|
||||||
|
name = name;
|
||||||
|
value = import (path + "/${name}");
|
||||||
|
})
|
||||||
|
(
|
||||||
|
builtins.filter
|
||||||
|
(name: (builtins.readDir path).${name} == "directory")
|
||||||
|
(builtins.attrNames (builtins.readDir path))
|
||||||
|
)
|
||||||
|
))
|
||||||
|
modulesPath;
|
||||||
in {
|
in {
|
||||||
flake.nixosModules = {
|
flake.nixosModules = {
|
||||||
personal = {
|
personal = {
|
||||||
|
@ -59,19 +69,7 @@ in {
|
||||||
imports = builtins.attrValues {
|
imports = builtins.attrValues {
|
||||||
inherit
|
inherit
|
||||||
(modules)
|
(modules)
|
||||||
acme
|
services
|
||||||
caddy
|
|
||||||
jellyfin
|
|
||||||
logrotate
|
|
||||||
mastodon
|
|
||||||
minecraft
|
|
||||||
nextcloud
|
|
||||||
ollama
|
|
||||||
owncast
|
|
||||||
peertube
|
|
||||||
postgresql
|
|
||||||
samba
|
|
||||||
vaultwarden
|
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
27
nixos/modules/services/default.nix
Normal file
27
nixos/modules/services/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
imports = let
|
||||||
|
configPath = ./config;
|
||||||
|
in
|
||||||
|
(map
|
||||||
|
(folder: (configPath + ./${folder}))
|
||||||
|
[
|
||||||
|
"mastodon"
|
||||||
|
])
|
||||||
|
++ (map
|
||||||
|
(file: (configPath + ./${file}.nix))
|
||||||
|
[
|
||||||
|
"acme"
|
||||||
|
"caddy"
|
||||||
|
"jellyfin"
|
||||||
|
"logrotate"
|
||||||
|
"minecraft"
|
||||||
|
"ollama"
|
||||||
|
"peertube"
|
||||||
|
"postgresql"
|
||||||
|
"owncast"
|
||||||
|
"samba"
|
||||||
|
"vaultwarden"
|
||||||
|
# "forgejo"
|
||||||
|
# "nextcloud"
|
||||||
|
]);
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue