!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

881 Members
179 Servers

Load older messages


SenderMessageTime
29 Jul 2021
@ambroisie:belanyi.frAmbroisie left the room.19:00:38
@papojari:artemislena.eupapojari 🏳️‍🌈
In reply to @elonsroadster:matrix.org
you can do: imports = [
home-manager.nixosModule
];
where am I supposed to put this
19:00:59
30 Jul 2021
@polykernel:kde.orgpolykernel

are let statements not allowed at the toplevel for flakes, for instance

let
# etc
in
{
02:25:37
@polykernel:kde.orgpolykernel *

are let statements not allowed at the toplevel for flakes, for instance

let
# etc
in
{
  # etc
}
02:25:48
@polykernel:kde.orgpolykernel *

are let statements not allowed at the toplevel for flakes, for instance

let
  # etc
in
{
  # etc
}
02:25:59
@polykernel:kde.orgpolykernel *

are let statements not allowed at the toplevel for flakes, for instance

let
  # etc
in
{
  inputs = {
     # etc
  };

  outputs = { self, ... }: {
     # etc
  };
}
02:35:30
@tomberek:matrix.orgtomberek polykernel: no, the top-level of flakes are restricted, as are some other constructs that would cause them to be more difficult to evaluate/cache 02:55:40
@tomberek:matrix.orgtomberek * polykernel: no, the top-level of flakes are restricted, as are some other constructs that would cause them to be more difficult to evaluate/cache (Refer: https://github.com/NixOS/nix/issues/3966#issuecomment-682497697 ) 03:04:10
@polykernel:kde.orgpolykernel thanks, I should of known this. I recall reading that computation is forbidden on metadata attributes(https://github.com/NixOS/nix/issues/4945#issuecomment-868572873), but it didn't occur to me at least somehow, it included the top level as well. 03:12:27
@polykernel:kde.orgpolykernel * thanks, I should of known this. I recall reading that computation is forbidden for metadata attributes(https://github.com/NixOS/nix/issues/4945#issuecomment-868572873), but it didn't occur to me at least somehow, it included the top level as well.03:12:38
@polykernel:kde.orgpolykernel * thanks, I should of known this. I recall reading that computation is forbidden for metadata attributes(https://github.com/NixOS/nix/issues/4945#issuecomment-868572873), but it somehow didn't occur to me it included the top level as well.03:12:55
@polykernel:kde.orgpolykernelso due to the evaluation constraint of flakes, if I want to do computation for inputs (i.e, dynamically generate inputs),I would have to write a generator for flake.nix using another nix expression?03:17:10
@tomberek:matrix.orgtomberekyes, or generate the file in some other way, then evaluate the flake once it is no longer dynamic03:17:52
@polykernel:kde.orgpolykernelI see, thanks for the help03:20:13
@dramforever:matrix.orgdramforever joined the room.08:41:42
31 Jul 2021
@yusdacra:nixos.devyusdacra changed their profile picture.17:18:04
1 Aug 2021
@polykernel:kde.orgpolykernelis there a way to call a flake within a nix expression, would I have to use builtins.getFlake?22:06:22
@elonsroadster:matrix.orgIvan MalisonSo I think I want to do something that would generally be regarded as a bad idea. I get that flakes are supposed to be as pure as possible, but I really want to be able to know what directory the flake is defined in, because I want to be able to talk about paths relative to that flake. The reason I want to do this is that I want to add to certain paths in my dotfiles to the global path environment variable. I realize that the nixy way to do this would be to actually add all of the relevant paths/scripts to the nix store and add them that way, but I don't want to have to explicitly rebuild to get new versions of all the scripts every time they are changed.22:17:08
2 Aug 2021
@colemickens:matrix.orgcolemickens 🏳️‍🌈I mean, you can't...?00:17:30
@elonsroadster:matrix.orgIvan Malison
In reply to @colemickens:matrix.org
I mean, you can't...?
even with --impure? Is there a way you can pass an argument to a flake
02:30:12
@colemickens:matrix.orgcolemickens 🏳️‍🌈 I guess you could do nix build --expr and pass it an expression where you're providing the path of where the scripts are. 04:12:25
@colemickens:matrix.orgcolemickens 🏳️‍🌈Not sure that's any better than just ... setting it via convention and then hard-coding it. Either way you're making an un-enforceable assumption.04:12:51
@colemickens:matrix.orgcolemickens 🏳️‍🌈Right? If you build that into the toplevel, nothing stops you from just... not cloning the scripts there and forgetting and putting it in the wrong place.04:13:56
@elonsroadster:matrix.orgIvan Malisoncouldn't i do something like builtins getEnv if I use --impure07:13:31
@elonsroadster:matrix.orgIvan Malisonno i guess that wont work, because the file will already be in the store07:26:41
@Las:matrix.orgLas
In reply to @elonsroadster:matrix.org
So I think I want to do something that would generally be regarded as a bad idea. I get that flakes are supposed to be as pure as possible, but I really want to be able to know what directory the flake is defined in, because I want to be able to talk about paths relative to that flake. The reason I want to do this is that I want to add to certain paths in my dotfiles to the global path environment variable. I realize that the nixy way to do this would be to actually add all of the relevant paths/scripts to the nix store and add them that way, but I don't want to have to explicitly rebuild to get new versions of all the scripts every time they are changed.
You don't have to do this
08:15:37
@Las:matrix.orgLasThat's a really bad solution honestly08:15:44
@Las:matrix.orgLasYou can just refer to the paths normally08:15:53
@Las:matrix.orgLas With " 08:15:58
@Las:matrix.orgLasJust don't depend on them being where the flake is08:16:17

There are no newer messages yet.


Back to Room ListRoom Version: 6