!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

811 Members
165 Servers

Load older messages


SenderMessageTime
18 Nov 2021
@scotttrinh:matrix.orgscotttrinh left the room.14:53:57
@scotttrinh:matrix.orgscotttrinh joined the room.14:54:11
@scotttrinh:matrix.orgscotttrinh set their display name to scotttrinh.19:00:16
@scotttrinh:matrix.orgscotttrinh set a profile picture.19:00:18
@austinp17:matrix.orgaustinp17 joined the room.21:06:00
19 Nov 2021
@skamdart:matrix.orgSkamDartIs it possible to build all outputs of a flake from nix build?01:41:11
@tomberek:matrix.orgtomberek

SkamDart: it's not pretty, but....

nix flake show --json | jq '[leaf_paths as $path | select(getpath($path) == "derivation") | {"key": $path | join(".") | sub(".type";""), "value": getpath($path)}] | from_entries | keys|.[]' -cr | xargs -I{} nix build .#{}
02:26:50
@ilkecan:matrix.orgilkecan
In reply to @skamdart:matrix.org
Is it possible to build all outputs of a flake from nix build?
If you can modify the flake, you can add the outputs you would like to be built under checks output and then run nix flake check. Note that some outputs might not supposed to be built.
09:33:07
@lovesegfault:matrix.orglovesegfaultHow can I get my flake to work in a repo that contains submodules?20:38:28
@lovesegfault:matrix.orglovesegfault Like, I have a top-level flake and a submoduel foo/bar/ but when I build the submodule is not there 20:38:50
@lovesegfault:matrix.orglovesegfault(inside the build sandbox, that is)20:38:55
@skamdart:matrix.orgSkamDartRad. Thanks folks!21:07:04
20 Nov 2021
@artemist:artem.istartemist 🏳️‍⚧️ joined the room.02:15:32
@artemist:artem.istartemist 🏳️‍⚧️ I have a repo with a few modules in it. Can I just do nixosModules.foo = ./foo.nix or do I need to wrap that in something? 02:55:22
@ilkecan:matrix.orgilkecan
In reply to @artemist:artem.ist
I have a repo with a few modules in it. Can I just do nixosModules.foo = ./foo.nix or do I need to wrap that in something?
That should work.
09:14:51
@ilkecan:matrix.orgilkecan or rather nixosModules.foo = import ./foo.nix 09:15:39
@nykw:tchncs.denykw joined the room.11:05:49
@j-k:matrix.orgj-k
In reply to @lovesegfault:matrix.org
Like, I have a top-level flake and a submoduel foo/bar/ but when I build the submodule is not there
Looks like it's not possible yet. https://github.com/NixOS/nix/issues/4423
Submodule support was merged and reverted
16:09:41
@j-k:matrix.orgj-k

Or maybe this works git+file://$(pwd)?submodules=1

https://github.com/NixOS/nix/pull/5434

16:10:41
@j-k:matrix.orgj-k could try ?submodules=1 on what you have 🤷 16:10:58
@lovesegfault:matrix.orglovesegfaultYeah, it just doesn't work21:00:29
@lovesegfault:matrix.orglovesegfaultI tried a bunch of ways21:00:32
21 Nov 2021
@artemist:artem.istartemist 🏳️‍⚧️ Does specialArgs only apply to modules directly referenced in the nixpkgs.lib.nixosSystem call? It seems like it's doing that for me and I'd like it to work recursively 18:47:48
@balsoft:balsoft.rubalsoft
In reply to @artemist:artem.ist
Does specialArgs only apply to modules directly referenced in the nixpkgs.lib.nixosSystem call? It seems like it's doing that for me and I'd like it to work recursively
No, it should work recursively
18:48:12
@balsoft:balsoft.rubalsoftHave a link to the code?18:48:20
@artemist:artem.istartemist 🏳️‍⚧️Oh, I think the issue is that it's being called from within home-manager18:48:45
@balsoft:balsoft.rubalsoftHm, I don't understand what you're doing then 🤔18:51:56
@artemist:artem.istartemist 🏳️‍⚧️Okay, my non-working changes are here: https://github.com/artemist/nixos-config/commit/2824907ab6b1c03e34b2a8c98d181779ce8b06df18:55:20
@artemist:artem.istartemist 🏳️‍⚧️ I get error: cannot coerce null to a string in <nixpkgs>/pkgs/stdenv/generic/make-derivation.nix:224:17 19:01:06
@balsoft:balsoft.rubalsoft
In reply to @artemist:artem.ist
Okay, my non-working changes are here: https://github.com/artemist/nixos-config/commit/2824907ab6b1c03e34b2a8c98d181779ce8b06df
Hm, interesting
19:07:18

There are no newer messages yet.


Back to Room ListRoom Version: 6