File tree Expand file tree Collapse file tree 2 files changed +20
-6
lines changed
nix/process-compose/settings Expand file tree Collapse file tree 2 files changed +20
-6
lines changed Original file line number Diff line number Diff line change 1919 # This adds a `self.packages.default`
2020 process-compose . "default" = {
2121 settings = {
22- environment = [
23- "DATAFILE=data.sqlite"
24- ] ;
25- processes = {
22+ environment = {
23+ DATAFILE = "data.sqlite" ;
24+ } ;
2625
26+ processes = {
2727 # Print a pony every 2 seconds, because why not.
2828 ponysay . command = ''
2929 while true; do
Original file line number Diff line number Diff line change 11{ lib , ... } :
2+ let
3+ inherit ( lib ) types ;
4+ inherit ( types ) nullOr either listOf str attrsOf ;
5+ in
26lib . mkOption {
3- type = lib . types . nullOr ( lib . types . listOf lib . types . str ) ;
7+ type =
8+ nullOr
9+ ( either ( listOf str ) ( attrsOf str ) ) ;
410 default = null ;
5- example = [ "ABC=2221" "PRINT_ERR=111" ] ;
11+ example = { ABC = "2221" ; PRINT_ERR = "111" ; } ;
12+ description = ''
13+ Attrset of environment variables.
14+
15+ List of strings is also allowed.
16+ '' ;
17+ apply = attrs :
18+ if ! builtins . isAttrs attrs then attrs else
19+ lib . mapAttrsToList ( name : value : "${ name } =${ value } " ) attrs ;
620}
You can’t perform that action at this time.
0 commit comments