2024-10-06 15:25:05 -05:00
|
|
|
let
|
2025-02-05 20:15:36 -06:00
|
|
|
collectDirs =
|
|
|
|
path:
|
|
|
|
let
|
|
|
|
content = builtins.readDir path;
|
|
|
|
subdirs = builtins.filter (name: content.${name} == "directory") (builtins.attrNames content);
|
|
|
|
buildPath = name: path + "/${name}";
|
|
|
|
|
|
|
|
thisDirs = map buildPath subdirs;
|
|
|
|
subDirs = builtins.concatMap collectDirs thisDirs;
|
|
|
|
in
|
|
|
|
[ path ] ++ subDirs;
|
|
|
|
|
|
|
|
directoryImport =
|
|
|
|
path:
|
2025-01-18 03:50:54 -06:00
|
|
|
builtins.listToAttrs (
|
2025-02-05 20:15:36 -06:00
|
|
|
map (dir: {
|
|
|
|
name = baseNameOf (toString dir);
|
|
|
|
value = import dir;
|
|
|
|
}) (collectDirs path)
|
2025-01-18 03:50:54 -06:00
|
|
|
);
|
2025-02-05 20:15:36 -06:00
|
|
|
|
|
|
|
modules = directoryImport ./.;
|
2025-01-18 03:50:54 -06:00
|
|
|
in
|
|
|
|
{
|
2024-11-03 17:48:32 -06:00
|
|
|
flake.nixosModules = {
|
|
|
|
desktop = {
|
2024-11-04 19:24:06 -06:00
|
|
|
imports = builtins.attrValues {
|
2025-01-16 16:14:09 -06:00
|
|
|
inherit (modules)
|
2025-02-02 22:55:38 -06:00
|
|
|
mullvad
|
2025-01-18 03:50:54 -06:00
|
|
|
syncthing
|
|
|
|
ollama
|
2025-02-06 00:51:06 -06:00
|
|
|
hypr
|
|
|
|
wayland
|
2025-02-05 20:15:36 -06:00
|
|
|
xserver
|
2025-01-28 20:45:11 -06:00
|
|
|
;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
fallaryn = {
|
2025-01-31 01:49:36 -06:00
|
|
|
imports = builtins.attrValues {
|
|
|
|
inherit (modules)
|
2025-01-28 20:45:11 -06:00
|
|
|
plasma
|
|
|
|
sddm
|
2025-02-05 20:15:36 -06:00
|
|
|
tablet
|
2025-01-18 03:50:54 -06:00
|
|
|
;
|
2024-12-24 20:09:31 -06:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2025-02-05 20:15:36 -06:00
|
|
|
laptop = {
|
2025-01-31 01:49:36 -06:00
|
|
|
imports = builtins.attrValues {
|
|
|
|
inherit (modules)
|
|
|
|
gnome
|
2025-02-05 20:15:36 -06:00
|
|
|
xserver
|
2025-01-31 01:49:36 -06:00
|
|
|
;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2025-02-05 20:15:36 -06:00
|
|
|
server = {
|
2025-02-04 14:07:47 -06:00
|
|
|
imports = builtins.attrValues {
|
|
|
|
inherit (modules)
|
2025-02-05 20:15:36 -06:00
|
|
|
acme
|
|
|
|
caddy
|
|
|
|
jellyfin
|
|
|
|
logrotate
|
|
|
|
mastodon
|
|
|
|
minecraft
|
|
|
|
ollama
|
|
|
|
website
|
|
|
|
postgresql
|
|
|
|
samba
|
|
|
|
vaultwarden
|
|
|
|
forgejo
|
2025-02-04 14:07:47 -06:00
|
|
|
;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2025-02-05 20:15:36 -06:00
|
|
|
sops = {
|
2025-01-19 02:31:05 -06:00
|
|
|
imports = builtins.attrValues {
|
|
|
|
inherit (modules)
|
2025-02-05 20:15:36 -06:00
|
|
|
sops
|
2025-01-19 02:31:05 -06:00
|
|
|
;
|
|
|
|
};
|
2025-01-18 03:50:54 -06:00
|
|
|
};
|
2024-11-03 17:48:32 -06:00
|
|
|
|
2025-02-05 20:15:36 -06:00
|
|
|
system = {
|
2025-01-31 01:49:36 -06:00
|
|
|
imports = builtins.attrValues {
|
|
|
|
inherit (modules)
|
2025-02-05 20:15:36 -06:00
|
|
|
hardware
|
|
|
|
programs
|
2025-01-31 01:49:36 -06:00
|
|
|
;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2025-02-05 20:15:36 -06:00
|
|
|
core = {
|
2024-11-04 19:24:06 -06:00
|
|
|
imports = builtins.attrValues {
|
2025-01-16 16:14:09 -06:00
|
|
|
inherit (modules)
|
2025-02-05 20:15:36 -06:00
|
|
|
core
|
2025-01-18 03:50:54 -06:00
|
|
|
xserver
|
|
|
|
;
|
2024-11-04 19:24:06 -06:00
|
|
|
};
|
2024-10-06 15:25:05 -05:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|