!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

888 Members
178 Servers

Load older messages


SenderMessageTime
22 Sep 2021
@edrex:matrix.orgedrexas a new user trying to do things purely with flakes, i'm in an awkward position with the documentation20:38:18
@edrex:matrix.orgedrexon one hand, legacy docs like nix pills are foundational20:38:35
@edrex:matrix.orgedrexon the other, they are, in practical terms, largely irrelevant with nixFlakes20:39:37
@edrex:matrix.orgedrexso I have skimmed them but I miss a lot of foundation that way/20:40:01
@balsoft:balsoft.rubalsoft
In reply to @edrex:matrix.org
i'm trying to install nixGL with nixUnstable. There's a big issue thread discussing what to do about flakes there. Am I missing something in thinking a short term solution is just introducing an impure flake and instructing users to pass --impure to nix profile install? https://github.com/guibou/nixGL/issues/16#issuecomment-925300321
Could you tl;dr on what the problem is?
20:40:07
@tomberek:matrix.orgtomberekUnderstood, flakes are not completely done, nor have they moved out of experimental status. So you are in a bit of an awkward moment. I would like to re-do "nix pills" with flakes and nix2.4 cli at some point.20:40:21
@tomberek:matrix.orgtomberekyes, short term solution is "--impure"20:40:49
@edrex:matrix.orgedrex@balsoft you mean for the nixGL project, or for me trying to consume it as it is? (assuming the former)20:41:03
@balsoft:balsoft.rubalsoft
In reply to @edrex:matrix.org
on the other, they are, in practical terms, largely irrelevant with nixFlakes
Most of nix pills are still very relevant with flakes
20:41:29
@edrex:matrix.orgedrexi gather it does some install-time introspection on your system to figure out what graphics drivers you are using20:41:47
@balsoft:balsoft.rubalsoft
In reply to @edrex:matrix.org
i gather it does some install-time introspection on your system to figure out what graphics drivers you are using
Oh, that sounds impure by design then
20:42:02
@edrex:matrix.orgedrexi'm honestly not sure tho20:42:18
@edrex:matrix.orgedrexi will try to make an impure flake for it and install that way20:42:50
@balsoft:balsoft.rubalsoftI guess it would be nicer if it was possible to specify what hardware you need declaratively20:43:36
@balsoft:balsoft.rubalsoft And perhaps add an auto-detector thing that would work similar to hardware-configuration.nix 20:43:53
@balsoft:balsoft.rubalsoft * And perhaps add an auto-detector thing that would work similar to nixos-generate-config --show-hardware-configuration 20:44:18
@edrex:matrix.orgedrex
In reply to @tomberek:matrix.org
Understood, flakes are not completely done, nor have they moved out of experimental status. So you are in a bit of an awkward moment. I would like to re-do "nix pills" with flakes and nix2.4 cli at some point.
yeah, i think that's what's needed. and yeah, i knew what awkwardness I was diving into. My intention is/was to provide some early product testing, which means I need to complain in useful ways/volumes
20:45:08
@edrex:matrix.orgedrex
In reply to @balsoft:balsoft.ru
And perhaps add an auto-detector thing that would work similar to nixos-generate-config --show-hardware-configuration
so it would do some runtime detection and use that to configure? somehow it seems like they also want to have all the possible binary graphics drivers as inputs. maybe they're not using the system drivers but matched copies? I'm not sure.
20:46:59
@edrex:matrix.orgedrexerr, "... and use that to produce a description of the local driver configuration which would be (pure) input to subsequent evaluation runs?"20:48:14
23 Sep 2021
@aciceri:nixos.devzrsk joined the room.23:37:35
@aciceri:nixos.devzrsk Hi!
Someone here knows a way to run nix flake check excluding some outputs? I would like to specify the excluded outputs directly in the cli.
The reason is that I want to be able to run that command on my machine which supports cross compilation but I want to exclude that outputs that need it when I run the command in a github workflow (where cross compilation is not supported and where I can't have an aarch64 host).
23:41:41
24 Sep 2021
@niksnut:matrix.orgniksnut
In reply to @aciceri:nixos.dev
Hi!
Someone here knows a way to run nix flake check excluding some outputs? I would like to specify the excluded outputs directly in the cli.
The reason is that I want to be able to run that command on my machine which supports cross compilation but I want to exclude that outputs that need it when I run the command in a github workflow (where cross compilation is not supported and where I can't have an aarch64 host).
Currently there isn't. I guess we could add an --exclude flag or something like that...
09:45:48
@balsoft:balsoft.rubalsoft
In reply to @niksnut:matrix.org
Currently there isn't. I guess we could add an --exclude flag or something like that...
Could we just add --only-eval-current-platform ? I think it would solve the most common issue (which is IFD in checkable outputs)
09:46:48
@aciceri:nixos.devzrsk

Maybe balsoft's solution is better since the only use case that comes to my mind is when the host's architecture is different, but I don't feel like I can express an opinion.

Any quick workaround to do what I'm trying to do instead? Maybe a sequence of nix check where I manually specifying what want to check?

10:23:23
@aciceri:nixos.devzrskHowever I found a discussione about this: https://github.com/NixOS/nix/issues/426510:24:05
@balsoft:balsoft.rubalsoft
In reply to @aciceri:nixos.dev

Maybe balsoft's solution is better since the only use case that comes to my mind is when the host's architecture is different, but I don't feel like I can express an opinion.

Any quick workaround to do what I'm trying to do instead? Maybe a sequence of nix check where I manually specifying what want to check?

What exactly are you trying to do?
10:24:43
@balsoft:balsoft.rubalsoftJust run checks for your platform?10:24:48
@balsoft:balsoft.rubalsoft If so, just nix build all of them 10:24:53
@aciceri:nixos.devzrsk

I'm trying to write a flake with the configurations of all my machines (using devos as template), included an aarch64 notebook. The problem is that when I run in the Github workflow nix flake check it tells me that "a 'aarch64-linux' with features {} is required to build blah blah..." and it stops.

Before adding the arm machine the workflow correctly worked.

10:35:54
@aciceri:nixos.devzrsk

The alternative would be to run several times nix build .#checks.x86_64-linux.<myCheck> with all the needed <myCheck>s. I see two problems:

  • The number of my checks could grow in time and I don't want to manually add these lines in the workflow yaml, is there a way to get a flake's outputs? Then with a little bit of shell fu I could obtain the correct nix build command to run.
  • According to the doc flake check not only builds the checks but also does checks that the flake's outputs are app definitions, nixos modules, overlays, etc... So it would'n be equivalent to just run a sequence of nix build
10:48:06

Show newer messages


Back to Room ListRoom Version: 6