mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
nixos/services.epmd: remove with lib;
This commit is contained in:
parent
a09250d8ab
commit
6233a59db3
1 changed files with 7 additions and 10 deletions
|
@ -1,15 +1,12 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.services.epmd;
|
cfg = config.services.epmd;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
###### interface
|
###### interface
|
||||||
options.services.epmd = {
|
options.services.epmd = {
|
||||||
enable = mkOption {
|
enable = lib.mkOption {
|
||||||
type = types.bool;
|
type = lib.types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to enable socket activation for Erlang Port Mapper Daemon (epmd),
|
Whether to enable socket activation for Erlang Port Mapper Daemon (epmd),
|
||||||
|
@ -17,10 +14,10 @@ in
|
||||||
Erlang computations.
|
Erlang computations.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
package = mkPackageOption pkgs "erlang" { };
|
package = lib.mkPackageOption pkgs "erlang" { };
|
||||||
listenStream = mkOption
|
listenStream = lib.mkOption
|
||||||
{
|
{
|
||||||
type = types.str;
|
type = lib.types.str;
|
||||||
default = "[::]:4369";
|
default = "[::]:4369";
|
||||||
description = ''
|
description = ''
|
||||||
the listenStream used by the systemd socket.
|
the listenStream used by the systemd socket.
|
||||||
|
@ -32,7 +29,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
assertions = [{
|
assertions = [{
|
||||||
assertion = cfg.listenStream == "[::]:4369" -> config.networking.enableIPv6;
|
assertion = cfg.listenStream == "[::]:4369" -> config.networking.enableIPv6;
|
||||||
message = "epmd listens by default on ipv6, enable ipv6 or change config.services.epmd.listenStream";
|
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…
Add table
Add a link
Reference in a new issue