8 cfg = config.services.fireqos;
9 fireqosConfig = pkgs.writeText "fireqos.conf" cfg.config;
12 options.services.fireqos = {
13 enable = lib.mkEnableOption "FireQOS";
15 config = lib.mkOption {
16 type = lib.types.lines;
18 interface wlp3s0 world-in input rate 10mbit ethernet
19 class web commit 50kbit
20 match tcp ports 80,443
22 interface wlp3s0 world-out input rate 10mbit ethernet
23 class web commit 50kbit
24 match tcp ports 80,443
27 The FireQOS configuration.
32 config = lib.mkIf cfg.enable {
33 systemd.services.fireqos = {
34 description = "FireQOS";
35 after = [ "network.target" ];
36 wantedBy = [ "multi-user.target" ];
39 RemainAfterExit = true;
40 ExecStart = "${pkgs.firehol}/bin/fireqos start ${fireqosConfig}";
42 "${pkgs.firehol}/bin/fireqos stop"
43 "${pkgs.firehol}/bin/fireqos clear_all_qos"