From 5695ff29e0a35261a6915debc2c6d66afe7ca597 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 17 Oct 2015 23:38:58 +0200 Subject: fixed last commit --- bragi.nix | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'bragi.nix') diff --git a/bragi.nix b/bragi.nix index 35833925..eb237f62 100644 --- a/bragi.nix +++ b/bragi.nix @@ -243,12 +243,15 @@ in { home = "/var/lib/thermoprint"; }; - systemd.services."thermoprint" = { - serviceConfig = { - Type = "simple"; - ExecStart = ''${thermoprint-servant}/bin/thermoprint --database /var/thermoprint/database.sqlite /dev/usb/lp0''; - User = "thermoprint"; - Group = "lp"; + let + user = user.extraUsers."thermoprint"; + in + systemd.services."thermoprint" = { + serviceConfig = { + Type = "simple"; + ExecStart = ''${thermoprint-servant}/bin/thermoprint --database ${user.home}/database.sqlite /dev/usb/lp0''; + User = user.name; + Group = user.group; + }; }; - }; } -- cgit v1.2.3