Add nicotine service
This commit is contained in:
parent
8c6a855a00
commit
b42283f459
|
@ -71,6 +71,7 @@ with nLib; {
|
|||
media = {
|
||||
enable = mkDefaultOption "Media Applications"
|
||||
(config.nathan.config.isDesktop && pkgs.stdenv.isLinux);
|
||||
nicotineService = mkDefaultOption "Nicotine service" false;
|
||||
mopidyExtraConfig = mkOption {
|
||||
description = "Extra config files for mopidy";
|
||||
default = [ ];
|
||||
|
|
|
@ -12,39 +12,57 @@ let
|
|||
terminal = false;
|
||||
};
|
||||
in {
|
||||
config = lib.mkIf config.nathan.programs.media.enable {
|
||||
# General Packages
|
||||
home.packages = with pkgs; [
|
||||
spotify
|
||||
unstable.vlc
|
||||
unstable.plex-media-player
|
||||
unstable.obs-studio
|
||||
nicotine-plus
|
||||
irisDesktopItem
|
||||
picard
|
||||
mpc-cli
|
||||
calibre
|
||||
];
|
||||
# Mopidy service
|
||||
# TODO: Add scrobbling
|
||||
services.mopidy = {
|
||||
enable = true;
|
||||
extensionPackages = with pkgs; [
|
||||
mopidy-mpd
|
||||
mopidy-iris
|
||||
mopidy-scrobbler
|
||||
mopidy-local
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.nathan.programs.media.enable {
|
||||
# General Packages
|
||||
home.packages = with pkgs; [
|
||||
spotify
|
||||
unstable.vlc
|
||||
unstable.plex-media-player
|
||||
unstable.obs-studio
|
||||
nicotine-plus
|
||||
irisDesktopItem
|
||||
picard
|
||||
mpc-cli
|
||||
calibre
|
||||
];
|
||||
# extraConfigFiles = config.nathan.programs.media.mopidyExtraConfig;
|
||||
settings = {
|
||||
file = { media_dirs = [ "~/Music" ]; };
|
||||
local = {
|
||||
enabled = true;
|
||||
media_dir = "~/Music";
|
||||
# Mopidy service
|
||||
# TODO: Add scrobbling
|
||||
services.mopidy = {
|
||||
enable = true;
|
||||
extensionPackages = with pkgs; [
|
||||
mopidy-mpd
|
||||
mopidy-iris
|
||||
mopidy-scrobbler
|
||||
mopidy-local
|
||||
];
|
||||
# extraConfigFiles = config.nathan.programs.media.mopidyExtraConfig;
|
||||
settings = {
|
||||
file = { media_dirs = [ "~/Music" ]; };
|
||||
local = {
|
||||
enabled = true;
|
||||
media_dir = "~/Music";
|
||||
};
|
||||
mpd = { enabled = true; };
|
||||
};
|
||||
mpd = { enabled = true; };
|
||||
extraConfigFiles = [ nixosConfig.sops.secrets."last.fm".path ];
|
||||
};
|
||||
extraConfigFiles = [ nixosConfig.sops.secrets."last.fm".path ];
|
||||
};
|
||||
};
|
||||
})
|
||||
(lib.mkIf (config.nathan.programs.media.enable
|
||||
&& config.nathan.programs.media.nicotineService) {
|
||||
systemd.user.services.nicotine = {
|
||||
Unit = {
|
||||
Description = "Nicotine++";
|
||||
After = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = ''
|
||||
${pkgs.nicotine-plus}/bin/nicotine -s
|
||||
'';
|
||||
};
|
||||
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
programs = {
|
||||
util = { wine = true; };
|
||||
games = { launcher = true; };
|
||||
media.nicotineService = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue