mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-15 17:45:12 -05:00
181 lines
3.6 KiB
Nix
Executable file
181 lines
3.6 KiB
Nix
Executable file
{ config, ... }:
|
|
let
|
|
collectDirs =
|
|
path:
|
|
let
|
|
content = builtins.readDir path;
|
|
subdirs = builtins.filter (name: content.${name} == "directory") (builtins.attrNames content);
|
|
buildPath = name: path + "/${name}";
|
|
|
|
thisDirs = map buildPath subdirs;
|
|
subDirs = builtins.concatMap collectDirs thisDirs;
|
|
in
|
|
[ path ] ++ subDirs;
|
|
|
|
directoryImport =
|
|
path:
|
|
builtins.listToAttrs (
|
|
map (dir: {
|
|
name = baseNameOf (toString dir);
|
|
value = import dir;
|
|
}) (collectDirs path)
|
|
);
|
|
|
|
modules = directoryImport ./.;
|
|
in
|
|
{
|
|
flake.homeModules =
|
|
let
|
|
inherit (config.machines.devices)
|
|
bartholomew
|
|
desktop
|
|
fallaryn
|
|
laptop
|
|
server
|
|
;
|
|
inherit (config.people) user0 user1 user2;
|
|
in
|
|
{
|
|
"${desktop.name}-${user0}" = {
|
|
imports = builtins.attrValues {
|
|
inherit (modules)
|
|
cli
|
|
brave
|
|
emulators
|
|
firefox
|
|
tor
|
|
code
|
|
gaming
|
|
media
|
|
messaging
|
|
sharing
|
|
tools
|
|
hypr
|
|
wayland
|
|
theming
|
|
;
|
|
};
|
|
};
|
|
"${desktop.name}-${user1}" = {
|
|
imports = builtins.attrValues {
|
|
inherit (modules)
|
|
cli
|
|
brave
|
|
ghostty
|
|
zed
|
|
gaming
|
|
spotify
|
|
docs
|
|
mpv
|
|
kolourPaint
|
|
discord
|
|
signal
|
|
scrcpy
|
|
bitwarden
|
|
emote
|
|
desktop
|
|
;
|
|
};
|
|
};
|
|
"${fallaryn.name}-${user2}" = {
|
|
imports = builtins.attrValues {
|
|
inherit (modules)
|
|
cli
|
|
brave
|
|
firefoxNix
|
|
braveNix
|
|
code
|
|
ghostty
|
|
gaming
|
|
spotify
|
|
audioProduction
|
|
wpsOffice
|
|
obsidian
|
|
okular
|
|
images
|
|
modeling
|
|
obsStudio
|
|
kdenlive
|
|
videoPlaying
|
|
discord
|
|
signal
|
|
tdesktop
|
|
teams
|
|
whatsApp
|
|
zoom
|
|
tools
|
|
;
|
|
};
|
|
};
|
|
"${laptop.name}-${user0}" = {
|
|
imports = builtins.attrValues {
|
|
inherit (modules)
|
|
cli
|
|
brave
|
|
emulators
|
|
firefox
|
|
tor
|
|
code
|
|
gaming
|
|
media
|
|
messaging
|
|
sharing
|
|
tools
|
|
;
|
|
};
|
|
};
|
|
"${laptop.name}-${user1}" = {
|
|
imports = builtins.attrValues {
|
|
inherit (modules)
|
|
cli
|
|
brave
|
|
ghostty
|
|
zed
|
|
gaming
|
|
spotify
|
|
docs
|
|
mpv
|
|
kolourPaint
|
|
discord
|
|
signal
|
|
scrcpy
|
|
bitwarden
|
|
emote
|
|
desktop
|
|
;
|
|
};
|
|
};
|
|
"${bartholomew.name}-${user1}" = {
|
|
imports = builtins.attrValues {
|
|
inherit (modules)
|
|
cli
|
|
catppuccin
|
|
gtk
|
|
brave
|
|
ghostty
|
|
zed
|
|
gaming
|
|
spotify
|
|
docs
|
|
mpv
|
|
jellyfin
|
|
kolourPaint
|
|
discord
|
|
signal
|
|
scrcpy
|
|
bitwarden
|
|
emote
|
|
desktop
|
|
;
|
|
};
|
|
};
|
|
"${server.name}-${user0}" = {
|
|
imports = builtins.attrValues {
|
|
inherit (modules)
|
|
cli
|
|
tooling
|
|
;
|
|
};
|
|
};
|
|
};
|
|
}
|