nixos/veilid: format with nixfmt-rfc-style

Changed files
+29 -34
nixos
modules
services
networking
+29 -34
nixos/modules/services/networking/veilid.nix
···
-
{ config, pkgs, lib, ... }:
+
{
+
config,
+
pkgs,
+
lib,
+
...
+
}:
with lib;
let
cfg = config.services.veilid;
···
settingsFormat = pkgs.formats.yaml { };
configFile = settingsFormat.generate "veilid-server.conf" cfg.settings;
-
in {
+
in
+
{
config = mkIf cfg.enable {
networking.firewall = mkIf cfg.openFirewall {
allowedTCPPorts = [ 5150 ];
···
before = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
restartTriggers = [ configFile ];
-
environment = { RUST_BACKTRACE = "1"; };
+
environment = {
+
RUST_BACKTRACE = "1";
+
};
serviceConfig = {
ExecStart = "${pkgs.veilid}/bin/veilid-server -c ${configFile}";
ExecReload = "${pkgs.coreutils}/bin/kill -s HUP $MAINPID";
···
};
users.groups.veilid = { };
-
environment = { systemPackages = [ pkgs.veilid ]; };
+
environment = {
+
systemPackages = [ pkgs.veilid ];
+
};
services.veilid.settings = { };
};
···
ipc_enabled = mkOption {
type = types.bool;
default = true;
-
description =
-
"veilid-server will respond to Python and other JSON client requests.";
+
description = "veilid-server will respond to Python and other JSON client requests.";
};
ipc_directory = mkOption {
type = types.str;
···
type = types.str;
default = "info";
example = "debug";
-
description =
-
"The minimum priority of system events to be logged.";
+
description = "The minimum priority of system events to be logged.";
};
};
terminal = {
···
type = types.str;
default = "info";
example = "debug";
-
description =
-
"The minimum priority of terminal events to be logged.";
+
description = "The minimum priority of terminal events to be logged.";
};
};
api = {
···
type = types.str;
default = "info";
example = "debug";
-
description =
-
"The minimum priority of api events to be logged.";
+
description = "The minimum priority of api events to be logged.";
};
};
};
···
type = types.listOf types.str;
default = [ ];
example = [ "APPM" ];
-
description =
-
"A list of capabilities to disable (for example, DHTV to say you cannot store DHT information).";
+
description = "A list of capabilities to disable (for example, DHTV to say you cannot store DHT information).";
};
};
protected_store = {
allow_insecure_fallback = mkOption {
type = types.bool;
default = true;
-
description =
-
"If we can't use system-provided secure storage, should we proceed anyway?";
+
description = "If we can't use system-provided secure storage, should we proceed anyway?";
};
always_use_insecure_storage = mkOption {
type = types.bool;
default = true;
-
description =
-
"Should we bypass any attempt to use system-provided secure storage?";
+
description = "Should we bypass any attempt to use system-provided secure storage?";
};
directory = mkOption {
type = types.str;
default = "${dataDir}/protected_store";
-
description =
-
"The filesystem directory to store your protected store in.";
+
description = "The filesystem directory to store your protected store in.";
};
};
table_store = {
directory = mkOption {
type = types.str;
default = "${dataDir}/table_store";
-
description =
-
"The filesystem directory to store your table store within.";
+
description = "The filesystem directory to store your table store within.";
};
};
block_store = {
directory = mkOption {
type = types.nullOr types.str;
default = "${dataDir}/block_store";
-
description =
-
"The filesystem directory to store blocks for the block store.";
+
description = "The filesystem directory to store blocks for the block store.";
};
};
network = {
···
bootstrap = mkOption {
type = types.listOf types.str;
default = [ "bootstrap.veilid.net" ];
-
description =
-
"Host name of existing well-known Veilid bootstrap servers for the network to connect to.";
+
description = "Host name of existing well-known Veilid bootstrap servers for the network to connect to.";
};
node_id = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
-
description =
-
"Base64-encoded public key for the node, used as the node's ID.";
+
description = "Base64-encoded public key for the node, used as the node's ID.";
};
};
dht = {
min_peer_count = mkOption {
type = types.number;
default = 20;
-
description =
-
"Minimum number of nodes to keep in the peer table.";
+
description = "Minimum number of nodes to keep in the peer table.";
};
};
upnp = mkOption {
type = types.bool;
default = true;
-
description =
-
"Should the app try to improve its incoming network connectivity using UPnP?";
+
description = "Should the app try to improve its incoming network connectivity using UPnP?";
};
detect_address_changes = mkOption {
type = types.bool;
default = true;
-
description =
-
"Should veilid-core detect and notify on network address changes?";
+
description = "Should veilid-core detect and notify on network address changes?";
};
};
};