Load language settings from the config

This commit is contained in:
Manuel Thalmann 2024-07-09 02:22:12 +02:00
parent a9108dd12c
commit 73d72c569e
4 changed files with 22 additions and 7 deletions
scripts/Common/Scripts

View file

@ -0,0 +1,5 @@
#!/bin/env fish
function getConfig -S -a property
. "$(status dirname)/eval-module.fish"
evalModule "$CONFIG_MODULE" "$property" $argv[2..]
end

View file

@ -0,0 +1,5 @@
#!/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..]
end