From ded7ef42ffefe2cdd57cfa304eb2f64aadffc2bb Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Fri, 7 Apr 2023 14:02:15 +0530 Subject: [PATCH] refactor services --- home/services/default.nix | 17 ++++++----------- home/services/media.nix | 25 ------------------------- home/services/spotifyd.nix | 23 +++++++++++++++++++++++ 3 files changed, 29 insertions(+), 36 deletions(-) delete mode 100644 home/services/media.nix create mode 100644 home/services/spotifyd.nix diff --git a/home/services/default.nix b/home/services/default.nix index d7a8d9e..b040eae 100644 --- a/home/services/default.nix +++ b/home/services/default.nix @@ -1,14 +1,9 @@ { ... }: { - imports = [ - ./media.nix - ]; - services.blueman-applet.enable = true; - services.gnome-keyring.enable = true; - services.gpg-agent = { - enable = true; - enableExtraSocket = true; - enableScDaemon = true; - enableSshSupport = true; - pinentryFlavor = "gnome3"; + services = { + imports = [ + ./spotifyd.nix + ]; + blueman-applet.enable = true; + gnome-keyring.enable = true; }; } diff --git a/home/services/media.nix b/home/services/media.nix deleted file mode 100644 index 7f50139..0000000 --- a/home/services/media.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ pkgs, ... }: { - services = { - spotifyd = { - enable = true; - package = pkgs.spotifyd.override { - withKeyring = true; - withMpris = true; - }; - settings = { - global = { - use_keyring = true; - use_mpris = true; - username_cmd = '' - ${pkgs.libsecret}/bin/secret-tool search --all service spotifyd 2>&1 | grep 'username' | awk -F'= ' '{print $2}' - ''; - device_name = "Skipperd"; - device_type = "computer"; - backend = "pulseaudio"; - no_audio_cache = true; - dbus_type = "session"; - }; - }; - }; - }; -} diff --git a/home/services/spotifyd.nix b/home/services/spotifyd.nix new file mode 100644 index 0000000..c23f29e --- /dev/null +++ b/home/services/spotifyd.nix @@ -0,0 +1,23 @@ +{ pkgs, ... }: { + spotifyd = { + enable = true; + package = pkgs.spotifyd.override { + withKeyring = true; + withMpris = true; + }; + settings = { + global = { + use_keyring = true; + use_mpris = true; + username_cmd = '' + ${pkgs.libsecret}/bin/secret-tool search --all service spotifyd 2>&1 | grep 'username' | awk -F'= ' '{print $2}' + ''; + device_name = "Skipperd"; + device_type = "computer"; + backend = "pulseaudio"; + no_audio_cache = true; + dbus_type = "session"; + }; + }; + }; +}