dotfiles/nixos/default.nix
2024-11-03 20:50:41 -06:00

106 lines
1.7 KiB
Nix
Executable file

let
modulesPath = ./modules;
importFolder = name: {"${name}" = import (modulesPath + "/${name}");};
importFile = name: {"${name}" = import (modulesPath + "/${name}.nix");};
modules =
builtins.foldl' (
emptySet: importedModules:
emptySet // importedModules
) {} (map importFolder [
"services"
])
// builtins.foldl' (
emptySet: importedModules:
emptySet // importedModules
) {} (map importFile [
"accounts"
"android"
"audio"
"bluetooth"
"corectrl"
"dconf"
"disks"
"doas"
"environment"
"firejail"
"flatpak"
"fonts"
"gnome"
"greetd"
"gvfs"
"home-manager"
"locale"
"network"
"nix"
"nur"
"ollama"
"plasma"
"printing"
"regreet"
"rsyncd"
"sddm"
"sops"
"ssh"
"steam"
"syncthing"
"sysstat"
"system"
"virtualization"
"xserver"
]);
in {
flake.nixosModules = {
personal = {
imports = with modules; [
android
audio
bluetooth
corectrl
dconf
disks
firejail
flatpak
fonts
nur
plasma
printing
sddm
steam
sysstat
virtualization
];
};
desktop = {
imports = with modules; [
syncthing
# ollama
];
};
server = {
imports = with modules; [
services
];
};
shared = {
imports = with modules; [
accounts
doas
environment
gvfs
home-manager
locale
nix
rsyncd
sops
ssh
system
xserver
];
};
};
}