!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

886 Members
177 Servers

Load older messages


SenderMessageTime
20 Nov 2021
@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
@balsoft:balsoft.rubalsoft I didn't know you could even do imports in the home-manager nixos module :D 19:07:40
@balsoft:balsoft.rubalsoftApparently I'm some years behind on this19:07:55
@artemist:artem.istartemist 🏳️‍⚧️ Okay, got it. You need to set home-manager.extraSpecialArgs and I was setting home-manager.users.artemis.extraSpecialArgs 19:09:47
@tomberek:matrix.orgtomberek

What would people think of having a "arg" type for flake arguments. Imagine

{ 
inputs.someArg = { type = "arg"; default = "defaultValue"; description="A thing"; };
outputs = { self, someArg, ...
 }
nix build .#someOutput --someArg anotherValue
would be equivalent to
nix build .#someOutput --override-input someArg "arg://anotherValue"
and
nix flake metadata
Inputs:
---- someArg: arg://defaultValue
...

It can be achieved with a path or dedicated git repo right now, but that's almost too much redirection for simple values/parameters. eg: echo anotherValue > f; nix build .#someOutput --override-input someArg path:$PWD/f

22:47:45
22 Nov 2021
@cdepillabout:matrix.orgcdepillabout
In reply to @tomberek:matrix.org

What would people think of having a "arg" type for flake arguments. Imagine

{ 
inputs.someArg = { type = "arg"; default = "defaultValue"; description="A thing"; };
outputs = { self, someArg, ...
 }
nix build .#someOutput --someArg anotherValue
would be equivalent to
nix build .#someOutput --override-input someArg "arg://anotherValue"
and
nix flake metadata
Inputs:
---- someArg: arg://defaultValue
...

It can be achieved with a path or dedicated git repo right now, but that's almost too much redirection for simple values/parameters. eg: echo anotherValue > f; nix build .#someOutput --override-input someArg path:$PWD/f

That would be amazing. That's one of my big remaining issues with flakes: https://discourse.nixos.org/t/passing-options-to-flakes/7579
00:24:51
@cdepillabout:matrix.orgcdepillabout
In reply to @tomberek:matrix.org

What would people think of having a "arg" type for flake arguments. Imagine

{ 
inputs.someArg = { type = "arg"; default = "defaultValue"; description="A thing"; };
outputs = { self, someArg, ...
 }
nix build .#someOutput --someArg anotherValue
would be equivalent to
nix build .#someOutput --override-input someArg "arg://anotherValue"
and
nix flake metadata
Inputs:
---- someArg: arg://defaultValue
...

It can be achieved with a path or dedicated git repo right now, but that's almost too much redirection for simple values/parameters. eg: echo anotherValue > f; nix build .#someOutput --override-input someArg path:$PWD/f

* That would be amazing. Not being able to pass arguments one of my big remaining issues with flakes: https://discourse.nixos.org/t/passing-options-to-flakes/7579
00:25:31
@klaymore:klaymore.meklaymore joined the room.05:12:32
@klaymore:klaymore.meklaymore set a profile picture.05:15:16
@cdepillabout:matrix.orgcdepillabout * That would be amazing. Not being able to pass arguments is one of my big remaining issues with flakes: https://discourse.nixos.org/t/passing-options-to-flakes/7579 11:14:34
@roberthensing:matrix.orgRobert Hensing (roberth)
In reply to @tomberek:matrix.org

What would people think of having a "arg" type for flake arguments. Imagine

{ 
inputs.someArg = { type = "arg"; default = "defaultValue"; description="A thing"; };
outputs = { self, someArg, ...
 }
nix build .#someOutput --someArg anotherValue
would be equivalent to
nix build .#someOutput --override-input someArg "arg://anotherValue"
and
nix flake metadata
Inputs:
---- someArg: arg://defaultValue
...

It can be achieved with a path or dedicated git repo right now, but that's almost too much redirection for simple values/parameters. eg: echo anotherValue > f; nix build .#someOutput --override-input someArg path:$PWD/f

Add a self:// input and you can solve the system problem in a new and imho better way
16:37:57
@tomberek:matrix.orgtomberekI'll play with this idea a bit to see the pros/cons.16:48:51
23 Nov 2021
@server_stats:nordgedanken.devServer Stats Discoverer (traveler bot) left the room.02:59:33
@everything-narrative:matrix.orgKeel joined the room.08:44:44
@endomain:matrix.orgendomain joined the room.20:57:00
24 Nov 2021
@theophane:hufschmitt.netThéophane joined the room.12:30:41
@theophane:hufschmitt.netThéophane
In reply to @tomberek:matrix.org

What would people think of having a "arg" type for flake arguments. Imagine

{ 
inputs.someArg = { type = "arg"; default = "defaultValue"; description="A thing"; };
outputs = { self, someArg, ...
 }
nix build .#someOutput --someArg anotherValue
would be equivalent to
nix build .#someOutput --override-input someArg "arg://anotherValue"
and
nix flake metadata
Inputs:
---- someArg: arg://defaultValue
...

It can be achieved with a path or dedicated git repo right now, but that's almost too much redirection for simple values/parameters. eg: echo anotherValue > f; nix build .#someOutput --override-input someArg path:$PWD/f

I was actually looking at this old PR of mine, and I think this would be a very nice way to avoid the combinatorial explosion of available outputs
19:56:10
25 Nov 2021
@betaboon:0x80.ninjabetaboon is it possible to have multiple flake.nix within the same repo, eg in a monorepo-scenario? 13:10:13
@j-k:matrix.orgj-kyou can have separate flakes in subdirs. I imagine you could have a flake at the top that imports them all too but I've not seen it or tried it13:18:49
@mewp:nurupo.plmewp I don't think you would be able to use import at the top of a flake 13:31:06

Show newer messages


Back to Room ListRoom Version: 6