mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
ncspot: add module (#1939)
* ncspot: add module ncspot is a ncurses Spotify client written in Rust using librespot. * news: fix bad github ui merge Co-authored-by: Nicolas Berbiche <nicolas@normie.dev>
This commit is contained in:
parent
5709b5f953
commit
2f857761d0
4 changed files with 61 additions and 0 deletions
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
|
@ -105,6 +105,8 @@
|
|||
/tests/modules/programs/ncmpcpp @olmokramer
|
||||
/tests/modules/programs/ncmpcpp-linux @olmokramer
|
||||
|
||||
/modules/programs/ncspot.nix @marsam
|
||||
|
||||
/modules/programs/ne.nix @cwyc
|
||||
/tests/modules/programs/ne @cwyc
|
||||
|
||||
|
|
|
@ -1946,6 +1946,14 @@ in
|
|||
A new module is available: 'programs.lazygit'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2021-04-27T00:00:00+00:00";
|
||||
message = ''
|
||||
A new module is available: 'programs.ncspot'.
|
||||
'';
|
||||
}
|
||||
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -98,6 +98,7 @@ let
|
|||
(loadModule ./programs/msmtp.nix { })
|
||||
(loadModule ./programs/mu.nix { })
|
||||
(loadModule ./programs/ncmpcpp.nix { })
|
||||
(loadModule ./programs/ncspot.nix { })
|
||||
(loadModule ./programs/ne.nix { })
|
||||
(loadModule ./programs/neomutt.nix { })
|
||||
(loadModule ./programs/neovim.nix { })
|
||||
|
|
50
modules/programs/ncspot.nix
Normal file
50
modules/programs/ncspot.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.programs.ncspot;
|
||||
|
||||
tomlFormat = pkgs.formats.toml { };
|
||||
|
||||
in {
|
||||
meta.maintainers = [ maintainers.marsam ];
|
||||
|
||||
options.programs.ncspot = {
|
||||
enable = mkEnableOption "ncspot";
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.ncspot;
|
||||
defaultText = literalExample "pkgs.ncspot";
|
||||
description = "The package to use for ncspot.";
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
type = tomlFormat.type;
|
||||
default = { };
|
||||
example = literalExample ''
|
||||
{
|
||||
shuffle = true;
|
||||
gapless = true;
|
||||
}
|
||||
'';
|
||||
description = ''
|
||||
Configuration written to
|
||||
<filename>~/.config/ncspot/config.toml</filename>.
|
||||
</para><para>
|
||||
See <link xlink:href="https://github.com/hrkfdn/ncspot#configuration" />
|
||||
for the full list of options.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
xdg.configFile."ncspot/config.toml" = mkIf (cfg.settings != { }) {
|
||||
source = tomlFormat.generate "ncspot-config" cfg.settings;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue