From eaf3787f110f359fc58525e73515bd1d244f08ca Mon Sep 17 00:00:00 2001 From: jolheiser Date: Tue, 11 Jul 2023 16:59:51 -0500 Subject: [PATCH] feat: spotifyd Signed-off-by: jolheiser --- apps/default.nix | 2 ++ apps/spotifyd.nix | 17 +++++++++++++++++ flake.nix | 4 ++++ secrets/secrets.nix | 1 + secrets/shared/spotify-pw.age | 13 +++++++++++++ 5 files changed, 37 insertions(+) create mode 100644 apps/spotifyd.nix create mode 100644 secrets/shared/spotify-pw.age diff --git a/apps/default.nix b/apps/default.nix index c2743fb..92030e9 100644 --- a/apps/default.nix +++ b/apps/default.nix @@ -16,6 +16,7 @@ ./jq.nix ./nushell.nix ./oh-my-posh.nix + ./spotifyd.nix ./ssh.nix ./wezterm.nix ./zoxide.nix @@ -31,6 +32,7 @@ du-dust fd just + spotify-tui ripgrep # LSPs diff --git a/apps/spotifyd.nix b/apps/spotifyd.nix new file mode 100644 index 0000000..fc0c170 --- /dev/null +++ b/apps/spotifyd.nix @@ -0,0 +1,17 @@ +{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 b3674d1..779aaf9 100644 --- a/flake.nix +++ b/flake.nix @@ -60,6 +60,10 @@ file = ./secrets/shared/nushell.nu.age; owner = "jolheiser"; }; + spotify-pw = { + file = ./secrets/shared/spotify-pw.age; + owner = "jolheiser"; + }; }; }; }); diff --git a/secrets/secrets.nix b/secrets/secrets.nix index f4cb906..a98f276 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -8,4 +8,5 @@ in { "shared/ssh-config.age".publicKeys = all; "shared/ssh-config-work.age".publicKeys = all; "shared/nushell.nu.age".publicKeys = all; + "shared/spotify-pw.age".publicKeys = all; } diff --git a/secrets/shared/spotify-pw.age b/secrets/shared/spotify-pw.age new file mode 100644 index 0000000..0489506 --- /dev/null +++ b/secrets/shared/spotify-pw.age @@ -0,0 +1,13 @@ +-----BEGIN AGE ENCRYPTED FILE----- +YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IEU4ajYvZyB5MlA0 +eGhSSmRPTjc4dDJpZ1dBNlhmS0NDT3VUalloQ0MzNDREZTM1Y1dRCkxsQnJHNlV3 +NmlGVVVLUk5VWllmMlR5UXZac0tBejNpTkI1Njh6STV5UzAKLT4gc3NoLWVkMjU1 +MTkgam8xTVBBIG9nbVBXLzVmNTROUUU2ZUxZR1dhWkZJSEZ2TDlUNjY5L1pKVytO +WUJlRFkKbjRyc0VYazdIaWpqbkNuZUFvd1JsR21VczF3UGdFNmF3U0J5MjU2ZG95 +UQotPiBPNy1ncmVhc2UgZjpTTSlBaCkKaEVDb1NVZ0hyY3o2RE1CTDQxNDN1SnVp +SklKREFwMHg4VklES0V4MWdFVGlROTBkZ25JZG5IS2NUN0lIRlFEbApLYnBEak9x +R3BBdVFjTzhRUVg1U1JEZXRrUEdEQXM2Z0FQR1F2KzhiR2dWZGUzcFRCUFpFTXIw +L2h4NytORm8KLS0tIDVKKzgzR1ZqMkF2RG1OZXoxcFMzMkFIaUdEaVNMb0xpMjVO +VTZ6b0pUVGcKSXvrqA0huEbxdXkW++sACbzvVdFBId2lcQSef3jS1jjseG9tmGX6 +z4x2VMvcuskidyihMA== +-----END AGE ENCRYPTED FILE-----