| 21 Nov 2021 |
balsoft | I didn't know you could even do imports in the home-manager nixos module :D | 19:07:40 |
balsoft | Apparently I'm some years behind on this | 19:07:55 |
artemist 🏳️‍⚧️ | Okay, got it. You need to set home-manager.extraSpecialArgs and I was setting home-manager.users.artemis.extraSpecialArgs | 19:09:47 |
tomberek | 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 | 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 | 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 joined the room. | 05:12:32 |
| klaymore set a profile picture. | 05:15:16 |
cdepillabout | * 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 |
Robert 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 | I'll play with this idea a bit to see the pros/cons. | 16:48:51 |
| 23 Nov 2021 |
| Server Stats Discoverer (traveler bot) left the room. | 02:59:33 |
| Keel joined the room. | 08:44:44 |
| endomain joined the room. | 20:57:00 |
| 24 Nov 2021 |
| Théophane joined the room. | 12:30:41 |
Thé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 | is it possible to have multiple flake.nix within the same repo, eg in a monorepo-scenario? | 13:10:13 |
j-k | you 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 it | 13:18:49 |
mewp | I don't think you would be able to use import at the top of a flake | 13:31:06 |
mewp | you can have them as inputs though | 13:31:13 |
Théophane | It’s possible to have inputs.otherFlake.url = "path:./subdir";. The only (but painful) issue is that you’ll need to run nix flake lock --update-input otherFlake everytime you modify subdir for the changes to be taken into account | 13:33:30 |
Théophane | (Alternatively always passing --override-input otherFlake ./subdir probably works too, but equally as invasive) | 13:34:25 |
betaboon | thanks for your input :) | 13:50:47 |
j-k | yeah I meant inputs | 14:36:53 |
betaboon | is it possible yet to define a binary-cache to use in a flake.nix? iirc that somehow worked but not on multi-user systems ? | 17:48:26 |
Théophane | In reply to @betaboon:0x80.ninja is it possible yet to define a binary-cache to use in a flake.nix? iirc that somehow worked but not on multi-user systems ? It should work in the latest master, but not in 2.4 | 17:49:58 |
betaboon | i think i found the PR: https://github.com/NixOS/nix/pull/5504 right? | 17:50:25 |
betaboon | thanks for letting me know. just had to revert to 2.4 earlier today tho, due to https://github.com/NixOS/nix/issues/5616 | 17:52:29 |
| uakci~ joined the room. | 20:41:49 |
| 26 Nov 2021 |
| pinpox joined the room. | 16:09:00 |