~aasg/nixexprs

783708728382cebec6c941cbb8f5632dc1f1e7d3 — Aluísio Augusto Silva Gonçalves 5 months ago 13602af
Switch all systemd services from Type=simple to Type=exec

Type "exec" waits until the service process is exec'ed before
reporting success, while "simple" succeeds right after the fork
and will not detect errors such as missing binaries or invalid
user/group.
M modules/services/cluster/ipfs-cluster.nix => modules/services/cluster/ipfs-cluster.nix +1 -1
@@ 105,7 105,7 @@ in
        IPFS_CLUSTER_PATH = cfg.dataDir;
      } // settingsToEnv cfg.settings;
      serviceConfig = {
        Type = "simple";
        Type = "exec";
        User = cfg.user;
        Group = cfg.group;
        Restart = "on-abnormal";

M modules/services/networking/matrix-appservice-irc.nix => modules/services/networking/matrix-appservice-irc.nix +1 -1
@@ 119,7 119,7 @@ in
      description = "Matrix bridge to IRC";
      wantedBy = [ "multi-user.target" ];
      serviceConfig = rec {
        Type = "simple";
        Type = "exec";
        ExecStartPre = reconfigureScript;
        ExecStart = "${pkg}/bin/matrix-appservice-irc --config /etc/matrix-appservice-irc/config.json --file /etc/matrix-appservice-irc/registration.yaml";
        ExecReload = [ reconfigureScript "${pkgs.coreutils}/bin/kill -HUP $MAINPID" ];

M modules/services/networking/trust-dns.nix => modules/services/networking/trust-dns.nix +1 -1
@@ 38,7 38,7 @@ in
      wants = [ "network-online.target" ];
      wantedBy = [ "multi-user.target" ];
      serviceConfig = {
        Type = "simple";
        Type = "exec";
        ExecStart = "${cfg.package}/bin/named --quiet --config=${configFile}";
        DynamicUser = true;
        ConfigurationDirectory = "trust-dns";