Major refactor to flake, abstract non-trivial packages into their own

files (such as firefox/spotify-qt+librespot), create utils for reusable
function library
This commit is contained in:
Martin Larsson 2025-05-11 18:19:19 +02:00
parent d5735692d2
commit c4d7f5d082
11 changed files with 379 additions and 331 deletions

16
nix/utils.nix Normal file
View file

@ -0,0 +1,16 @@
{
mk_symlinks =
{
config,
basePath ? "${config.home.homeDirectory}/dev/git/.dotfiles",
dotfiles ? [ ],
}:
builtins.listToAttrs (
map (file: {
name = builtins.elemAt file 0;
value = {
source = config.lib.file.mkOutOfStoreSymlink "${basePath}/${builtins.elemAt file 1}";
};
}) dotfiles
);
}