2020-04-30

<clever> try stopping nm, and then just manually run it, something like: wpa_supplicant -s -u -Dnl80211,wext -c /etc/wpa_supplicant.conf -iwlp3s0
<Raito_Bezarius> journalctl -u networkmanager shows something interesting?
<Raito_Bezarius> I don't know if poetry is doing something wrong or classical pip difficulties or just TensorFlow maintainers which reinvented something again
<bqv> lewo: fwiw, i would do this myself, but every time i try and touch lispPackages it ends in something being on fire
<Raito_Bezarius> but is callPackage something that must be kept? :-°
<Raito_Bezarius> nothing that fancy :P ; but for some work, they didn't have proper private networking, so I tried to write something that put WireGuard as private networking layer with minimal assumptions and hardcoding
<{^_^}> attempt to call something which is not a function but a list, at (string):308:1

2020-04-29

<{^_^}> attempt to call something which is not a function but a list, at (string):308:1
<clever> Raito_Bezarius: most of my code to boot nixos in ram (kexec, multi-boot-helper, and others) is just grabbing that netboot kernel/initrd, and then booting it via something else
<clever> for something like OVH, use the api to force it into the netboot rescue console, then use the 1st func to kexec, and the 2nd to deploy
<Raito_Bezarius> i'm just getting again this "don't know how to unpack wheels" but that most likely due to something I don't understand and it's bit late
<Raito_Bezarius> except if I have missed something, those two package are supposedly the same
<Raito_Bezarius> adisbladis: okay got where I have done a mistake, stdenv.mkDerivation seems to wrap the derivation while fetchurl seems to return something akin to the drv.outPath, what should I use to pass for src?
<jumper149> Is there something like postBuildInputs which exposes these inputs only when a program is run? Like a nix-shell wrapper around the executable
<Raito_Bezarius> tikhon: that's something you do outside of Nix, I guess you can do it in Nix as part of some CI/Hydra stuff
<tikhon> I have a Python package I'm building with buildPythonPackage. How can I build something like a wheel that people could install with pip, without needing Nix?
<cole-h> adisbladis: Something prettier would be `hello.overrideAttrs ({ buildInputs ? [], ... }: { buildInputs = buildInputs ++ [ pkgs.jq ]; })` ;)
<adisbladis> Something along those lines
<infinisil> But I guess that's something that should be done too in such a mkPoetryApplicationEnv function
<Lumpio-> https://github.com/NixOS/nixpkgs/ has it been fully integrated here or something
<cole-h> emily: I think it'd be hard. Not having looked at its AST, does it even carry something that would denote a binary vs a builtin vs an erroneous string?
<adisbladis> Something something shell linker something
<emily> cole-h: I strongly recommend making the patch something you can automatically generate, even if it involves gnarly regexps
<Lumpio-> I guess I'll need to add the relevant packages as buildInputs or something
<adisbladis> Totally fine for testing, not something you'd want to use in production.
<Lumpio-> I already tried something very similar to this
<Lumpio-> Normally there should be a "build/Release" directory or something under it I suppose
<emily> adisbladis: I would love a repo with proper apparmor modules for nixos or something
<emily> Henson: that said, real VMs or something like gVisor do offer a lot more isolation than kernel namespaces in practice, and I don't think there's anything particularly great you can do there other than having pet NixOS VMs
<Lumpio-> So I get something that installs correctly but fails at runtime because, well, the .so files it expects to exist don't.
<Lumpio-> However I'm trying to get a stupid little node.js application to run and I just can't figure out how to make it work. The problem seems to be that it depends on something that includes native code.
<Henson> is there a more secure way to run NixOS containers? I see in the NixOS manual that the containers aren't perfectly isolated from the host system. Is there a way to use qemu or kvm or something instead of systemd nspawn containers?
<aanderse> or something
<aanderse> so most people likely aren't using cifs-utils straight up, they will use it as part of fileSystems or something
<aanderse> anyone use cifs-utils package from nixpkgs? getting a "This program is not installed setuid root" and feeling like i'm missing something obvious (like a security wrappers bit)
<emily> peelz: I know that I had to move from _module.args stuff to using specialArgs with nixos upstream a while back, so maybe this is something home-manager hasn't migrated yet, idk
<emily> peelz: ah, I haven't set home-manager up so maybe this is something I'll run into later
<emily> I don't really get what this (setFunctionArgs userFn) stuff is doing at all though, so maybe you're just doing something too fancy for me to understand :p
<emily> peelz: you already pass stuff via specialArgs which should plumb it down to the modules of your nixos configuration, but maybe i'm missing something additional you're trying to doh ere
<jumper149> When I use nix-env --upgrade, is that like pinning nixpkgs to a specific commit? So if I install something new with 'nix-env -iA nixpkgs.randomPackage' afterwards, is that from the same commit as the upgrade or maybe an even newer one?
<Alexey56> my hard, rerun nixos-install, which repeats the same messages from grub. Am I missing something simple?
<Setzer22__2> More specifically, I'd like to know what something like home-manager could do that I can't do by putting most of my /home under version control with e.g. git
<Setzer22__2> well, the thing is autoPatchElf did complain about missing libstdc++.. maybe I did something wrong?
<emily> presumably the ordering is keyed on something fairly reasonable (like, if it was just "lexicographic ordering first", then people would be booting ubuntu 19.xx after installing 20.xx, which doesn't sound right)
<emily> danielrf: I don't know if upstream changed this, or nixos does something weird to change the ordering, or (my guess, ngl) poettering just didn't check and is full of shit
<jakobrs> The neil mitchell guy (co-author) tweeted something about the "original Shake paper" and I was just unsure what was meant
<evanjs> emily: and thank you for that. the initial advice I got was "generally try to mitigate breakages as much as possible -- some breakages will be unrelated to your changes, and they can be left broken" -- but sometimes I need instructinos that are a bit more explicit, even if it's something dead simple :D
<numkem> gchristensen: I saw your video from the new york linux meeting last night and you mentionned you are booting bare metal hardware over pxe to make it do things, do you have something written on how you did it?
<{^_^}> [nixos-homepage] @garbas pushed to update-nixpkgs-on-cron « make sure update.sh fails when something wrong happens »: https://git.io/JfYOI
<LnL> note, there's something wrong with the data from status.nixos.org at the moment
<ramses_> makefu: because it sets up a docker swarm cluster running on nixos servers. Is this something that's supported by nixos config anyway? I don't see how to configure swarm, define services, etc
<ramses_> makefu: but I cannot specify something like nix run for ansible's python interpreter, I tried that, it only accepts an executable but no parameters
<vika_nezrimaya> something like this
<vika_nezrimaya> Oh noes looks like something's wrong with cache.nixos.org keys!
<ramses_> Hey guys, when I run "nix-env -iA nixos.python3Packages.docker" and then do "import docker" in a python REPL, it says module not found. Did I miss something? Am I not supposed to install python packages like this?
<bqv> to be fair, i am very excited to see what comes after nixos. i still consider this distro an experiment, something way better thought out and polished will come later, and learn from all the mistakes of nixos
<bqv> you're probably dumping an entire git repo into the store or something
<cole-h> worldofpeace: Only reason I pinged you was because you had merged something just before :P
<cole-h> I should just shell out for a buildslave or something
<bdju> nearly filed a package request for something that appears to be packaged because it didn't come up in my search. I wonder why the search fails me like this
<Jonathan69> I am trying figure out how to control QT themeing. I had something which was working somehow before I upgraded to NixOS 20.03.
<cole-h> Additionally, you may learn something from https://github.com/tazjin/nix-1p

2020-04-28

<Kyndig> apparently there's something more about a user's environment than just the store, that needs to match because after just importing the store paths directly, I got errors about missing nix/var/share paths
<MichaelRaskin> I would say that «doing something wrong» is about nix-env -iA (and even more so -i)
<bqv> generally a decent rule of thumb: if you're using nix-env, you're probably doing something wrong, or recovering from doing something wrong
<infinisil> As already said, this is not something one usually wants to do, in fact it's probably never the right thing to do
<Kyndig> it seems like this would be something that's done all the time
<infinisil> Well there is a way to install raw /nix/store paths with nix-env, but it's really not something you usually want to do
<nschoe> I did notice that there was a prefixed 'ar', (something with 'linux-gnu-aarch64' as a prefix in ${binutils}/bin/.
<bgamari> gchristensen, might be something to investigate
<nschoe> So presumably I have to patch something to replace ar with the ar from binutils. Now are you sure it's the 'binutils' and not -wrapped needed?
<the_pumpkin_man[> Anyway I just found a workaround by using something else, maybe I could do that one day, yes
<the_pumpkin_man[> Hello, is there a way ton configure something system wide even if it isn't implemented in NixOS ?
<etu> hyper_ch: I don't think it matters tbh when you have it all on a zfs volume, but it's something I've used to do in the past because spinning rust with ext4 may take time to mount etc. And then I didn't want mounts blocking the boot process since they weren't needed for the boot really.
<etu> hyper_ch: It will create a systemd automount unit for /root that has a placeholder filesystem "mounted" on /root that will trigger a the mount of /persistent/home/root on /root whenever something accesses /root
<xfix> let me check my own configuration, because i did something similar in a virtual machine
<kahiru_> seku: /etc gets indeed wiped. I put the configuration to a persistent mountpoint and then added something to configuration.nix to create symlinks in /etc/nixos pointing to the persistent location
<seku> kahiru_, thanks ill try that! just for my understanding, /etc/ gets wiped too, so configuration.nix as well? is it copied/rebuilt in the iniramfs or something like that?
<seku> noob here, been playing around a bit with gchristensen's idea of deleting / on every boot. It worked, but of course it deleted my users as well, so i can no longer log in xD. Parsing his configuration file, i saw that he stores them in secrets... somewhere. Is there something like a tutorial for that? :)
<deuloma> something like running nix-shell with config.use-stable-rust override
<pjt_014> It could still be in a state where dmesg can operate. Having something like dmesg -w > log.txt run while 'shutting down' would tell you if that's the case
<elvishjerricco> keithy[m]: I feel like there's gotta be something broken in your store
<elvishjerricco> xcmw: Then either you don't have a multi-user install or something killed the daemon
<elvishjerricco> xcmw: You may have run just one command long after installing with root or something
<xcmw> I feel like I didn't use sudo before and that this a something new
<elvishjerricco> Try nix-collect-garbage. Might clean up some funk that's breaking something? Shot in the dark

2020-04-27

<Henson> simpson: ok. I got the IR event thing to work with the kernel decoders, but some buttons weren't working. I was just wondering if I was missing something else that I should be using instead.
<simpson> Henson: There's a userspace IR stack, if you have something like a USB IR receiver, and it happens to be supported. But you're going to have a much better time by using the kernel-side drivers, IME.
<ornxka> that points to like /sw/opengl/nvidia/libglx.so or something
<ajs124> or TMPDIR or something like that. but default is for sure /tmp
<nschoe> I still have tons of place on my '/ partition, so I am guessing this means something in tmpfs. I've relaunched the command with a 'watch df -h', but maybe you can help: where are packages build ?
<emily> (if you're on NixOS you turn it on via options instead, on non-nixos you might want to use something like https://github.com/guibou/nixGL)
<evanjs> just so happened to do it and thought it was something normal for you? :P
<clever> ornxka: dqlite is what hung, and thats probably something in your systemPackages?
<rooke> The journal is showing lorri complain about a build failure due to not being able to find something in `$HOME/.cache/lorri/cas/`
<evanjs> Often times it will fail to build something and thus have no valid shell for me to enter
<dmj`> srk: nix-shell on shellFor gives error: attempt to call something which is not a function but a set
<jakobrs> I guess my question is less "this is surprising" and more "am I doing something wrong"
<zakkor> i was using compton, it seems like it was changed to picom, and something is breaking
<chloekek> Oh, but it also passes { llvm-config = null; } to callPackage. So it will probably do something else elsewhere.
<qyliss> chloekek: Yes. Look at the inputs to the package. Is it taking llvm, llvmPackages, or something else?
<zakkor> i'm asking because I also knew something about postgres and systemVersion, but that's pretty much it lol
<Avaq> Hi folks! Something odd happened on one of my nixops manached machines, and now most nix commands error out with: "error: reading symbolic link '/nix/var/nix/profiles/system-31-link': Bad message"
<cole-h> Maybe that lazy modules stuff does have something to do with it, then
<drakonis> its probably something to do with the qt5 wrapper?
<mvnetbiz_> I think I watched a youtube documentary on him or something
<bqv> something's very wrong then
<mvnetbiz_> I guess I can just set the package to something else but I don't think that will even help becaues the error is when it is evaluating the options in that module.
<colemickens> fido2 emulator backed by openpgp protected something something something...?
<evelyn> the trezor thing is an order of magnitude worse than gnupg itself and that's saying something
<niso> semi related question: when it comes to hardware-keys i've noticed yubikey is mentioned a lot, however they seem to be proprietary. How do open solutions compare? do they share an interface, or will each key need it's own driver (or something like that)?

2020-04-26

<emily> elvishjerricco: for something like pass(1), you'd just need to ensure the gpg agent socket environment variable was set correctly
<elvishjerricco> Really want to swap out with something else though
<energizer> cole-h: if you want something cleaned up you have to put it under `lib.hm.dag.entryAfter ["writeBoundary"] ''` (see `home.activation` under `man home-configuration.nix`). the `xdg.configFile.<name>` options get cleaned up in that manner
<genevino> notgne2: but that being said, my last nvidia gpu is more than 10 years ago and i'm not planning on buying something nvidia anytime soonish.
<emily> or something like that
<emily> (dunno if that's a nixos bug or something in my config, I worked around it locally but didn't see anyone else experiencing it)
<colemickens> my mistake, it looks like that should only happen when I change my sway config. probably that I updated something and forgot until I rebuilt.
<pjt_014> camlriot42: what command are you trying to launch it with? qemu-something imgfile.img or such?
<craige> Most of the problems have been short coming inmy database setups. None have yet been something I that allows me t point the finger away from myself :-)
<bqv> closest i got to that was running with a readonly $HOME/ for a while, but then that broke something and i couldn't track down what was breaking so i had to undo it
<notgne2> rotaerk: I think I had something like that, but iirc it cleared up after setting `gfx.webrender.all` in about:config
<peelz_> emily: how do you rebuild your current nixos system with the gist you sent? `nixos-rebuild switch`? does nixos-config need to be set to something special?
<cole-h> bqv++ Thanks, I learned something new :)
<manveru> niv is just something you can use already instead of waiting another half year or so :)
<peelz_> infinisil: I thought there were lib function that deal with attribute paths or something like that?
<peelz_> infinisil: any idea if it's possible to do something like this? `let name = "a.b"; in { a.b = 5; }.${name}`
<bqv> if someone already had, you would be able to get away with something as simple as `nix-shell -p gcc 'pkgs.python38.withPackages (ps: [ ps.python-cgal_5 ])'`
<bqv> so instead you would go something closer to `nix-shell -p gcc 'pkgs.python38.withPackages (ps: [ (ps.toPythonModule (cgal_5.overrideAttrs (super: { cmakeFlags = [ "-DBUILD_PYTHON=ON" ]; buildInputs = super.buildInputs ++ [ pkgs.swig ]; }))) ])'`
<cole-h> How would that differ from something like `packages = with sources.nixpkgs-unstable; [ gcc a b c d e ];`?
<peelz_> cole-h: but can you do something like this: `getPkg = pkg: sources.${pkg} or nixpkgs.pkgs.${pkg}`, where `sources.${pkg}` is the maybe-overridden derivation from the niv sources ?
<cole-h> peelz_: Maybe I'm missing something, but you can already maintain different pinned channels in niv?
<cgi> energizer, attempt to call something which is not a function but a set
<energizer> cgi: something like `{pkgs ? import <nixpkgs> {}}: let mything = pkgs.callPackage ./default.nix {}; in pkgs.mkShell {buildInputs = [mything];}`
<energizer> cgi: oh that's something i forgot to mention. if you want to grab version-pinned deps from github instead of from nixpkgs, you can use `niv`
<peelz_> infinisil: uhh currently fiddling around with niv, trying to see if it would be possible to do something like `niv add expr gcc-unstable -E 'sources.nixpkgs-unstable.gcc`
<rotaerk> if you're using something that interacts with, say, graphics drivers, then upgrade nixos to the latest version ... your nix shell will use the pinned version, sure, but that version may end up incompatible with your nixos environment, and not work
<edef> peelz_: something that looks like a derivation or path
<peelz_> oh so import only looks for something that looks like a derivation?
<emily> nihilazo: in general the "nix way" is leaning towards localizing dependencies where possible, not including things in your system environment just because something else needs them
<cgi> I just installed nix on my machine. It says I have to ". /home/.../nix.sh" - is this something i should be sourcing from ~/.bashrc?
<bkv> presumably at least *something* that implements cron is
<cgi> bkv, how do i get a modification of something that is already compiled and easy to install? like python-bindings for cgal_5?
<emily> cgi: arch has no concept of an individual set of reproducibly-built tools exposed to a shell like that. the closest you could get would be hacking up something with docker, which nix is far nicer than
<cole-h> That sounds like something you should figure out for yourself.
<emily> does anyone know why nixos-unstable is stuck right now? is it just that hydra jobs issue, or problems with gnome packages, or something?
<numkem> I'll make sure to read the manual regarding language specific things. It's something I don't think about
<numkem> cole-h: wow, well thank you, figured it was something 'simple'
<wucke13> gchristensen: How would I utilize that to build something with cargo for windows?
<qyliss> the problem may end up being something else, because this is extremely odd
<thibm> So I'm wondering if there is a difference from systemd. If not, then I did something wrong :>
<CrazyMind102> It is easy to miss something small like that.
<nh2> clever: I think it's legitimate to build something like fsnoop against newer kernel headers; it needs to know what the constants are for various functionaliy (like `FAN_CREATE`), and then they it still gracefully detect at runtime whether the running kernel does not suppor them
<fusion809> Is there something else one has to get virtualbox guest additions to work in a VM? Naturally, the guest OS is NixOS (so is the host, but I don't think that part is as relevant)
<tobeportable> Hi, I'd like to have some clarification from the doc : in https://nixos.org/nixpkgs/manual/#reviewing-contributions-new-packages , it says : "A maintainer must be set. This can be the package submitter or a community member that accepts to take maintainership of the package." should I add myself to maintainers/maintainer-list.nix with the new package MR or should I ask here for someone to volunteer or something else ?
<Ashy> hmm, seeing something weird with fetchFromGitHub, when adding new packages to a nix derivation (in a let block) i'm copying blocks and modifying everything except the sha256, but when i build with nix-shell i get a permission error instead of a wrong hash error, what's going on here?
<infinisil> Mic92: You can use -E and then something like callPackage
<rotaerk> is there something unusual going on with nixOS that other distros don't do that would cause that
<energizer> home-manager probably has something for that under the xdg.* namespace
<clever> Wulfsta: wantedby makes your thing start before something else
<clever> Wulfsta: after just controls the order of starting things, and forces something else to start first
<cole-h> Could also try `phases = [ "buildPhase" "installPhase" ];` -- I imagine that stuff might be cleaned in fixup or something
<nh2> qy[m]: something is fishy in my setup, I don't have `linuxPackages_5_4` will check tomorrow
<nh2> or should it be the oldest one we have or something?
<Wulfsta> I want to point to the user's .config directory, and it seems like something that should be explicitly doable rather than hoping that it falls back by default.
<emily> i think it was like xx MiB/s or something
<colemickens> that having been said, I think someone with a spare couple hours could hack something together that works with dragonfly now
<bqv> i know i should read the rfc, but i don't understand how that can even begin to work theoretically - how can you hash something that might include said hash
<notgne2> I don't think I really caught up to much of the discussion about it, will it ever be possible to have something like the derivation outputs being available and addressed by hash from other machines? so for instance all the devices on my network will be able to read at least certain derivations from machiens that already have them?
<colemickens> I thought somehow CAS store tied into nix/ipfs and it seems like I saw something about someone working on that in graham's last twig dev update?
<colemickens> more like nix store in ipfs or something
<bqv> git is based on something similar to merkel trees, git is not a blockchain
<infinisil> emacs does something like that with its customizations
<MichaelRaskin> You _need_ something writeable that is expected to be an /etc subdir? Put a symlink
<infinisil> notgne2: Ah nice, I want something like this too :o
<emily> infinisil: I could only imagine using mutableUsers if I was using some cursed software that used Unix accounts for end-user registration or something personally
<notgne2> if nothing else happens, I'm (soon) going to be working on maintaining a derivative of #64594 anyway (and would happily continue to do so if it were merged), so I'm not the most concerned with it being merged, but an abstract service manager interface is something only really useful if upstreamed
<infinisil> notgne2: A good reason to not merge something like this is that it adds a bunch of complicated code that is probably tested by only very few people, and that in a core part of NixOS

2020-04-25

<notgne2> that's something NixOS compared to any other OS would be great at solving and it's dissapointing to not see it having been done
<notgne2> also, I consider SystemD's solutions to be volatile, something which is either going to change or be replaced, and having the NixOS modules chase SystemD down their path of evolution seems like wasted effort in comparison to making an abstract interface, and having the implementation make the best use of the features at the time
<infinisil> emily: Oh, or something like a capability system
<genevino> infinisil: well i can't say that i'm anything like an advanced nixos user or something, i only started last week... https://github.com/netzverweigerer/nixos-configs
<notgne2> persinally I wish there was less of the magic activation logic in some cases, for instance https://github.com/NixOS/nixpkgs/pull/64594 - imo should've been merged, it's something that makes more unconventional setups a lot more trivial
<notgne2> have to worry about (unless you're making something new)
<notgne2> genevino: it's definitely weird to get used to, when I first got used to NixOS I would find myself thinking "wait but when does it set this, when will it run this", and the answer is confusingly "no", NixOS has all the magic for turning a running system into your declared configuration, or for writing it to your disk so it is the same after a reboot all under the hood, so that's not something you
<genevino> simpson: sounds excellent. do you have your configuration in pastebin'able form or on github or something like that?
<notgne2> genevino: I'm not sure what you mean, but you can create files in `/etc` by putting something like `environment.etc.example.text = "hello"`, and home-manager has similar options for putting dotfiles or files in .config
<genevino> ok thx for your answers. so if i understand it correctly, nobody of you is actually "used" to replacing a file on the resulting system in their initial deployment configurations or has a definitive and simple answer to the question "how do you do that directly from configuration.nix, without complexity, without blah, just replace this file in /etc with something i have here." which for my
<genevino> what i'm after is really just some kind of "nix good practices.pdf" or something? i don't know...
<oborot> Is it something related to systemd maybe? I'm running "amixer" in the script, and figured it couldn't find the binary.
<cole-h> Well, if you don't understand something, there are many others who also don't understand something
<jluttine> cole-h: yeah, maybe. but i think it's more probable that i just don't understand something :)
<jluttine> cole-h: the upstream file has ${foo} in one file and i need to replace with just something else. so in patch phase i'm using: substituteInPlace --substitute '''${foo}' "bar"
<lovesegfault> LnL: to make sure I'm not missing something, here's each step:
<LnL> that's written in the build root of the drv, something like /tmp/nix-build-foo.drv-0
<cole-h> TL;DR: if you want to mess around, you'll need to force a failure somewhere (like just putting `false` in preBuild or something)
<jakobrs> So you could go to something like "hydra.nixos.org/nix/store/000000000000000-package", and it'd redirect you to the relevant build
<pingiun> I could make something specifically for Linode just does everything without user interaction
<dsal> Ugh, I have another project that won't build from what seems like nix-store corruption or something. How do I deal with this kind of problem? `Expected: name == pushover-hs, version == 0.1.0.0, tree == e4b768f60a0c7788608f093f661a1f22422a6656c80d4c46bd552bcc9665c9da,469, cabal file == 0dae0da4298b2eea7b3fcf25d00f514dde865bb07f9213b5795d34268bd65d12,1977`
<kraem> oh i realised that error might be something else. i tried `sudo nix-channel --remove nixos` just to be sure it was using the nixpkgs defined by `sources.nix` but i ended up with `error: file 'nixpkgs/nixos' was not found in the Nix search path`. guess i'm misunderstanding how NIX_PATH is used with niv and a configuration.nix :/
<aveltras> but i guess i should override defaults to disable it fully, i was wondering if i did something wrong
<hyper_ch> pingiun: and that's the office server https://paste.simplylinux.ch/view/raw/597a3786 but I'll move sooner or later to something more like the earse-your-darlings setups
<manveru> symphorien: something like https://github.com/target/lorri/issues/365 maybe?
<vika_nezrimaya> it takes around 500-600M to a desktop, so I'd say 1G to boot and do at least something
<GiGa> I think the issue is a lack of mount.cifs or smbfs support or something of that ilk
<Wulfsta> Do I need to do something like `@ofborg check` to try to run checks again?
<jonathan84> I figured `nix-shell keymouse.nix` would do that, but I guess that does something different.
<jonathan84> I figured I just had the file in the wrong place or something.
<jonathan84> Um, I am lost, I could use some more help. What is it that nix-build expects? My best guess is that something about my default.nix does not setup the `$out` in the proper way.
<infinisil> You can get started with something like `with import <nixpkgs> {}; stdenv.mkDerivation { name = "..."; src = fetchurl { ... }; dontBuild = true; nativeBuildInputs = [ autoPatchelfHook ]; installPhase = "mkdir -p $out/bin; cp $src $out/bin"; }`
<peelz> every time I take a look at it I catch something else that could be improved /shrug
<abathur> build may not be appropriate if the invocations do differ and you expect a user to run it many times a session or something
<abathur> virus_dave: I haven't touched bazel; someone who has may be of more utility; it just sounds a lot like you're already doing something that sounds like a build; if you don't really need it to be interactive (which is hinted at by the fact that you're just using --command with nix-shell anyways), it might make more sense to just make it a build.

2020-04-24

<peelz> evanjs: sorry for pinging you directly but do you think you could help me out with something? trying to figure out how to use `lib.composeExtensions`
<abathur> it may also be helpful to use something like `env -i` to genuinely clear the environment and assert more explicit control over it
<virus_dave> ok so, if i cannot rely on nix-shell shebangs, my next thought is to have a wrapper script which just does something like `nix-shell --pure ./. -A my-der --command "my-command $@". What's the appropriate way to pass arbitrary positional parameters to `my-command` this way? $@ seems to not work quite right
<lovesegfault> we're doing something illegal in Nix
<cole-h> lovesegfault: binutils finally eval'd. Something's up with busybox
<energizer> or maybe nix would consider making the default name something more unique like nix-result/ ?
<worldofpeace> freeman42x: I feel like plasma5 would have something in systemsettings for sure
<cole-h> So you'll want to do something with it, likely `lib.cleanSource`
<lassulus> yes, if the opener doesn't respond thats the right way, but if the opener can't get maintainer awareness to merge something is another problem
<clever> contrun[m]: so you can use something like this, to just `rm $out/kernel ; cp ${./bzImage} $out/kernel`
<clever> contrun[m]: that error looks weird, like maybe you turned on something you shouldnt have
<iuunno> i just checked on my arch install to see if the new version of flash wasnt just completely broken or something but it works fine there
<iuunno> Something just happened when I did the restore to default settings thing inside of Firefox
<iuunno> reload firefox? like kill and restart it? or that thing that makes you a new firefox profile or something like that?
<jlv38> I think Python even has a built in function to convert hsl to hex, but I'm almost done writing it in Nix. Definitly something to keep in mind for the future though.
<abathur> or use an existing command, since there's inevitably something?
<clever> iuunno: you would need to modify something to use <unstable> instead of <nixpkgs>
<jlv38> Often, I can figure something out by just searching the man page for an option.
<jlv38> abathur: I couldn't find one with grep on nixpkgs, but I hoped something might exist elsewhere. In general, I'm not sure where I'd look for Nix libraries outside of nixpkgs lib.

2020-04-23

<cole-h> Issues are still the best place for that, IMO. If you're doing something stupid, they'll tell you and close it. If it's an actual issue, they'll help troubleshoot.
<bqv> cole-h: that's the problem, is it an issue, or am i doing something stupid?
<infandum> infinisil: But why would it be different? I don't know if I did something wrong or not :/
<hackerfoo> bqv: Is there something that will convert Nix expressions to BUILD files?
<infinisil> energizer: Have something like `transforms = [ "cat" "sort" "tac" ]` which then gets turned into `let step1 = runCommand "cat" {} "input > cat > $out"; step2 = runCommand "sort" {} "cat ${step1} | sort > $out"; in ...
<bqv> because at the end of the day it's just an incremental build, which is something that those two excel at but is naturally a pain in the ass in nix
<bqv> you're looking for something more like bazel or meson
<lucus16> I heard some people were working on bootstrapping that from a rust compiler in C that targets rust 1.29 or something
<sphalerite> ornxka: well, what about w3m or something?
<dsal> This seems to be broken on this host. Can I delete the things being referenced? Something seems to have gone wrong.
<dsal> Can someone denoob me on cabal2nix + nix-build? What's the shortest path from 'stack test' to 'nix-something test' ?
<thoughtpolice> jakobrs: Yeah, they're super cool! I only learned about them recently. And if you use something like https://vaultproject.io it can do like an entire CA for you, with rotation, an API etc for grabbing short-lived keys for auth, etc.
<immae> It becomes DYLIB_SOMETHING
<amanjeev> Wrote something little for upgrade (my experience) https://amanjeev.com/blog/nixos-20-03-upgrade
<cole-h> Mic92: Literally add a single space or something, and it should kick off (whatever makes GH recognize it as an "edit")
<immae> infandum: so it works for me, you might have missed something in your test
<immae> infandum: not exactly, but you just pointed something: it checks the content of the resulting files to know what will be runtime dependencies. However in your case the process "R" is called via the PATH so maybe that’s why it finds the system one (which is in your path) rather than the one in the nix store (which doesn’t exist as far as your program can see)
<Jaxon> gerschtli, something like what ? how can i check ?
<gerschtli> Jaxon: maybe something is disabling the service manually
<exarkun> or, maybe it isn't always redownloaded, but something happens on the network, maybe it checks a last modified or something, I dunno, but can I make it completely network independent?
<immae> Then I guess you woudl have to use something similar to https://github.com/tweag/HaskellR/blob/master/shell.nix in your own package
<infandum> immae: You said that the HaskellR shell is fine as it's using the /nix/store -- but I'm not using that. And I assume the default.nix knows nothing of the shell.nix file, so should I have something like that in my default.nix?
<immae> So for that if you have sandbox (it seems to be the case), then it’s possibly that something in the build hardcodes the path of R
<immae> - Then it seems like somewhere in your nix derivation script, something hardcodes the location of the R library to /usr/lib
<jakobrs> So you'd do something like `src = src.override { rev = "master"; hash = "..."; }`
<ikwildrpepper> CRTified[m]: nice, I was looking for something similar a while back, thnx
<kenran> Is there a way to do it without having to change my `callPackage` call? That is, can my `default.nix` return something other than `generatedNix` so that I can get rid of the extra `import` step?
<cole-h> e.g. if you can go to EmacsWiki/script/1234.el, you can write something that will fetch that for you (using fetchurl, probably)
<samueldr> would be nice to have with "nix-env failed:" something like "failed to eval [the release branch | the PR changes]
<colemickens> I actually kind of liked, one module the other day had an option for it "openFirewallPorts" or something and then it would open the appropriate ports for you. Seems ideal
<nerosnm> clever: ahhh thank you so much! i thought it might be something like that but didn't know I needed to add nixos-config= at the beginning
<nerosnm> I'm having trouble with nixos-rebuild - I'm trying to switch over to storing my configuration.nix under my home directory, but when I move it there and run nixos-rebuild switch with an explicit -I argument pointing to configuration.nix, I still get "file 'nixos-config' was not found in the Nix search path". Am I doing something wrong?

2020-04-22

<clever> ramses_: you can then use `nix why-depends ./result /nix/store/hash-glibc-locales` to find out why something is included, and begin adding overrides to make it not be included
<clever> ivegotasthma: `sudo -u foo command` to run something as somebody
<ramses_> clever: Yeah, the problem is that I need to have something seamless for my colleagues, nix is very scary to them
<jtojnar> cole-h maybe we could introduce something to the generic builder that would replace the placeholder references during patchPhase
<energizer> how do i find out whether it's doing something useful or it's just stuck for some reason?
<ixxie> mehlon: I was considering something like that... I think there is a lot of potential there
<infinisil> (for lists, as there is no way to insert something into a list)
<numkem> hodapp: fantastic find, BEAM isn't something I remember just yet, just started reading about it
<nicksloan> has anyone seen anything like this? https://github.com/NixOS/nixpkgs/issues/85791 Can't shake the feeling I'm doing something wrong since no one else seems to be talking about it
<Kyndig> infinisil: sounds like it's not something easily worked around and I'm not quite ready to dive into how the nixos build works. I'll just a variable set to a string for my home dir for now. Thanks though
<peelz> or something to that effect
<infinisil> (a normal nixos-rebuild just uses the nixpkgs from NIX_PATH after all, something needs to be wrapped around it to not make it do that)
<nschoe> I'm just wondering if you had something in mind that could make a gtk (and also qtbase)-based app crash on launch :)
<immae> infinisil: yes I though of something like `let src = builtins.fetchTarball {... }; in with import "${src}/nixos" {}; config.system.build.nixos-rebuild`
<infinisil> I do have `{ nixos = import <nixpkgs> {}; }` in ~/.nix-defexpr/default.nix so I can still use normal nix-env commands if I need it or need to test something (though that rarely happens)
<lmz> Something similar to python contect managers:
<seku> gchristensen : hi, read through your ZFS dataset blog post, very insightful, i'll give it a try setting up the datasets as you propose! what would you use for swap tho? a dedicated zvol without checksumming? something else?
<Mic92> ToxicFrog: usually something like .nix-profile/share/doc
<colemickens> maybe it's because it's a symlink or something. this is before your commits: https://gist.github.com/colemickens/454f23d3c74a9d1abe4ee1a241ce8b57. this is after: https://gist.github.com/colemickens/bb3279afa3ae963f961bb0d4e2025c0b
<colemickens> I've got my setup all replicated in HM. This swaylock/PAM is sorta the last issue. I know some other folks also choose not to use swaylock at all, in favor of something more systemd-specific (generic?)
<colemickens> nah, it's alright. that explains somethings.
<zannzen> infinisil qy[m] thanks for the hep with that, pretty new to nix in general so of course it was something simple to miss heh
<qy[m]> i reckon i could sketch out something easily using unshare, chroot, tmpfs and overlayfs, if keeping mounts below root wasn't a requirement, but i'm just surprised nobody already has
<qy[m]> but i'd assume there'd be something slightly higher level than that anyway
<qy[m]> basically i want to run something with full filesystem access but no actual filesystem side-effects
<qy[m]> i don't suppose anyone knows a quick way to run something in an tmpfs/overlayfs'd chroot of the current fs tree?
<qy[m]> am i missing something or does `nix build` not run checkPhase?
<qy[m]> unless i do something dirty like IFD output-hashed derivations for each source file :')
<qy[m]> unless i'm missing something obvious
<qy[m]> there's something i compile pretty much every day, but it's extremely modular (shared libraries) so it would be mighty nice if i could have a derivation per module
<jackdk> then why does ldd show something for that? line 8 of the paste above!?
<clever> you want something like nix-user-chroot then
<jackdk> clever: okay. how can I do that when it's something that bazel downloads and tries to run?
<hackerfoo> Couldn't you use that to generate `~/.config/nix/nix.conf`? You could make an expression to generate dot files in your home directory. I think someone has done something like that.

2020-04-21

<hexagoxel> Is there any type of nix API lookup where I could search for something like "fetch" and it would include search results such as builtins.fetchGit, nixpkgs.fetchgit and what their approximate types are?
<dsx> oh... net me check something