mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-16 10:05:13 -05:00
160 lines
3 KiB
Nix
Executable file
160 lines
3 KiB
Nix
Executable file
let
|
|
modulesPath = ./modules;
|
|
miscPath = modulesPath + "/misc";
|
|
|
|
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)
|
|
// moduleImport miscPath (name: "misc-${builtins.replaceStrings [".nix"] [""] name}")
|
|
// (path:
|
|
builtins.listToAttrs (
|
|
map
|
|
(name: {
|
|
name = name;
|
|
value = import (path + "/${name}");
|
|
})
|
|
(
|
|
builtins.filter
|
|
(name: (builtins.readDir path).${name} == "directory" && name != "misc")
|
|
(builtins.attrNames (builtins.readDir path))
|
|
)
|
|
))
|
|
modulesPath;
|
|
in {
|
|
flake.homeModules = {
|
|
desktop = {
|
|
imports = builtins.attrValues {
|
|
inherit
|
|
(modules)
|
|
brave
|
|
flameshot
|
|
misc-android
|
|
misc-desktop
|
|
misc-internet
|
|
misc-tracking
|
|
;
|
|
};
|
|
};
|
|
|
|
entertainment = {
|
|
imports = builtins.attrValues {
|
|
inherit
|
|
(modules)
|
|
freetube
|
|
misc-entertainment
|
|
mpv
|
|
steam
|
|
;
|
|
};
|
|
};
|
|
|
|
firefox = {
|
|
imports = builtins.attrValues {
|
|
inherit
|
|
(modules)
|
|
firefox
|
|
;
|
|
};
|
|
};
|
|
|
|
hyprland = {
|
|
imports = builtins.attrValues {
|
|
inherit
|
|
(modules)
|
|
gtk
|
|
dunst
|
|
easyEffects
|
|
gammastep
|
|
hyprland
|
|
misc-hyprland
|
|
network
|
|
swaylock
|
|
tofi
|
|
waybar
|
|
;
|
|
};
|
|
};
|
|
productionArt = {
|
|
imports = builtins.attrValues {
|
|
inherit
|
|
(modules)
|
|
misc-productionArt
|
|
;
|
|
};
|
|
};
|
|
|
|
productionAudio = {
|
|
imports = builtins.attrValues {
|
|
inherit
|
|
(modules)
|
|
misc-productionAudio
|
|
;
|
|
};
|
|
};
|
|
|
|
productionCode = {
|
|
imports = builtins.attrValues {
|
|
inherit
|
|
(modules)
|
|
vscode
|
|
;
|
|
};
|
|
};
|
|
|
|
productionVideo = {
|
|
imports = builtins.attrValues {
|
|
inherit
|
|
(modules)
|
|
misc-productionVideo
|
|
obs-studio
|
|
yt-dlp
|
|
;
|
|
};
|
|
};
|
|
|
|
productionWriting = {
|
|
imports = builtins.attrValues {
|
|
inherit
|
|
(modules)
|
|
misc-productionWriting
|
|
;
|
|
};
|
|
};
|
|
|
|
shared = {
|
|
imports = builtins.attrValues {
|
|
inherit
|
|
(modules)
|
|
bat
|
|
bottom
|
|
direnv
|
|
fastfetch
|
|
ghostty
|
|
git
|
|
helix
|
|
homeManager
|
|
lazygit
|
|
misc-commandLine
|
|
nushell
|
|
starship
|
|
yazi
|
|
zellij
|
|
zoxide
|
|
;
|
|
};
|
|
};
|
|
};
|
|
}
|