2017-11-03

<clever> __monty__: how are you running zsh for testing?
<clever> __monty__: are you using startx?
<clever> __monty__: and when you started zsh, it appended an entry
<clever> __monty__: then NIX_PATH had already been set, before you ran zsh
<clever> which is the same mechanic as nix-env -iA
<clever> achambe: nix-shell only accepts the attribute path, not the .name
<clever> unset and set to empty behave very differently
<clever> run bash first then
<clever> __monty__: unset NIX_PATH ; zsh then echo $NIX_PATH
<clever> __monty__: unset
<clever> __monty__: what if you manualy clear NIX_PATH, then just run zsh normally, what is the end-result?
<clever> if nix_path was empty, it would become NIX_PATH=:nixpkgs=...
<clever> __monty__: if it doesnt have a value, it just sets it
<clever> __monty__: if nix_path has a value, it will append to it with a : as a separator
<clever> __monty__: add an echo to both bashprofile and zshrc
<clever> try clearing NIX_PATH, then manually source it once, and echo
<clever> __monty__: it sounds like your sourcing the script twice

2017-11-02

<clever> kkini: so every single time you eval the nix, it has to redownload the source (with a 1h cache)
<clever> kkini: builtins.fetchurl happens at eval time, before it computes $out
<clever> the one under pkgs needs a hash
<clever> kkini: builtins.fetchurl will re-download every hour
<clever> my irc client only alerts me if my name is at the start of a msg
<clever> oh, lol
<clever> cement: ?

2017-11-01

<clever> bbl
<clever> universalpackage: most things use LD_LIBRARY_PATH to do that
<clever> universalpackage: why?
<clever> universalpackage: what are you trying to do?
<clever> universalpackage: are you using the nixpkgs gcc or the host gcc?
<clever> universalpackage: what about -L. -lc ?
<clever> universalpackage: try -l./libc-2.25.so?
<clever> ldlework: the nix install script on darwin asks if you want single or multi-user when you run it

2017-10-31

<clever> ldlework: you may need to unset NIX_REMOTE and ensure the nix-daemon has stopped
<clever> then you need to manually configure linux build slaves
<clever> so the automation just gives up and shuts off
<clever> but if nix-daemon is in use, it has to be setup in /etc/nix/machines, and only root can write to that
<clever> ldlework: so nixops can auto-configure nix-build to use the target machine as a build slave
<clever> ldlework: if nix is running without nix-daemon, then the env variables of the nix-build process control the build slaves
<clever> and nixops can only do its automation if NIX_REMOTE is unset, which requires +w to /nix/store/
<clever> ldlework: as long as you have +w to the store, it will work without the daemon, so you just have to stop the daemon from making root-only things
<clever> ldlework: i think you could do it by, stopping the nix-daemon service from running, and chown -R /nix/store
<clever> c: reinstall nix in single-user mode
<clever> b: run nixops as root on darwin with NIX_REMOTE unset
<clever> a: manualy add a linux slave to /etc/nix/machines
<clever> ldlework: so you need to either
<clever> ldlework: the multi-user install breaks the code in nixops that deals with that automatically

2017-10-27

<clever> yeah
<clever> Dezgeg: then how did the emacs one get symlinked?
<clever> unknown
<clever> ldlework: and ls that
<clever> ldlework: check the nix-build output and find the path for hammerspoon, when it re-built it with the new script
<clever> ldlework: but only 1 thing provides Applications, so the whole thing is linked
<clever> ldlework: so buildenv has to make a bin directory, then symlink each item within
<clever> ldlework: in the case of bin, lib, and share, there are multiple things providing those directories
<clever> ldlework: thats just how buildEnv works, let me see
<clever> '';
<clever> ldlework: cp -r ${release}/* $out/foo
<clever> ldlework: runCommand "Hammerspoon-${version}" {} ''mkdir -pv $out/applications/foo.app
<clever> ldlework: that will run the script to produce name
<clever> infinisil: yeah, pkgs.runCommand "name" {} "script"
<clever> ldlework: just use runCommand, not builder
<clever> nix-serve is dynamic, and will look in /nix/store/ for every request, and generate the NAR on the fly
<clever> nix-push will generate nar's of the given paths, and make a directory suitable for a static website, just upload it anywhere
<clever> kiloreux_: it will dynamicaly generate the NAR on-demand, compressing up the storepaths your using normally
<clever> kiloreux_: nix-serve just serves everything in /nix/store/
<clever> and several others
<clever> it is a bit confusing, there is also a writeTextFile, with a different api
<clever> its writeText
<clever> if you could provide a staticly linked shell, and you put that builder in a normal file and did ./builder.sh, this derivation can run entirely without nixpkgs
<clever> but the derivation itself, makes no use of the stdenv
<clever> this uses some of nixpkgs to setup the derivation
<clever> i also do exactly that in an example
<clever> yeah
<clever> ldlework: also, you can use a derivation in pretty much any place you can use a path/string, it will cast automatically
<clever> infinisil: and it has variants line writeScript (+x's the file) and writeScriptBin (puts it in $out/bin/), that have the same API
<clever> ldlework: writeText accepts 2 strings, a name, and the text to be written
<clever> ldlework: but writeText can do files within $out, it can +x things, and it can depend on things
<clever> ldlework: writeText is just a wrapper around "echo ${foo} > $out", so it runs in a sandbox, and the $out hash depends on what build of echo you use
<clever> ldlework: toFile cant have any dependencies, and it works at a nix level during the eval so its platform independant
<clever> ldlework: pkgs.writeText
<clever> then it will be less confusing
<clever> ldlework: you can add a name = "..."; attribute inside fetchzip, to rename what it will unpack to
<clever> ldlework: ah, so its a directory that ends in .zip?
<clever> ldlework: is it actually a zip?
<clever> ldlework: run ls -l on that path
<clever> you just run it on a file you want to find
<clever> ncurses5.out 0 s /nix/store/28bbln4vwh7jhfiq4nbmv4dq12d9gl05-ncurses-5.9/lib/libncursesw.so.5
<clever> [clever@amd-nixos:~]$ nix-locate libncursesw.so.5
<clever> sauyon: import
<clever> oops, -E not --eval
<clever> xelxebar: nix-instantiate --eval 'with import <nixpkgs> { config = { permittedInsecurePackages ... }; }; foo'

2017-10-26

<clever> ylwghst: wait more
<clever> and if both dont exist, it has to name one of them
<clever> if shell.nix doesnt exist, it will try default.nix
<clever> yeah
<clever> nix-shell ignores that bash script, and drops you into a shell suitable for running dummy (but you just dont run it)
<clever> the first "dummy" is a name, the 2nd "dummy" is a bash script to run
<clever> the name, some attributes, and then a bash script of the command to run
<clever> runCommand takes 3 arguments
<clever> nix-shell
<clever> echo 'with import <nixpkgs> {}; runCommand "dummy" { buildInputs = [ somepackage ]; } "dummy"' > shell.nix
<clever> then put the previous string into shell.nix
<clever> ah
<clever> even with those dummy's left exactly as-is
<clever> this should be identical to nix-shell -p somepackage
<clever> nix-shell -E 'with import <nixpkgs> {}; runCommand "dummy" { buildInputs = [ somepackage ]; } "dummy"'
<clever> what exactly are you trying to do?
<clever> nothing really has to go there
<clever> riclima: it will then open a shell suitable for building that dummy derivation, so somepackage will be in $PATH
<clever> with import <nixpkgs> {}; runCommand "dummy" { buildInputs = [ somepackage ]; } "dummy"
<clever> riclima: -p will dynamicaly generate a derivation, in the form of
<clever> the nixos and nixpkgs manuals
<clever> so half of the nixos-rebuild job is done on a central box
<clever> then just activate the pre-built nixos
<clever> and then copy it over with nix-copy-closure
<clever> it will build it on the machine running nixops
<clever> and they need a unique ip within the VPN
<clever> gutsoo: but there is pre-existing differences in the filesystem layout, that i havent bothered to fix yet, so i encoded that in the deployment.nix
<clever> gutsoo: in the example i linked, eeepc.nix contains the common setup between 2 netbooks, so i can just grab whichever has a charged battery
<clever> gutsoo: and the config that nixops uses must be able to boot the machine: https://github.com/cleverca22/nixos-configs/blob/master/deployment.nix#L15-L26
<clever> it will just hijack the system, as if your deployment file was used for configuration.nix
<clever> gutsoo: so you could deploy to an existing libvirt guest, but you would have to manually create the guest on the remote end
<clever> gutsoo: if you use the "none" targetEnv, it can just deploy to anything running nixos, with ssh open
<clever> ghostyyy: you have to force the function application with ( ... )
<clever> greymalkin: lists are weird in nix, that is a list containing a function and a set
<clever> greymalkin: i think if you add "nix: True" to ~/.cabal/config, then cabal will enter nix-shell automatically
<clever> i suspect that the .env for haskellPackages was broken by split outputs, and nobody has noticed/bothered to fix it
<clever> greymalkin: ah, try editing the nix expression to use openssl.dev then
<clever> Synthetica: you could try mapping gksudo to just normal sudo
<clever> greymalkin: did you look at the openssl in $NIX_CFLAGS_COMPILE ?
<clever> Synthetica: ah, then something must be wrong with policykit/pkexec
<clever> greymalkin: i would strace the cabal configure, and see what its doing to look for crypt
<clever> Synthetica: thats strange, its running the right thing, but claiming it cant find it
<clever> greymalkin: that will overwrite the buildInputs and leave none of the normal ones i believe
<clever> greymalkin: it might be a bug in the .env code
<clever> Synthetica: then hit it with strace and find out what its trying to do with pkexec
<clever> Synthetica: and also confirm LD_PRELOAD is still set
<clever> nixos1022: sure
<clever> Synthetica: then try to strace sublime, to see what syscall its using to access pkexec
<clever> Synthetica: next thing would be to peek at "strings /proc/PID/environ" for sublime, to see if that variable is still set right
<clever> greymalkin: i think the problem is that the native libraries arent in the .env shell
<clever> Synthetica: yeah, that should work
<clever> Synthetica: is libredirect also in LD_PRELOAD?
<clever> greymalkin: and if you remove the .env at the end, what happens when you run nix-build on that shell.nix?
<clever> greymalkin: try using "runhaskell Setup.hs configure" rather then cabal configure
<clever> greymalkin: how exactly is openssl included int he environment?
<clever> cheaty!
<clever> nix will only build it once
<clever> Lisanna: this is the problem i mentioned with fixed-output derivations
<clever> nixos1022: i think it just has to be unique within your network, so the server knows who is who
<clever> nixos1022: it was set to iqn.2015-09.com.example:3255a7223b2 on one of my machines
<clever> nixos1022: yeah, that one is in the way, kill it then restart the systemd unit
<clever> nixos1022: "ps aux | grep iscsid" is it running?
<clever> try ${pkgs.kmod} instead
<clever> nixos1022: oh, the sbin attr
<clever> checking...
<clever> nixos1022: nixos doesnt use sbin
<clever> nixos1022: then you can services.iscsid.enable = true; and systemd will manage running it foryou
<clever> nixos1022: put this file in /etc/nixos/ and then add ./iscsi_module.nix to the imports list
<clever> nixos1022: also, you need to start iscsid first
<clever> nixos1022: use a pastebin
<clever> nixos1022: what commands have you ran, and what output do they give?
<clever> nixos1022: its already packaged in nix, openiscsi i believe is the attribute name
<clever> nixos1022: you just need the 2 commands under "log into the LUN": http://backreference.org/2013/12/23/diskless-iscsi-boot-with-pxe-howto/
<clever> nixos1022: let me pull up the guide i used
<clever> nixos1022: ah, thats simple
<clever> nixos1022: booting nixos over iscsi, mounting iscsi normally, or hostind iscsi?
<clever> some ugly libraries use "invalid" points like 100 to have special meanings, and if its outside that special range, its a normal pointer
<clever> i believe nixos has it off by default, but hydra has it on
<clever> Lisanna: if the nix sandbox is disabled, then you have full network access and the ability to read anything on the host
<clever> MichaelRaskin: the conntrack limits in routers would make the test fail if you try to test it too often
<clever> MichaelRaskin: ive had nightmares trying to test things with DHT's on a real network
<clever> MichaelRaskin: but you would need to encode all of $buildInputs into the name to have it rebuild correctly
<clever> Lisanna: so it wont test new versions of the code
<clever> Lisanna: nix will only run the test once, because you said the content is the same
<clever> Lisanna: fixed-output causes its own problems
<clever> Lisanna: it spawns 4 qemu VM's, with 2 networks, and runs the torrent client between things
<clever> Lisanna: this is how you do "networky" things without having internet access
<clever> Lisanna: one minute
<clever> pass -v to both cp and mv, to see what its doing
<clever> ylwghst: you need to move $out/usr/bin to $out/bin
<clever> ylwghst: .nix-profile links the bin subdir, but you have a usr/bin/
<clever> TweyII: i was pointing out how to adjust what backspace does in xterm, which may be related
<clever> jumblemuddle: yeah, sounds like the mouse isnt working at a higher level
<clever> left, middle, and right (with control) opens 3 different menus within xterm, for various settings
<clever> jumblemuddle: it has to be control + left, and the menu closes when you release left
<clever> jumblemuddle: the back-arrow option
<clever> jumblemuddle: hold control, then hold left mouse button, in xterm
<clever> TweyII: if ~/.xprofile exists, it will be sourced and then normal operations continue
<clever> TweyII: and re-enables repeat when the client looses focus
<clever> TweyII: also be aware, that synergy disables key-repeat on the clients, when they have focus
<clever> ah
<clever> TweyII: ive found that synergy behaves very very weirdly if i renice certain processes
<clever> ylwghst: sure
<clever> ylwghst: quote the whole thing
<clever> ylwghst: test what kind of variables?
<clever> so you gave it a lambda that was wanting 1 more arg
<clever> ahh
<clever> TweyII: stdenv.mkDerivation will unpack it at the unpackPhase, so if its the source for your own thing, you can just refer to it in the local directory
<clever> this one is for bios boot, which you only need if you want to boot with legacy
<clever> 4 BIOS boot 21686148-6449-6E6F-744E-656564454649
<clever> LexLeoGryfon: this typecode for fdisk, when you want to boot with efi
<clever> 1 EFI System C12A7328-F81F-11D2-BA4B-00A0C93EC93B
<clever> yeah, biosboot, /boot, zfs
<clever> hyper_ch: legacy with biosboot
<clever> tanonym: it helps to know what you did wrong, or you are doomed to repeat that failure
<clever> drakonis: you need to work with nix, write an override that describes the changes you want done, then nix will apply them for you
<clever> tanonym: also keep in mind, nothing in /nix/store can be modified, so you cant just add a wallpaper once you find the directory
<clever> tanonym: nix-shell will setup the env vars for you so things just work
<clever> tanonym: the autoSnapshot service will look at the com.sun:auto-snapshot setting on each dataset, to decide what to do
<clever> tanonym: for /nix, just "zfs set com.sun:auto-snapshot=false pool/nix", and for configuration.nix, services.zfs.autoSnapshot.enable = true;
<clever> tanonym: yeah, one sec
<clever> everything you delete stays
<clever> tanonym: yeah, snapshots on /nix make it rather hard to free space up with nix-collect-garbage
<clever> also, docker has a zfs backend, and will make its own zfs snapshots to quickly clone containers and images
<clever> tanonym: yeah
<clever> i turn snapshots on for the pool, and off for pool/nix
<clever> ArdaXi[m]: the snapshots are more for undo, when the text editor cant undo far enough
<clever> ArdaXi[m]: i also keep mine in git, but i dont update it often enough
<clever> tanonym: its just pool/fs
<clever> ArdaXi[m]: for nixos, you also want to save at least /etc/nixos/ so you can rebuild things
<clever> etu: thats why i have a seperate dataset for /nix in my zfs setups, so i can turn snapshots off for that
<clever> Lisanna: pkgs.chromium.browser is the raw derivation that built the browser itself, with no ability to load plugins from nixpkgs
<clever> Lisanna: pkgs.chromium is a shell script wrapper arround the open-source build, that sets where to find plugins and such
<clever> Lisanna: derivations can have attributes, which could be more derivations
<clever> Lisanna: yes
<clever> tanonym: ive been leaving it off
<clever> KDE is pretty big
<clever> tanonym: its a random hex value, check the man page for "configuration.nix"
<clever> LexLeoGryfon: a custom bootloader would be a similar looking file, added to the list of imports in configuration.nix
<clever> LexLeoGryfon: everything else then sets up options for configuring that script
<clever> LexLeoGryfon: line 531 tells nixos where the script for installing the bootloader is
<clever> LexLeoGryfon: one sec
<clever> hyper_ch: u-boot also supports the same syntax
<clever> LexLeoGryfon: i believe that will generate syslinux compatible config files, but you will need to install the bootloader yourself
<clever> LexLeoGryfon: https://nixos.org/nixos/options.html#boot.loader.generic
<clever> some people even put a tmpfs on /tmp/
<clever> gzip-9 does have a noticable impact on latency
<clever> i think lz4 is the best for speed, and gzip-9 is the best for storage
<clever> hyper_ch: on will use the "best" compression algo, as set in the source
<clever> tanonym: this is where i mount all of the datasets, activate swap, and mount the boot partition to boot
<clever> tanonym: ext4
<clever> and if you ever want to recover it by putting the drives into an existing machine
<clever> zfs may get confused if there are 2 pools with the same name
<clever> correct
<clever> infinisil: thats the rootfs
<clever> hyper_ch: which is why i just assume it has 4k sectors
<clever> ArdaXi[m]: so going over doesnt have any major harm
<clever> ArdaXi[m]: the only hard requirement is that its equal to or greater then the sector size
<clever> sphalerite: ah, nice
<clever> tanonym: you dont need to format before formatting
<clever> tanonym: zpool create formats the partition you give it
<clever> hyper_ch: i have a dozen usb sticks, i cant remember which one is the live usb
<clever> hyper_ch: you need that special rescue shell to move /nix to another zfs dataset :P
<clever> 300mb is needed for a special rescue shell
<clever> Lisanna: the build will fail if you dont meet that
<clever> Lisanna: and by defining the output hash, you are also making a promise to nix, that your output will have that hash
<clever> Lisanna: you must define the hash of the output to unlock network access
<clever> hyper_ch: its hibernate that needs swap
<clever> Lisanna: pkgs.runInLinuxVM doesnt have networking enabled
<clever> :D
<clever> probably because you never made a bios boot partition and reinstalled grub
<clever> you need a special partition to boot from GPT
<clever> how exactly is it bricked?
<clever> why does GPT brick it?
<clever> also, is it MBR or GPT?
<clever> you dont have to format it before formatting it
<clever> tanonym: "zpool create" is what formats it
<clever> hyper_ch: yes
<clever> hyper_ch: so you get twice the storage, and can loose up to 1 drive from each pair
<clever> hyper_ch: that will concat the 2 mirrors together
<clever> tanonym: you cant mount anything until you make the pool
<clever> tanonym: i have a laptop with 4gig of ram running on zfs
<clever> tanonym: nix-env -iA nixos.irssi
<clever> Lisanna: just look at what nix-channel did with nixpkgs in ~/.nix-defexpr/
<clever> Lisanna: the entire directory structure remains
<clever> and then nix-env and nix-build can refer to them
<clever> Lisanna: nix-channel will unpack the tarball into the store, and add it under ~/.nix-defexpr/
<clever> Lisanna: yeah
<clever> nixpkgs has a script for that
<clever> you can also use fetchurl to download things
<clever> now you need a tar containing that default.nix, and every file it refers to
<clever> you need a default.nix that can return a set with everything
<clever> Lisanna: a channel is just a directory with 2 files, nixexprs.tar.xz and binary-cache-url
<clever> Lisanna: the channel is managed seperately from nix-push
<clever> pkgs.fetchurl
<clever> which puts the entire config.nix file in the argument