nixops-aws
nixops-aws copied to clipboard
How do you use the s3 remote backend?
I've tried using the s3 remote backend below
network.storage.s3 = {
profile = "root";
region = "us-east-1";
bucket = "main-nixops-state";
key = "personal.nixops";
kms_keyid = "166c5cbe-b827-4105-bdf4-a2db9b52efb4";
};
however when deploying on nixopsUnstable, I get
The network requires the 's3' state provider, but no plugin provides it.
I've found no documentation on how to fix this.
My question is how does one exactly install the s3 plugin? And does anyone have an example config I could reference?
I am kind of in the same boat as you so it's just a guess but probably you should use nixops.packages."${system}".nixops-aws # nixops with plugins
from nixops.url = "github:lukebfox/nixops-plugged"; to have nixops and its aws plugin.
nixpkgs also has a nixopsUnstable that includes most plugins. If something is missing from there, you can ping me for a review and merge.
looks like it is now called nixops_unstable on unstable
@roberth
It still appears as missing even with nixops_unstable on nixpkgs-unstable
Then this seems to be an issue with the aws plugin.
I'm having the same issue using a flake-based deployment.
Initial cursory investigation: NixopsAWSPlugin does not override storage_backends in nixops_aws/plugin.py, and so no s3 plugin is found when nixops assembles its list of storage backends here. The "fix" is to set storage_backends to return a dict containing the s3 bucket storage backend.
…however—and this may be my lack of sleep / familiarity with the codebase talking—I cannot find an implementation of a StorageBackend in this repo.