2018-08-22

<clever> yeah, it has lost the count a few times, and not many people know it even exists
<clever> nh2: try the c++ syntax, clever++
<clever> nh2: pkgs.path + "/pkgs/development/haskell-modules/configuration-hackage2nix.yaml"
<clever> fzer0: so your wifi was not working, when you claimed it was
<clever> and i believe networkmanager configures wpa_supplicant automatically
<clever> fzer0: nixos should handle that for you
<clever> fzer0: you could try this: nixos-rebuild switch --fast --option substituters ""
<clever> fzer0: id you enabled networkmanager, then you have to use networkmanager to configure the wifi
<clever> fzer0: is wpa_supplicant running?
<clever> fzer0: does `iwconfig` show the wifi as being connected?
<clever> fzer0: and can you `ping 8.8.8.8` ?
<clever> fzer0: what URL failed to download?
<clever> fzer0: is the wifi currently working?
<clever> fzer0: /topic #nixos
<clever> boomshroom: use nix-shell, gcc automatically sets the rpath correctly
<clever> boomshroom: patchelf, same as always i believe
<clever> boomshroom: libEGL is part of mesa
<clever> fzer0: try without that first, and see what works
<clever> fzer0: you may also want to use the inputClassSections option: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/x11/xserver.nix#L710-L715
<clever> where is the Section starting it?
<clever> fzer0: line 17 of your pastebin, you have an EndSection
<clever> fzer0: i found the problem
<clever> fzer0: does it show any syntax errors about xorg.conf ?
<clever> fzer0: and if you check `journalctl -u display-manager.service` ?
<clever> yeah
<clever> inquisitiv3: you will need a dummy hardware-configuration.nix, or just the real fileSystems."/" entries, to make it fully pass assertions
<clever> inquisitiv3: you need to manually add the root FS sincr you used --no-filesystems
<clever> inquisitiv3: your config lacks a fileSystems."/" entry
<clever> fzer0: can you pastebin the section of configurationn.nix involved in xserver setup?
<clever> fgaz: using --option substituters "urls" you can override it temporarily
<clever> fzer0: yeah
<clever> fzer0: run `wpa_passprase NAME PASSWORD > /etc/wpa_supplicant.conf`
<clever> Lisanna: check the default.nix in the root of nixpkgs
<clever> boot is unencrypted
<clever> i use luks on all laptops, which complicates it slightly
<clever> fzer0: you can just omit a boot partition if your using ext4 on root
<clever> fzer0: then you can continue by formating them, and mounting root to /mnt and boot to /mnt/boot/
<clever> check lsblk again
<clever> probably
<clever> fzer0: the one in /etc or /mnt?
<clever> just reboot, and then continue with formatting the devices
<clever> fzer0: mount | grep sda --color
<clever> fzer0: partprobe /dev/sda ; lsblk
<clever> and then check lsblk to confirm things
<clever> and if you save&exit in fdisk?
<clever> now edit something in fdisk and save, so it updates
<clever> `umount /mnt/boot /mnt`
<clever> and its not listed by `mount`
<clever> that isnt mounted
<clever> just run umount on everything in sda, then check mount and repeat
<clever> and did you try to umount them in the right order?
<clever> what does `pwd` say?
<clever> umount, only 1 n
<clever> you need to umount them
<clever> fzer0: when you run `mount`, are they listed?
<clever> fzer0: umount them, then make another change in fdisk
<clever> fzer0: that happens if you change partitions while they are still mounted
<clever> fzer0: dont really need to
<clever> fzer0: switch to the other set of directions in the manual
<clever> fzer0: uefi is optional, and if manjaro was booting without it, then you can also just do a non-uefi install
<clever> fzer0: changing it to GPT will delete all partitions
<clever> fzer0: UEFI does not work on dos tables, it must be GPT
<clever> Disklabel type: gpt
<clever> fzer0: does fdisk list it as GPT or MBR?
<clever> fzer0: is the disk GPT or MBR?
<clever> fzer0: it doesnt really matter what number the partition it, just that you remember which one is /boot/
<clever> fzer0: sure
<clever> format would be simpler
<clever> just umount everything, then re-mount them in the right positions, and rm the junk in the new boot
<clever> yeah
<clever> heh, yeah, that will do it
<clever> how big is /dev/sda1 ?
<clever> yeah, that one also doesnt matter
<clever> loop0 shouldnt matter
<clever> fzer0: and where are those 3 mounted?
<clever> fzer0: check df -h and see what device is full
<clever> gchristensen: there is a bug in nixos-install, it builds the entire target system on the tmpfs unioned to /nix
<clever> Dezgeg: but now we have the issue of getting a reference to pkgs.time, inside make-derivation.nix
<clever> you could possibly do time ( foo 2>&4) 2>metrics 2>&4, but now its just getting ugly
<clever> the time program supports appending to a file given on the CLI
<clever> what do i redirect to get time, but not the stdout or stderr of the program it ran?
<clever> Dezgeg: there is also still the issue of capturing its output to a file
<clever> yeah, lol
<clever> oh, it was, i was looking for cli args, not env vars!
<clever> Dezgeg: that wasnt in `help time`
<clever> techieAgnostic: just replace cardanoPkgsBase with pkgs.haskellPackages, and then populate activeOverlays with an array of haskell overlays, and then conditionaly omit things (as i did here)
<clever> or look into overlays, one min
<clever> you will also want another overrides block for the without hoogle case
<clever> and delete the entire config= from overrides.nix
<clever> yeah, it would be far simpler to just move semigroups = self.callPackage ./semigroups.nix { };
<clever> techieAgnostic: you also dont need to use packageOverrides
<clever> techieAgnostic: your overriding the overrides, which erases all previous overrides
<clever> kandinski: if `ssh-add -l` is able to list the same keys, then it is talking to the agent, and it should work on the remote box also, try `ssh -v` in the remote session
<clever> 2 ssh problems at once can be a bit confusing
<clever> yeah, agent vs host
<clever> oh, *looks up*
<clever> that could be the issue, try to ssh into the build slave, as root
<clever> yeah
<clever> kandinski: and did you check the variant of that file in /root/ ?

2018-08-21

<clever> johnw: ~/.ssh/known_hosts
<clever> kandinski: if you `ssh -A` another system, then `ssh-add -l`, you should see the same key
<clever> yep
<clever> the config has been written to a file in /etc/ and systemd has ran wpa_supplicant for you
<clever> you can skip that entirely
<clever> fzer0: after installing, youll want to also copy that conf file to /mnt/etc/ and set networking.wireless.enable = true; before you nixos-install
<clever> fzer0: ifconfig should now show an IP on it
<clever> fzer0: use "iwlist wlp3s0 scan" to get the exact name for your wifi network, then run `wpa_passphrase NAME PASSWORD >> /etc/wpa_supplicant.conf` and try to start the service again
<clever> fzer0: `systemctl start wpa_supplicant` and then status again, is it running now?
<clever> fzer0: `systemctl status wpa_supplicant`
<clever> fzer0: `ps aux | grep wpa`, is supplicant running?
<clever> fzer0: and if you run `wpa_cli -iwlp3s0` and then check `status` what does it say?
<clever> fzer0: what is the interface name from `ip link` ?
<clever> and based on the size, you can know which branches of the tree to continue to search
<clever> then repeat on ab*, and so on
<clever> i think the example was a medical history site, do you have any conditions matching "a*"
<clever> also of use, if the site provides a search with partial matches
<clever> brute-force until you get a reply that is bigger
<clever> infinisil: 404 vs account details
<clever> repeat until you find the acct# or other sensitive data
<clever> but if you are on the right network segment, you can see the SIZE of the reply
<clever> due to cross-origin, you cant see the reply
<clever> infinisil: basically, you load www.bank.com/account/1 in an iframe
<clever> infinisil: that reminds me of a cross-site attack
<clever> ldlework: did you add xlib.xcbutil to the buildInputs?
<clever> ,locate xcb-aux.pc
<clever> run ls -l on the files its managing and look at what it did
<clever> i dont even bother with home-manager
<clever> adamantium: and part of it is just setting up symlinks that point into the store
<clever> adamantium: i think part of what home-manager does, is copying things out of the store and into the real /home
<clever> growpotkin: ./. + "/foo/bar"
<clever> techieAgnostic: base and containers cant have their versions changes easily
<clever> growpotkin: possibly
<clever> pointfourone: yeah
<clever> pointfourone: yeah, the systemd stuff is part of nixos, which cant run under ubuntu
<clever> pointfourone: but you can always use an absolute path to run one of your choice
<clever> pointfourone: yeah
<clever> techieAgnostic: that will let you override packages
<clever> techieAgnostic: in project.nix, do `hsPkgs = pkgs.haskellPackages.override { overrides = self: super: { .... }; };` and then use hsPkgs
<clever> pointfourone: run `which --all unbound`
<clever> so simpleirc needs to be updated, or hspec downgraded
<clever> techieAgnostic: monadic was removed in 1.10.0 of hspec
<clever> 1.3.0 does
<clever> techieAgnostic: also, its simpleirc thats failing to build, so nothing youve done has really come into play yet
<clever> techieAgnostic: Test.Hspec.Monadic is not part of hspec, according to hackage
<clever> techieAgnostic: just `nix-build project.nix`
<clever> techieAgnostic: i would expect that to just work
<clever> techieAgnostic: can you post all the files into a gist?

2018-08-20

<clever> or write your own nix file that uses the module framework
<clever> growpotkin: you can either `nix repl '<nixpkgs/nixos>' and add it to your imports, or use `-I nixos-config=./fake-configuration.nix` and add it to that files imports
<clever> growpotkin: its producing a module, that has to be ran by the module framework
<clever> leotaku: possible under systemd.logind.extraConfig

2018-08-19

<clever> bbl
<clever> Zajcev: ok, thats very very weird, curl and nmap give different responses
<clever> Zajcev: which machine did you run that from?
<clever> Zajcev: i port scaned the IP you gave above, 22 is open, 443 is closed, and all others are blocked
<clever> Zajcev: which VPS provider is it?
<clever> Zajcev: look up the gateway ip, then open that in a browser
<clever> Zajcev: sounds like you may be double-nat'ing
<clever> the direction of the wind
<clever> that wouldnt explain manual wget
<clever> that is a bit odd
<clever> pxc: run nix-prefetch-url on the url?
<clever> hlolli: tab-completion inside `nix repl '<nixpkgs>'`
<clever> only 6, 8, and 10 are
<clever> nodejs nodejs-10_x nodejs-6_x nodejs-8_x nodejs-slim nodejs-slim-10_x nodejs-slim-6_x nodejs-slim-8_x
<clever> hlolli: 9 isnt in nixpkgs
<clever> DigitalKiwi: the linux host can cache reads, and serve them to the vm faster then the hdd could
<clever> and just use a single pkgs
<clever> yeah
<clever> kisik21: oh, and cross-compile goes out of its way to NOT put buildInputs into PATH
<clever> kisik21: also, i think if you use buildInputs and nativeBuildInputs, it will pick the right one for you

2018-08-18

<clever> now, try and explain why 1/100 == 101 :P
<clever> > let __div = a: b: a+b; in 1 / 100
<clever> ooooo
<clever> infinisil: why?
<clever> abusing nix internals!
<clever> :D
<clever> > let __mul = a: b: "boo!"; in 1 * 2
<clever> infinisil: did you see the scopedImport example above?
<clever> i see your reply at the bottom now, and that would explain things
<clever> just mentioning it incase you didnt
<clever> mpickering: you shouldnt use rec in overrrides, thats what self is for
<clever> mpickering: and if you are cross-compiling, buildPackages will ignore the cross-compile flags
<clever> mpickering: yeah
<clever> emily: try running `nix-instantiate --eval` on the 3 files in here: https://github.com/cleverca22/nix-tests/tree/master/scopedImport
<clever> mpickering: there is a comment on line 24 of that file explaining it more
<clever> mpickering: that is where it is defined
<clever> > builtins.unsafeGetAttrPos "buildPackages" pkgs
<clever> due to strings, float + float is a lot more complex
<clever> wait, thats string +....
<clever> oh, + is a little different from - * and /
<clever> { $$ = new ExprConcatStrings(CUR_POS, false, new vector<Expr *>({$1, $3})); }
<clever> hmmm, not actually working...
<clever> emily: scopedImport can be abused to overwrite __add
<clever> scopedImport is the only way to change that
<clever> emily: another fun thing, is that `true` and `false` are just global variables, that contain the expected values: https://github.com/NixOS/nix/blob/master/src/libexpr/primops.cc#L2155-L2159
<clever> and __ is a special trick to add a non __ variant to builtins
<clever> seperate primops for the same function i believe
<clever> > __add == builtins.add
<clever> emily: nope, its using the global __add
<clever> dang!
<clever> > let __add = a: b: "boo!"; in 1+2
<clever> let __add = a: b: "boo!"; in 1+2
<clever> it needs to forceValue arg0 and arg1, THEN check its types
<clever> prim_add needs to be fixed
<clever> but if either argument is a thunk (another expression), it will force them to be ints
<clever> if both arguments are floats, AND NOT THUNKS, it will add the floats, and make a new float
<clever> if both arguments are floats, it will oh, i see the problem
<clever> Lisanna: which are then implemented here: https://github.com/NixOS/nix/blob/master/src/libexpr/primops.cc#L2281-L2285
<clever> Lisanna: internally, + and * just get translated into calls of the __add and __mul functions
<clever> JonReed_: and one of my systems uses a 64mb usb stick for /boot lol
<clever> JonReed_: ive also had the fun of my /boot drive becoming corrupt and having to swap it out
<clever> JonReed_: systemctl stop boot.automount
<clever> JonReed_: and what does configuration.nix say about /boot/ ?
<clever> JonReed_: does anything appear in `journalctl -f` when you try to umount it?
<clever> JonReed: have you tried `umount /boot` ?
<clever> so its available on anything that has nix
<clever> JonReed: its part of the nix package
<clever> JonReed: nix repl is part of nix 2.0
<clever> kisik21: shared user on a shared machine
<clever> kisik21: in the above case, i wanted to use my vim, without changing the defaults for other users on the machine
<clever> ambro718: the biggest problem ive had, is that f7/f8 dont work, because that machine had keybinds in screen for f7/f8, so vim never got them, lol
<clever> ambro718: i often scp my vim.nix file to another machine, nix-build it, and then just manually jam it into $PATH
<clever> probably
<clever> :D
<clever> kisik21: as long as you also bash darwin/apple? :P
<clever> which the uefi firmware will load without having the efivars setup
<clever> this configures grub to use the path that is used on removable drives
<clever> boot.loader.grub.efiInstallAsRemovable
<clever> install as removable is also good for usb drives
<clever> kisik21: you can also just do that on purpose, to get exactly that
<clever> ambro718: youve accidentaly configured nixos to both legacy and efi at the same time (a common mistake)
<clever> ambro718: bios_grub is only needed if you forgot to set boot.loader.grub.device = "nodev";
<clever> kisik21: select an older generation, yeah
<clever> Dezgeg: ive noticed that some of my wifi drivers have support for open-source firmware, at least in terms of loading it, but ive never actually found said firmware
<clever> kisik21: you can also do .mkDerivation { name = "name"; }
<clever> try just putting that directly into nix-shell -E '....' ?
<clever> kisik21: this is what i have tested in the past
<clever> (import <nixpkgs> { crossSystem = (import <nixpkgs/lib>).systems.examples.musl64; }).hello
<clever> and nix already counts as that
<clever> /tools is more about having a full toolchain that doesnt live in /usr/
<clever> kisik21: you can probably just bind-mount /nix into the chroot and use nix-shell -p as a fake /tools
<clever> kisik21: it might be possible to create the /tools/ set from nixos, just follow the usual directions and make sure cc-wrapper doesnt inject too much junk
<clever> and if its a nix only patch
<clever> yeah
<clever> works a lot like fetchurl
<clever> Thra11: there is a pkgs.fetchpatch function
<clever> or `diff -ru` if i dont have a .git
<clever> i just do `git diff > reason.patch
<clever> new-repl may also work
<clever> Wizek: i use ghcid -c "runhaskell Setup.hs repl"
<clever> Wizek: you can also just runhaskell Setup.hs
<clever> Wizek: so you have to compile and run Setup.hs and use that as your cabal binary
<clever> Wizek: nix gives you cabal as a library, not a binary
<clever> ghci*
<clever> ah, just runs main in ghcid
<clever> what does -T do?
<clever> -p will build that (shell only) derivation, and then put it into PATH
<clever> use -E not -p
<clever> oh
<clever> can you paste that error?
<clever> Wizek: if you read the file listed in the error, it only accepts root, source-overrides, overrides, modifier, and returnShellEnv
<clever> adding yourself to the trustedUsers on the local machine would also get rid of the need to use sudo
<clever> do one of the above to fix it
<clever> c: setup nix keypairs to sign builds, and configure the 2 machines properly
<clever> b: add your ssh key to root on the remote machine and switch to root
<clever> a: add johnny to the trusted users on the remote machine
<clever> but the remote machine wont accept the storepath
<clever> so the remote nix builder is now "working"
<clever> oldandwise: try starting ssh-agent, set the vars it showed, then ssh-add, then do the above cmd again
<clever> sudo nix-build --builders ssh://johnny@192.168.2.10 '<nixpkgs>' -A cscope --max-jobs 0
<clever> ah, then your not using an ssh agent, so it looked in /root/.ssh/id_rsa instead of /home/johnny/.ssh/id_rsa
<clever> sudo changes the default user for ssh
<clever> oldandwise: try with user@ip in the cmd
<clever> you may need to set the user in that cmd
<clever> oldandwise: oh, but what about sudo ssh 192.168.2.164 nix-store --version
<clever> oldandwise: `ssh 192.168.2.164 nix-store --version`
<clever> oldandwise: sudo nix-build --builders ssh://192.168.2.10 '<nixpkgs>' -A cscope --max-jobs 0
<clever> oldandwise: the syntax is different there
<clever> oldandwise: what exact command did you try with nix-build?
<clever> oldandwise: nix build is a bit random with its arg parsing, try nix-build
<clever> oldandwise: also, try with sudo on the nix-build
<clever> oldandwise: try ssh-ng:// ?

2018-08-17

<clever> nek0: should work, does it fail on the same url every time?
<clever> nek0: what is the contents of /etc/resolv.conf ?
<clever> nek0: can you ping those hosts from the same machine?
<clever> countingsort: you can use config.nix to define a custom package, that contains many other packages, then nix-env it, possible with -r
<clever> somebody fixed it and made me into a lier! :P
<clever> found it, all the way back in 16.03!
<clever> let me check 16.09, lol
<clever> it must have been cleaned up