nixos/evcc: Fix unit environment

In some recent version evcc started requiring `getent` in the PATH, or
else it would fail to start.

It also now requires an sqlite database, which it tries to create a
directory for at `$HOME/.evcc`, so we now need to provide a
StateDirectory.

Changed files
+5 -1
nixos
modules
services
home-automation
+5 -1
nixos/modules/services/home-automation/evcc.nix
···
wantedBy = [
"multi-user.target"
];
-
+
environment.HOME = "/var/lib/evcc";
+
path = with pkgs; [
+
glibc # requires getent
+
];
serviceConfig = {
ExecStart = "${package}/bin/evcc --config ${configFile} ${escapeShellArgs cfg.extraArgs}";
CapabilityBoundingSet = [ "" ];
···
ProtectKernelModules = true;
ProtectKernelTunables = true;
ProtectProc = "invisible";
+
StateDirectory = "evcc";
SystemCallArchitectures = "native";
SystemCallFilter = [
"@system-service"