nixos/kanata: notify systemd when starting up is finished

- set service type to notify
- allow unix socket which is needed by systemd notify

Lin Jian 4482c705 a7717edb

Changed files
+2 -2
nixos
modules
services
hardware
+2 -2
nixos/modules/services/hardware/kanata.nix
···
mkService = name: keyboard: nameValuePair (mkName name) {
wantedBy = [ "multi-user.target" ];
serviceConfig = {
+
Type = "notify";
ExecStart = ''
${getExe cfg.package} \
--cfg ${mkConfig name keyboard} \
···
ProtectKernelModules = true;
ProtectKernelTunables = true;
ProtectProc = "invisible";
-
RestrictAddressFamilies =
-
if (keyboard.port == null) then "none" else [ "AF_INET" ];
+
RestrictAddressFamilies = [ "AF_UNIX" ] ++ optional (keyboard.port != null) "AF_INET";
RestrictNamespaces = true;
RestrictRealtime = true;
SystemCallArchitectures = [ "native" ];