From c9979de25043ab31b85b366cac42c01b89bcc4c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Wed, 20 Jan 2021 07:47:13 +0100 Subject: [PATCH] feat(zaatar): run audio control tmux session --- systems/zaatar/configuration.nix | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/systems/zaatar/configuration.nix b/systems/zaatar/configuration.nix index 9f79724..53bf7b3 100644 --- a/systems/zaatar/configuration.nix +++ b/systems/zaatar/configuration.nix @@ -14,9 +14,34 @@ { sound.enable = true; } + { + environment.systemPackages = [ + (pkgs.writers.writeDashBin "mpv" '' + ${pkgs.mpv}/bin/mpv --no-video "$@" + '') + ]; + } { services.illum.enable = true; } + { + environment.systemPackages = [ pkgs.tmux ]; + systemd.services.turntables = { + description = "music controller session"; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + path = [ pkgs.alacritty.terminfo ]; + script = '' + ${pkgs.tmux}/bin/tmux -2 new-session -d -s turntables ${pkgs.ncmpcpp}/bin/ncmpcpp \; split-pane -h \; split-pane -v ${pkgs.alsaUtils}/bin/alsamixer + ''; + preStop = "${pkgs.tmux}/bin/tmux kill-session -t turntables"; + serviceConfig = { + User = "root"; + RemainAfterExit = true; + Type = "oneshot"; + }; + }; + } { users.extraUsers.kiosk = { isNormalUser = true;