From 8355a996418d9abde0b83ac48ed5f6fe7cc8b67a Mon Sep 17 00:00:00 2001 From: jolheiser Date: Tue, 19 Dec 2023 11:14:54 -0600 Subject: [PATCH] chore: move to spotify_player Signed-off-by: jolheiser --- apps/gui/default.nix | 4 ++-- apps/gui/spotify.nix | 17 +++++++++++++++++ apps/gui/spotifyd.nix | 17 ----------------- flake.nix | 6 +++++- secrets/secrets.nix | 2 +- secrets/shared/spotify-pw.age | 14 -------------- secrets/shared/spotify.age | 14 ++++++++++++++ 7 files changed, 39 insertions(+), 35 deletions(-) create mode 100644 apps/gui/spotify.nix delete mode 100644 apps/gui/spotifyd.nix delete mode 100644 secrets/shared/spotify-pw.age create mode 100644 secrets/shared/spotify.age diff --git a/apps/gui/default.nix b/apps/gui/default.nix index 6436a1c..a370b44 100644 --- a/apps/gui/default.nix +++ b/apps/gui/default.nix @@ -4,7 +4,7 @@ ./firefox.nix ./ghostty.nix ./gtk.nix - ./spotifyd.nix + ./spotify.nix ./tiny.nix ./wezterm.nix ]; @@ -15,7 +15,7 @@ delve discord obsidian - spotify-tui + spotify-player # LSPs lua-language-server diff --git a/apps/gui/spotify.nix b/apps/gui/spotify.nix new file mode 100644 index 0000000..c490ee9 --- /dev/null +++ b/apps/gui/spotify.nix @@ -0,0 +1,17 @@ +{pkgs, ...}: { + xdg.configFile."spotify-player/theme.toml".text = builtins.readFile (pkgs.fetchFromGitHub { + owner = "catppuccin"; + repo = "spotify-player"; + rev = "816e48fe7ade959dab920d83a7a88a952c48ede3"; + sha256 = "sha256-Xl8GoAzuSfYmFb5ohS4H5we9q+0DTrCwQ3WubPsnxGg="; + } + + "/src/theme.toml"); + xdg.configFile."spotify-player/app.toml".source = (pkgs.formats.toml {}).generate "spotify-player-config" { + client_id = "41af4976ba70474fbd541ee8764a2cda"; + theme = "Catppuccin-mocha"; + enable_notify = false; + enable_media_control = true; + device.volume = 100; + }; + programs.nushell.shellAliases.spt = "spotify_player"; +} diff --git a/apps/gui/spotifyd.nix b/apps/gui/spotifyd.nix deleted file mode 100644 index fc0c170..0000000 --- a/apps/gui/spotifyd.nix +++ /dev/null @@ -1,17 +0,0 @@ -{pkgs, ...}: { - services.spotifyd = { - enable = true; - settings.global = { - username = "john.olheiser"; - password_cmd = "cat /run/agenix/spotify-pw"; - device_name = "nix"; - }; - }; - xdg.configFile."spotify-tui/config.yml".text = builtins.readFile (pkgs.fetchFromGitHub { - owner = "catppuccin"; - repo = "spotify-tui"; - rev = "45a4ef12508784410c516746c9d84862d52e4567"; - sha256 = "sha256-RXJ+skwUu2miCbBDLXx0Md0aVgo3iub2rQBzICwYLMU="; - } - + "/mocha.yml"); -} diff --git a/flake.nix b/flake.nix index 62559f4..a512769 100644 --- a/flake.nix +++ b/flake.nix @@ -131,7 +131,11 @@ age.secrets = { ssh-config = userSecret ./secrets/shared/ssh-config.age; ssh-config-work = userSecret ./secrets/shared/ssh-config-work.age; - spotify-pw = userSecret ./secrets/shared/spotify-pw.age; + spotify = { + file = ./secrets/shared/spotify.age; + owner = username; + path = "/home/${username}/.cache/spotify-player/credentials.json"; + }; irc-pw = userSecret ./secrets/shared/irc-pw.age; gist-pw = userSecret ./secrets/shared/gist-pw.age; git-send-email = userSecret ./secrets/shared/git-send-email.age; diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 26fe91c..cf1a436 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -8,7 +8,7 @@ let in { "shared/ssh-config.age".publicKeys = all; "shared/ssh-config-work.age".publicKeys = all; - "shared/spotify-pw.age".publicKeys = all; + "shared/spotify.age".publicKeys = all; "shared/irc-pw.age".publicKeys = all; "shared/gist-pw.age".publicKeys = all; "shared/git-send-email.age".publicKeys = all; diff --git a/secrets/shared/spotify-pw.age b/secrets/shared/spotify-pw.age deleted file mode 100644 index ee20305..0000000 --- a/secrets/shared/spotify-pw.age +++ /dev/null @@ -1,14 +0,0 @@ -age-encryption.org/v1 --> ssh-ed25519 E8j6/g rTczN49uC7rlcUspdrZvezwwsopZbDI3ed2Iu8dMqho -5bYO3BkBUlfND31gZP9Q2mm36uG0H3ztKz53+ULWEpI --> ssh-ed25519 xUMv2w Afpo98rI2byTAp1ggl6dk1jLUX38/Kw0quZmkNYToBc -uf2EAkbf++q3JJJmtvr/0GGXF36vKGi79P9nDcwnkOM --> ssh-ed25519 jo1MPA rtF3q41fH9J65yefk+HH8lbAnH8Uks+JqmKfKHNiBAM -JljmFpYPY9UZrqj4bNMAuiIIpfGtts/BLdBBcECFluA --> ssh-ed25519 f31uNA be9QDOLTnswNPCzOwAzrkcjZnGi0bRkqKn6XVu9POGQ -+HI5hr4P5JpwvnYos4MWWfgNYbav96Dql6ByQ3FyOZw --> 2-grease +t`Yq +>J# MPH/!o 0M -Y4t2zoE06phrwv7b85k716E9a/6rDrTMUzHG7FEEL1vf1l2HxDRmbETdD8vqgHyr -a93dGwR316iAcBz36LBZ ---- yBlcDPxXfHOlWH84kOPk90Y/QnyxAmmHEe3DON5+UbA -^ G13Q? }qamZ/FqY5I \ No newline at end of file diff --git a/secrets/shared/spotify.age b/secrets/shared/spotify.age new file mode 100644 index 0000000..1b760f0 --- /dev/null +++ b/secrets/shared/spotify.age @@ -0,0 +1,14 @@ +age-encryption.org/v1 +-> ssh-ed25519 E8j6/g NP0qP5dxYB6KZ1Wa9a91XsT8jP5USL+Mv1qPBz5KBBA +ryml/Fr+ue9vtdvpYQ5CcAZLYsxNq/0cg5Z0jxkS740 +-> ssh-ed25519 xUMv2w 6qMMxiDjNPWyIjZBYu9ZITtg8yOLe8pdCEKqXRrZfVM +oXE21t5+l7Hwqv0+yqomhilbAuVajufNzZ9py1v4GnY +-> ssh-ed25519 jo1MPA QKp2NFCDqg/wxewXLXob9fXpbASsiEwfvrUbYu3LMgg +OulnC5T/VoEKdOSd+q9OsaMs3JBcJ8uHvp5zrstTt1g +-> ssh-ed25519 f31uNA U2VaJ3nLdoSV1LupL9EJeM9LLCc/8WLIHzZfHnXzdCM +OvsNQEK7I9jKi1MarwYB/I91tOiGYu08W9fZ9xIw7MI +-> %kCxB-Uw^V/A"B ی-3=9"75@*\B \ No newline at end of file