2024-10-06 15:25:05 -05:00
|
|
|
let
|
2024-11-03 17:48:32 -06:00
|
|
|
modulesPath = ./modules;
|
2024-11-23 20:45:46 -06:00
|
|
|
moduleImport = path: nameTransform:
|
|
|
|
builtins.listToAttrs (
|
|
|
|
map
|
2024-11-23 20:44:17 -06:00
|
|
|
(name: {
|
2024-11-23 20:45:46 -06:00
|
|
|
name = nameTransform name;
|
|
|
|
value = import (path + "/${name}");
|
2024-11-23 20:44:17 -06:00
|
|
|
})
|
2024-11-23 20:45:46 -06:00
|
|
|
(
|
|
|
|
builtins.filter
|
|
|
|
(name: (builtins.readDir path).${name} == "regular" && builtins.match ".*\\.nix$" name != null)
|
|
|
|
(builtins.attrNames (builtins.readDir path))
|
|
|
|
)
|
|
|
|
);
|
|
|
|
modules =
|
|
|
|
moduleImport modulesPath (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;
|
2024-10-06 15:25:05 -05:00
|
|
|
in {
|
2024-11-03 17:48:32 -06:00
|
|
|
flake.nixosModules = {
|
|
|
|
personal = {
|
2024-11-04 19:24:06 -06:00
|
|
|
imports = builtins.attrValues {
|
|
|
|
inherit
|
|
|
|
(modules)
|
|
|
|
android
|
|
|
|
audio
|
|
|
|
bluetooth
|
|
|
|
corectrl
|
|
|
|
dconf
|
|
|
|
disks
|
|
|
|
firejail
|
|
|
|
flatpak
|
|
|
|
fonts
|
|
|
|
plasma
|
|
|
|
printing
|
|
|
|
sddm
|
|
|
|
steam
|
|
|
|
sysstat
|
|
|
|
virtualization
|
|
|
|
;
|
|
|
|
};
|
2024-11-03 17:48:32 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
desktop = {
|
2024-11-04 19:24:06 -06:00
|
|
|
imports = builtins.attrValues {
|
|
|
|
inherit
|
|
|
|
(modules)
|
|
|
|
syncthing
|
2024-11-07 23:27:43 -06:00
|
|
|
ollama
|
2024-12-06 21:48:52 -06:00
|
|
|
edgedb
|
2024-11-04 19:24:06 -06:00
|
|
|
;
|
|
|
|
};
|
2024-11-03 17:48:32 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
server = {
|
2024-11-04 19:24:06 -06:00
|
|
|
imports = builtins.attrValues {
|
|
|
|
inherit
|
|
|
|
(modules)
|
2024-11-23 20:40:51 -06:00
|
|
|
services
|
2024-11-04 19:24:06 -06:00
|
|
|
;
|
|
|
|
};
|
2024-11-03 17:48:32 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
shared = {
|
2024-11-04 19:24:06 -06:00
|
|
|
imports = builtins.attrValues {
|
|
|
|
inherit
|
|
|
|
(modules)
|
|
|
|
accounts
|
|
|
|
doas
|
|
|
|
environment
|
|
|
|
gvfs
|
|
|
|
home-manager
|
|
|
|
locale
|
|
|
|
nix
|
|
|
|
rsyncd
|
|
|
|
sops
|
|
|
|
ssh
|
|
|
|
system
|
|
|
|
xserver
|
|
|
|
;
|
|
|
|
};
|
2024-10-06 15:25:05 -05:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|