MPD services configuration
This commit is contained in:
parent
d5b2c3984e
commit
9dbe998f0d
|
|
@ -131,7 +131,45 @@ in
|
||||||
ExecStart = "${script}";
|
ExecStart = "${script}";
|
||||||
};
|
};
|
||||||
Install = {
|
Install = {
|
||||||
WantedBy = [ "multi-user.target" ];
|
WantedBy = [ "default.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# This service appears to have issues when system sleeps - restart service
|
||||||
|
systemd.user.services.mpd-discord-rpc-refresh = let
|
||||||
|
script = pkgs.writeShellScript "mpd-discord-rpc-refresh-script"
|
||||||
|
''
|
||||||
|
systemctl --user restart mpd-discord-rpc.service
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
Unit = {
|
||||||
|
Description = "Refresh mpd--discord-rpc service on sleep/hibernate/login to resolve issues";
|
||||||
|
Before = [ "systemd-suspend.service" "systemd-hibernate.service" "systemd-hybrid-sleep.service" ];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
ExecStart = "${script}";
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "suspend.target" "hibernate.target" "hybrid-sleep.target" "xdg-desktop-autostart.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.services.mpd-discord-rpc-start = let
|
||||||
|
script = pkgs.writeShellScript "mpd-discord-rpc-start-script"
|
||||||
|
''
|
||||||
|
systemctl --user start mpd.service
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
Unit = {
|
||||||
|
Description = "Start MPD on boot";
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
ExecStart = "${script}";
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "default.target" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
13
global.nix
13
global.nix
|
|
@ -86,13 +86,24 @@
|
||||||
LXVST_PATH = makePluginPath "lxvst";
|
LXVST_PATH = makePluginPath "lxvst";
|
||||||
VST_PATH = makePluginPath "vst";
|
VST_PATH = makePluginPath "vst";
|
||||||
VST3_PATH = makePluginPath "vst3";
|
VST3_PATH = makePluginPath "vst3";
|
||||||
|
|
||||||
|
# Dotnet libicu not found fix
|
||||||
|
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT = "1";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# NixOS Dynamic Libraries Fix
|
||||||
|
programs.nix-ld.enable = true;
|
||||||
|
programs.nix-ld.libraries = with pkgs; [
|
||||||
|
# Add any missing dynamic libraries for unpackaged programs
|
||||||
|
# here, NOT in environment.systemPackages
|
||||||
|
icu
|
||||||
|
];
|
||||||
|
|
||||||
# Emacs Config Init Service - For root user also
|
# Emacs Config Init Service - For root user also
|
||||||
systemd.services.emacs-config-initialiser = {
|
systemd.services.emacs-config-initialiser = {
|
||||||
description = "Initialises default emacs configuration if not available";
|
description = "Initialises default emacs configuration if not available";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
path = [ pkgs.coreutils pkgs.git ];
|
path = with pkgs; [ coreutils git ];
|
||||||
enable = true;
|
enable = true;
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = "root";
|
User = "root";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue