2022-02-03 14:34:32 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.cmus;
|
|
|
|
in {
|
|
|
|
options.programs.cmus = {
|
|
|
|
enable = mkEnableOption "Cmus";
|
|
|
|
|
|
|
|
package = mkOption {
|
|
|
|
type = types.package;
|
|
|
|
default = pkgs.cmus;
|
|
|
|
description = "Cmus package to install.";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
home = {
|
2022-02-07 08:03:43 +01:00
|
|
|
packages = optional cfg.enable cfg.package;
|
|
|
|
};
|
|
|
|
xdg.desktopEntries.cmus = {
|
|
|
|
type = "Application";
|
|
|
|
exec = "${cfg.package}/bin/cmus";
|
|
|
|
terminal = true;
|
|
|
|
name = "C* Music Player";
|
|
|
|
comment = "A small, fast and powerful console music player";
|
|
|
|
genericName = "Music player";
|
|
|
|
categories = [
|
2023-03-06 08:07:20 +01:00
|
|
|
"Audio"
|
|
|
|
"AudioVideo"
|
2022-02-07 08:03:43 +01:00
|
|
|
"ConsoleOnly"
|
|
|
|
];
|
2022-02-03 14:34:32 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|