dotfiles/home-manager/default.nix

122 lines
2.1 KiB
Nix
Executable file

let
folderModules = [
"bat"
"firefox"
"obs-studio"
"qbittorrent"
"steam"
];
fileModules = [
"bottom"
"brave"
"direnv"
"freetube"
"git"
"helix"
"home-manager"
"lazygit"
"mpv"
"nextcloud"
"nushell"
"starship"
"vscode"
"wezterm"
"yazi"
"zellij"
"zoxide"
];
miscModules = [
"android"
"commandLine"
"desktop"
"entertainment"
"internet"
"productionArt"
"productionAudio"
"productionVideo"
"productionWriting"
"tracking"
"virtualization"
];
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' (a: b: a // b) {} (map importFolder folderModules)
// builtins.foldl' (a: b: a // b) {} (map importFile fileModules)
// builtins.foldl' (a: b: a // b) {} (map importMisc miscModules);
in {
flake.homeModules = {
desktop = {
imports = with modules; [
brave
firefox
misc-android
misc-desktop
misc-internet
qbittorrent
vscode
];
};
entertainment = {
imports = with modules; [
freetube
misc-entertainment
mpv
steam
];
};
productionArt = {
imports = with modules; [
misc-productionArt
];
};
productionAudio = {
imports = with modules; [
misc-productionAudio
];
};
productionVideo = {
imports = with modules; [
misc-productionVideo
obs-studio
];
};
productionWriting = {
imports = with modules; [
misc-productionWriting
];
};
shared = {
imports = with modules; [
bat
bottom
direnv
git
helix
home-manager
lazygit
misc-commandLine
misc-virtualization
nushell
starship
wezterm
yazi
zellij
zoxide
];
};
};
}