System/home-manager/linux/programs/media.nix

88 lines
2.4 KiB
Nix
Raw Permalink Normal View History

2023-02-12 21:54:39 -05:00
{ config, nixosConfig, lib, pkgs, inputs, ... }:
2022-06-23 02:57:41 -04:00
let
unstable = import inputs.nixpkgs-unstable {
config = { allowUnfree = true; };
system = pkgs.system;
};
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
2023-06-02 15:14:58 -04:00
unstable.haruna
2023-04-18 17:52:37 -04:00
unstable.jellyfin-media-player
2023-02-19 20:03:05 -05:00
nicotine-plus
picard
mpc-cli
calibre
2023-06-17 15:27:58 -04:00
playerctl
2023-06-17 18:36:26 -04:00
ncmpcpp
ario
2023-06-24 06:31:57 -04:00
libsForQt5.kdenlive
mediainfo
glaxnimate
2022-06-23 02:57:41 -04:00
];
2023-06-02 15:14:58 -04:00
# Register haruna as the default video player
xdg.mimeApps.defaultApplications = {
"video/mp4" = [ "haruna.desktop" ];
"video/avi" = [ "haruna.desktop" ];
"video/AV1" = [ "haruna.desktop" ];
"video/H264" = [ "haruna.desktop" ];
"video/H265" = [ "haruna.desktop" ];
};
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
mopidy-mpris
2023-02-19 20:03:05 -05:00
];
# extraConfigFiles = config.nathan.programs.media.mopidyExtraConfig;
settings = {
file = { media_dirs = [ "~/Music" ]; };
local = {
enabled = true;
media_dir = "~/Music";
};
mpd = { enabled = true; };
mpris = { 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-06-22 00:01:37 -04:00
# Setup obs
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
wlrobs
obs-vaapi
obs-gstreamer
input-overlay
2023-07-02 11:56:35 -04:00
looking-glass-obs
2023-10-21 21:46:04 -04:00
obs-pipewire-audio-capture
2023-06-22 00:01:37 -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
}