mpd: Add listenbrainz submitting
This commit is contained in:
parent
c7895e8427
commit
287560e0fa
|
@ -45,4 +45,11 @@ lib.mkIf config.sbruder.gui.enable {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
sops.secrets = lib.mkIf config.sbruder.trusted {
|
||||||
|
listenbrainz-token = {
|
||||||
|
group = "users";
|
||||||
|
mode = "440";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
listenbrainz-token: ENC[AES256_GCM,data:0lHG/52VGRnO+ubG2dZqILIgZ4ddSmZKN2AOhL3ezP0MbQw1,iv:fFvFOVy1oF1Ppv0PwyNDem6h5OqZLF/9DDrODHjg7g0=,tag:LwplKbzhz5rfCuY91WXk9w==,type:str]
|
||||||
media-htpasswd: ENC[AES256_GCM,data:8o+MBYaH+OoPrK2FtDzxCLXCz8oGDezIALl2KkoVlj/ZtC4WfTHu6NnaUbi+xUb7s8bLHchpmFyXC9U5+yGAlHV/v7zKOrkrga08Qn2sHqudZS8uRMj4Mh/WdYbAJ+MjfhihTf377obIDJAesYwL8Jnkcy5NiVSD7jN7PJUlTLFLiXr+U+dYctJG1b2TnhNaGL9FnutG6GnOHP37AZaTMPaD0YgSNJ+PNEGULkajwxNj2dn9XFeQGa5DlETHh8UlL3+6hUBUgXsAiN3UkRYJGLybq2vDlS9uRXRzobCiqK1E58SXS0ZMOUzewtvvOixXDC31/ppd1WmUOweJ4JiAKGWindgj5yejxf8kk2UaIJQTjATb1jtQTmdMBEfckIq+xvbyVNAofBSlSAuo/FGNYt7zf2uH1Y6A3cQwgTSaMo8Rs01AfszyaXLMqwiS+k9kq/QXkH4VLAbVakli4yuywB4pusqBvf5vAFDdgTtKhag4vuworbo/kM8KXh6nAA==,iv:n44K6SEtrL6MYEzXdPHbOvzoIQBqnVee+uC0/kbgd1M=,tag:HeOX3bXb107fSFXUk6Hc5Q==,type:str]
|
media-htpasswd: ENC[AES256_GCM,data:8o+MBYaH+OoPrK2FtDzxCLXCz8oGDezIALl2KkoVlj/ZtC4WfTHu6NnaUbi+xUb7s8bLHchpmFyXC9U5+yGAlHV/v7zKOrkrga08Qn2sHqudZS8uRMj4Mh/WdYbAJ+MjfhihTf377obIDJAesYwL8Jnkcy5NiVSD7jN7PJUlTLFLiXr+U+dYctJG1b2TnhNaGL9FnutG6GnOHP37AZaTMPaD0YgSNJ+PNEGULkajwxNj2dn9XFeQGa5DlETHh8UlL3+6hUBUgXsAiN3UkRYJGLybq2vDlS9uRXRzobCiqK1E58SXS0ZMOUzewtvvOixXDC31/ppd1WmUOweJ4JiAKGWindgj5yejxf8kk2UaIJQTjATb1jtQTmdMBEfckIq+xvbyVNAofBSlSAuo/FGNYt7zf2uH1Y6A3cQwgTSaMo8Rs01AfszyaXLMqwiS+k9kq/QXkH4VLAbVakli4yuywB4pusqBvf5vAFDdgTtKhag4vuworbo/kM8KXh6nAA==,iv:n44K6SEtrL6MYEzXdPHbOvzoIQBqnVee+uC0/kbgd1M=,tag:HeOX3bXb107fSFXUk6Hc5Q==,type:str]
|
||||||
media-proxy-auth: ENC[AES256_GCM,data:OcmYZq/tyzMB61NfyYZ8gAlEE+8w2IhlPlZ+dfedtfqVlPHk3iJsd9mvsXHf5ODTtuy00ll0MF4KYNePZkz7TeuaIdBgGlshFyE4gwsJdPXZNYnhcg==,iv:qo6SOaHrWsXfvRwgSKDTSnreOcO9xy3RKrfE2k+VLEg=,tag:14DT86PQdEuK9zyZzcAohA==,type:str]
|
media-proxy-auth: ENC[AES256_GCM,data:OcmYZq/tyzMB61NfyYZ8gAlEE+8w2IhlPlZ+dfedtfqVlPHk3iJsd9mvsXHf5ODTtuy00ll0MF4KYNePZkz7TeuaIdBgGlshFyE4gwsJdPXZNYnhcg==,iv:qo6SOaHrWsXfvRwgSKDTSnreOcO9xy3RKrfE2k+VLEg=,tag:14DT86PQdEuK9zyZzcAohA==,type:str]
|
||||||
media-ssh-key: EN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dx7QG0y3f/AbxRvVCuLLZW/y0JpCtE2B/mcObRvjsZP3RXQIS4vGAeTerd18RwsrsWO,iv:+ASa0hhWXmQ2hgJ9UuRFjnf/fA65kxWXiC+rDI6Lnx8=,tag:LDYSsN0DXAFiW0w+YBcopA==,type:str]
|
||||||
|
@ -10,8 +11,8 @@ sops:
|
||||||
azure_kv: []
|
azure_kv: []
|
||||||
hc_vault: []
|
hc_vault: []
|
||||||
age: []
|
age: []
|
||||||
lastmodified: "2022-08-25T14:27:39Z"
|
lastmodified: "2023-09-18T13:17:11Z"
|
||||||
mac: ENC[AES256_GCM,data:75hpB3gQ5WhqdSG4q1w08dQ1g9QGK2PA3hqXHnRz7cosjAERyldIG9TmOATrUGLULUy+E8fnOaACCatY5aMXVL/wmn77GkI4EA658D9j3Fhm1+k/Tv+rE8+4icb+9YNVZijLpHzSlMKZVOdYyg+CZlAC/xDz6ggdZOO6Ks29N+Q=,iv:0NKHdZxKmcUNiraoBW4WldO2hHkaTDVH0sUk/lh1Xg8=,tag:mRfDetmVh0Nv/4nHjCs/5g==,type:str]
|
mac: ENC[AES256_GCM,data:y6VTyAeZgGyqafjw7asaeEq2XhhhB8QW8qhnaqUNUCO+OsgITXMOGwQmsWKN7qnW8D8r5WHiR0aojGROBhSKJ1tgPjRu+Ya5rMsOIN5KecqBhA1Z7yOL45xcYKVNJmiL0p9fxrrBQi1FP1zE1Rgwx+nD6MfydLoEU9LDBRFcyUs=,iv:Q3jbtDU+zWZXGhtCu3qC7KCXOM7gRBePHN0CxqBpvAM=,tag:8iRP6j78H90aDujiQh33fw==,type:str]
|
||||||
pgp:
|
pgp:
|
||||||
- created_at: "2023-05-06T07:18:02Z"
|
- created_at: "2023-05-06T07:18:02Z"
|
||||||
enc: |-
|
enc: |-
|
||||||
|
|
|
@ -73,6 +73,12 @@ lib.mkIf nixosConfig.sbruder.gui.enable {
|
||||||
# Misc
|
# Misc
|
||||||
external_editor = "nvim";
|
external_editor = "nvim";
|
||||||
};
|
};
|
||||||
|
bindings = [
|
||||||
|
# not really speaking bindings, though t(op), h(ate) and d(elete) are somewhat memorizable
|
||||||
|
{ key = "t"; command = ''run_external_command "mpc sendmessage listenbrainz_feedback love"''; }
|
||||||
|
{ key = "h"; command = ''run_external_command "mpc sendmessage listenbrainz_feedback hate"''; }
|
||||||
|
{ key = "d"; command = ''run_external_command "mpc sendmessage listenbrainz_feedback clear"''; }
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
@ -80,4 +86,18 @@ lib.mkIf nixosConfig.sbruder.gui.enable {
|
||||||
];
|
];
|
||||||
|
|
||||||
home.sessionVariables.MPD_HOST = config.services.mpd.network.listenAddress;
|
home.sessionVariables.MPD_HOST = config.services.mpd.network.listenAddress;
|
||||||
|
|
||||||
|
services.listenbrainz-mpd = lib.mkIf nixosConfig.sbruder.trusted {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.unstable.listenbrainz-mpd;
|
||||||
|
settings = {
|
||||||
|
submission = {
|
||||||
|
token_file = "/run/secrets/listenbrainz-token";
|
||||||
|
};
|
||||||
|
|
||||||
|
mpd = {
|
||||||
|
address = config.services.mpd.network.listenAddress;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue