helm/modules/desktop/media/ncmpcpp.nix
Henrik Lissner a75c64d04a
Rewrite to use flakes
This puts a hard dependency on 20.09, but that's to be expected.
2020-10-11 01:31:33 -04:00

27 lines
706 B
Nix

{ config, options, lib, pkgs, ... }:
with lib;
with lib.my;
let cfg = config.modules.desktop.media.ncmpcpp;
in {
options.modules.desktop.media.ncmpcpp = {
enable = mkBoolOpt false;
# modipy.enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
user.packages = with pkgs; [
(ncmpcpp.override { visualizerSupport = true; })
];
env.NCMPCPP_HOME = "$XDG_CONFIG_HOME/ncmpcpp";
# Symlink these one at a time because ncmpcpp writes other files to
# ~/.config/ncmpcpp, so it needs to be writeable.
home.configFile = {
"ncmpcpp/config".source = "${configDir}/ncmpcpp/config";
"ncmpcpp/bindings".source = "${configDir}/ncmpcpp/bindings";
};
};
}