ref(nix): mkOptions

This commit is contained in:
Léana 江 2024-02-27 01:23:20 +01:00 committed by Léana 江
parent d98d30916b
commit 989d025f56
42 changed files with 80 additions and 78 deletions

View file

@ -0,0 +1,23 @@
{
pkgs,
lib,
config,
...
}: {
home = lib.optionalAttrs config.cmus.enable {
packages = with pkgs; [
cmus
cmusfm
];
file.cmus = {
recursive = true;
source = let
inherit (pkgs.stdenv) isLinux;
in
if isLinux
then ./cmus-linux
else ./cmus-darwin;
target = ".config/cmus";
};
};
}