#nixos

/

      • kalbasit
        s/Fixus/Fixes/
      • clever
        kalbasit: you can make it an argument to the package, that is boolean, and then override that from nixos
      • { stdenv, doHadexThing ? false, ... }:
      • and then in nixos, nixpkgs.overlays = [ (self: super: { something = super.something.override { doHadexThing = true; }; }) ];
      • kalbasit
        oh, so I can just send down the hostname instead? `{stdenv, myHostname ? "", ... }` correct?
      • clever
        you could also do that
      • kalbasit
        awesome
      • clever: do you have an example of that? haven't seen any yet
      • clever
        it would just be a variant of the example i just gave, with strings instead of bools
      • wpcarro joined the channel
      • kalbasit
        clever: I'm sorry for the confusion, but I meant to ask about passing down any variable from NixOS to Nixpkgs
      • not sure how to do that
      • magnetop` joined the channel
      • clever
        nixpkgs.overlays = [ (self: super: { something = super.something.override { hostname = config.networking.hostname; }; }) ];
      • wpcarro has quit
      • magnetophon has quit
      • ajs124 has left the channel
      • ajs124 joined the channel
      • kalbasit
        oh I see, now I see the difference between `override` and `overrideAttrs` as well. Thank you :)
      • cryptomonoid has quit
      • clever: heading off to bed, good night!
      • sigmundv joined the channel
      • hyper_ch2 joined the channel
      • zimbatm
        manveru: sounds good, I don't have any objections for removing the zlib toggle in ruby
      • jperras joined the channel
      • NOTICE: Channel nixpkgs-unstable advanced to https://github.com/NixOS/nixpkgs/commit/b3af2cd9627 (from 4 hours ago, history: https://channels.nix.gsc.io/nixpkgs-unstable)
      • nschoe joined the channel
      • manveru
        cool, i'll make a PR tonight if you don't get to it first :)
      • cryptomonoid joined the channel
      • crmlt has quit
      • crmlt joined the channel
      • nschoe
        Hi everyone, quick question: can I use multiple `-I nixpkgs=xxx` options in `nix-shell`?
      • toby1851 has quit
      • clever
        nschoe: you can use multiple -I's, but only one that sets nixpkgs= will take effect
      • nschoe
        okay no sorry, let me rephrase: I know I _can_, but how can I specify which package should use which -I option?
      • toby1851 joined the channel
      • clever, oh?
      • clever
        nschoe: you need to write your own nix expression, that imports the right paths
      • create a nix file with something like this:
      • graphene1 joined the channel
      • let pkgs1 = import /path/to/nixpkgs1 {}; pkgs2 = import /path/to/nixpkgs2 {}; in pkgs1.stdenv.mkDerivation { name = "name"; buildInputs = [ pkgs1.foo pkgs2.bar ]; }
      • then run nix-shell against that file
      • you can just skip -I entirely, and put the paths right into the file
      • ThatDocsLady joined the channel
      • nschoe
        clever, oh okay! Thanks I'll try do. Thank you.
      • graphene joined the channel
      • toby1851 has quit
      • adisbladis[m]
        What's a good way to go from a .drv to it's output paths?
      • NOTICE: [nixpkgs] @johanot opened pull request #43725 → nixos/kubernetes: Added missing dependency, awk, to kube-addon-manager path → https://git.io/fNGgI
      • The moment after I wrote that I realised `nix-store -q` is exactly what I want -.-
      • ldesgoui[m]
        system-units is failing to build because systemd-238 is missing example/systemd/system/system.slice, any way to fix this?
      • le_jonge
        does anyone have experience with "stackage2nix"? i tried to nix-build the wrapper there, but it compiles for hours and it looks like it actually compiles all the stackage packages instead of just building an index of them??
      • ldesgoui[m]
        Fails using nixpkgs-unstable and nixos-unstable
      • woffs read "unusable" for unstable :-D
      • haha. might as well just back-port the package i need, don't feel like fighting all of this :)
      • NOTICE: [nixpkgs] @srhb merged pull request #43725 → nixos/kubernetes: Added missing dependency, awk, to kube-addon-manager path → https://git.io/fNGgI
      • NOTICE: [nixpkgs] @srhb pushed 2 commits to master: https://git.io/fNGg9
      • Guanin_ has quit
      • kyren joined the channel
      • manveru
        le_jonge: yeah, it's really compiling all of hackage...
      • it's the reason i went with stack instead
      • clever
        manveru: try importing that file in nix repl
      • manveru: it may be an attrset, containing an attr for every single package
      • and since you didnt give it an attr, it builds all
      • manveru
        clever: you can tell le_jonge :)
      • i haven't done haskell in months
      • le_jonge
        manveru: generally i am happy with `stack2nix`. but then i am unable to change the nix expressions in a way that i have `ghcid` in my nix-shell environment, because stack2nix does some magic that i don't understand. i already opened an issue on the stack2nix github repo. besides that i wanted to play with stackage2nix.
      • clever
        le_jonge: add .env to the attribute and ghcid works fine
      • le_jonge
        but if stackage2nix is such an effort compiling everything from lts... i'd rather stick to stack2nix
      • crmlt has quit
      • humanoyd joined the channel
      • clever
        le_jonge: i use ghcid with stack2nix all the time
      • le_jonge
        clever: oh THAT is nice to hear. i guess i am doing it completely wrong. i have a line like `if pkgs.lib.inNixShell then drv.env else drv` but it does not include ghcid
      • crmlt joined the channel
      • clever
        le_jonge: nix-shell default.nix -A foo.env -> runhaskell Setup.hs configure ; ghcid -c "runhaskell Setup.hs repl"
      • le_jonge
        if i don't install ghcid system wide it won't work
      • clever
        ghcid is installed system wide, too much of a bother to override it into literally 100's of different derivations
      • le_jonge
        hm. my whole imagination of a nix project is "you just clone the repo and EVERYTHING YOU NEED is available in nix-shell"
      • otherwise i am again at "ok so for the following workflow you first need to install...."
      • and it's also not possible to say `nix-shell -p ghcid myproject.nix`, right?
      • clever
        le_jonge: -p cant be mixed with nix files
      • -p auto-generates a nix file and loads it
      • le_jonge
        right.
      • toby1851 joined the channel
      • i just want something like `if pkgs.lib.inNixShell then ( do something that adds ghcid and maybe other developer tools to the environment).env else drv`
      • clever
        le_jonge: i try to avoid pkgs.lib.inNixShell, it tends to just cause more confusion
      • trylist joined the channel
      • le_jonge
        it would be pretty cool to be able to do that even with a --pure shell. so is your opinion about that "it's not the right way" or "it's too complicated"?
      • clever
        for example, it makes it imposible to run `nix-build` inside a `nix-shell`
      • it automatically switches to the wrong derivation
      • le_jonge
        what is the usecase/reason for running nix-build in a nix-shell?
      • sphalerite
        yeah it's nicer to just have a separate attr for the dev environment
      • clever
        not wanting to close the nix-shell because re-opening causes a 2 hour recompile
      • le_jonge
        hm
      • sphalerite: a separate attr/nixfile would be also fine for me. i am happy if i can do `nix-shell --pure --something --something` and have ghcid available although i don't have it installed systemwide
      • clever
        le_jonge: you would need to create a new default.nix that overrides mkDerivation to add ghcid to every single package in your tree
      • crmlt
        anyone here uses enlightenment DE?
      • clever
        le_jonge: which also means rebuilding every single package
      • le_jonge: line 47 loads the stack2nix output, 51 passes it a set of overrides, and and 99 overwrites mkDerivation
      • le_jonge: and the new mkDerivation can append ghcid to the inputs
      • le_jonge
        clever: that sounds like a lot of work to just get another package in the PATH. is that really the only way?
      • clever
        le_jonge: you could maybe use mapAttrs in shell.nix, to mutate every single attribute, and do it in a shallow manner, so the deps arent modified
      • trylist has quit
      • le_jonge: this is why i just installed ghcid system wide
      • le_jonge: ghc itself is not installed, so i dont need --pure very often
      • le_jonge
        hm, i understand.
      • goibhniu joined the channel
      • crmlt has quit
      • silver joined the channel
      • knupfer joined the channel
      • NOTICE: [nixpkgs] @srhb opened pull request #43728 → Don't lose rbac submodule with no explicit options → https://git.io/fNGVQ
      • civodul joined the channel
      • Lisanna has quit
      • anderslu1dstedt has quit
      • wpcarro joined the channel
      • tobiasBora has quit
      • clever: in which repo is the sourcecode of nix-shell (or is nix-shell just a wrapper script around something), if i want to learn from it?
      • anderslundstedt joined the channel
      • clever
        le_jonge: nix-shell and nix-build are the exact same binary, both are in the nix repo
      • le_jonge
        thx
      • clever
        le_jonge: nix-build will check the value of argv[0] to decide what mode to run in
      • ckauhaus has quit
      • le_jonge
        oh nice this is even just a single file.
      • wpcarro has quit
      • worldofpeace joined the channel
      • cryptomonoid has quit
      • ericsagnes has quit
      • simukis joined the channel
      • NOTICE: [nixpkgs] @mredaelli closed pull request #42675 → fontin, fontinsans: init → https://git.io/f4dwX
      • Lisanna joined the channel
      • hyper_ch2
        anyone got a notebook recommendation for Nixos that has long battery life?
      • srhb
        hyper_ch2: I think the only Nix specific advice is "have enough space for your generations"
      • hyper_ch2
        driver support for wifi etc.
      • and I don't have many generations
      • no matter how much space I have, I'll run out of it shortly anyway
      • srhb
        I think driver support is mostly the same across all linux distributions.
      • Though obviously I'd avoid the broadcom madness if that's still a thing.
      • tobiasBora joined the channel
      • goibhniu
        I'd avoid anything with nvidia, since bumblebee doesn't work well on NixOS
      • srhb
        goibhniu: That does not mirror my experience.
      • goibhniu
        you have bumblebee working!?
      • srhb
        Yup, piece of cake.