From 7e7ed4aea4792b58aa7387d833564f6105725db1 Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Wed, 5 Jul 2023 17:17:24 +0300 Subject: [PATCH] finally add stuff to directories --- configuration.nix | 16 +--------------- modules/default.nix | 6 ++++++ modules/mpd/default.nix | 16 ++++++++++++++++ 3 files changed, 23 insertions(+), 15 deletions(-) create mode 100644 modules/default.nix 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"; + }; + +}