mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
nixos/fireqos: modernize
This commit is contained in:
parent
7ed1bb9467
commit
c91e47f589
1 changed files with 12 additions and 14 deletions
|
@ -1,21 +1,19 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.services.fireqos;
|
||||
fireqosConfig = pkgs.writeText "fireqos.conf" "${cfg.config}";
|
||||
in {
|
||||
fireqosConfig = pkgs.writeText "fireqos.conf" cfg.config;
|
||||
in
|
||||
{
|
||||
options.services.fireqos = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
If enabled, FireQOS will be launched with the specified
|
||||
configuration given in `config`.
|
||||
'';
|
||||
};
|
||||
enable = lib.mkEnableOption "FireQOS";
|
||||
|
||||
config = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
type = lib.types.lines;
|
||||
example = ''
|
||||
interface wlp3s0 world-in input rate 10mbit ethernet
|
||||
class web commit 50kbit
|
||||
|
@ -26,7 +24,7 @@ in {
|
|||
match tcp ports 80,443
|
||||
'';
|
||||
description = ''
|
||||
The FireQOS configuration goes here.
|
||||
The FireQOS configuration.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue