From 4b117924f47f168945cf7296e6d7e2a70083ea8a Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Mon, 12 Jun 2023 16:41:22 -0400 Subject: [PATCH] Run nixpkgs-fmt --- flake.nix | 2 +- nix/process-compose/cli.nix | 6 +++--- nix/process-compose/default.nix | 6 +++--- nix/process-compose/settings/command.nix | 10 +++++----- nix/process-compose/settings/environment.nix | 8 ++++---- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/flake.nix b/flake.nix index 8bae56a..a19f928 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ outputs = _: { flakeModule = ./nix/flake-module.nix; - templates.default = { + templates.default = { description = "Example flake using process-compose-flake"; path = builtins.path { path = ./example; filter = path: _: baseNameOf path == "flake.nix"; }; }; diff --git a/nix/process-compose/cli.nix b/nix/process-compose/cli.nix index 15679eb..d227e8e 100644 --- a/nix/process-compose/cli.nix +++ b/nix/process-compose/cli.nix @@ -1,8 +1,8 @@ -{ config, lib, ... }: +{ config, lib, ... }: -let +let inherit (lib) types mkOption; -in +in { options = { port = mkOption { diff --git a/nix/process-compose/default.nix b/nix/process-compose/default.nix index a1dc808..fc7256d 100644 --- a/nix/process-compose/default.nix +++ b/nix/process-compose/default.nix @@ -1,8 +1,8 @@ -{ name, config, pkgs, lib, ... }: +{ name, config, pkgs, lib, ... }: -let +let inherit (lib) types mkOption; -in +in { imports = [ ./cli.nix diff --git a/nix/process-compose/settings/command.nix b/nix/process-compose/settings/command.nix index ef2c4af..05a58e3 100644 --- a/nix/process-compose/settings/command.nix +++ b/nix/process-compose/settings/command.nix @@ -4,9 +4,9 @@ args: lib.mkOption (args // { type = lib.types.either lib.types.package lib.types.str; apply = pkg: - if builtins.isString pkg - # process-compose is unreliable in handling environment variable, so let's - # wrap it in a bash script. - then lib.getExe (pkgs.writeShellApplication { inherit name; text = pkg; }) - else lib.getExe pkg; + if builtins.isString pkg + # process-compose is unreliable in handling environment variable, so let's + # wrap it in a bash script. + then lib.getExe (pkgs.writeShellApplication { inherit name; text = pkg; }) + else lib.getExe pkg; }) diff --git a/nix/process-compose/settings/environment.nix b/nix/process-compose/settings/environment.nix index da8486c..333b757 100644 --- a/nix/process-compose/settings/environment.nix +++ b/nix/process-compose/settings/environment.nix @@ -4,17 +4,17 @@ let inherit (types) nullOr either listOf str attrsOf; in lib.mkOption { - type = - nullOr + type = + nullOr (either (listOf str) (attrsOf str)); default = null; - example = { ABC="2221"; PRINT_ERR="111"; }; + example = { ABC = "2221"; PRINT_ERR = "111"; }; description = '' Attrset of environment variables. List of strings is also allowed. ''; apply = attrs: - if ! builtins.isAttrs attrs then attrs else + if ! builtins.isAttrs attrs then attrs else lib.mapAttrsToList (name: value: "${name}=${value}") attrs; }