mirror of
https://github.com/nix-community/home-manager
synced 2024-11-30 06:59:45 +01:00
parent
346973b338
commit
09a0c0c029
7 changed files with 82 additions and 0 deletions
|
@ -604,6 +604,12 @@
|
||||||
github = "zorrobert";
|
github = "zorrobert";
|
||||||
githubId = 118135271;
|
githubId = 118135271;
|
||||||
};
|
};
|
||||||
|
joygnu = {
|
||||||
|
name = "joygnu";
|
||||||
|
email = "contact@joygnu.org";
|
||||||
|
github = "joygnu";
|
||||||
|
githubId = 152063003;
|
||||||
|
};
|
||||||
callumio = {
|
callumio = {
|
||||||
name = "Callum Leslie";
|
name = "Callum Leslie";
|
||||||
email = "git+nix@cleslie.uk";
|
email = "git+nix@cleslie.uk";
|
||||||
|
|
|
@ -1780,6 +1780,15 @@ in {
|
||||||
See https://zed.dev for more.
|
See https://zed.dev for more.
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
time = "2024-10-18T14:01:07+00:00";
|
||||||
|
message = ''
|
||||||
|
A new module is available: 'programs.cmus'.
|
||||||
|
|
||||||
|
cmus is a small, fast and powerful console music player.
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,6 +77,7 @@ let
|
||||||
./programs/carapace.nix
|
./programs/carapace.nix
|
||||||
./programs/cava.nix
|
./programs/cava.nix
|
||||||
./programs/chromium.nix
|
./programs/chromium.nix
|
||||||
|
./programs/cmus.nix
|
||||||
./programs/command-not-found/command-not-found.nix
|
./programs/command-not-found/command-not-found.nix
|
||||||
./programs/comodoro.nix
|
./programs/comodoro.nix
|
||||||
./programs/darcs.nix
|
./programs/darcs.nix
|
||||||
|
|
44
modules/programs/cmus.nix
Normal file
44
modules/programs/cmus.nix
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
cfg = config.programs.cmus;
|
||||||
|
|
||||||
|
in {
|
||||||
|
meta.maintainers = [ hm.maintainers.joygnu ];
|
||||||
|
|
||||||
|
options.programs.cmus = {
|
||||||
|
enable = mkEnableOption "Enable cmus, the music player.";
|
||||||
|
|
||||||
|
theme = mkOption {
|
||||||
|
type = types.lines;
|
||||||
|
default = "";
|
||||||
|
example = "gruvbox";
|
||||||
|
description = ''
|
||||||
|
Select color theme. A list of available color themes can be found
|
||||||
|
here: <https://github.com/cmus/cmus/tree/master/data>.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig = mkOption {
|
||||||
|
type = types.lines;
|
||||||
|
default = "";
|
||||||
|
example = ''
|
||||||
|
set audio_backend = "mpd"
|
||||||
|
set status_display = "default"
|
||||||
|
'';
|
||||||
|
description = "Extra configuration to add to cmus {file}`rc`.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home.packages = [ pkgs.cmus ];
|
||||||
|
|
||||||
|
home.file.".config/cmus/rc".text = ''
|
||||||
|
${optionalString (cfg.theme != "") "colorscheme ${cfg.theme}"}
|
||||||
|
${cfg.extraConfig}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
|
@ -67,6 +67,7 @@ in import nmtSrc {
|
||||||
./modules/programs/btop
|
./modules/programs/btop
|
||||||
./modules/programs/carapace
|
./modules/programs/carapace
|
||||||
./modules/programs/cava
|
./modules/programs/cava
|
||||||
|
./modules/programs/cmus
|
||||||
./modules/programs/comodoro
|
./modules/programs/comodoro
|
||||||
./modules/programs/darcs
|
./modules/programs/darcs
|
||||||
./modules/programs/dircolors
|
./modules/programs/dircolors
|
||||||
|
|
20
tests/modules/programs/cmus/cmus.nix
Normal file
20
tests/modules/programs/cmus/cmus.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.cmus = {
|
||||||
|
enable = true;
|
||||||
|
theme = "gruvbox";
|
||||||
|
extraConfig = "test";
|
||||||
|
};
|
||||||
|
|
||||||
|
nmt.script = ''
|
||||||
|
assertFileContent \
|
||||||
|
home-files/.config/cmus/rc \
|
||||||
|
${
|
||||||
|
builtins.toFile "cmus-expected-rc" ''
|
||||||
|
colorscheme gruvbox
|
||||||
|
test
|
||||||
|
''
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
}
|
1
tests/modules/programs/cmus/default.nix
Normal file
1
tests/modules/programs/cmus/default.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{ cmus = ./cmus.nix; }
|
Loading…
Reference in a new issue