2020-03-21

<clever> hio: you set boot.loader.grub.device wrong
<clever> linarcx: https://hydra.nixos.org/job/nixos/release-19.09/nixpkgs.clang.x86_64-linux and the latest clang is in the queue still
<clever> linarcx: if you use the nixpkgs repo, you get nix expressions hydra hasnt built yet
<clever> linarcx: AFTER hydra has built everything, the nixpkgs-channels repo will update
<clever> hio: how did you fail?
<clever> linarcx: export NIX_PATH="nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/release-19.09.tar.gz
<clever> linarcx: you must use the nixpkgs-channels fork, or you wind up not getting cached results
<clever> linarcx: i see the problem, your using the release-19.09 branch of nixpkgs, which is before hydra testing occurs
<clever> makefu: but that doesnt explain why its trying to oh wait
<clever> these derivations will be built: /nix/store/pq64x5rwvbj011pcln2gcgaqz7c96xi5-clang-7.1.0.drv
<clever> [clever@amd-nixos:~/apps/rpi/rpi-open-firmware]$ nix-build https://github.com/NixOS/nixpkgs/archive/release-19.09.tar.gz -A clang --arg config '{}' --arg overlays '[]'
<clever> looks normal?
<clever> linarcx: let me check hydra...
<clever> linarcx: i think clang is broken on 19.09
<clever> linarcx: thats not in the binary cache, what does `nix-instantiate --find-file nixpkgs` report?
<clever> linarcx: nix-store -q --binding out /nix/store/pq64x5rwvbj011pcln2gcgaqz7c96xi5-clang-7.1.0.drv
<clever> linarcx: what about `nix-build '<nixpkgs>' -A clang --dry-run` ?
<clever> linarcx: what about `nix show-config | grep subs` ?
<clever> linarcx: did you change $NIX_PATH or nixpkgs?
<clever> hio: you can also use `sudo -i` to get a root shell
<clever> hio: it says that before chapter 1
<clever> > Note: Commands prefixed with # have to be run as root, either requiring to login as root user or temporarily switching to it using sudo for example.
<clever> hio: step 2.3.4
<clever> hio: when you partitioned sda, it created 1/2/3
<clever> yeah, the one your stuck on
<clever> hio: every single step in the installation guide must be ran as root
<clever> hio: mkfs must be ran as root
<clever> linarcx: but since line 1 already pulls in all of nixpkgs, you dont need line 2
<clever> ,callPackage linarcx
<clever> hio: you cant copy/paste to a pastebin?
<clever> hio: can you pastebin all of the output from the terminal?
<clever> hio: parted should only be ran on sda, not sda1
<clever> hio: what did parted say when you exited?
<clever> hio: and what did fdisk print when you exited?
<clever> hio: which guide are you following?
<clever> hio: was anything mounted while partitioning?
<clever> hio: how many partitions did you make?
<clever> hio: did you partition sda?
<clever> linarcx: probably
<clever> linarcx: clangStdenv points $CC and $CXX to clang
<clever> linarcx: and the with on line 1 pulled in all of nixpkgs, so the function on 2 and the with on 8 arent of much use
<clever> linarcx: you may also not need parts of 14-19
<clever> linarcx: and you can now delete line 10, clangStdenv always has clang
<clever> kraem: i dont think its possible to override that, youll need to just copy the file and modify it
<clever> [clever@amd-nixos:~/apps/nixpkgs]$ vi pkgs/build-support/rust/default.nix
<clever> default.nix: buildRustPackage = callPackage ../../../build-support/rust {
<clever> kraem: you need to read the source of buildRustPackage to see how it can be overridden
<clever> kraem: and it then tries to convert 17-24 into a string
<clever> kraem: line 17, your creating a $buildRustPackage env var within alacritty
<clever> linarcx: you also need to add a name = "something"; to the mkDerivation
<clever> linarcx: mkShell is just a wrapper around stdenv.mkDerivation
<clever> linarcx: it should still work
<clever> linarcx: use clangStdenv.mkDerivation { buildInputs = [ ... ]; shellHook = ''....'' }
<clever> jakobrs: this allows mounting any fuse based fs on boot
<clever> jakobrs: one minute
<clever> linarcx: you need to use clangStdenv, not buildInputs = [ clang ];
<clever> jakobrs: ahh
<clever> jakobrs: not sure then
<clever> alexarice[m]: so if you `nix-shell -A haskellPackages.aeson.env` then you get the environment needed for building it
<clever> alexarice[m]: all haskell packages have a .env attribute
<clever> jakobrs: try using ssh:// on a new path, does it give the same error?
<clever> alexarice[m]: haskellPackages.ghcWithPackages or cabal2nix and .env
<clever> jakob_rs_1: if the path is already copied, the `nix copy` wont have anything to do
<clever> jakob_rs_1: you claimed to be using it without before
<clever> jakob_rs_1: with or without ssh:// ?
<clever> jakob_rs_1: what about `nix copy --from ssh://10.0.0.174 /nix/store/...`
<clever> jakob_rs_1: have you tried nix-copy-closure?
<clever> jakob_rs_1: are you running it as root?
<clever> jakob_rs_1: what command is giving that error?
<clever> jakob_rs_1: if its not valid, then the build didnt finish, and it will be ignored by all nix tools
<clever> jakob_rs_1: it means the path is not part of /nix/store/
<clever> raboof: something like: runCommand "name" {} "mkdir -pv $out/bin ; makeWrapper ${input}/bin/foo $out/bin/foo"
<clever> raboof: runCommand would be the best way to do it
<clever> akegalj_: i also just expect users to know the difference between 404 and connection timed out
<clever> akegalj_: did you open port 80 in the nixos config?
<clever> akegalj_: that means your firewall is blocking port 80
<clever> colemickens: it should be possible to carry that back to nixos easily enough
<clever> colemickens: this downloads the rootfs using tftp, and then runs it via the tmpfs
<clever> colemickens: let me grab something...
<clever> colemickens: back when i ran gentoo, i did have a custom initrd, that would download the entire rootfs over wifi
<clever> ,stateVersion fusion809
<clever> say?
<clever> akegalj_: what does `curl http://116.203.64.124/` sya?
<clever> linarcx: depends on if you have a `with pkgs;` in effect
<clever> linarcx: just put xlibs.libX11 into the buildInputs
<clever> ,locate
<clever> linarcx: nix-locate and ,locate
<clever> akegalj_: and also the journal for nginx
<clever> access.log error.log nginx.pid
<clever> [root@amd-nixos:~]# ls /var/spool/nginx/logs/
<clever> akegalj_: does the nginx log file say anything?
<clever> akegalj: https://nixos.org/nixos/options.html#nginx.virtualhosts.%3Cname%3E.default
<clever> akegalj: part of that will depend on if you have several hosts defined, and which is the default
<clever> akegalj: you can either use an ip, or use /etc/hosts to fake having dns

2020-03-20

<clever> EffSquared: the code in nix will always use : to seperate the list
<clever> EffSquared: what args did you run nix-shell with?
<clever> morgrimm: external boot disk?
<clever> morgrimm: dual-boot nixos + darwin?
<clever> blame apple :P
<clever> morgrimm: it also means, root will wind up owning half your config files, so certain programs never work without sudo again
<clever> morgrimm: it means programs you run with sudo, will use the current users ~/.config, not roots config

2020-03-19

<clever> yeah
<clever> yeah, i can see that being a valid solution
<clever> infinisil: buildEnv already does priority based on order, and warns on collision
<clever> and buildEnv should prefer one over the other
<clever> foo defines a shell script that overwrites a binary in bar
<clever> gchristensen: what if i want foo to come before bar?
<clever> gchristensen: what about order though?
<clever> raboof: and that is the script you would have to run, to reproduce the failure in nix-shell
<clever> raboof: 99% of the work is done in the installPhase override, do `echo "$installPhase"`
<clever> raboof: when you ran `unpackPhase`, you ran the original, not the override
<clever> raboof: line 810, unpackPhase was overwritten
<clever> raboof: `nix show-derivation /nix/store/ly5879n22ww4wzi8x2rd1bcl27xzscw7-node_mastodon-bot-0.0.1.drv` ?
<clever> raboof: and what error does `nix-build` fail with?
<clever> raboof: what did you set patches to?

2020-03-18

<clever> jakobrs: that all looks totally normal
<clever> cole-h: i think thats fine
<clever> jakobrs: can you pastebin your configuration.nix and hardware-configuration.nix files?
<clever> jakobrs: i think the PROGRAM= in a udev rule, must be a single binary, not a line of shell code
<clever> jakobrs: sure
<clever> jakobrs: what if you just manually run `nix-daemon` as root?
<clever> jakobrs: `ls -l /proc/*/fd/* | grep mnt`
<clever> jakobrs: where is sdc1 mounted?
<clever> jakobrs: what does systemd say when you `systemctl start nix-daemon.service` ?
<clever> jakobrs: what does fstab say about /nix/store?
<clever> jakobrs: restart it?
<clever> Unode: you need to create an efi system partition, fat32, and mount it to /boot
<clever> Unode: should usually be fine
<clever> coderobe: legacy bios typically wont show nvme devices at all, and grub technically lacks nvme support
<clever> Unode: and only if the bios decided to include support
<clever> Unode: only UEFI can boot from NVME

2020-03-17

<clever> icey__: youll need to patch it to just use plain 755, and then security.wrappers to make it setuid later
<clever> icey__: yeah, nothing in $out can be setuid root
<clever> icey__: what permissions is it trying to set?
<clever> bqv[m]: not sure why it was done that way
<clever> icey__: --keep-failed, or nix will delete it on you
<clever> bqv[m]: it uses raw bash
<clever> cole-h: that usually needs a @token@ to replace, and i dont think it can replace strings like /usr/local
<clever> icey__: you can either use sed, or just put a patch into the patches list
<clever> platformTools skips directly to adb, and skips most of the other developer tools
<clever> bqv[m]: pkgs.androidenv.platformTools
<clever> bqv[m]: one sec
<clever> bqv[m]: b: if you use $src (the env var) instead of ${src} (the nix var), then it will respect further overrides
<clever> bqv[m]: a: the unpackPhase will have copied the src to . for you already
<clever> Taneb: that makes it ignore all config and overlays
<clever> Taneb: try `nix-instantiate -A haskellPackages.Agda --arg config '{}' --arg overlays '[]'`
<clever> Taneb: do you have a config.nix file?
<clever> Taneb: what if you read pkgs/development/haskell-modules/hackage-packages.nix ?
<clever> hmmm, its usually slower then that
<clever> [root@nas:~]# time ls -U /nix/store/ | wc -l
<clever> real 0m3.061s
<clever> 88965
<clever> my system is weirdly IO bound, so ive not seen much benefit from changing schedulers
<clever> yeah
<clever> ah, yeah, i see that now
<clever> gchristensen: if you give it a partition, it wont mess with the IO scheduler, so the 2nd partition gets a more fair share of things
<clever> gchristensen: also of note, if you give zfs the whole disk, it will set a magic flag on the vdev, which causes zfs to mess with the IO scheduler upon import
<clever> evanjs: havent seen that one
<clever> evanjs: https://github.com/NixOS/nixpkgs/pull/72657 this adds a new cross-compile target, including its own libc
<clever> evanjs: you might want to look at my vc4 PR

2020-03-16

<clever> cole-h: https://gist.github.com/cleverca22/45e46f3b6a1ede7836938d2122bae9c7 is something ive installed with nix-env, to get certain man pages
<clever> fresheyeball: i remember fixing something similar months ago, but cant see any answers in the irc logs
<clever> s1341: you may want to edit pkgs/development/androidndk-pkgs/androidndk-pkgs.nix then, to change v7 to 4.8
<clever> armv5 uses 4.8
<clever> 24 gccVer = "4.8";
<clever> 21 "armv5tel-unknown-linux-androideabi" = {
<clever> s1341: do you want 32bit or 64bit ?
<clever> 29 gccVer = "4.9";
<clever> 26 "armv7a-unknown-linux-androideabi" = {
<clever> s1341: nixpkgs has 4.9 gcc's for ndk
<clever> s1341: what makes r10e different from r18b?
<clever> s1341: have you considered just shipping pure static binaries, that dont care about the android libs at all?
<clever> s1341: and you need that special gcc to align with the system libraries android provides?
<clever> s1341: how is r10e different from the normal ndk?
<clever> s1341: have you looked at pkgs.androidndkPkgs ?
<clever> s1341: there is already some android ndk's in nixpkgs, let me see...
<clever> fresheyeball: checking some logs...
<clever> fresheyeball: though, its also not connecting to any sockets
<clever> fresheyeball: dont see it trying to open anything in the xkeyboard-config area, it might be talking to Xorg to make that do it
<clever> s1341: but when trying to patchelf things, you have to add it to the list of libraries being patched in
<clever> s1341: 2020-03-16 13:56:28 < clever> s1341: its part of glibc, so nix-shell will just provide it automatically
<clever> fresheyeball: strace, what syscall failed, what is it not finding?
<clever> s1341: no library you install with home-manager will be visible to anything
<clever> ,libraries s1341
<clever> s1341: how exactly did you "install" glibc?
<clever> s1341: `nix-build '<nixpkgs>' -A glibc` then `ls result/lib`
<clever> s1341: which libm.so does glibc contain?
<clever> fresheyeball: now `nix-store -qR /run/current-system | grep xkeyboard-config` and see if the new keyboard-config has that
<clever> s1341: how are you searching for it?
<clever> fresheyeball: `find /nix/store | grep --color apl`
<clever> s1341: though, android-ndk may complicate things, if you need the andriod libm.so
<clever> s1341: its part of glibc, so nix-shell will just provide it automatically
<clever> fresheyeball: cant remember exactly where that was, but if you have an older generating with it in the nix store, try just searching the whole store for a file with apl in the name?
<clever> evanjs: builtins.elem to test if the name is in a list
<clever> evanjs: evanjs 43 baseName = baseNameOf (toString name);
<clever> evanjs: if its a <path>
<clever> evanjs: nix-instantiate --find-file
<clever> exarkun: you can use fetchFromGitHub or any other fetcher, to fetch the new src
<clever> exarkun: patches = lib.filter something drv.patches;
<clever> or fetchFromGitHub
<clever> if you want to add in nix-build, qemu.overrideAtrs (drv: { src = ./.; })
<clever> exarkun: if you only want nix-shell, even this is enough
<clever> with import <nixpkgs> {}; qemu
<clever> $ cat ~/apps/qemu/shell.nix
<clever> __red__: i believe its the default domain for the virtualhost
<clever> __red__: it must be an attribute set, not a list
<clever> __red__: you want services.httpd.virtualHosts = { "example.com" = { ... }; };
<clever> and maybe clang.cc.lib
<clever> Ankhers: for clang, you want to instead use clangStdenv
<clever> Ankhers: try gcc.cc.lib
<clever> __red__: what are you setting services.httpd.virtualHosts to?
<clever> yep, that will do it
<clever> exarkun: did you set keepDotGit ?
<clever> exarkun: then youll have the $out for each, and can just run plain `diff -r` on the 2 dirs
<clever> exarkun: if you use `nix-hash` to convert the base32 hashes to base16, you can then query both in the DB
<clever> hash = sha256:51858393c5698aba2e7c4e2832054a6985ab3eeda5db7373db5627d0acceefa8
<clever> sqlite> .mode line
<clever> sqlite> select * from ValidPaths limit 1;
<clever> [root@amd-nixos:~]# sqlite3 /nix/var/nix/db/db.sqlite
<clever> evanjs: what is the nix expression that you tried to nix-build?
<clever> evanjs: ive not really tried to override parts of the stdenv

2020-03-15

<clever> tnks: you can read it with `nix-store -l` or `nix log`
<clever> tnks: nix saves the full log to /nix/var/log/
<clever> tnks: `nix build` will show progress, but only the most recent line, from everything combined, with the name as you wanted
<clever> tnks: if you know which drv is failing, you can also just `nix-store -r /nix/store/foo.drv` to re-build it without any parallelism
<clever> tnks: you either want `nix build` (instead of `nix-build`) or `nix-build -Q`

2020-03-14

<clever> kolaente_: you could just `rm -rf ~/.cache/nix` to clear the cache, and nix will re-make it
<clever> ive also heard that such mac's cant boot with the SSD missing
<clever> samueldr: yeah, ive heard that the nvme is part of the T2 security chip
<clever> and linux needs a patch to the kernel
<clever> lovesegfault: i suspect you will loose all data if you try to move the ssd to another mac
<clever> lovesegfault: apple has a custom nvme controller, that i think does transparent hw encryption
<clever> lovesegfault: apple does even more whacky stuff
<clever> Ashy: if its missing from lspci, then the bios has either disabled it, or its not seated properly
<clever> Ashy: what does lspci say?
<clever> ive memorized the codebase :P
<clever> ah
<clever> samueldr: HYDRA_DBI and PGPASSFILE are likely also used
<clever> samueldr: and dynamically update the internal machine list when the last-mod timestamp changes
<clever> samueldr: hydra-queue-runner will poll every file in $NIX_REMOTE_SYSTEMS once per minute
<clever> samueldr: that then gets passed to hydra-queue-runner, via an env var
<clever> 23 NIX_REMOTE_SYSTEMS = concatStringsSep ":" cfg.buildMachinesFiles;
<clever> samueldr: buildMachinesFiles lets yoou point hydra to secondary files that nixos isnt managing, which lets custom tools add/remove machines dynamically
<clever> samueldr: via that option
<clever> 169 default = [ "/etc/nix/machines" ];
<clever> 170 example = [ "/etc/nix/machines" "/var/lib/hydra/provisioner/machines" ];
<clever> 167 buildMachinesFiles = mkOption {
<clever> samueldr: by default, it only reads /etc/nix/machines, which is managed by nix.buildMachine
<clever> samueldr: hydra can take a list of files, that all have the /etc/nix/machines syntax
<clever> OmnipotentEntity: what did gogui do?

2020-03-13

<clever> kaliumxyz: the nixos firewall prints that by default, and it blocks all incoming by default
<clever> atemu12[m]: ^^
<clever> ,locate
<clever> adisbladis: yep, clear is in ncurses
<clever> ,locate bin clear
<clever> then just delete the .env part
<clever> you must use .env when pointing nix-shell to a haskell thing
<clever> lovesegfault: .env is specific to haskell packages
<clever> the rest is defining custom scripts that wind up in $PATH, and aid in debugging this specific case
<clever> lovesegfault: https://github.com/input-output-hk/cardano-sl/blob/parallel-restore/wallet/shell.nix line 34 is the override, and 2 is the default.nix
<clever> grabbing an example...
<clever> lovesegfault: put an override into the shell.nix
<clever> and does the -A for you
<clever> lovesegfault: what i sometimes do, is sprinkle shell.nix files in each subdir, which imports a default.nix one dir up
<clever> (import ../. {}).daedalus-installer.env
<clever> [clever@amd-nixos:~/iohk/daedalus/installers]$ cat shell.nix

2020-03-12

<clever> LnL: what about the older `nix-store -l` ?
<clever> LnL: last time i looked into it, nix can only store success, and failures are treated as it never tried
<clever> pie_[bnc]: nix doesnt save the output for failed builds
<clever> Jonathan5: you want clangStdenv.mkDerivation to get clang working

2020-03-11

<clever> exarkun: they can also be set by the stdenv and any setup hooks, try running nix-shell on the .drv file, and check the real env of that shell
<clever> exarkun: it has both a stripDebugList and a stripAllList
<clever> exarkun: have you read nixpkgs/pkgs/build-support/setup-hooks/strip.sh ?
<clever> yep
<clever> but for a gui desktop, no
<clever> for a remote machine, i can almost see that being useful
<clever> its very hard to debug, when you run `git commit` and it just silently hangs, because the pw prompt opened on another ssh session
<clever> ratsclub: and then the GUI starts asking for pw prompts over an ssh session coming from the laptop!
<clever> ratsclub: it automatically re-binds the gpg agent to the new tty, every time i ssh into the machine
<clever> ratsclub: ive intentionally not enabled the gpg support in nixos
<clever> default-cache-ttl 34560000
<clever> $ cat ~/.gnupg/gpg-agent.conf
<clever> ratsclub: ive been doing that with normal config files
<clever> johnw: on linux, you could use chroot, as long as the nix binary is pre-copied
<clever> johnw: on darwin, you cant really do that, because the nix binary itself is in /nix/store
<clever> johnw: a bug within nix, ?root=/path doesnt affect everything properly
<clever> zimbatm: you about?
<clever> i try to avoid with when possible
<clever> lovesegfault: check the length of builtins.attrNames ?