2024-10-06 15:25:05 -05:00
|
|
|
let
|
2024-11-03 17:48:32 -06:00
|
|
|
modulesPath = ./modules;
|
2024-11-10 01:29:37 -06:00
|
|
|
servicePath = modulesPath + "/services";
|
2024-11-03 17:48:32 -06:00
|
|
|
|
2024-11-10 01:29:37 -06:00
|
|
|
moduleImport = path: nameTransform:
|
|
|
|
builtins.listToAttrs (
|
|
|
|
map
|
2024-11-04 12:54:00 -06:00
|
|
|
(name: {
|
2024-11-10 01:29:37 -06:00
|
|
|
name = nameTransform name;
|
|
|
|
value = import (path + "/${name}");
|
2024-11-04 12:54:00 -06:00
|
|
|
})
|
2024-11-10 01:29:37 -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)
|
|
|
|
// moduleImport servicePath (name: builtins.replaceStrings [".nix"] [""] name);
|
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
|
|
|
|
nur
|
|
|
|
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-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)
|
|
|
|
services
|
|
|
|
;
|
|
|
|
};
|
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
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|