convert firewall service to new serviceDefn
this is a bit kludgey with dependencies, need to come back and look at that
This commit is contained in:
@@ -4,20 +4,11 @@
|
||||
, firewallgen
|
||||
, nftables
|
||||
}:
|
||||
{ ruleset }:
|
||||
let
|
||||
inherit (liminix.services) oneshot;
|
||||
inherit (liminix.lib) typeChecked;
|
||||
inherit (lib) mkOption types;
|
||||
t = {
|
||||
ruleset = mkOption {
|
||||
type = types.anything; # we could usefully define this more tightly
|
||||
description = "firewall ruleset";
|
||||
};
|
||||
};
|
||||
in
|
||||
params:
|
||||
let
|
||||
inherit (typeChecked "firewall" t params) ruleset;
|
||||
script = firewallgen "firewall.nft" ruleset;
|
||||
in oneshot {
|
||||
name = "firewall";
|
||||
|
Reference in New Issue
Block a user