2019-09-04

<clever> DariusTheMede: you need to use -E instead
<clever> DariusTheMede: i dont think -p accepts --arg config
<clever> __monty__: toxvpn does need internet access to find other peers
<clever> __monty__: yeah
<clever> nakkle: depends on if its a module level arg, or a function outside the module
<clever> __monty__: the firewall can block pings over the vpn, after the vpn itself is working
<clever> nakkle: the imports value must not depend on the args the module receives, because the args you receive can come from other modules in imports
<clever> __monty__: and most systems dont block outgoing traffic, or the replies to that
<clever> __monty__: toxvpn uses udp, and the firewall lets replies to udp come back in, it treats it like an outgoing connection
<clever> __monty__: linux rarely blocks outgoing traffic
<clever> __monty__: if ssh works one way, then the vpn is fully working, and its just firewalls
<clever> __monty__: that sounds like its just the nixos firewall, can mac ping 192.168.2.4?
<clever> __monty__: what ip's are you using, and what is your lan?
<clever> __monty__: you cant exchange packets until toxvpn says the other peer is online
<clever> __monty__: does toxvpn show the 2 peers as being connected, and having non-conflicting IP's?
<clever> __monty__: sounds like your using the wrong ip
<clever> waleee-cl: i have seen nixos-unstable-small update a few times since then
<clever> __monty__: run the tcpdump on the tun interface, of both machines, local and remote, does something going in one end, come out the other?
<clever> Ariakenom: nope
<clever> `This is a demo appliance for VirtualBox (in OVA format) that has X11 and Plasma 5 enabled, as well as the VirtualBox guest additions.`
<clever> Ilya_G: the above nix-build will produce the same ova files that https://nixos.org/nixos/download.html offers for download
<clever> Ilya_G: it might be as simple as: nix-build '<nixpkgs/nixos/release.nix>' -A ova.x86_64-linux
<clever> Ilya_G: or use nixos/release.nix
<clever> Ilya_G: that is a nixos module, and its already part of nixos, you want to run nix-build on <nixpkgs/nixos>
<clever> __monty__: run tcpdump on the tun interface at both ends
<clever> just let it run as root
<clever> __monty__: ah, maybe i never tested -u on mac
<clever> __monty__: the `-u foo` assumes you run it as root, and it will drop-root on its own after opening things
<clever> __monty__: oh, lol
<clever> __monty__: you need to load the tun driver from the openvpn project
<clever> __monty__: unable to open /dev/tun0
<clever> Ariakenom: because you should generally avoid editing hardware-configuration.nix, since nixos-generate-config overwrites it
<clever> Ariakenom: that means you can set it again in configuration.nix and it wont conflict
<clever> elux: yep
<clever> elux: https://github.com/cleverca22/nixos-configs/blob/master/deployments/house.nix is how i manage my nas and router at home

2019-09-03

<clever> jasom: clangStdenv, instead of stdenv
<clever> yeah
<clever> hyperfekt: if its a set or a list, yes
<clever> and it will then rebuild whatever it needs to
<clever> jasom: if you need a certain library with debug, you can do `--arg config '{ packageOverrides = pkgs: { libfoo = pkgs.enableDebugging pkgs.libfoo; }; }'`
<clever> jasom: from all-packages.nix
<clever> | 395 enableDebugging = pkg: pkg.override { stdenv = stdenvAdapters.keepDebugInfo pkg.stdenv; };
<clever> | 394 # intended to be used like nix-build -E 'with import <nixpkgs> {}; enableDebugging fooPackage'
<clever> Stuck_: yeah, so it was likely ~/.ghc/ that has been causing all of your problems
<clever> Stuck_: you had something in your ~/.ghc that hid all packages
<clever> Stuck_: does import work in ghci?
<clever> Stuck_: expose will never work
<clever> Stuck_: try removing x86_64-linux-8.6.4
<clever> Stuck_: or are you still stuck?
<clever> Stuck_: any change?
<clever> evanjs: that will cause it to install the devman output of things in systemPackages
<clever> evanjs: https://nixos.org/nixos/options.html#documentation.dev.enable and click declared in's link
<clever> evanjs: but it wont install the man pages for libc things
<clever> evanjs: documentation.man.enable just installs man, and installs the .doc output of things in systemPackages
<clever> nhey_: i use https://gist.github.com/cleverca22/37af9840ed40406ed89f0fda4992c55b to get a collection of man pages
<clever> ,libraries nhey_
<clever> pbb: what does `dmsetup ls` report?
<clever> pbb: what was on it then?
<clever> pbb: mdadm? luks?
<clever> pbb: was lvm previously on the device?
<clever> Stuck_: try removing x86_64-linux-8.6.4
<clever> Stuck_: what does `ghc-pkg list | grep random` say?
<clever> Stuck_: what is within that?
<clever> Stuck_: do you have a ~/.ghci file?
<clever> Stuck_: it works perfectly here
<clever> Stuck_: ghcWithPackages gives you a ghc already
<clever> Stuck_: what if you remove p.ghc from the list?
<clever> Stuck_: ghc expose will never work under nix
<clever> boxdot: the ninja setup hook, will overwrite the buildPhase, and the cmake setup hook will detect that, and change the cmake flags
<clever> zeta_0: only if somebody gets a pr for that merged before then
<clever> you can also see the setup hooks in both packages
<clever> boxdot: sorta, its a convention setup within nixpkgs, that happens inside the nix builds
<clever> zeta_0: i think the package is done, it just needs a module to be built
<clever> hyperfekt: yeah
<clever> boxdot: then repeat the above on cmake also
<clever> boxdot: the setup hooks, run `nix-build '<nixpkgs>' -A ninja` and then `ls -l result/nix-support`
<clever> zeta_0: it doesnt appear to have a nixos module yet
<clever> Stuck_: probably
<clever> hyperfekt: nix-shell is handy when the thing is burried in let blocks and imposible to access with -A
<clever> hyperfekt: nix-copy-closure can copy the drv files to a remote machine, nix-store -r /nix/store/foo.drv can re-build a drv, and skip the expensive eval, nix-shell /nix/store/foo.drv can shell into a drv to reproduce failures
<clever> Stuck_: i'm not sure why it isnt working when you install it system wide, but ^^
<clever> Stuck_: it works perfectly fine on this end
<clever> Stuck_: i also prefer to not install ghc system-wide, and to only use it from within a nix-shell
<clever> Stuck_: that should just work..., what does `type ghci` return?
<clever> Stuck_: how are you running ghci?
<clever> Stuck_: did you add random to your cabal file as a dependency?
<clever> Stuck_: what is claiming its hidden?
<clever> srhb: this bakes it into the sqlite state, so you dont need a shell.nix
<clever> srhb: nixops modify -I nixpkgs=something foo.nix
<clever> asymmetric: can you verify your reader works in another os?
<clever> _d0t: put the new nix into nix.package in configuration.nix and nixos-rebuild switch
<clever> asymmetric: that wont matter much
<clever> etu: yeah
<clever> asymmetric: anything of the right size in `lsblk` ?
<clever> asymmetric: with the card back in, what does `ls -l /dev/mmc*` return?
<clever> etu: oh right, thats the ID card stuff
<clever> asymmetric: if you pop the SD card out, does it disapear from lsusb?
<clever> arch lied to you :P
<clever> asymmetric: there it is, its a usb device, not a pci device
<clever> Bus 001 Device 002: ID 058f:9540 Alcor Micro Corp. AU9540 Smartcard Reader
<clever> asymmetric: what about `lsusb` from usbutils?
<clever> use the lspci from pciutils
<clever> asymmetric: theres your problem
<clever> asymmetric: what does `type lspci` report?
<clever> no flags at all
<clever> can you pastebin another without -k?
<clever> what args did you use?
<clever> asymmetric: that lspci looks strange
<clever> asymmetric: and the full dmesg output
<clever> asymmetric: can you pastebin the full lspci output?
<clever> asymmetric: and if its not showing in lspci, then linux cant load a driver for it, there is nothing for the driver to drive
<clever> asymmetric: is an SD card in the slot currently?
<clever> asymmetric: and if it does not show up in lspci, how do you know the model of the device?
<clever> asymmetric: once the system is booted, availableKernelModules means nothing, and it can just load any module it needs to load
<clever> Ariakenom: already showed that it was
<clever> 2019-09-03 09:37:58 < clever> > pkgs.pkgsCross.avr.buildPackages.gcc
<clever> 2019-09-03 09:38:01 < {^_^}> "<derivation /nix/store/5yanyfpfpyhxsg44fzkmswbq9vdcngj2-avr-stage-final-gcc-debug-wrapper-7.4.0.drv>"
<clever> Ariakenom: did you look at how all-packages.nix is loading simavr?
<clever> Ariakenom: what are you trying to do?
<clever> > pkgs.pkgsCross.avr.buildPackages.gcc
<clever> Ariakenom: except in cases where an override has been given to it via the 2nd arg of callPackage
<clever> $ grep -r --color simavr ~/apps/nixpkgs/pkgs/top-level/all-packages.nix -A5
<clever> avrgcc = pkgsCross.avr.buildPackages.gcc;
<clever> simavr = callPackage ../development/tools/simavr {
<clever> > pkgs.avrgcc
<clever> Ariakenom: callPackage then gets it from pkgs
<clever> ,callPackage Ariakenom
<clever> ,profiling

2019-09-02

<clever> kraem: you want rec on your override
<clever> kraem: and you need to call fetchFromGithub when overriding src, your overlay just sets src to a set with just one attr
<clever> kraem: you want self.fetchFromGithub
<clever> kraem: you need to override src= also, because the rec { means the version= alone wont do it
<clever> pbb: no, but if configure cant be found, it will silently skip that phase
<clever> +1
<clever> pbb: i dont think doBuild is a valid option, try `buildPhase = ":";` ?
<clever> kraem: refer to the new version of the file to see how src= was computed
<clever> kraem: simplest is to just override the version= and src=, using normal .overrideAttrs
<clever> fresheyeball: what happens if you run `xlsclients`, and did you sleep long enough for X to actually start?
<clever> the 2nd one
<clever> fresheyeball: that touch isnt doing anything
<clever> kraem: nixpkgs.overlays = [ (self: super: { .... }) ];
<clever> kraem: nixos overlays are set with the nixpkgs.overlays option, in configuration.nix
<clever> kraem: yeah
<clever> kraem: might be simpler to just read that git rev, and then write an overlay that changes the versions of both vulkan packages
<clever> ,howoldis Shyim[m]
<clever> Shyim[m]: youll need to wait until unstable updates
<clever> .howoldis Shyim[m]
<clever> Shyim[m]: or just wait a day for somebody else to fix it
<clever> Shyim[m]: the assertion means that the headers and main package for vulkan are of different versions
<clever> and X wants it to have the same sticky bit as /tmp, so anybody can create a socket, and own it properly
<clever> fresheyeball: its a directory, with sockets for each server
<clever> $ ls -lh /tmp/.X11-unix/
<clever> srwxrwxrwx 1 root root 0 Sep 1 15:01 X0
<clever> total 512
<clever> fresheyeball: also, that is not the right path to the socket
<clever> fresheyeball: that sounds like X is still creating the unix socket, not socat
<clever> Shyim[m]: do you have any overrides on vulkan?
<clever> Shyim[m]: what does line 8 of that file say?
<clever> Shyim[m]: and consider getting an FS that doesnt scramble everything at the slightest problem
<clever> Shyim[m]: that .drv file was also corrupted, do a `nix-collect-garbage` to just nuke all unused things
<clever> Shyim[m]: yep
<clever> Shyim[m]: do a `nix-channel --rollback` as root to undo the last change
<clever> Shyim[m]: you had an improper shutdown after updating your channels and the manifest.nix has been corrupted
<clever> Shyim[m]: ls -lL /nix/var/nix/profiles/per-user/root/channels/manifest.nix
<clever> to get around X being upset about /tmp having the wrong permissions
<clever> you can use socat to create such a socket, and proxy it to the tcp port X is listening on
<clever> fresheyeball: which routes to the X server
<clever> fresheyeball: most X programs expect a unix socket in /tmp/.X11-unix/
<clever> fresheyeball: then just tell X to not listen on unix
<clever> fresheyeball: have a look at the socat man page, you should be able to make socat listen on a unix socket, and forward everything to a tcp port
<clever> fresheyeball: same problem then, its upset about the uid's of /tmp things, try `--option sandbox false` ?
<clever> which costs you a whole 12mb!!
<clever> but it will still install legacy-bios modules to /boot/grub/
<clever> that will instruct grub to not update the stub in the MBR
<clever> thoughtpolice: ive yet to find a motherboard in my collection that is supported
<clever> pbb: which is actually what you want, when grub is the payload, the cfg, without the loader!
<clever> so you only get the config file, with no binary
<clever> so if you switch from grub to systemd-boot, it doesnt even install the systemd-boot binaries!
<clever> pbb: but systemd-boot does have anything like that, at all
<clever> pbb: nixos grub uses /boot/grub/state to detect when the version in the boot partition is out of sync with nixos, and auto-reinstalls the bootloader
<clever> pbb: that reminds me of a recent bug i discovered with systemd-boot, lol
<clever> thoughtpolice: yeah, ive heard about the whole payload stuff, and i think there was something about how you need the seabios payload if you want the legacy bios api available to grub
<clever> ahhh
<clever> enless that coreboot was very minimal?
<clever> pbb: i would expect most x86 bios to provide working graphics
<clever> pbb: x86 or arm?
<clever> pbb: cant grub already do that with its normal background image stuff?
<clever> pbb: ah, yeah, definitely a use for buildEnv
<clever> pbb: why do you want to merge 2 together?
<clever> pbb: nixos option definitons or plain sets?
<clever> fresheyeball: what error does it give?
<clever> fresheyeball: what error does it give?
<clever> fresheyeball: if your not connecting to its vnc port, it should be functionally identical to Xvfb
<clever> ,locate Xvnc
<clever> fresheyeball: you may also want to try Xvnc to see if it has the same trouble
<clever> fresheyeball: you can still use socat to proxy a unix socket to a tcp socket, which could hack around that
<clever> fresheyeball: i think its trying to set the sticky bit on .X11-unix
<clever> ivan: neat
<clever> oh, nice
<clever> i also discovered, that if you add invalid entries to fstab (i had escaping trouble with a space in a mount point), systemd will happily kill the entire machine, the instant you rebuild-switch
<clever> but nixos will undo that at the next boot or switch
<clever> sphalerite: yeah, delete the /etc/fstab symlink, replace it with a file containing the same contents, then edit-away
<clever> sphalerite: you need to add a nofail thing to the fstab options
<clever> i cant remember why i didnt use screen, because i use screen for everything
<clever> m1cr0man: i also have my own weechat service i wrote a while back
<clever> m1cr0man: but screen does have a multi-user attach mode ive never used, that can smooth over those issues
<clever> m1cr0man: you need to change the owner of whatever `tty` prints out, before you can successfully do it
<clever> m1cr0man: also, `sudo -u weechat screen -x` will fail, because screen cant open /dev/tty, which is owned by the wrong user
<clever> -S sessionname
<clever> -D -m This also starts screen in "detached" mode, but doesn't fork a new process. The command exits if the session terminates.
<clever> m1cr0man: what user is screen running as, `ps aux | grep -i screen` ?
<clever> m1cr0man: check `systemctl status` on that service
<clever> Melkor333: you could also make your own nixos option, that both sets settings, and puts your package into systemPackages
<clever> Melkor333: not really, you just have to tell users to do that
<clever> fresheyeball: though you may need to run the x server with -auth pointing to the file
<clever> fresheyeball: i believe the X server will then generate the cookie and write it to that file for you
<clever> fresheyeball: you have to point XAUTHORITY to a file, before you run the X server
<clever> glittershark: nixpkgs only supports the old build
<clever> fresheyeball: both Xvfg and Xvnc should work for your issue
<clever> fresheyeball: its a headless X server, with a vnc server baked into it
<clever> fresheyeball: Xvnc is another hack ive used before
<clever> new-build also makes that file, which breaks old-build
<clever> glittershark: is there any hidden files like `.ghc*` ?
<clever> glittershark: yeah
<clever> glittershark: you have some new-build junk in the dist dir, `rm -rf dist` and try again with `cabal configure` and `cabal build`
<clever> ivan: ?
<clever> ivan: https://github.com/cleverca22/nix-tests/blob/master/kexec/session.md, you may also want to edit the `configuration.nix` to include your own public key
<clever> ivan: then you want my kexec stuff
<clever> ivan: ah, do you want to wipe the disk and install nixos on it?
<clever> ivan: zfs and xfs support some of that, so it heavily depends on what fs your using
<clever> mightybyte: root is trusted by default
<clever> mightybyte: it only works if you are a trusted user in the main nix.conf file
<clever> the nixos tests let you just enable xorg as normal
<clever> if your dealing with XAUTHORITY, then your not headless
<clever> fresheyeball: the nixos test cases can do that
<clever> fresheyeball: you probably need to launch an entire X server
<clever> Phillemann: amd card
<clever> Phillemann: my system locks up solid if i unplug a monitor before turning it off
<clever> Phillemann: for unfree packages, you want to set hydraPlatforms, so its still marked as "working" but hydra wont try to build it
<clever> Phillemann: feel free to file PR's to get those errors down
<clever> and this is a combined jobset, nixpkgs + nixos
<clever> pbb: if its in the pkgs tree, then the nixpkgs jobset will get it
<clever> one glance at that will tell you why nobody noticed an error
<clever> Phillemann: so the error will appear in this page
<clever> ,howoldis
<clever> so it would appear on the eval errors tab in hydra
<clever> of*
<clever> you would need a gpu accel mode in qemu, that vulkan can make use ot
<clever> ah, but you cant really test it, because qemu doesnt have gpu accel
<clever> Phillemann: isnt vulkan doing gpu compute?
<clever> mikky: and there isnt much point in putting rainloop into systemPackages, it doesnt do antyhing
<clever> mikky: once you add that to the nginx config, it should immediatelly spring to life and copy it over
<clever> mikky: and nixops is copying the runtime closure, so it ignores rainloop-community
<clever> mikky: i think the problem, is that rainloop-community doesnt contain any bin directories, so systemPackages only depends on it at buildtime, not runtime
<clever> mikky: which will insert the proper path into the config files
<clever> mikky: rainloop-community isnt meant to go in systemPackages, your meant to use it in an expression that configures the http server
<clever> mikky: what files do you expect rainloop-community to provide once installed?
<clever> mikky: run that nix-store command on the machine with nixops, not the target
<clever> mikky: ls -l /run/current-system/sw/index.php
<clever> mikky: why do you think rainloop-community is not appearing in systemPackages?
<clever> mikky: nix-store -r /nix/store/m29n2fazi75yr9imizh1n2rnx3wa0ijx-system-path.drv
<clever> mikky: yes
<clever> mikky: i would expect that to work, what does `nixops deploy` print if you swap the order of htop and rainloop?
<clever> mikky: what does `nixops info` say for the nix exprs? (it will be a list of nix files)
<clever> mikky: gist supports multiple files, that makes things a lot cleaner to read
<clever> Stuck_: yeah
<clever> Stuck_: now its finding the one in systemPackages
<clever> Stuck_: no, check `type ghc` again
<clever> mikky: no, the .nix files your defining htop and rainloop-community in
<clever> Stuck_: the default in that path means its roots ghc, so you want to `sudo nix-env -q`
<clever> Stuck_: with or without root?
<clever> Stuck_: check `nix-env -q` and uninstall the name it shows with -e
<clever> Stuck_: its still in roots nix-env, you didnt remove it
<clever> mikky: can you gist all of your nix files?
<clever> mikky: how do you know rainloop-community isnt being installed
<clever> > rainloop-community
<clever> Stuck_: does `type ghc` agree with you? what does it say?
<clever> Stuck_: if you remove it from systemPackages, does `type ghc` say its gone?
<clever> nice
<clever> Stuck_: you must use the ghc provided by haskellPackages.ghcWithPackages, installing the library wont work, installing a normal ghc wont work
<clever> hyperfekt: there are some utils to search for fs headers, and discover where partitions should begin
<clever> superbaloo: i believe the platform thing is in master now
<clever> superbaloo: sounds simpler to just use the official installer for nix, https://nixos.org/nix/install
<clever> superbaloo: yeah, you could check to see if debian has a newer version
<clever> superbaloo: then youll need to upgrade nix, and see if that adds it, what does `type nix` return?
<clever> superbaloo: then you want to check `nix show-config | grep platforms` and see if your nix supports extra-platforms
<clever> superbaloo: it will also configure nix to support that, so you can just build a non-cross nixos for the rpi
<clever> superbaloo: that will magically allow you to run arm binaries, including the arm->arm gcc, as a "native" build
<clever> superbaloo: git clone this repo, then add /path/to/qemu.nix to your imports list, and set qemu-user.arm = true;