mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-17 10:35:13 -05:00
refactor: condensed the lists
This commit is contained in:
parent
d369bfaa5c
commit
98795adb7d
1 changed files with 46 additions and 44 deletions
|
@ -1,53 +1,55 @@
|
||||||
let
|
let
|
||||||
serviceModules = [
|
|
||||||
"services"
|
|
||||||
];
|
|
||||||
|
|
||||||
fileModules = [
|
|
||||||
"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"
|
|
||||||
];
|
|
||||||
|
|
||||||
modulesPath = ./modules;
|
modulesPath = ./modules;
|
||||||
|
|
||||||
importFolder = name: {"${name}" = import (modulesPath + "/${name}");};
|
importFolder = name: {"${name}" = import (modulesPath + "/${name}");};
|
||||||
importFile = name: {"${name}" = import (modulesPath + "/${name}.nix");};
|
importFile = name: {"${name}" = import (modulesPath + "/${name}.nix");};
|
||||||
|
|
||||||
modules =
|
modules =
|
||||||
builtins.foldl' (a: b: a // b) {} (map importFolder serviceModules)
|
builtins.foldl' (
|
||||||
// builtins.foldl' (a: b: a // b) {} (map importFile fileModules);
|
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 {
|
in {
|
||||||
flake.nixosModules = {
|
flake.nixosModules = {
|
||||||
personal = {
|
personal = {
|
||||||
|
@ -74,7 +76,7 @@ in {
|
||||||
desktop = {
|
desktop = {
|
||||||
imports = with modules; [
|
imports = with modules; [
|
||||||
syncthing
|
syncthing
|
||||||
ollama
|
# ollama
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue