mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
nixos/services.ferm: remove with lib;
This commit is contained in:
parent
abc0a6e035
commit
17f8650ace
@ -1,7 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.ferm;
|
||||
|
||||
@ -17,9 +14,9 @@ let
|
||||
in {
|
||||
options = {
|
||||
services.ferm = {
|
||||
enable = mkOption {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Whether to enable Ferm Firewall.
|
||||
*Warning*: Enabling this service WILL disable the existing NixOS
|
||||
@ -27,17 +24,17 @@ in {
|
||||
considered at the moment.
|
||||
'';
|
||||
};
|
||||
config = mkOption {
|
||||
config = lib.mkOption {
|
||||
description = "Verbatim ferm.conf configuration.";
|
||||
default = "";
|
||||
defaultText = literalMD "empty firewall, allows any traffic";
|
||||
type = types.lines;
|
||||
defaultText = lib.literalMD "empty firewall, allows any traffic";
|
||||
type = lib.types.lines;
|
||||
};
|
||||
package = mkPackageOption pkgs "ferm" { };
|
||||
package = lib.mkPackageOption pkgs "ferm" { };
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
config = lib.mkIf cfg.enable {
|
||||
systemd.services.firewall.enable = false;
|
||||
systemd.services.ferm = {
|
||||
description = "Ferm Firewall";
|
||||
|
Loading…
Reference in New Issue
Block a user