nixops
nixops copied to clipboard
Global `deployment.keys.<name>.destDir`
deployment.storeKeysOnMachine was removed which means that the only real option is setting destDir for each key. Maybe that value can be restored with it just setting the default destDir for each key to /var/keys or similar? Or simple breaking compatibility and adding a deployment.defaultKeysDir?
You can achieve this with type-merging, although a more obvious solution would be nice. Something like this should work:
# nixops network defaults. You could do it for a single host instead if you prefer.
defaults = { ... }: {
# this is a nixos module
options = {
deployment.keys = lib.mkOption {
# this gets merged into the existing type
type = attrsOf (submodule ({ ... }: {
config.destDir = "/run/nixops-keys";
});
};
};
}