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

documentation: add remote repo inclusion recipe (as preferred installation method?) #75

Open
ppenguin opened this issue Mar 9, 2021 · 0 comments

Comments

@ppenguin
Copy link

ppenguin commented Mar 9, 2021

As a nix noob I (unnecessarily) struggled with this one, although it's arguably the most logical use case to directly start using nixcloud: a "zero install" method by just referring to the remote repo in the .nix file using nixcloud.

I.e. I would have expected that a solution that does the below is actually documented as the first and preferred "installation" method, since it makes the most sense for remote declarative deployments.

After some trial and horror I ended up with:

{
  imports = [ "${fetchGit https://github.com/nixcloud/nixcloud-webservices}/modules/" ];
  nixcloud.tests.enable = false;
  # only now can you start using nixcloud.... options
}

which arguably doesn't support referring to a specific tag or commit and would therefore be less robust upon rebuilds.

An alternative which also appeared to work is the following, which doesn't have the above problem but is much more convoluted (it could maybe be simplified?):

  let
    ncws = (import <nixpkgs> {}).fetchFromGitHub {
          owner = "nixcloud";
          repo = "nixcloud-webservices";
          rev = "7e421fed1cb6dc460468d5917bb93b559606c7b6";
          sha256 = "sha256:0y3kpajq10ixh5xnijfsq2aqpf9f7yij5bxl7ynh3n9dj44ksflb";
    };
  in {
    imports = [ "${ncws}" {} ];
    nixcloud.tests.enable = false;
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

1 participant