diff options
author | Robin Gloster <mail@glob.in> | 2016-01-06 06:50:18 +0000 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2016-01-07 06:39:06 +0000 |
commit | 88292fdf09960e9cb8e3c063a6b95ac4284222ec (patch) | |
tree | 34ff267ed7bacf9fd906b1736476b431e9afe909 /nixos/modules/services/networking/gvpe.nix | |
parent | af50b03f50d88954e98018c7c18c0581928b7165 (diff) | |
download | nixpkgs-88292fdf09960e9cb8e3c063a6b95ac4284222ec.tar nixpkgs-88292fdf09960e9cb8e3c063a6b95ac4284222ec.tar.gz nixpkgs-88292fdf09960e9cb8e3c063a6b95ac4284222ec.tar.bz2 nixpkgs-88292fdf09960e9cb8e3c063a6b95ac4284222ec.tar.lz nixpkgs-88292fdf09960e9cb8e3c063a6b95ac4284222ec.tar.xz nixpkgs-88292fdf09960e9cb8e3c063a6b95ac4284222ec.tar.zst nixpkgs-88292fdf09960e9cb8e3c063a6b95ac4284222ec.zip |
jobs -> systemd.services
Diffstat (limited to 'nixos/modules/services/networking/gvpe.nix')
-rw-r--r-- | nixos/modules/services/networking/gvpe.nix | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/nixos/modules/services/networking/gvpe.nix b/nixos/modules/services/networking/gvpe.nix index c633ffedef4..27b64b5bb95 100644 --- a/nixos/modules/services/networking/gvpe.nix +++ b/nixos/modules/services/networking/gvpe.nix @@ -37,13 +37,6 @@ let ''; executable = true; }); - - exec = "${pkgs.gvpe}/sbin/gvpe -c /var/gvpe -D ${cfg.nodename} " - + " ${cfg.nodename}.pid-file=/var/gvpe/gvpe.pid" - + " ${cfg.nodename}.if-up=if-up" - + " &> /var/log/gvpe"; - - inherit (cfg) startOn stopOn; in { @@ -55,18 +48,6 @@ in Whether to run gvpe ''; }; - startOn = mkOption { - default = "started network-interfaces"; - description = '' - Condition to start GVPE - ''; - }; - stopOn = mkOption { - default = "stopping network-interfaces"; - description = '' - Condition to stop GVPE - ''; - }; nodename = mkOption { default = null; description ='' @@ -122,10 +103,10 @@ in }; }; config = mkIf cfg.enable { - jobs.gvpe = { + systemd.services.gvpe = { description = "GNU Virtual Private Ethernet node"; - - inherit startOn stopOn; + after = [ "network-interfaces.target" ]; + wantedBy = [ "multi-user.target" ]; preStart = '' mkdir -p /var/gvpe @@ -136,9 +117,12 @@ in cp ${ifupScript} /var/gvpe/if-up ''; - inherit exec; + script = "${pkgs.gvpe}/sbin/gvpe -c /var/gvpe -D ${cfg.nodename} " + + " ${cfg.nodename}.pid-file=/var/gvpe/gvpe.pid" + + " ${cfg.nodename}.if-up=if-up" + + " &> /var/log/gvpe"; - respawn = true; + serviceConfig.Restart = "always"; }; }; } |