mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-11 15:08:52 +03:00
nixos/services.epmd: remove with lib;
This commit is contained in:
parent
a09250d8ab
commit
6233a59db3
@ -1,15 +1,12 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.epmd;
|
||||
in
|
||||
{
|
||||
###### interface
|
||||
options.services.epmd = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable socket activation for Erlang Port Mapper Daemon (epmd),
|
||||
@ -17,10 +14,10 @@ in
|
||||
Erlang computations.
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "erlang" { };
|
||||
listenStream = mkOption
|
||||
package = lib.mkPackageOption pkgs "erlang" { };
|
||||
listenStream = lib.mkOption
|
||||
{
|
||||
type = types.str;
|
||||
type = lib.types.str;
|
||||
default = "[::]:4369";
|
||||
description = ''
|
||||
the listenStream used by the systemd socket.
|
||||
@ -32,7 +29,7 @@ in
|
||||
};
|
||||
|
||||
###### implementation
|
||||
config = mkIf cfg.enable {
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = [{
|
||||
assertion = cfg.listenStream == "[::]:4369" -> config.networking.enableIPv6;
|
||||
message = "epmd listens by default on ipv6, enable ipv6 or change config.services.epmd.listenStream";
|
||||
@ -60,5 +57,5 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
meta.maintainers = teams.beam.members;
|
||||
meta.maintainers = lib.teams.beam.members;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user