feat: add toYAML function
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
a572a13f04
commit
ab77c767b6
1 changed files with 11 additions and 0 deletions
|
@ -27,6 +27,17 @@ in {
|
||||||
options.arion = {
|
options.arion = {
|
||||||
enable = mkEnableOption (lib.mdDoc "My custom arion config layer module");
|
enable = mkEnableOption (lib.mdDoc "My custom arion config layer module");
|
||||||
|
|
||||||
|
# TODO: move this somewhere else
|
||||||
|
toYAML = mkOption {
|
||||||
|
type = types.anything;
|
||||||
|
readOnly = true;
|
||||||
|
default = name: attrs:
|
||||||
|
pkgs.runCommandCC name {} ''
|
||||||
|
echo '${builtins.toJSON attrs}' |
|
||||||
|
${pkgs.remarshal}/bin/remarshal --if json --of yaml > $out
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
rwDataDir = mkOption {
|
rwDataDir = mkOption {
|
||||||
default = "/var/lib/arion";
|
default = "/var/lib/arion";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
|
|
Loading…
Reference in a new issue