Implicitly produce raw output
This commit is contained in:
parent
42c7d24198
commit
7956df2e36
2 changed files with 8 additions and 2 deletions
|
@ -6,7 +6,7 @@ begin
|
|||
|
||||
set -q CONFIG_MODULE || set -l CONFIG_MODULE "$dir/config.nix"
|
||||
set -q ARCH_TIMEZONE || set -l ARCH_TIMEZONE "Europe/Zurich"
|
||||
set -q ARCH_MOUNT_ROOT || set -l ARCH_MOUNT_ROOT (getConfig valhalla.partition.rootDir --raw)
|
||||
set -q ARCH_MOUNT_ROOT || set -l ARCH_MOUNT_ROOT (getConfig valhalla.partition.rootDir)
|
||||
set -q ARCH_LANG || set -l ARCH_LANG en_US.UTF-8
|
||||
set -q ARCH_KEYMAP || set -l ARCH_KEYMAP de_CH-latin1
|
||||
set -q ARCH_X11_KEYMAP || set -l ARCH_X11_KEYMAP ch
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
#!/bin/env fish
|
||||
function evalModule --argument-names modulePath property
|
||||
set -l nixPkgs 'import <nixpkgs> { config = {}; overlay = []; }'
|
||||
nix eval --file "$modulePath" --apply "_: (($nixPkgs).lib.evalModules { modules = [ _ ]; }).config.$property" $argv[3..]
|
||||
set -l argv $argv[3..]
|
||||
|
||||
if not contains -- "--json" $argv
|
||||
set -a argv --raw
|
||||
end
|
||||
|
||||
set -l nixPkgs 'import <nixpkgs> { config = {}; overlay = []; }'
|
||||
nix eval --file "$modulePath" --apply "_: (($nixPkgs).lib.evalModules { modules = [ _ ]; }).config.$property" $argv
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue