<joko>
I've tried with builtins.tryEval, but still no chance
<joko>
Some of my configuration files are looking on a path that my Hydra server does not have and I am getting errors like "getting status of '/opt': No such file or directory". Is it possible to bypass this error?
<joko>
Is it possible to set just one attribute on a set and leave the rest in the set undefined?
<joko>
If I have funA { inp1, inp2, ... }, is there any x so that x inp1 = funA { inp2, ... }?
<joko>
infinisil: thanks!
<joko>
?
<joko>
Suppose that I have a nix function with input arguments on a file, how to run nix-repl on that file and set its input arguments
2017-11-22
<joko>
Is it possible to catch undefined variables? I've tried something like this: networking.nameservers = let try = builtins.tryEval networking.interfaces.eth0; in if try.success then [ "8.8.8.8" ] else [];
2017-11-21
<joko>
I am trying to setup a new nix channel and keep getting "error: undefined variable ‘white’ at (string):3:18". Any idea where to look? nixexprs.tar.xz seems fine to me
<joko>
I am trying to setup a new nix channel and keep getting "error: undefined variable ‘white’ at (string):3:18". Any idea where to look? nixexprs.tar.xz seems fine to me
<joko>
andrewchamb: Supposedly it's the same command, is it working for you?
<joko>
andrewchamb: Actually I did nix-env -iA nixos.clang_5
<joko>
andrewchamb: It worked here
<joko>
Unode: (y)
<joko>
Unode: check the hash with nix-prefetch-url
<joko>
Unode: you could try replacing ftp:// with http://, it might work
<joko>
Unode: does the sha256 hash match?
<joko>
Unode: why don't you download the one at ftp://ftp.gnutls.org/gcrypt/gnutls/v3.5/... ?
<joko>
andrewchamb: how do you try to install it?
2017-11-17
<joko>
orivej: as a matter of fact, it worked with myPackage.outPath + "/nix/myfun.nix"!
<joko>
(I'm probably neither using outPath correctly, nor + )
<joko>
something like import (myPackage.outPath + /nix/myfun.nix)
<joko>
Is it possible to access nix files from a package directory?
<joko>
hyper_ch: I am trying to lock the nixpkgs of some machines using this trick. So far it works great, I just want to make the Hydra job building their configuration completely independent of <nixpkgs>, so that I don't have to enter that as an input
<joko>
Is it possible to set $Nix::Config::curlCaFlag somehow?
<joko>
I still can't find why my new nixos channel returns "error: undefined variable ‘white’ at (string):3:18" on update. It presumably fails on nix-env --profile '$profile' -f '<nix/unpack-channel.nix>' -i -E $exprs --quiet (Line 172 of nix-channel)
<joko>
lol
<joko>
fusion809: perhaps the closest you could get to installing the bootloader again in nixos would be nixos-rebuild switch --install-bootloader inside the chroot
<joko>
To be fair, I also use systemd-boot, but I don't dual boot, NixOS for lifeeeee
<joko>
fusion809: just replace line 18 with boot.loader.efi.canTouchEfiVariables = true; and line 20 to boot.loader.grub.device = "nodev";
<joko>
fusion809: are you also setting boot.loader.efi.canTouchEfiVariables to true?
<joko>
fusion809: ah, no, it's not fine i386-pc is for BIOS-based
<joko>
fusion809: that's fine
<joko>
fusion809: I think you have to delete "boot.loader.efi.efiSysMountPoint" and set boot.loader.grub.device to "nodev"
<joko>
jfroche: unfortunately, it's largely undocumented, so shot a more specific question and I might know the answer
<joko>
Good morning, all! I've built a nixos channel, but it appears not to be working... When doing nix-channel --update, 1) the URL appears to have double quotes, e.g. "http://blabla/channel//nixexprs.tar.xz" and 2) I get "error: undefined variable ‘white’ at (string):3:18" "cannot unpack the channels at /run/current-system/sw/bin/nix-channel line 172."
2017-11-16
<joko>
as the binary cache is no longer hydra
<joko>
clever: I would like the same functionality for normal hosts, hosts running nginx and ssh
<joko>
And one more question, regarding binary cache this time... I was checking how to setup a binary cache and after seeing zimbatm's presentation I noticed this: https://github.com/zimbatm/todomvc-nix/blob/master/scripts/nix-cloud-push. In practice one can do a simple rsync as well, right? But how the cache is cleaned from older generations?
<joko>
clever, gchristensen: and afterwards I want to copy the channel to my site
<joko>
larsvm: lol, I didn't know :D
<joko>
gchristensen: sure, I'm building my own nixos channel ( https://git.joko.gr/joko/etc-nixos/src/master/jobs.nix#L48 ) and I would like to do so only if the other jobs (nixos.config.system.build.toplevel mainly for a couple of systems) succeed
<joko>
So I guess there are no such patterns in Hydra jobs for the time being?
<joko>
ditto
<joko>
clever: then perhaps have a shell.nix and run the command inside a nix-shell?>
<joko>
Anyone familiar with Hydra? 2 questions: I would like to create a job which runs a simple shell script and then I would like to run this job only if a previous one has succeed. I think for the latter I could use pkgs.releaseTools.aggregate, but I would feel more confident if I saw how others are using it
<joko>
gchristensen: I think zimbatm mentioned some issues with rust
<joko>
clever: awesome work!
<joko>
ah, I see now
<joko>
or does it run with a single vcpu?
<joko>
clever: what I don't get is where you define the target platform in qemu
<joko>
cool :D
<joko>
So that I can use it as a buildMachine on my wandboard, right?
<joko>
clever: just saw it, yeah
<joko>
ah, ok
<joko>
clever: so, I have to use qemu-user-arm somehow or what?
<joko>
clever: thanks, I will do some experiments and tell you my results :D
<joko>
clever: should I try with 2 single-core machines or 1 dual-core?
<joko>
clever: is x86 emulating arm faster than my barebone pc?
<joko>
clever: so you would recommend me to start a VM emulating ARM, right?
<joko>
clever: could you give me some info on cross compiling for arm systems, ideally on a hydra farm? I'm planning to install NixOS on my Wandboard this weekend
<joko>
srhb: no, just the packages I want to. E.g. Firefox 57 still isn't in nixos-unstable (or at least yesterday), so I've pulled it on my custom nixpkgs and Hydra built it
<joko>
srhb: I'd say I'm using lib/eval-config.nix that release.nix also uses. I don't want to build all the packages, test cases that release.nix does
<joko>
srhb: you could avoid line 35, it's for building packages to use for home-manager
<joko>
clever: It's funny, on my Hydra setup where I don't have localhost in buildMachines everything are working. On my company's Hydra I have just set up with localhost as the only buildMachine, it's not
<joko>
clever: so it is not possible to have Hydra and run "sudo nixos-rebuild switch" on a new packet?
<joko>
clever: I think I got locked out, even sudo nixos-rebuild switch is "waiting for locks or build slots..."
<joko>
Hydra user owns the sshKey file
<joko>
Having set buildMachines, do you lose the ability to install stuff as simple user? As a simple user I do not have access to the sshKey of the buildMachines
<joko>
I think this is happening on the live setup, but the Hydra job somehow pulls the full version
<joko>
If I override a package in nixpkgs.config.packageOverrides (e.g. oraclejre8), then shouldn't services.tomcat.jdk = pkgs.oraclejre8 use its overriden version?
<joko>
oh, correct
<joko>
clever: I think line 16 is installing grub for BIOS systems as well and if the system has CSM, then it tries to boot from there
<joko>
:P
<joko>
Oh yeah
<joko>
Why doesn't he use systemd-boot? It's easier
<joko>
One more question, I'm evaluating the use of home-manager and I would like to use Hydra to build some of the packages I define in .config/nixpkgs/home.nix
<joko>
clever, orivej: I feel ashamed, I hadn't set distributedBuilds >_<
<joko>
Hmm, my Hydra server seems to be stuck on a job (scheduled to be built), any way to find the issue there?
<joko>
clever: that would be a bit difficult, it's for my employer :(
<joko>
clever: I get the same error there, too
<joko>
Hello, hydra evaluator reports the following error on a job: "value is a list while a set was expected". Any idea how to trace it?
2017-11-14
<joko>
Is it possible to expose only the binary cache in that way?
<joko>
clever: Planning to do so, yeah
<joko>
Thanks, guys
<joko>
:)
<joko>
Hello, is it possible to use private Git repositories in Hydra?
2017-11-13
<joko>
orivej: the Hydra user must own them
<joko>
I mean as one derivation
<joko>
Any way to download from two sources and install them both??
<joko>
I'm afraid that it also requires that during build time :(
<joko>
Is there any NixOS package like that?
<joko>
So that shorewall-core checks for files that shorewall put in that directory and vice-versa
<joko>
gchristensen: I want to package shorewall and there are efectively two derivations, shorewall-core and plain shorewall. Some of the scripts in both derivations require access to a SHAREDIR
<joko>
Is it possible to have a shared directory for two derivations?
<joko>
Any help with debugging a default.nix with nix-shell?
<joko>
Could anyone tell me how to debug stages in nix-build, aka invoke a shell and enter in stages via command (installPhase etc.)?
<joko>
Lisanna: download it manually and add it via nix-store --add-fixed sha256 <FILE> ???
<joko>
etu: The thing is that I don't want them all the time, e.g. I could have a Python 3.5 and a Python 3.6 env there
<joko>
Good morning, people! Is there any way to keep closures I've used in nix-shell after nix-collect-garbage? Somehow to mark them as still needed
2017-11-12
<joko>
Hello, I've just started using home-manager and was wondering how to put its packages to my Hydra server. I am thinking of using the pkgs attribute from eval-config.nix, but this expects a set (sth like { inherit (pkgs) chromium irssi; };) and I have "with pkgs; [chromium irssi]; Am I thinking it right so far?
2017-11-06
<joko>
Hmmm, I've tried setting "export VAR" in postBuild, but it didn't work
<joko>
your system downloads a closure before trying to build it *
<joko>
This is why binary caches would work and download a closure
<joko>
chrisburr: I'd say it's the latter
<joko>
MoreTea: cool, I guess I have to do something similar with python.buildEnv
<joko>
Actually I am using "let" etc.
<joko>
MoreTea: kind of, I have a shell.nix which goes like that: pkgs.python35.env
<joko>
MoreTea: yeah
<joko>
Hey, I am using pkgs.python35.env in a nix-shell, is there any way to export env vars in shell.nix, too?
2017-11-03
<joko>
gchristensen: the test vms do not have internet access and thus they cannot build any package. Since my nixpkgs do not have grub2 with zfsSupport, the test vm tries to build it and fails.
<joko>
Hello, I am trying to package a program with a systemd user unit and I have the following problem: I would like to use the already available unit files, but in one of them /bin/true is being run. Should I make coreutils a package dependency and use systemd.packages to expose the user units if the user enable the NixOS service?
2017-11-02
<joko>
Hi, I am using (pkgs.python35.withPackages ( blabla )).env in shell.nix to fire up a nix-shell, how to append stuff in PYTHONPATH there?
2017-10-30
<joko>
Could anyone help me with icon themes? I'm getting the following error when I try to run pavucontrol: (pavucontrol:4534): Gtk-WARNING **: Could not load a pixbuf from icon theme. Gtk:ERROR:gtkiconhelper.c:493:ensure_surface_for_gicon: assertion failed: (destination)
2017-10-29
<joko>
cransom: oh, probably not
<joko>
Any idea if anything is wrong?
<joko>
Hey, I have a file in nix store iconrc, which appears to be empty if I do cat, but it has content if I use less
<joko>
hyper_ch: duh, thought it would be more dangerous :P
<joko>
hyper_ch: good luck!
<joko>
it got improved, yeah
<joko>
obadz: because of his github avatar? :D
<joko>
Hello, I'm trying to update my user environment via "nix-env -u" and I'm getting "error: syntax error, unexpected $undefined, expecting IND_STR or DOLLAR_CURLY or IND_STRING_CLOSE, at /nix/store/gklpdjwd7693jp7cb311d9fskqnxik46-nixos/nixos/pkgs/os-specific/linux/bcc/default.nix:29:27"
2017-10-27
<joko>
The problem is that some packages fail to get built inside the chroot
<joko>
Indeed, you will have to build everything
<joko>
And I have seen a blog post once describing how to compile it on your own
<joko>
Is it possible to start a vanilla nix-shell inside a nix-shell
<joko>
vaibhavsagar: but they copy them to S3
<joko>
and there is no Python3 in the systemPackages
<joko>
adisbladis: I am still getting the same error inside the nix-shell
<joko>
vaibhavsagar: I think it's doable, isn't this what cache.nixos.org does?
<joko>
adisbladis: ok then, let me try
<joko>
adisbladis: even if I avoid including this to systemPackages, I will have to run nixos-rebuild switch inside a nix-shell, don't you think I will have the same issue?
<joko>
Have a nice flight!
<joko>
Because I had a similar issue when I tried to run a Python 3.6 program on this env
<joko>
sphalerite: is nixos-rebuild switch running any Python code?
<joko>
sphalerite: echo hello works as intended
<joko>
adisbladis: funny thing is that I do not, but I do have (pkgs.python35.withPackages (ps: with ps; [ json-rpc pika psycopg2 requests sqlalchemy ])) in my environment.systemPackages
<joko>
I think this happens because of Python being wrapped in the shell of the Python script
<joko>
sphalerite: subprocess.run("nixos-rebuild switch".split(), shell=False) <- Fatal Python error: Py_Initialize: Unable to get the locale encoding
<joko>
Good morning, all! I'm trying to run nixos-rebuild switch inside a Python program via subprocess.run, any ideas how to make it working?
2017-10-26
<joko>
I don't think you have to set any part label
<joko>
The name of the pool is automatically detected to be imported
<joko>
tanonym: not at all
2017-10-25
<joko>
I am trying to build a Python application, is it reasonable that nix downloads and builds all the necessary Python libraries? In a nix-shell I had them all
<joko>
Hmm, callPackage is not working because in python-pacakges.nix it is set via let as "pkgs.newScope self". Any idea how to properly call them?
<joko>
tilpner: seems way smarter, thanks :D
<joko>
Is it possible to use python35Packages.override to add (not modify) a Python package?
<joko>
clever: so, it creates impurities inside the closure? It did get fixed
<joko>
/nix/store/zapwm1wx4j900am73abd9fc3a271yam2-nix-1.11.15/lib/perl5/site_perl/5.24.2/x86_64-linux-thread-multi/Nix/CopyClosure.pm line 44.
<joko>
Hmm, nix-copy-closure reports error: unexpected end-of-file, hash of path â/nix/store/j8dydlcskl12f77jks98myg4w9gbnqrc-python3.5-setuptools-36.4.0â has changed from âddb7a57010288df335916dc2555512d12feacc17b79e71d6eccba99747acb2f1â to âd59d48323f60306b442ad81095ebb32a2804062814cfe6b1fa7ec959eab0f762â! at
<joko>
clever: thank you, sir!
<joko>
My guess is that I need something like l3lmprhcz5w1xp4nbj42lr8yjs9hc31g-nixos-system-hostname-blabla, how to tell which is the current one?
<joko>
closures *
<joko>
Is it possible to copy the derivations of a whole system?
<joko>
clever: that's cmcdragonkai's issue :)
<joko>
clever: sorry, no js-beautify
<joko>
Unfortunately I cannot share my Python code :(
<joko>
cmcdragonkai: I am still getting "error: selector ‘nodePackages.js-beautify’ matches no derivations"
<joko>
So, regarding the Python app, I do have a shell.nix and packaged a Python library (json-rpc; will do a PR this week). So it seems to me that I have everything as Nix packages, there is no need for virtualenv, right?
<joko>
just a sec, let me try with a 17.09 vm
<joko>
cmcdragonkai: I get error: selector ‘nodePackages.js-beautify’ matches no derivations
<joko>
Is anyone developing Python on NixOS? I am trying to run a Python app and I get "Fatal Python error: Py_Initialize: Unable to get the locale encoding" and "ModuleNotFoundError: No module named 'encodings'". Googling around showed that there might be an issue with PYTHONPATH etc.
<joko>
cmcdragonkai: I don't see an issue there, I mean, I am using nixpkgs.config.packageOverrides all the time and they are addressable by nix-env at all
<joko>
Good morning, people!
2017-10-24
<joko>
or so I think
<joko>
gchristensen: any clue? I couldn't find any at lib/attrsets.nix
<joko>
Now I could use a fold function which has a set as an accumulator, is there such a thing?
<joko>
sphalerite: clever: exactly :)
<joko>
sphalerite: I meant removePrefix "prefix" (removeSuffix "suffix" k)
<joko>
oh, forget it
<joko>
Is there any way to combine removeSuffix with removePrefix in a functional way?
<joko>
neat, let's try it!
<joko>
so, 127.0.0.1 could get overwritten :S
<joko>
clever: unfortunately it's a json one :(
<joko>
I would like to do something like networking.hosts = { "127.0.0.1" = [ "mynixos" ]; } + buildins.readFile blabla;
<joko>
Is there any way to merge sets?
<joko>
doublehp: NIX is awesome!
<joko>
Is anyone running pdb on Python projects? Any tip on how to do so?
<joko>
niksnut: thanks, I'll try it a bit later
<joko>
I have a test that fails because the VM has not internet access, so it cannot build a derivation. I have yet to find a way to solve this
<joko>
clever: I've also tried with pkgs.erlang_nox
<joko>
clever: your answer makes sense, but overriding erlang is not working: erlang = erlang_nox; returns undefined variable ‘erlang_nox’
<joko>
And an irrelevant question to my previous ones: I am pinning a package version using nixpkgs.config.packageOverrides and overrideAttrs. How to override the arguments (maybe it's not the right expression)? E.g. I would like to use rabbitmq_server v3.6.6 with erlang_nox (to avoid building all the X stuff)
<joko>
clever: awesome
<joko>
clever: can you have options in ipxe?
<joko>
clever: does netboot use grub?
<joko>
correct
<joko>
clever: would you recommend creating a separate dataset for /nix?
<joko>
this is neat, I might create a live cd using that
<joko>
clever: ah, but you are using grub, it's simpler
<joko>
the bad thing afterwards is going to be bootloader entries, for uefi the menu is not that customizable
<joko>
right
<joko>
clever: I was also thinking that I could pass vars to the kernel cmdline and read them later on via the justdoit script to make it more customizable, what do you think?
<joko>
For make[3]: Leaving directory '/tmp/nix-build-erlang-19.3.drv-0/otp-OTP-19.3-src/lib/wx/c_src'
<joko>
clever: would you like a pr or sth like that?
<joko>
btw, I was working this weekend on a justdoit version using uefi, gpt partitions and zfs over luks
<joko>
clever: many thanks, sir
<joko>
bingo, was modified! expected hash
<joko>
So I was thinking maybe it's corrupted or something
<joko>
sphalerite: I am getting sth like this: /nix/store/c7j0lq0h2mvvxrmyy0wxd5iys8arrdz5-audit-disable: line 3: /nix/store/9ac9bfx006fpvpnx7aqbhn25dz7zfbpb-audit-2.6.6-bin/bin/auditctl: cannot execute binary file: Exec format error
<joko>
Hey, is there a way to re-install a derivation?
2017-10-21
<joko>
thank you, guys, it moved :D
<joko>
I mean, I don't want them to be evaluated by nix, just passed to Bash
<joko>
What would be the proper way of escaping {} in writeScriptBin?
<joko>
It would give more to you :P
<joko>
Anyone knows how to create a cache (secondary) http(s) server to hold my Hydra files?
<joko>
ylwghst: search for the invalid hash? 0kk2m9ac9fw5s97pdanm63jgl6gky4ay9n2l30q68qqkjc4x12ax
<joko>
clever: night, night, thanks for all the help!
<joko>
clever: oh, now I see why my first case fails