1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

feat: spotifyd, spotify-tui

This commit is contained in:
Kierán Meinhardt
2020-05-20 00:06:26 +02:00
parent 39bc899d44
commit a59be3f398
4 changed files with 24 additions and 3 deletions

View File

@@ -40,6 +40,7 @@ in
./redshift.nix
./retiolum.nix
./rofi.nix
./spotify.nix
./ssh.nix
./sudo.nix
./sxiv.nix

View File

@@ -102,7 +102,6 @@ in
inkscape
pdfgrep # search in pdf
pdftk # pdf toolkit
spotify
nur.repos.kmein.python3Packages.spotify-cli-linux
youtubeDL
bc # calculator

21
configs/spotify.nix Normal file
View File

@@ -0,0 +1,21 @@
{ pkgs, lib, ... }:
let
inherit (import <niveum/lib> { inherit pkgs; }) toTOML;
inherit (lib.strings) fileContents;
in
{
environment.systemPackages = with pkgs; [
spotify
spotify-tui
];
services.spotifyd = {
enable = true;
config = toTOML {
global = {
username = fileContents <shared-secrets/spotify/username>;
password_cmd = "${pkgs.pass}/bin/pass shared/spotify/password";
};
};
};
}

View File

@@ -1,7 +1,7 @@
{ pkgs, ... }:
{
rec {
writeTOML = object: pkgs.runCommand "generated.toml" {} ''
echo '${builtins.toJSON object}' | ${pkgs.remarshal}/bin/json2toml > $out
'';
toTOML = object: builtins.readFile (pkgs.writeTOML object);
toTOML = object: builtins.readFile (writeTOML object);
}