mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-16 10:05:13 -05:00
refactor: cleaned up folds
This commit is contained in:
parent
a114034e0e
commit
82eeb09127
2 changed files with 108 additions and 85 deletions
|
@ -1,59 +1,73 @@
|
|||
let
|
||||
modulesPath = ./modules;
|
||||
|
||||
importFolder = name: {"${name}" = import (modulesPath + "/${name}");};
|
||||
importFile = name: {"${name}" = import (modulesPath + "/${name}.nix");};
|
||||
importMisc = name: {"misc-${name}" = import (modulesPath + "/misc/${name}.nix");};
|
||||
|
||||
modules =
|
||||
builtins.foldl' (
|
||||
emptySet: importedModules:
|
||||
emptySet // importedModules
|
||||
) {} (map importFolder [
|
||||
"bat"
|
||||
"firefox"
|
||||
"obs-studio"
|
||||
"qbittorrent"
|
||||
"steam"
|
||||
])
|
||||
) {} (map
|
||||
(name: {
|
||||
"${name}" =
|
||||
import (modulesPath
|
||||
+ "/${name}");
|
||||
})
|
||||
[
|
||||
"bat"
|
||||
"firefox"
|
||||
"obs-studio"
|
||||
"qbittorrent"
|
||||
"steam"
|
||||
])
|
||||
// builtins.foldl' (
|
||||
emptySet: importedModules:
|
||||
emptySet // importedModules
|
||||
) {} (map importFile [
|
||||
"bottom"
|
||||
"brave"
|
||||
"direnv"
|
||||
"freetube"
|
||||
"git"
|
||||
"helix"
|
||||
"home-manager"
|
||||
"lazygit"
|
||||
"mpv"
|
||||
"nextcloud"
|
||||
"nushell"
|
||||
"starship"
|
||||
"vscode"
|
||||
"wezterm"
|
||||
"yazi"
|
||||
"zellij"
|
||||
"zoxide"
|
||||
])
|
||||
) {} (map
|
||||
(name: {
|
||||
"${name}" =
|
||||
import (modulesPath
|
||||
+ "/${name}.nix");
|
||||
})
|
||||
[
|
||||
"bottom"
|
||||
"brave"
|
||||
"direnv"
|
||||
"freetube"
|
||||
"git"
|
||||
"helix"
|
||||
"home-manager"
|
||||
"lazygit"
|
||||
"mpv"
|
||||
"nextcloud"
|
||||
"nushell"
|
||||
"starship"
|
||||
"vscode"
|
||||
"wezterm"
|
||||
"yazi"
|
||||
"zellij"
|
||||
"zoxide"
|
||||
])
|
||||
// builtins.foldl' (
|
||||
emptySet: importedModules:
|
||||
emptySet // importedModules
|
||||
) {} (map importMisc [
|
||||
"android"
|
||||
"commandLine"
|
||||
"desktop"
|
||||
"entertainment"
|
||||
"internet"
|
||||
"productionArt"
|
||||
"productionAudio"
|
||||
"productionVideo"
|
||||
"productionWriting"
|
||||
"tracking"
|
||||
"virtualization"
|
||||
]);
|
||||
) {} (map
|
||||
(name: {
|
||||
"misc-${name}" =
|
||||
import (modulesPath
|
||||
+ "/misc/${name}.nix");
|
||||
})
|
||||
[
|
||||
"android"
|
||||
"commandLine"
|
||||
"desktop"
|
||||
"entertainment"
|
||||
"internet"
|
||||
"productionArt"
|
||||
"productionAudio"
|
||||
"productionVideo"
|
||||
"productionWriting"
|
||||
"tracking"
|
||||
"virtualization"
|
||||
]);
|
||||
in {
|
||||
flake.homeModules = {
|
||||
desktop = {
|
||||
|
|
|
@ -1,55 +1,64 @@
|
|||
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"
|
||||
])
|
||||
) {} (map
|
||||
(name: {
|
||||
"${name}" =
|
||||
import (modulesPath
|
||||
+ "/${name}");
|
||||
})
|
||||
[
|
||||
"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"
|
||||
]);
|
||||
) {} (map
|
||||
(name: {
|
||||
"${name}" =
|
||||
import (modulesPath
|
||||
+ "/${name}.nix");
|
||||
})
|
||||
[
|
||||
"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 = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue