2019-09-07

<clever> zeta_0: i dont think nautilus on its own can do it, it needs services that gnome/xfce runs, which xmonad has replaced
<clever> zeta_0: i think some desktop managers can auto-mount it
<clever> and its been having other issues lately, so ive just not enabled it
<clever> sb0: https://github.com/cleverca22/nixos-configs/blob/master/router.nix#L65-L81 does the radvd end of things, but the actuall tunnel is just a shell script i source every time i reboot :(
<clever> sb0: actually, half yes, i never finished doing it "right"
<clever> sb0: yes
<clever> boxscape: use -I to change what <nixpkgs> maps to
<clever> contrun[m]: the --arg can also take a path, so the $(cat isnt needed
<clever> contrun[m]: nix-shell -p '(import <nixpkgs/nixos> { configuration = ./kernel-dev.nix; }).vm'
<clever> DariusTheMede: git bisect to find when it broke

2019-09-06

<clever> fresheyeball: yes
<clever> fresheyeball: that will return a string with a sha1 in it, which you then just add to your drv
<clever> fresheyeball: why must it be a derivation?, an eval time string can do the same thing
<clever> fresheyeball: fetchGit, and several lib functions (that i cant find) will do that, without a derivation
<clever> fresheyeball: use ! to invert the filter
<clever> you could add more to that list
<clever> --option substituters "https://cache.nixos.org" would use that
<clever> pikajude: --option can be used to override any field in nix.conf
<clever> DariusTh`: domenkozar[m]
<clever> fresheyeball: is it being ran on a git repo?
<clever> fresheyeball: oops, fetchGit
<clever> fresheyeball: builtins.fetchgit ./. will get you that
<clever> fresheyeball: did you get new .drv files, and are you using cleanSource?
<clever> DariusTh`: that sounds like the nix expr is just broken
<clever> DariusTh`: you have to restart nix-daemon if you change nix.conf
<clever> DariusTh`: is cachix configured in /etc/nix/nix.conf ?
<clever> DariusTh`: ls -lh ~/.config/nix/nix.conf
<clever> 2019-08-23 01:13:55< ryantm> "We do not recommend using ~/.config/nix/nix.conf unless you are a power user. It's simpler to have only one global config file."
<clever> DariusTh`: in your home dir
<clever> DariusTh`: check your local machine to see if the file i just pasted exists
<clever> DariusTh`: does that file exist?
<clever> 2019-08-23 01:13:55< ryantm> "We do not recommend using ~/.config/nix/nix.conf unless you are a power user. It's simpler to have only one global config file."
<clever> fresheyeball: cleanSource will already ignore .git by default
<clever> fresheyeball: its in the nixpkgs manual i believe
<clever> cleanSource can clean most of those up
<clever> fresheyeball: also, try using `diff -r /nix/store/ia83szf79darxc2m1275f0vx1h6ykix2-kassir /nix/store/9srk6j3zx2qhbaasy0v9dnv7pgh0yf35-kassir`
<clever> fresheyeball: your ./. doesnt match perfectly between the 2 machines, so its considered a different version
<clever> fresheyeball: you need to use lib.cleanSource when doing ./.
<clever> and matrix is back to matrix is once more!
<clever> fresheyeball: seperately, do `nix-instantiate something.nix -A something` on your project, on both machines, then do `nix-copy-closure --from 192.168.2.10 /nix/store/something.drv` to get both versions of the drv on the same machine, then use nix-diff to compare the 2
<clever> fresheyeball: first, do `nix-store --query --binding out /nix/store/foo.drv` to get the $out, so they are the same type
<clever> fresheyeball: if you have a /nix/store/foo and a /nix/store/foo.drv, dont bother trying to compare them
<clever> you want the output path inside the drv
<clever> the hashes will never match
<clever> dont bother comparing drv and non-drv files
<clever> fresheyeball: use nix-copy-closure to get the .drv from both of them onto the same machine, then run nix-diff on both drv files
<clever> fresheyeball: is nix-build creating the exact same $out ?
<clever> fresheyeball: check `nix-store -r -vvv` again on a path it should pull
<clever> fresheyeball: that means it worked, try with nix again
<clever> colemickens: config = lib.mkIf (networkmanager.wireless.backend == "iwd") { wireless.iwd.enable=true; };
<clever> fresheyeball: journalctl -f -u sshd
<clever> nix-ssh*
<clever> fresheyeball: check the journal on the machine with nix-serve, does it say anything in the sshd logs, when you try to ssh into nix-serve?
<clever> fresheyeball: its created when you enable sshServe
<clever> fresheyeball: double-check /etc/ssh/authorized_keys.d/ on the remote machine, is ~/.ssh/id_rsa.pub authorized on nix-ssh?
<clever> fresheyeball: can root ssh to that user&ip?
<clever> fresheyeball: no, you want nix-ssh@192.168.1.10
<clever> fresheyeball: nix adds the keys to a user called nix-ssh, not isaac
<clever> 2019-09-06 13:50:33 < fresheyeball> error: cannot connect to 'isaac@192.168.1.10'
<clever> fresheyeball: your not using the nix-ssh user
<clever> fresheyeball: the private key just goes into the default dir, run `ssh-keygen` as root, and do all defaults
<clever> fresheyeball: and the sshServe option creates a nix-ssh user for that key, so you dont give out root
<clever> an agent wont work
<clever> fresheyeball: make a second key for the cache usage
<clever> fresheyeball: root must have an ssh key in its ~/.ssh, that lacks a passphrase
<clever> fresheyeball: check its timestamps
<clever> 2019-08-23 01:13:55< ryantm> "We do not recommend using ~/.config/nix/nix.conf unless you are a power user. It's simpler to have only one global config file."
<clever> fresheyeball: so you lied :P
<clever> fresheyeball: or just: ls -lh ~/.config/nix/nix.conf
<clever> fresheyeball: `find ~ -name nix.conf`
<clever> fresheyeball: do you have a nix.conf in $HOME?
<clever> fresheyeball: do they agree?
<clever> fresheyeball: compare /etc/nix/nix.conf to `nix show-config | grep substituters`
<clever> fresheyeball: or you have a 2nd nix.conf in $HOME, or you used mkForce
<clever> fresheyeball: nix show-config | grep substituters
<clever> boxdot: nix-store -qR
<clever> fresheyeball: try adding a -vvv, and use a pastebin for the full log
<clever> and we got matrixed!
<clever> and on the other one?
<clever> fresheyeball: what happens if you run `nix-store -r /nix/store/891q5c3xk5ipdpx89zvwah381vnq2m9f-kassir` ?
<clever> fresheyeball: find a path on one machine, and not another, preferably also not in the upstream cache (like `ls -l /run/current-system`) and then run `nix-store -r /nix/store/thatpath` on the other machine
<clever> fresheyeball: what was the error message?
<clever> you want the other option
<clever> fresheyeball: trustedBinaryCaches does almost nothing, it jsut allows untrusted users to opt-in
<clever> fresheyeball: and on the other machine, what is in trusted-public-keys on nix.conf?
<clever> fresheyeball: on a path that is failing to copy
<clever> fresheyeball: yeah
<clever> fresheyeball: run this, on a path that is failing to copy, what signatures are on it?
<clever> /nix/store/4nlyyzbl1r1vr4jiqlnl134w5xpznh34-binutils-wrapper-2.30 hydra.iohk.io:WpdhvMryCHyb9DmUYOwfvdWePPK7mwYtZb8pUPGewpTBw0rEByfL9334c1VPM9uMu03CUa886Fc5XBFY7w2xCA==
<clever> $ nix path-info /nix/store/4nlyyzbl1r1vr4jiqlnl134w5xpznh34-binutils-wrapper-2.30 --sigs
<clever> your only setting a single top-level key, so merging it easy
<clever> infinisil: without typing, you would just have to // things together
<clever> zajko: how about a simple if file doesnt exist, create it with this string
<clever> but thats just going to cause more confusion? when config.nix doesnt do anything
<clever> if this file exists, then nixpkgs will entirely ignore config.nix in $HOME
<clever> $ echo $NIXPKGS_CONFIG
<clever> /etc/nix/nixpkgs-config.nix
<clever> one other option
<clever> and you cant just have thst installed by default for them, via configuration.nix?
<clever> with import <nixpkgs> { config.allowUnfree = true; };
<clever> zajko: in the nix file that is loading unfree software, you can just set allowUnfree = true;
<clever> zajko: you could just modify your nix exprs to ignore the users config.nix file
<clever> so the user can choose for himself, for most things, but the script will have its own choice
<clever> this will just ignore config.nix entirely, and always use the value you give it
<clever> nix-build '<nixpkgs>' -A hello --arg config '{ allowUnfree = true; }'
<clever> but you can just ignore config.nix entirely
<clever> zajko: you would need to edit it manually, theres not really an automated way to do it yet
<clever> $ nix-instantiate ~/.nixpkgs/config.nix --eval -A allowUnfree
<clever> true
<clever> jonreeve[m]: i can then just programs.vim.fat = false; to trim the fat
<clever> jonreeve[m]: this is the config for my vim, and it also defines a programs.vim.fat option, that controls if my vim config should include some heavy deps
<clever> jonreeve[m]: not possible, but you can define your own options, and then just set them like any other option
<clever> thats what ive been using
<clever> 170 fonts = [ pkgs.unifont pkgs.noto-fonts-cjk ];
<clever> 166 fonts = {
<clever> manveru: thats usually in a CJK font package
<clever> marius851000[m]: you want import <nixpkgs> {}
<clever> marius851000[m]: pkgs.callPackage will fail the same way, pkgs if a function, not a set
<clever> marius851000[m]: that is a function, not a set, so you cant do pkgs.fetchurl
<clever> marius851000[m]: you have pkgs ? import <nixpkgs>
<clever> marius851000[m]: your problem is on line 1
<clever> DariusTh`: you need to add a stdenv.mkDerivation { name = "name"; buildInputs = [ (ghcWithPackages ...) ]; }
<clever> 2019-09-06 10:38:19 < clever> DariusTh`: -p will generate a drv, that has everything listed under buildInputs
<clever> DariusTh`: that is a shell suitable for creating ghcWithPackages, not using it
<clever> DariusTh`: you didnt put ghcWithPackages into the buildInputs of something
<clever> DariusTh`: can you paste the full command that doesnt work?
<clever> DariusTh`: -p will generate a drv, that has everything listed under buildInputs
<clever> marius851000[m]: can you paste the entire imagemix.nix file?
<clever> what error did it give?
<clever> marius851000[m]: why doesnt it work?
<clever> marius851000[m]: also, you can treat any derivation as a string, which gets the outPath
<clever> > let drv = stdenv.mkDerivation { name = "foo"; }; in "${drv}"
<clever> but releaseTools.nixBuild doesnt support pname!
<clever> oh, it was called hydra, somebody upgraded it to the newer pname style
<clever> so you need confusing advice like `nix-env -i nix-build`
<clever> whoever packaged hydra, forgot to set the name to hydra
<clever> nix-build is the default name for that helper function
<clever> something funky is going on with the hydra package
<clever> wait, thats not even the hydra package
<clever> the "name" of the hydra package, is nix-build!!
<clever> boom, theres the entire cause of the confusion
<clever> is ~/.nix-profile/bin/ in $PATH?
<clever> yeah, thats hydra
<clever> VaNilLa[m]: the command i gave, will ls bin
<clever> the bin at the end is missing
<clever> VaNilLa[m]: what does `ls -l /nix/store/3ragnilnlj035dkwirkq6x0sypidjpq9-nix-build/bin/` show?
<clever> VaNilLa[m]: can you enable ssh, then just ssh into it?
<clever> VaNilLa[m]: there is no package called nix-build, can you pastebin the contents of ~/.nix-profile/manifest.nix ?
<clever> VaNilLa[m]: can you pastebin the entire output of `nix-env -q` ?
<clever> VaNilLa[m]: `nix-env -iA hydra` shouldnt install nix-build, what does `nix-env -q` report?
<clever> VaNilLa[m]: what is the exact command you ran?
<clever> VaNilLa[m]: after you ran nix-build, did you `ls -l result/bin/` ?

2019-09-05

<clever> 2019-09-05 20:40:03 < clever> secret-key-files goes into nix.conf, via nix.extraConfig
<clever> nixos does have a nix.conf, its in the same place, /etc/nix/nix.conf
<clever> oh, i read that as "not nixos"
<clever> then create one
<clever> then nix will sign everything it generates
<clever> yeah, the secret has to go into secret-key-files in nix.conf
<clever> which can be even more ugly :P
<clever> other distros dont have \n or \r, so the prompt turns into: dunlap-1:4lzFs1Psk1Sq4SPSRFberfL[root@amd-nixos:~]#
<clever> the default nixos prompt starts the prompt with \n to prevent such issues
<clever> and the file didnt end with `\n`, so the cursor was still on the same line as the output
<clever> the shell starts its prompt with \r, which rewinds to the start of the line
<clever> your shell is to blame
<clever> fresheyeball: there is no \n at the end of the file, some shells are dumb and overwrite the `cat public` with your prompt
<clever> fresheyeball: are you sure the files are empty? what does `less` say about them? (also the secret is in the pastebin, make a new pair)
<clever> write(3, "dunlap-1:4lzFs1Psk1Sq4SPSRFberfL"..., 97) = 97
<clever> run it with strace
<clever> what exact args did you use?
<clever> works on this end
<clever> did you give it a hostname also?
<clever> no alcohol in that, as far as i know
<clever> ive never drunk any alcoholic beverage
<clever> secret-key-files goes into nix.conf, via nix.extraConfig
<clever> give each machine its own keypair, and trust the public of the other
<clever> and look at the generate command in `man nix-store`
<clever> secret-key-files = /etc/nix/signing.sec
<clever> ah right
<clever> then just add the ssh://user@host to the binary cache list
<clever> fresheyeball: nix.sshServe.enable is one option
<clever> fresheyeball: register each as a binary cache for the other
<clever> nested virtualization is bad
<clever> and my main windows system, is in virtualbox
<clever> another problem, with anything hyper-v based, is that hyper-v needs vm extensions in the cpu
<clever> and last i looked, you only had 1 rootfs dir, so you cant really play around much
<clever> then use an atomic rename in explorer, to swap the rootfs dirs
<clever> so, you must install ubuntu, then use the linux tar to unpack the rootfs within WSL
<clever> something about how you need a special ntfs attr on every "linux" file, and windows explorer (along with nearly every fs tool out there) cant make them, and destroy them when copying
<clever> i did briefly look into how the old WSL worked, and how to get other OS's into it, and it was pretty ugly
<clever> since proper vm's existed by that point
<clever> nobody bothered to port it to 64bit windows
<clever> and it only worked on 32bit windows kernels
<clever> but, it never got multi-core support, so linux could only use a single core of the machine
<clever> ldlework: so in the end, windows thinks colinux is a network driver, that hogs a lot of cpu time, and needs 3gig of ram
<clever> when linux is done, and wants to "idle" the cpu, it will restore the state, and just do a normal return, back into the windows kernel
<clever> ldlework: and because the driver is in kernel space, it will just take the entire CPU hostage, and start running linux!
<clever> ldlework: and windows things colinux is a network driver, so when packets arrive for linux, it runs a function in the "driver" to handle the packet
<clever> ldlework: when linux needs to schedule a timer, it will use the windows kernel timer subsystem
<clever> ldlework: colinux, is basically a fork of linux, that will impersonate a windows driver, without needing any hypervisor (it was made in the days before hardware vm extensions)
<clever> ldlework: that reminds me of colinux, have you heard of that before?
<clever> a mount namespace just changes the pointer for what / is
<clever> so you can only see a subset of them
<clever> for example, on linux, a process namespace, just changes the table for the process list
<clever> containers are more about swapping out the pointer to the list of something
<clever> but they may have had just as many global vars laying around, that forced them to make just as ugly of an implementation
<clever> basically think of it like running a 2nd Xorg on :1 and :2
<clever> i can see it being semi-related to containers
<clever> ldlework: everything gui related, was a global kernel variable, so when you context switch between different processes, it has to swap out every single global var, to deal with multiple desktops (like RDP on another user)
<clever> ldlework: ive heard horrors about how windows handles multiple desktops
<clever> growpotkin: boot.loader.grub.memtest86.enable = true;
<clever> growpotkin: id enable and run memtest first
<clever> spease: docker technically cant run on osx or windows, behind the scenes, its just launching a linux VM, and running docker inside that
<clever> WhittlesJr: yeah, you can always change the nixpkgs after it installs
<clever> WhittlesJr: thats strange, definitely sounds like a bug
<clever> WhittlesJr: for a different path, something not libunistring
<clever> WhittlesJr: what is said path?
<clever> WhittlesJr: what is the output for one it cant build?
<clever> or look at the .drv's that have .lock files, but run the query on the version without .lock
<clever> ctrl+c it right after it starts to build, and scroll up some
<clever> try again with a .drv its actually building
<clever> its already built
<clever> then thats not something it needs to build
<clever> WhittlesJr: what happens if you run `nix-store -r /nix/store/q45f8b6wp4bynxbrlw2rjqjq9g5k47yb-libunistring-0.9.10` ?
<clever> WhittlesJr: i just need the output for a single drv, ignore and lock and tar files
<clever> WhittlesJr: add --store local?root=/mnt/
<clever> WhittlesJr: what path does it output?
<clever> WhittlesJr: grab one of the .drv files it wants to build, and run `nix-store --query --binding out /nix/store/foo.drv`
<clever> WhittlesJr: that definitely sounds like the binary cache didnt work
<clever> WhittlesJr: can you give an example of a storepath its trying to build?
<clever> WhittlesJr: did you mess with the binary cache config any? is the date set right?
<clever> WhittlesJr: does the machine have network access?
<clever> danbst: which also lets you fake the player name
<clever> danbst: multimc has an option to play offline
<clever> danbst: multimc handles forge, mods, and auth for you
<clever> wedens: yeah, it wont help with boot times, but it will help with normal running
<clever> wedens: the main downside, is that the l2arc cant persist between reboots
<clever> wedens: the l2arc is just an extension of the l1arc(the one in ram), which will use a combination of recently and frequently used things, and adjust the ratio to get a high hit rate
<clever> wedens: zfs will basically use the ssd as a read-cache to speed up reads from the hdd
<clever> wedens: zfs, with the ssd as a L2arc may be a good option
<clever> philipp[m]: pkgs.makeDesktopItem
<clever> craige: sounds good
<clever> craige: read the nixos module to see what file the strings winds up in, then check the postgres docs to see what that file does
<clever> craige: i think your best bet is the official postgresql docs
<clever> selfsymmetric-mu: if you run $$, then it will look for the pid of bash in PATH, and then say command-not-found
<clever> selfsymmetric-mu: if you eval it, yes
<clever> Fare: yeah, the expr to build the app itself can be shared, youll just need some differences to make an image around it
<clever> Fare: docker doesnt use image files much, and systemd doesnt really work in docker

2019-09-04

<clever> fresheyeball: any time you do src = ./.; it will copy . to the store
<clever> c: nix can cross-compile to windows!
<clever> b: death to windows :P
<clever> a: windows users will need to continue to build things the old non-nix way
<clever> somebody in here yesterday had something in ~/.ghc that was causing every single package from ghcWithPackages to be hidden
<clever> and baring weird stuff in your ~/.ghc/, it entirely gets rid of the "but it works for me" problem
<clever> there is also yarn2nix for nodejs
<clever> Trubydoor: you would need to do vulkan-headers = master.vulkan-headers; in an overlay
<clever> Trubydoor: you would make an overlay to change vulkan and vulkan-headers
<clever> Trubydoor: have you tried the nixos-unstable-small channel?
<clever> Trubydoor: remove the thing that depends on vulkan from your systemPackages
<clever> boxdot: and filter it to greater then 256mb
<clever> sqlite> select path, narsize/1024/1024 as narmb, datetime(registrationTime,'unixepoch') from ValidPaths where narsize > 256 * 1024 * 1024 order by registrationTime;
<clever> boxdot: that will list everything in /nix/store (run it after the warning is done) and sort it by when it was added, and filter oh wait, wrong sql
<clever> sqlite> select path, narsize/1024/1024 as narmb, datetime(registrationTime,'unixepoch') from ValidPaths where path like "%BindingAttributes%" order by registrationTime;
<clever> sqlite> .mode column
<clever> [root@amd-nixos:~]# sqlite3 /nix/var/nix/db/db.sqlite
<clever> boxdot: one sec
<clever> Trubydoor: that everything in the tested jobset passes, and every other job has at least been tried
<clever> ,howoldis Trubydoor
<clever> boxdot: and if the output fails to meet the expected hash, the build fails
<clever> boxdot: fixed-output derivations declare the hash of the result upfront, to get permission to access the network
<clever> boxdot: try using f6 in alsamixer to select another card, check the mute status on each of them
<clever> boxdot: sandbox isnt enabled by default, on macos
<clever> boxdot: nix disables all network access during the build
<clever> boxdot: in a normal shell or a nix build?
<clever> beyuu: try playing with the port field on the `sound core3d` device on the output tab?
<clever> beyuu: and which output are you actually plugging speakers into?
<clever> beyuu: what about the playback tab in pavucontrol?
<clever> Fare: builtins.fetchGit
<clever> equivrel: run patchShebangs on the file, at build-time
<clever> equivrel: but i dont think perl can re-parse its own #! if perl is not the command being ran
<clever> beyuu: can you screenshot both pavucontrol and alsamixer?
<clever> equivrel: try running patchShebangs on the file, at build-time?
<clever> equivrel: but in your case, env+perl doesnt fit, so env is getting upset?
<clever> equivrel: and then perl will re-parse the 1st line to work around the bug
<clever> equivrel: i think the problem, is that perl itself must be in the first 255 chars
<clever> equivrel: i had a PR on nixpkgs to fix that
<clever> beyuu: run pavucontrol, is the VU meter moving when you play things, is it going to the right device?
<clever> beyuu: run `alsamixer -c 0` and check if things are muted
<clever> :D
<clever> ar: 37
<clever> __monty__: can you make a gist showing the output of `list` and `status` from each machine, and also the ip's of everything, and what directions work where?
<clever> __monty__: if there are nat troubles, toxvpn will use a tcp relay as a fallback
<clever> DariusTheMede: nix-shell -E 'with import ~/nixpkgs { config.allowUnfree = true; }; haskellPackages.ghcWithPackages (pkgs: [pkgs.accelerate pkgs.accelerate-llvm pkgs.accelerate-llvm-native pkgs.accelerate-fft])'