mirror of
https://github.com/kmein/niveum
synced 2026-03-20 12:01:06 +01:00
chore: organize
use read-made spotifyd module move sshPort to niveum lib (used also from deploy.nix) factor out sshd config, use from toum factor out urlwatch access scardanelli locally mpd: configure webradio playlist scardanelli: use cage for kiosk toum: use wifi config toum: use spacetime, dont redeclare toum: use ssh config
This commit is contained in:
@@ -1,32 +1,12 @@
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
inherit (lib.strings) fileContents;
|
||||
in {
|
||||
services.dbus.packages = [ pkgs.gnome3.dconf ];
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/audio/spotifyd.nix
|
||||
systemd.user.services.spotifyd = let
|
||||
spotifyd = pkgs.spotifyd.override {
|
||||
withMpris = true;
|
||||
withPulseAudio = true;
|
||||
inherit (pkgs) libpulseaudio dbus;
|
||||
};
|
||||
spotifydConf = pkgs.writeText "spotifyd.conf" (lib.generators.toINI { } {
|
||||
{ lib, ... }:
|
||||
{
|
||||
services.spotifyd = {
|
||||
enable = true;
|
||||
config = lib.generators.toINI { } {
|
||||
global = {
|
||||
username = fileContents <secrets/spotify/username>;
|
||||
password = fileContents <secrets/spotify/password>;
|
||||
backend = "pulseaudio";
|
||||
username = lib.strings.fileContents <secrets/spotify/username>;
|
||||
password = lib.strings.fileContents <secrets/spotify/password>;
|
||||
};
|
||||
});
|
||||
in {
|
||||
wantedBy = [ "default.target" ];
|
||||
after = [ "network-online.target" "sound.target" ];
|
||||
description = "spotifyd, a Spotify playing daemon";
|
||||
serviceConfig = {
|
||||
ExecStart =
|
||||
"${spotifyd}/bin/spotifyd --no-daemon --config-path ${spotifydConf}";
|
||||
Restart = "always";
|
||||
RestartSec = 12;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user