NorfairKing / bevel

Other
37 stars 3 forks source link

Delete unused argument which makes it break #3

Closed jappeace closed 11 months ago

jappeace commented 11 months ago

This makes it work according to the readme, soving this issue:

sudo nixos-rebuild switch
error: anonymous function at /nix/store/hs32mqyq84rmm0lsmngwcix8ds49kw1s-source/nix/nixos-module.nix:1:1 called without required argument 'bevel-api-server'

       at /linux-config/configuration.nix:10:5:

            9|   bevel-production = (
           10|     import (
             |     ^
           11|       builtins.fetchGit {
(use '--show-trace' to show detailed location information)
building Nix...
error: anonymous function at /nix/store/hs32mqyq84rmm0lsmngwcix8ds49kw1s-source/nix/nixos-module.nix:1:1 called without required argument 'bevel-api-server'

       at /linux-config/configuration.nix:10:5:

            9|   bevel-production = (
           10|     import (
             |     ^
           11|       builtins.fetchGit {
(use '--show-trace' to show detailed location information)
building the system configuration...
error: anonymous function at /nix/store/hs32mqyq84rmm0lsmngwcix8ds49kw1s-source/nix/nixos-module.nix:1:1 called without required argument 'bevel-api-server'

       at /linux-config/configuration.nix:10:5:

            9|   bevel-production = (
           10|     import (
             |     ^
           11|       builtins.fetchGit {
(use '--show-trace' to show detailed location information)
jappeace commented 11 months ago

oh wait it's used :thinking:

jappeace commented 11 months ago

then I just don't know how to use the nixos module, it doesn't explain where to get bevel-api-server from: https://github.com/NorfairKing/bevel#nixos-integration-to-run-the-server

NorfairKing commented 11 months ago

@jappeace You use this flake output: https://github.com/NorfairKing/bevel/blob/d93e707633c0f8fe50e8f7d523036c317105b3af/flake.nix#L129

EDIT: err, I mean this one: https://github.com/NorfairKing/bevel/blob/d93e707633c0f8fe50e8f7d523036c317105b3af/flake.nix#L128C1-L128C1

jappeace commented 10 months ago

could you elobrate a bit more? I'm currently calling like this:

  bevel-production = (
    import (
      builtins.fetchGit {
        url = "https://github.com/NorfairKing/bevel";
        rev = "d93e707633c0f8fe50e8f7d523036c317105b3af"; # Put a recent commit hash here.
        ref = "master";
      } + "/nix/nixos-module.nix"
    ) { bevel-api-server = null; } { envname = "production"; }
  );

How do I set bevel-api-server to the flake output?

NorfairKing commented 10 months ago

@jappeace Not using flakes is not a use-case that's "officially" supported. You'll have to pass in the api server yourself if you want to do that and I'm not even sure how you would.

I'm also surprised that you are trying to set up a server. You don't need one to get started because there's community server. Of course it's a good idea for privacy reasons.