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 =
|
2025-01-08 19:11:58 -06:00
|
|
|
moduleImport modulesPath (name:
|
|
|
|
builtins.replaceStrings [
|
|
|
|
".nix"
|
|
|
|
] [
|
|
|
|
""
|
|
|
|
]
|
|
|
|
name)
|
2024-11-23 20:45:46 -06:00
|
|
|
// (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
|
|
|
|
printing
|
|
|
|
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-24 20:09:31 -06:00
|
|
|
plasma
|
2025-01-08 01:05:45 -06:00
|
|
|
# sddm
|
2024-12-24 20:09:31 -06:00
|
|
|
;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2025-01-08 01:05:45 -06:00
|
|
|
hyprland = {
|
2024-12-24 20:09:31 -06:00
|
|
|
imports = builtins.attrValues {
|
|
|
|
inherit
|
|
|
|
(modules)
|
2025-01-08 01:05:45 -06:00
|
|
|
hyprland
|
|
|
|
geoclue2
|
|
|
|
greetd
|
|
|
|
swaylock
|
|
|
|
thunar
|
|
|
|
wayland
|
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
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|