mirror of
https://github.com/Platonic-Systems/process-compose-flake.git
synced 2024-10-26 22:38:39 +03:00
Run nixpkgs-fmt
This commit is contained in:
parent
0d8b40edfa
commit
4b117924f4
@ -2,7 +2,7 @@
|
|||||||
outputs = _: {
|
outputs = _: {
|
||||||
flakeModule = ./nix/flake-module.nix;
|
flakeModule = ./nix/flake-module.nix;
|
||||||
|
|
||||||
templates.default = {
|
templates.default = {
|
||||||
description = "Example flake using process-compose-flake";
|
description = "Example flake using process-compose-flake";
|
||||||
path = builtins.path { path = ./example; filter = path: _: baseNameOf path == "flake.nix"; };
|
path = builtins.path { path = ./example; filter = path: _: baseNameOf path == "flake.nix"; };
|
||||||
};
|
};
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) types mkOption;
|
inherit (lib) types mkOption;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
port = mkOption {
|
port = mkOption {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{ name, config, pkgs, lib, ... }:
|
{ name, config, pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) types mkOption;
|
inherit (lib) types mkOption;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./cli.nix
|
./cli.nix
|
||||||
|
@ -4,9 +4,9 @@ args:
|
|||||||
lib.mkOption (args // {
|
lib.mkOption (args // {
|
||||||
type = lib.types.either lib.types.package lib.types.str;
|
type = lib.types.either lib.types.package lib.types.str;
|
||||||
apply = pkg:
|
apply = pkg:
|
||||||
if builtins.isString pkg
|
if builtins.isString pkg
|
||||||
# process-compose is unreliable in handling environment variable, so let's
|
# process-compose is unreliable in handling environment variable, so let's
|
||||||
# wrap it in a bash script.
|
# wrap it in a bash script.
|
||||||
then lib.getExe (pkgs.writeShellApplication { inherit name; text = pkg; })
|
then lib.getExe (pkgs.writeShellApplication { inherit name; text = pkg; })
|
||||||
else lib.getExe pkg;
|
else lib.getExe pkg;
|
||||||
})
|
})
|
||||||
|
@ -4,17 +4,17 @@ let
|
|||||||
inherit (types) nullOr either listOf str attrsOf;
|
inherit (types) nullOr either listOf str attrsOf;
|
||||||
in
|
in
|
||||||
lib.mkOption {
|
lib.mkOption {
|
||||||
type =
|
type =
|
||||||
nullOr
|
nullOr
|
||||||
(either (listOf str) (attrsOf str));
|
(either (listOf str) (attrsOf str));
|
||||||
default = null;
|
default = null;
|
||||||
example = { ABC="2221"; PRINT_ERR="111"; };
|
example = { ABC = "2221"; PRINT_ERR = "111"; };
|
||||||
description = ''
|
description = ''
|
||||||
Attrset of environment variables.
|
Attrset of environment variables.
|
||||||
|
|
||||||
List of strings is also allowed.
|
List of strings is also allowed.
|
||||||
'';
|
'';
|
||||||
apply = attrs:
|
apply = attrs:
|
||||||
if ! builtins.isAttrs attrs then attrs else
|
if ! builtins.isAttrs attrs then attrs else
|
||||||
lib.mapAttrsToList (name: value: "${name}=${value}") attrs;
|
lib.mapAttrsToList (name: value: "${name}=${value}") attrs;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user