mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-16 10:05:13 -05:00
111 lines
2 KiB
Nix
Executable file
111 lines
2 KiB
Nix
Executable file
let
|
|
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 =
|
|
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;
|
|
in {
|
|
flake.nixosModules = {
|
|
personal = {
|
|
imports = builtins.attrValues {
|
|
inherit
|
|
(modules)
|
|
android
|
|
audio
|
|
bluetooth
|
|
corectrl
|
|
dconf
|
|
disks
|
|
firejail
|
|
flatpak
|
|
fonts
|
|
printing
|
|
steam
|
|
sysstat
|
|
virtualization
|
|
;
|
|
};
|
|
};
|
|
|
|
desktop = {
|
|
imports = builtins.attrValues {
|
|
inherit
|
|
(modules)
|
|
syncthing
|
|
ollama
|
|
# plasma
|
|
# sddm
|
|
;
|
|
};
|
|
};
|
|
|
|
hyprland = {
|
|
imports = builtins.attrValues {
|
|
inherit
|
|
(modules)
|
|
hyprland
|
|
;
|
|
};
|
|
};
|
|
|
|
server = {
|
|
imports = builtins.attrValues {
|
|
inherit
|
|
(modules)
|
|
services
|
|
;
|
|
};
|
|
};
|
|
|
|
shared = {
|
|
imports = builtins.attrValues {
|
|
inherit
|
|
(modules)
|
|
accounts
|
|
doas
|
|
environment
|
|
gvfs
|
|
home-manager
|
|
locale
|
|
nix
|
|
rsyncd
|
|
sops
|
|
ssh
|
|
system
|
|
xserver
|
|
;
|
|
};
|
|
};
|
|
};
|
|
}
|