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

Flakes support? #9

Closed
Qubasa opened this issue Jan 9, 2022 · 7 comments
Closed

Flakes support? #9

Qubasa opened this issue Jan 9, 2022 · 7 comments

Comments

@Qubasa
Copy link

Qubasa commented Jan 9, 2022

Hi there,

I wanted to ask if there are plans to adopt flakes support?
That would be really awesome!

Cheers

@dylex
Copy link
Member

dylex commented Jan 10, 2022

nix flakes definitely seem like a nice idea and would fit well. I know @dguibert has done some work on this with #8, though I haven't looked too closely at it yet. I was sort of waiting until they became less experimental (specifically made it into a stable nix release on a stable nixpkgs release) before looking at switching over to them.

@dguibert
Copy link
Contributor

Hi,
@luis-hebendanz you could use my PR to test the flake support.
@dylex the flake support is pretty stable but still marked as experimental, you can view it as a declarative definition of NIX_PATH or channels.

@Qubasa
Copy link
Author

Qubasa commented Jan 11, 2022

@dguibert Awesome! I will try it out!

@Qubasa Qubasa closed this as completed Jan 11, 2022
@Qubasa
Copy link
Author

Qubasa commented Jan 12, 2022

@dguibert How do I import that into a nixos flake configuration? I tried

inputs.nixpack.url = "github:dguibert/nixpack/dg/flake";

outputs = {self, nixpack}: {
        nixosConfigurations.my-desktop = nixpkgs.lib.nixosSystem {
            system = "x86_64-linux";
          ({ ... }: {
          nixpkgs.config = {
            allowUnfree = true;
            packageOverrides = pkgs:
            {
              nixpack = import (nixpack.packages)
              {
                system = "x86_64-linux";
              };
            }
           }
         }
     }
}

@dguibert
Copy link
Contributor

@dguibert How do I import that into a nixos flake configuration

Which issue do you face? See my PR description, the options --impure --option sandbox false are required.

To use it, I assume that into environment.systemPackages, you can put nixpack.pkgs.$package but this will use the basic nixosPack defined into the flake.

@dguibert
Copy link
Contributor

I see, try using nixpack = nixpack.packages.x86_64-linux;

@Qubasa
Copy link
Author

Qubasa commented Jan 12, 2022

@dguibert Thanks, that was it!

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

3 participants