From 80fa2d745f2732c4bf2a51decca742d0cf84e61c Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Sat, 18 Jan 2020 18:00:19 +0100 Subject: [PATCH] Pulsebert: run ncmpcpp on tty0 --- hosts/pulsebert/configuration.nix | 1 + hosts/pulsebert/mpdConsole.nix | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 hosts/pulsebert/mpdConsole.nix diff --git a/hosts/pulsebert/configuration.nix b/hosts/pulsebert/configuration.nix index 713ba56e..67a7a657 100644 --- a/hosts/pulsebert/configuration.nix +++ b/hosts/pulsebert/configuration.nix @@ -19,6 +19,7 @@ in { ../../lib/yggdrasil.nix ../../lib/hail.nix ../../lib/emery.nix + ./mpdConsole.nix ]; c3d2 = { diff --git a/hosts/pulsebert/mpdConsole.nix b/hosts/pulsebert/mpdConsole.nix new file mode 100644 index 00000000..597fa206 --- /dev/null +++ b/hosts/pulsebert/mpdConsole.nix @@ -0,0 +1,22 @@ +{ pkgs, ... }: + +let tty = "tty1"; +in { + boot.extraTTYs = [ tty ]; + + systemd.services.ncmpcpp = { + description = "Rogue dungeon crawling game"; + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + ExecStart = "${pkgs.ncmpcpp}/bin/ncmpcpp"; + StandardInput = "tty"; + StandardOutput = "tty"; + TTYPath = "/dev/${tty}"; + TTYReset = true; + TTYVTDisallocate = true; + WorkingDirectory = "/tmp"; + Restart = "always"; + }; + }; + +}