Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclear how to install plugins #1324

Open
jhillyerd opened this issue Apr 24, 2020 · 10 comments
Open

Unclear how to install plugins #1324

jhillyerd opened this issue Apr 24, 2020 · 10 comments
Assignees

Comments

@jhillyerd
Copy link

I don't find mention of how to install plugins in the README or the docs linked from there.

Assuming most new nixops users are going to want to try nixops with libvirtd or VirtualBox, this is a significant adoption blocker.

@jhillyerd
Copy link
Author

jhillyerd commented Apr 25, 2020

I've now a significant amount of time trying to figure out how to install plugins and have failed.

I'm guessing we need to use poetry given #1284 - but I'm not much of a Python developer.

Update: Some good info in #1256

Update 2: I've had some success by following the steps in nix-community/nixops-libvirtd#10

@bhipple
Copy link
Contributor

bhipple commented May 7, 2020

It would be nice if the readme had some documentaiton about how to build NixOps with a plugin, such as the NixOps AWS plugin.

CC @adisbladis @grahamc

@steve-chavez
Copy link
Member

I also was lost regarding plugins. But since the nixpkgs 20.03 release still uses nixops 1.7(no plugins?), I'm guessing we should stick to that.

@grahamc grahamc self-assigned this May 11, 2020
@grahamc
Copy link
Member

grahamc commented May 11, 2020

I've started writing some docs on this in a guide format, starting with the nixops-aws plugin.

@typetetris
Copy link

I've started writing some docs on this in a guide format, starting with the nixops-aws plugin.

It would be really awesome, if you were willing to share our ongoing efforts!

@typetetris
Copy link

typetetris commented Aug 10, 2020

Took @adisbladis work and try to stuff in some more plugins: https://github.com/typetetris/nixops-with-plugins

Maybe the boilerplate code from there should go back into poetry2nix.

@yajo
Copy link
Contributor

yajo commented Jul 5, 2022

My guess is that plugins should provide a flake.nix with an overlay that adds their required python packages.

Thus, one would use a flake.nix such as:

{
  inputs.nixops.url = github:NixOS/nixops;
  inputs.nixops-vbox.url = github:nix-community/nixops-vbox;
  outputs = {nixpkgs, nixops, nixops-vbox}:
    let 
      pkgs = import nixpkgs {
        system = "x86_64-linux";
        overlays = [nixops.overlays.default nixops-vbox.overlays.default];
      };
      nixops-full = pkgs.nixops.withPlugins(p: [p.nixops-vbox]);
    in {
      devShells.x86_64_linux.default = pkgs.mkShell {
        packages = [nixops-full];
      };
    };
}

This is just a proposal and it won't work as of today. Maybe something that reuses python.withPackages instead would be just enough.

The fact is that starting to use NixOps is close to impossible, with the mix of this issue and #1452.

@roberth
Copy link
Member

roberth commented Jul 5, 2022

I would recommend to use nixopsUnstable from Nixpkgs. It comes with most plugins installed, so you don't have to bother with poetry2nix yourself.

Nonetheless it would be good to document how to package a custom set of plugins.

@yajo
Copy link
Contributor

yajo commented Jul 5, 2022

That seems like a handy workaround. Sadly it's broken with both vbox and libvirtd plugins, so I cannot test it. See nix-community/nixops-libvirtd#29 and nix-community/nixops-vbox#28.

@yajo
Copy link
Contributor

yajo commented Jul 6, 2022

It seems https://github.com/lukebfox/nixops-plugged provides a sane way to install nixops 2.0, and includes the fix for the vbox plugin in lukebfox/nixops-plugged@24ede62.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants