diff options
| -rw-r--r-- | bragi.nix | 9 |
1 files changed, 3 insertions, 6 deletions
| @@ -243,15 +243,12 @@ in { | |||
| 243 | home = "/var/lib/thermoprint"; | 243 | home = "/var/lib/thermoprint"; |
| 244 | }; | 244 | }; |
| 245 | 245 | ||
| 246 | let | ||
| 247 | user = user.extraUsers."thermoprint"; | ||
| 248 | in | ||
| 249 | systemd.services."thermoprint" = { | 246 | systemd.services."thermoprint" = { |
| 250 | serviceConfig = { | 247 | serviceConfig = { |
| 251 | Type = "simple"; | 248 | Type = "simple"; |
| 252 | ExecStart = ''${thermoprint-servant}/bin/thermoprint --database ${user.home}/database.sqlite /dev/usb/lp0''; | 249 | ExecStart = ''${thermoprint-servant}/bin/thermoprint --database ${users.users."thermoprint".home}/database.sqlite /dev/usb/lp0''; |
| 253 | User = user.name; | 250 | User = users.users."thermoprint".name; |
| 254 | Group = user.group; | 251 | Group = users.users."thermoprint".group; |
| 255 | }; | 252 | }; |
| 256 | }; | 253 | }; |
| 257 | } | 254 | } |
