!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

899 Members
186 Servers

Load older messages


SenderMessageTime
16 Jan 2022
@balsoft:balsoft.rubalsoftIt's just that they often are wanted together20:45:20
@anderscs:matrix.organderscsNix should do this automatically. When loading a new source into the store it should not try to substitute derivations dependent on it (with maybe some smart exceptions). 20:47:48
17 Jan 2022
@j-k:matrix.orgj-k
In reply to @alxanyae:matrix.org

If anyone else has this problem, I solved it with the following configuration option:

nix.registry."nixpkgs" = {
    from = { id = "nixpkgs"; type = "indirect"; };
    flake = nixpkgs;
};
mkRegistry = attrs: lib.mapAttrs (_: flake: { inherit flake; }) attrs;
registry = mkRegistry { inherit nixpkgs home-manager nixpkgs-master nur other-things-etc; };

this also works

09:03:33
@balsoft:balsoft.rubalsoft
In reply to @anderscs:matrix.org
Nix should do this automatically. When loading a new source into the store it should not try to substitute derivations dependent on it (with maybe some smart exceptions).
Wait, why tho?
09:06:56
@anderscs:matrix.organderscsBecause there is no point substituting something that is never going to be cached. And would improve the speed and experience when using nix for development.10:27:23
@balsoft:balsoft.rubalsoftI can see a situation where due to licensing reasons you can't distribute derivation X, but can distribute derivation Y that depends on X10:29:43
18 Jan 2022
@rajivr:matrix.orgrajivr joined the room.03:35:47
19 Jan 2022
@liketechnik:matrix.imliketechnik (he/him) joined the room.17:33:49
@liketechnik:matrix.imliketechnik (he/him) changed their display name from liketechnik to liketechnik (he/him).22:10:28
@liketechnik:matrix.imliketechnik (he/him) set a profile picture.22:10:37
20 Jan 2022
@andi:kack.itandi- left the room.00:09:23
21 Jan 2022
@edrex:matrix.orgedrexOof, papercuts https://github.com/NixOS/nixpkgs/issues/9785523:26:44
@edrex:matrix.orgedrexAnyone know of a way to learn the value of a nixos option in a flakes-based system? maybe some debug helper?23:27:48
@teutat3s:pub.solarteutat3s edrex: does an alias like this work for you? https://github.com/divnix/devos/blob/283f6b255e4371c13c0f4dd9320f56613b49cb86/profiles/core/default.nix#L79 23:29:38
@edrex:matrix.orgedrex teutat3s: so i need to add https://github.com/divnix/devos/tree/283f6b255e4371c13c0f4dd9320f56613b49cb86/lib/compat to my config? 23:30:38
@teutat3s:pub.solarteutat3syeah it uses https://github.com/edolstra/flake-compat under the hood23:30:57
@edrex:matrix.orgedrexi'm thinking to give devos a go anyway23:31:03
@edrex:matrix.orgedrexhoping it will reduce the pain/gain ratio a bit23:31:25
23 Jan 2022
@cgroves:matrix.orgcgroves joined the room.22:10:25
24 Jan 2022
@theophane:hufschmitt.netThéophane edrex: coming a bit late, but you can also directly get it with nix eval <flake>#nixosConfigurations.<hostname>.config.<foo.bar> 07:52:53
@flyx:flyx.orgflyx

in a flake, how can I access the correct output package from a nixosModule output? e.g. given:

let
  systemDependent = utils.eachDefaultSystem(system: {  packages = {…}; });
in systemDependent // {
  nixosModule = {lib, pkgs, config, ...}:
  let
    pkg = systemDependent.packages.<???>.myPackage;
  in …;
}

how do I query the target system for <???>?

18:22:57
@mewp:nurupo.plmewp wouldn't that just be system? 18:27:14
@mewp:nurupo.plmewpoh, that's not ibside the function18:27:36
@mewp:nurupo.plmewp* oh, that's not inside the function18:27:44
@theophane:hufschmitt.netThéophane flyx: Might be a better option, but in the worst case you can use config.nixpkgs.system 18:31:17
@tomberek:matrix.orgtomberek random: I was playing with the eval cache earlier. Found you can edit the sqlite and trick nix build into creating a symlink for an unrelated drv. 21:13:44
@moritz.hedtke:matrix.orgmoritz.hedtke
In reply to @tomberek:matrix.org
random: I was playing with the eval cache earlier. Found you can edit the sqlite and trick nix build into creating a symlink for an unrelated drv.
is this security-relevant?
22:05:42
@tomberek:matrix.orgtomberek it's an instance of "cache poisoning". I guess you can do something like re-writing the ones expected to be sudo ./result/bin/thing in the future and thus get control over what is run. 22:42:01
@tomberek:matrix.orgtomberek but practically, there are probably easier ways to hijack what nix build does... i think there is a bit more we can do in verifying the contents. 22:45:09
@tomberek:matrix.orgtomberekperhaps signing eval cache entries with the signing-key? That makes them more distributable as well!22:47:23

There are no newer messages yet.


Back to Room ListRoom Version: 6