mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-16 10:05:13 -05:00
feat: server test
This commit is contained in:
parent
38ba756246
commit
1633a13be9
1 changed files with 54 additions and 28 deletions
|
@ -1,34 +1,60 @@
|
||||||
let
|
let
|
||||||
modulesPath = ./modules;
|
modulesPath = ./modules;
|
||||||
moduleImport = path: nameTransform:
|
|
||||||
builtins.listToAttrs (
|
|
||||||
map
|
|
||||||
(name: {
|
|
||||||
name = nameTransform name;
|
|
||||||
value = import (path + "/${name}");
|
|
||||||
})
|
|
||||||
(
|
|
||||||
builtins.filter
|
|
||||||
(name: (builtins.readDir path).${name} == "regular" && builtins.match ".*\\.nix$" name != null)
|
|
||||||
(builtins.attrNames (builtins.readDir path))
|
|
||||||
)
|
|
||||||
);
|
|
||||||
modules =
|
modules =
|
||||||
moduleImport modulesPath (name: builtins.replaceStrings [".nix"] [""] name)
|
builtins.foldl' (
|
||||||
// (path:
|
emptySet: importedModules:
|
||||||
builtins.listToAttrs (
|
emptySet // importedModules
|
||||||
map
|
) {} (map
|
||||||
(name: {
|
(name: {
|
||||||
name = name;
|
"${name}" = import (modulesPath + "/${name}");
|
||||||
value = import (path + "/${name}");
|
})
|
||||||
})
|
[
|
||||||
(
|
"services"
|
||||||
builtins.filter
|
])
|
||||||
(name: (builtins.readDir path).${name} == "directory")
|
// builtins.foldl' (
|
||||||
(builtins.attrNames (builtins.readDir path))
|
emptySet: importedModules:
|
||||||
)
|
emptySet // importedModules
|
||||||
))
|
) {} (map
|
||||||
modulesPath;
|
(name: {
|
||||||
|
"${name}" = import (modulesPath + "/${name}.nix");
|
||||||
|
})
|
||||||
|
[
|
||||||
|
"accounts"
|
||||||
|
"android"
|
||||||
|
"audio"
|
||||||
|
"bluetooth"
|
||||||
|
"corectrl"
|
||||||
|
"dconf"
|
||||||
|
"disks"
|
||||||
|
"doas"
|
||||||
|
"environment"
|
||||||
|
"firejail"
|
||||||
|
"flatpak"
|
||||||
|
"fonts"
|
||||||
|
"gnome"
|
||||||
|
"greetd"
|
||||||
|
"gvfs"
|
||||||
|
"home-manager"
|
||||||
|
"locale"
|
||||||
|
"network"
|
||||||
|
"nix"
|
||||||
|
"nur"
|
||||||
|
"ollama"
|
||||||
|
"plasma"
|
||||||
|
"printing"
|
||||||
|
"regreet"
|
||||||
|
"rsyncd"
|
||||||
|
"sddm"
|
||||||
|
"sops"
|
||||||
|
"ssh"
|
||||||
|
"steam"
|
||||||
|
"syncthing"
|
||||||
|
"sysstat"
|
||||||
|
"system"
|
||||||
|
"virtualization"
|
||||||
|
"xserver"
|
||||||
|
]);
|
||||||
in {
|
in {
|
||||||
flake.nixosModules = {
|
flake.nixosModules = {
|
||||||
personal = {
|
personal = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue