diff --git a/configuration.nix b/configuration.nix index 79320e8f..89c1e231 100644 --- a/configuration.nix +++ b/configuration.nix @@ -7,6 +7,7 @@ [ # Include the results of the hardware scan. ./hardware-configuration.nix + ./modules ]; # grub (mount efi partition to /boot/efi) @@ -178,21 +179,6 @@ (final: prev: { qutebrowser = prev.qutebrowser.override { enableWideVine = true; }; }) ]; - # TODO(sako):: replace this with mopidy for jellyifn support - services.mpd = { - # pipewire fix - user = "sako"; - enable = true; - musicDirectory = "/home/sako/music"; - extraConfig = builtins.readFile config/mpd/mpd.conf; - startWhenNeeded = true; - }; - - # mpd fix - systemd.services.mpd.environment = { - XDG_RUNTIME_DIR = "/run/user/1000"; - }; - # garbage collection nix.gc = { automatic = true; diff --git a/modules/default.nix b/modules/default.nix new file mode 100644 index 00000000..ccaab666 --- /dev/null +++ b/modules/default.nix @@ -0,0 +1,6 @@ +{ config, pkgs, lib, ...}: +{ + imports = [ + ./mpd + ]; +} diff --git a/modules/mpd/default.nix b/modules/mpd/default.nix index e69de29b..6de12786 100644 --- a/modules/mpd/default.nix +++ b/modules/mpd/default.nix @@ -0,0 +1,16 @@ +{ config, pkgs, lib, ...}: +{ + services.mpd = { + enable = true; + # pipewire fix + user = "sako"; + musicDirectory = "/home/sako/music"; + extraConfig = builtins.readFile ../../config/mpd/mpd.conf; + }; + + # systemd fix pipewire + systemd.services.mpd.environment = { + XDG_RUNTIME_DIR = "/run/user/1000"; + }; + +}