nix-editor
nix-editor copied to clipboard
multiple updates
Something along the lines of:
nix-editor [OPTIONS] <FILE> [<ATTRIBUTE> [--val <VAL>]]...
nix-editor file.nix name1 --val 0 name2 --val 2
or even perhaps take a json?
{
"name1": 0,
"name2": 2
}
Ever since 0bd160e71b1b83df5ab20642448bb0b16dd82eef writing multiple values in the following form has been possible:
nix-editor ./file.nix something -v '{ a = 2; b = 2; }'
I'm thinking from there running something similar without a value could work, say
nix-editor ./file.nix --somearg '{ a = 2; b = 2; }'
would add a = 2 and b = 2 to the nix file