From 5d45ddbfaa44d29eb6077153248806d73ceabde9 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 10 Mar 2023 22:36:47 +0100 Subject: surtr: bifrost dscp --- hosts/surtr/bifrost/default.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'hosts/surtr/bifrost') diff --git a/hosts/surtr/bifrost/default.nix b/hosts/surtr/bifrost/default.nix index bdedf5b6..ccf0c959 100644 --- a/hosts/surtr/bifrost/default.nix +++ b/hosts/surtr/bifrost/default.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ config, lib, pkgs, ... }: with lib; @@ -56,5 +56,17 @@ in { format = "binary"; sopsFile = ./surtr.priv; }; + + systemd.services."bifrost-dscp" = { + wantedBy = ["sys-subsystem-net-devices-bifrost.device"]; + after = ["sys-subsystem-net-devices-bifrost.device"]; + bindsTo = ["sys-subsystem-net-devices-bifrost.device"]; + + serviceConfig = { + Type = "oneshot"; + ExecStart = "${pkgs.preserve-dscp}/bin/preserve-dscp bifrost ens3"; + ExecStop = "${pkgs.preserve-dscp}/bin/preserve-dscp bifrost ens3 --unload"; + }; + }; }; } -- cgit v1.2.3