mirror of
https://github.com/kmein/niveum
synced 2026-03-20 12:01:06 +01:00
feat: spotifyd, spotify-tui
This commit is contained in:
@@ -40,6 +40,7 @@ in
|
|||||||
./redshift.nix
|
./redshift.nix
|
||||||
./retiolum.nix
|
./retiolum.nix
|
||||||
./rofi.nix
|
./rofi.nix
|
||||||
|
./spotify.nix
|
||||||
./ssh.nix
|
./ssh.nix
|
||||||
./sudo.nix
|
./sudo.nix
|
||||||
./sxiv.nix
|
./sxiv.nix
|
||||||
|
|||||||
@@ -102,7 +102,6 @@ in
|
|||||||
inkscape
|
inkscape
|
||||||
pdfgrep # search in pdf
|
pdfgrep # search in pdf
|
||||||
pdftk # pdf toolkit
|
pdftk # pdf toolkit
|
||||||
spotify
|
|
||||||
nur.repos.kmein.python3Packages.spotify-cli-linux
|
nur.repos.kmein.python3Packages.spotify-cli-linux
|
||||||
youtubeDL
|
youtubeDL
|
||||||
bc # calculator
|
bc # calculator
|
||||||
|
|||||||
21
configs/spotify.nix
Normal file
21
configs/spotify.nix
Normal 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
rec {
|
||||||
writeTOML = object: pkgs.runCommand "generated.toml" {} ''
|
writeTOML = object: pkgs.runCommand "generated.toml" {} ''
|
||||||
echo '${builtins.toJSON object}' | ${pkgs.remarshal}/bin/json2toml > $out
|
echo '${builtins.toJSON object}' | ${pkgs.remarshal}/bin/json2toml > $out
|
||||||
'';
|
'';
|
||||||
toTOML = object: builtins.readFile (pkgs.writeTOML object);
|
toTOML = object: builtins.readFile (writeTOML object);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user