mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
nix: expose shared home manager configuration via homeModules
This commit is contained in:
parent
5155bd69e8
commit
5b95c43559
47 changed files with 45 additions and 29 deletions
31
nix/homeModules/cmus/default.nix
Normal file
31
nix/homeModules/cmus/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.programs.cmus.enable = lib.mkOption { default = false; };
|
||||
|
||||
config.home = lib.mkIf config.programs.cmus.enable {
|
||||
packages = [
|
||||
pkgs.cmus
|
||||
pkgs.cmusfm
|
||||
];
|
||||
file.cmus = {
|
||||
recursive = true;
|
||||
text = lib.mkMerge [
|
||||
(builtins.readFile ./rc)
|
||||
|
||||
(lib.mkIf pkgs.stdenv.isLinux ''
|
||||
set output_plugin=alsa
|
||||
'')
|
||||
(lib.mkIf pkgs.stdenv.isDarwin ''
|
||||
# # distortion fix https://github.com/cmus/cmus/issues/1130#issuecomment-1003324193
|
||||
# set output_plugin=ao
|
||||
'')
|
||||
];
|
||||
target = "${config.xdg.configHome}/cmus/rc";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue