| 16 Jan 2022 |
balsoft | It's just that they often are wanted together | 20:45:20 |
anderscs | 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). | 20:47:48 |
| 17 Jan 2022 |
j-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 | 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 | Because 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 | I can see a situation where due to licensing reasons you can't distribute derivation X, but can distribute derivation Y that depends on X | 10:29:43 |
| 18 Jan 2022 |
| rajivr joined the room. | 03:35:47 |
| 19 Jan 2022 |
| liketechnik (he/him) joined the room. | 17:33:49 |
| liketechnik (he/him) changed their display name from liketechnik to liketechnik (he/him). | 22:10:28 |
| liketechnik (he/him) set a profile picture. | 22:10:37 |
| 20 Jan 2022 |
| andi- left the room. | 00:09:23 |
| 21 Jan 2022 |
edrex | Oof, papercuts https://github.com/NixOS/nixpkgs/issues/97855 | 23:26:44 |
edrex | Anyone 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 | 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 | teutat3s: so i need to add https://github.com/divnix/devos/tree/283f6b255e4371c13c0f4dd9320f56613b49cb86/lib/compat to my config? | 23:30:38 |
teutat3s | yeah it uses https://github.com/edolstra/flake-compat under the hood | 23:30:57 |
edrex | i'm thinking to give devos a go anyway | 23:31:03 |
edrex | hoping it will reduce the pain/gain ratio a bit | 23:31:25 |
| 23 Jan 2022 |
| cgroves joined the room. | 22:10:25 |
| 24 Jan 2022 |
Thé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 | 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 | wouldn't that just be system? | 18:27:14 |
mewp | oh, that's not ibside the function | 18:27:36 |
mewp | * oh, that's not inside the function | 18:27:44 |
Théophane | flyx: Might be a better option, but in the worst case you can use config.nixpkgs.system | 18:31:17 |
tomberek | 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 | 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 | 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 | 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 | perhaps signing eval cache entries with the signing-key? That makes them more distributable as well! | 22:47:23 |