Need help to create systemd services and script

Hello i tried to follow Extend NixOS - NixOS Wiki for creating a custom systemd services but what i did doesn’t work at all…

This is what i tried to do :

{ config, pkgs, … }:

{

systemd.services.mullvadConfigure = {

enable = true;

description = “Configure Mullvad VPN settings”;

wantedBy = [ “default.target” ];

after = [ “network.target” ];

serviceConfig = {

Type = “oneshot”;

User = “user”;

ExecStart = ‘’

${pkgs.mullvad}/bin/mullvad relay set tunnel-protocol wireguard
${pkgs.mullvad}/bin/mullvad relay set tunnel wireguard --ip-version ipv6
${pkgs.mullvad}/bin/mullvad tunnel set wireguard --quantum-resistant on
‘’;

RemainAfterExit = “yes”;

};

};

}

The idea is to execute multiples commands for config Mullvad as you can see after the user connected to the Network.

By the way can someone explain me how to create a custom systemd services script running in the background ?

Thanks you for any help :slight_smile: