2023-02-12 21:54:39 -05:00
|
|
|
{ config, nixosConfig, lib, pkgs, inputs, ... }:
|
2022-06-23 02:57:41 -04:00
|
|
|
let
|
2022-10-13 22:13:43 -04:00
|
|
|
unstable = import inputs.nixpkgs-unstable {
|
|
|
|
config = { allowUnfree = true; };
|
|
|
|
system = pkgs.system;
|
|
|
|
};
|
2022-06-23 02:57:41 -04:00
|
|
|
irisDesktopItem = pkgs.makeDesktopItem {
|
|
|
|
name = "iris";
|
|
|
|
desktopName = "Iris";
|
2023-03-29 19:42:06 -04:00
|
|
|
exec =
|
|
|
|
''${pkgs.chromium}/bin/chromium "--app=http://localhost:6680/iris/"'';
|
2022-06-23 02:57:41 -04:00
|
|
|
terminal = false;
|
|
|
|
};
|
2022-10-13 22:13:43 -04:00
|
|
|
in {
|
2023-02-19 20:03:05 -05:00
|
|
|
config = lib.mkMerge [
|
|
|
|
(lib.mkIf config.nathan.programs.media.enable {
|
|
|
|
# General Packages
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
spotify
|
|
|
|
unstable.vlc
|
|
|
|
unstable.plex-media-player
|
2023-04-18 17:52:37 -04:00
|
|
|
unstable.jellyfin-media-player
|
2023-02-19 20:03:05 -05:00
|
|
|
unstable.obs-studio
|
|
|
|
nicotine-plus
|
|
|
|
irisDesktopItem
|
|
|
|
picard
|
|
|
|
mpc-cli
|
|
|
|
calibre
|
2022-06-23 02:57:41 -04:00
|
|
|
];
|
2023-02-19 20:03:05 -05:00
|
|
|
# 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; };
|
2022-06-23 02:57:41 -04:00
|
|
|
};
|
2023-02-19 20:03:05 -05:00
|
|
|
extraConfigFiles = [ nixosConfig.sops.secrets."last.fm".path ];
|
2022-06-23 02:57:41 -04:00
|
|
|
};
|
2023-02-19 20:03:05 -05:00
|
|
|
})
|
|
|
|
(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" ]; };
|
|
|
|
};
|
|
|
|
})
|
|
|
|
];
|
2022-06-23 02:57:41 -04:00
|
|
|
}
|