2018-08-05

<clever> ben: runCommand
<clever> typetetris: just pkgs.systemd
<clever> it will basically make nixos remember the last -I
<clever> which will effect the build your starting, and change the vars for later
<clever> and the only way to change it, is to use -I nixpkgs=/path/to/something
<clever> ben: this will copy the current <nixpkgs> into the store and then always use that version, ignoring the channels
<clever> ben: nix.nixPath = [ "nixpkgs=${<nixpkgs>}" ];
<clever> oops
<clever> ben: nix.nixPath = [ "nixpkgs=${<nixpkgs}" ];
<clever> there is a trick i have seen somebody do before, let me find it
<clever> ben: just keep in mind that it only effects the NIX_PATH after nixos-rebuild has finished, not the current nixos-rebuild
<clever> ben: using nix.nixPath in configuration.nix, you can control the default value of $NIX_PATH
<clever> ldlework: its best to bake those paths into a config file, since running a tool like that will be slow and randomly upgrade things
<clever> samueldr: probably
<clever> vim_configurable still obeys ~/.vimrc
<clever> and then it can be even more reproducible
<clever> as long as nix is present, i can run nix-build or nix-env to install a config similar to what i linked
<clever> the nixpkgs stuff to handle that fix all of the problems your having
<clever> that would be your problem then
<clever> i do see neovim in the plugin list
<clever> enableACME in nginx just works for me
<clever> if you pipe `git show <hash> | git apply` you can take a commit from another branch and apply it to the current one
<clever> Drakonis: i try to make a new local branch forked from master, push that to my fork, and then file a PR against master
<clever> driSupport32Bit doesnt need a restart

2018-08-04

<clever> aanderse: yeah
<clever> aanderse: probably, as long as its merged within the next ~25 days
<clever> hasufell_: the nix manual may also be of use: https://nixos.org/nix/manual/#ch-expression-language
<clever> hasufell_: are you on the nixpkgs manual?
<clever> in the nixpkgs manual
<clever> so haskellPackages.ghcid is an attribute path, open the haskellPackages attribute of nixpkgs, then the ghcid attribute of that
<clever> but sometimes the value is another attribute set
<clever> the keys are attributes, and the values are usually packages
<clever> nixpkgs is an attribute set containing key=value pairs
<clever> -i uses the .name attribute, -iA and config.nix use the attr path
<clever> hasufell_: i used tab-completion in `nix repl '<nixpkgs>'`
<clever> ,-A
<clever> > spaceFM.name
<clever> hasufell_: the attr name is spaceFM
<clever> that will remove the roots that are outside of the keepnr
<clever> yeah
<clever> Lisanna: temporarily reduce it, then `systemctl start hydra-update-gc-roots` to tell hydra to prune its own roots
<clever> Lisanna: how high do you have it set and how many nixpkgs changes have those evals gone thru?
<clever> Lisanna: hydra will always root the entire build-time closure for the last $keepnr evals in the jobset
<clever> Lisanna: first, do you know where the keep nr is in your config?
<clever> Lisanna: i can explain how to properly gc hydra things, one min
<clever> bigvalen: you can also use the file backend for testing, just create a heap of dummy disks and experiment
<clever> and if hydra ever needs it ....
<clever> Lisanna: hydra will believe the path exists, and wont try to rebuild it, because it was rooted and fully protected from gc
<clever> Lisanna: one min
<clever> that should only be managed via hydra utils, and you can break hydra if you force it
<clever> in the hydra root directory?
<clever> Lisanna: you need to make sure your not deleting the active generation of any profiles, or the entire profile will be gone
<clever> Lisanna: depending on what they are, yeah
<clever> bigvalen: i think (havent confirmed) that you can upgrade a lone disk into a mirror between olddisk + raidz2
<clever> Lisanna: nix-store -q --roots X
<clever> Lisanna: thats because of roots, not referrers
<clever> nix never allows a refernece to something which doesnt exist
<clever> if you want to get rid of the things depending on X, just normal nix-store --delete X is enough
<clever> if your goal is to get rid of all deps of a given path
<clever> Lisanna: it has to be a loop, because --delete will stop at the first rooted path
<clever> Lisanna: you would need to loop nix-store --delete over its nix-store -qR
<clever> i find it a bit pointless, and it makes nixos-rebuild --rollback more muddy
<clever> nixos-rebuild --upgrade will just run `nix-channel --update` then continue as normal
<clever> nixos needs a channel with the name nixos
<clever> you have 2 17.09's, remove one of them and then --update
<clever> bigvalen: sudo nix-channel --list
<clever> just skip the --json
<clever> ryantm: you could try evaling the same thing in nix repl or nix-instantiate
<clever> ryantm: not sure
<clever> you can also use $cmakeDir to change things, line 79
<clever> the cmakeConfigurePhase still obeys preConfigure and postConfigure
<clever> nikki93: use preConfigure to cd somewhere else
<clever> nikki93: if you add cmake to the nativeBuildInputs list, it will automatically run cmake during the configurePhase
<clever> ryantm: try running the nix-env command on 8 directly
<clever> line 11 is a nix error
<clever> ryantm: wait correction
<clever> ryantm: that is not a nix failure, so --show-trace will never do anything
<clever> ryantm: can you pastebin the whole console output when it fails?, including the commands you ran
<clever> ryantm: nix-env --show-trace
<clever> synergys is the server, and synergyc is the client
<clever> trylist: in my case, the desktop has 3 monitors, and the laptop is beside it, and then it behaves like a 4 monitor setup
<clever> trylist: the 2 machines behave more like a single machine in a dual-monitor setup
<clever> trylist: synergy is a tool for sharing the mouse/keyboard between several machines
<clever> trylist: yeah, its probably modern changes to stop xscreensaver seperately, so it wont render over things after dpms is shut off
<clever> lo_mlatu: does lightdm give you a selection to choose between several combinaitons of desktop managers?
<clever> lo_mlatu: which display manager?
<clever> trylist: and its set to disabled in the xfce settings
<clever> trylist: so i already have xscreensaver running
<clever> clever 23295 0.1 0.0 173040 1292 ? S Aug02 3:00 xscreensaver -no-splash
<clever> [clever@amd-nixos:~]$ xscreensaver
<clever> xscreensaver: 00:12:59: already running on display :0.0 (window 0x2400001) from process 23295 (clever@amd-nixos).
<clever> trylist: maybe, or maybe xscreensaver is supposed to forward it over
<clever> pie_: you need to uninstall python
<clever> pie_: nix2 has a bug involving symlinks that point to non-existant files
<clever> trylist: and just poking around in dfeet for a minute finds inhibit/uninhibit under org.freedesktop.PowerManagement, via interfaces and org.freedesktop.powermanagement.inhibit
<clever> trylist: dfeet is also a dbus debug util you may find of use
<clever> trylist: at a glance, thats not even specific to firefox, and can be used to detect if anything is playing audio via pulse
<clever> i also run synergys, and i suspect it disables dpms without using dbus
<clever> but i suspect the right dbus thing has to be running, to allow it to work
<clever> that will explain if it even supports doing this
<clever> trylist: for chrome, its at this location, but since your using firefox, you would want to check that
<clever> chromium-66.0.3359.181/services/device/wake_lock/power_save_blocker/power_save_blocker_x11.cc
<clever> trylist: try searching its codebase for org.freedesktop.ScreenSaver Uninhibit or Inhibit
<clever> Ashy: ah, thanks, was going to find that
<clever> init_6: that info is also now in the nixos manual
<clever> but in my case, dpms is just plain broken and never goes to sleep
<clever> trylist: related, i can see chrome trying to turn dpms on/off every time pause/unpause things
<clever> [28751:519:0803/233526.195462:ERROR:power_save_blocker_x11.cc(330)] No response to Inhibit() request!
<clever> [28751:519:0803/233526.195430:ERROR:object_proxy.cc(617)] Failed to call method: org.freedesktop.ScreenSaver.Inhibit: object_path= /org/freedesktop/ScreenSaver: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.ScreenSaver was not provided by any .service files
<clever> [28751:519:0803/233526.020873:ERROR:power_save_blocker_x11.cc(403)] No response to Uninhibit() request!
<clever> semilattice: i see a mix of - and _ and camelcase all over nixpkgs
<clever> semilattice: try `nix-instantiate '<nixpkgs>' -A js-env -vvvv`
<clever> semilattice: can you link your pastebin again?
<clever> i dont think nix supports base64 in hashes?
<clever> nix2 can auto-detect it, so the config setting the var was removed
<clever> nix-repl uses nix1, which cant auto-detect that
<clever> export NIX_REMOTE=daemon
<clever> nope
<clever> renaming it will be simpler
<clever> nix repl parses that as subtraction and breaks
<clever> only nix-repl can do that
<clever> semilattice: nix repl cant tab-complete anything with a - in the name
<clever> semilattice: oh right
<clever> semilattice: and js-env isnt in nixpkgs, so the override appears to be working
<clever> semilattice: its a bit hidden and simpler to just comment that line out
<clever> jasongrossman: id also recomend using the boot sub-command when downgrading
<clever> semilattice: and its not in the nix package
<clever> which you can only get by successfully finishing nixos-rebuild
<clever> semilattice: you would have to run the 17.09 version of generate-config
<clever> jasongrossman: nixos-generate-config made that entry, but 17.09 conflicts with that default
<clever> mikky: that is an unquoted path on the normal system, nix will copy the key into /nix/store and make it world-readable
<clever> jasongrossman: comment that line out in hardware-configuration.nix
<clever> jasongrossman: try switching to 17.09 next?
<clever> jasongrossman: try an older stable channel, it may also have the bug? and does `sudo nix-channel --list` show the stable under the name `nixos` exactly?
<clever> /nix and /nix/store/
<clever> so those still need mountpoint=legacy and a configuration.nix entry
<clever> but nixos cant do that for the root or store datasets
<clever> so you can `zfs set pool/dataset mountpoint=/foo` and it just does what you want
<clever> mikky, jasongrossman: with the most recent zfs (which nixos has), setting mountpoint= just works
<clever> emily: thats why i use lvm :P
<clever> emily: its more of a key to decrypt the master keys
<clever> Ashy: /nix has snapshots disabled, all others have snapshots enabled
<clever> Ashy: i typically have a dataset for / /nix /home and then more depending on the use-case of the machine
<clever> mikky: i also want hibernation
<clever> emily: and that just gets ugly, lvm is a lot simpler
<clever> mikky: i limit dedup to the dataset where i keep my virtualbox images and cryptocoin blockchains
<clever> and then luks asks for 2 passwords on bootup
<clever> gchristensen: and i want the swap to be encrypted, so it needs to be on luks
<clever> gchristensen: swap files generally perform worse then dedicated swap block devices
<clever> jasongrossman: it defaults to only using 50% of the ram at most
<clever> jasongrossman: typically, it just deadlocks
<clever> mikky: so i use lvm to squish zfs+swap into a single luks device
<clever> mikky: swap on zfs isnt stable, and swap on luks + zfs on luks leads to 2 password prompts
<clever> hodapp: i feel like even mentioning what secrets i am storing may draw in more attackers, lol
<clever> mikky: or the initrd wont be able to import it
<clever> mikky: also of note, current nixos zfs requires that you export the pool when your done installing
<clever> mikky: the justdoit script you where reading earlier supports zfs + swap on lvm on luks
<clever> jasongrossman: it will ask on the console i believe
<clever> ive seen a few brave souls using it :P
<clever> jasongrossman: nixos already supports zfs encryption of boot volumes
<clever> jasongrossman: ive also seen btrfs have problems with the ratio of metadata to data on nixos, and claim its out of space yet df says it isnt
<clever> jasongrossman: it then took another 6 hours to delete the .drv files i was making
<clever> jasongrossman: i had btrfs take 6 hours to do a simple hydra based task, and it ultimately gave up and flagged the FS as read-only, forcing a reboot
<clever> semilattice: and if you try to eval js-env in `nix repl '<nixpkgs>'` does it print the expected thing?
<clever> can you pastebin the config.nix?
<clever> semilattice: is the override in config.nix or configuration.nix?
<clever> plenty of disk space
<clever> you can just ignore justdoit then
<clever> and then it bakes those options into the tarball it generates
<clever> you can also set the options defined in justdoit, using the configuration.nix file
<clever> that part is optional, you can also just manually install like you normally would
<clever> mikky: correct, you have to run justdoit after logging in over ssh
<clever> sounds good
<clever> ah, then id try stable next
<clever> jasongrossman: try a `nixos-rebuild boot` then just reboot
<clever> sounds like dbus is to blame
<clever> jasongrossman: what about `journalctl -f -u display-manager` ?
<clever> jasongrossman: nothing of note, has the gui crashed yet?
<clever> in that situation, you have no console access and no undo button
<clever> mikky: i have helped people use this process on their own hardware, but they just lacked a keyboard/monitor to install with, lol
<clever> mikky: yeah, your undo options depend heavily on the hardware and the tools the datacenter provides
<clever> mikky: but once you format the disk, you only have one chance to get things right, and will need to reinstall something with the datacenter tools if nixos doesnt boot
<clever> mikky: that helps when you forget to setup ssh keys, or your network config isnt right
<clever> jasongro`: ah, check dmesg then, after things fail
<clever> jasongro`: check to see if any new errors occur when you `systemctl restart display-manager`
<clever> jasongrossman: anything that looks like an error around the time of failure
<clever> mikky: the kexec image already has zfs and luks
<clever> infinisil: ah yeah, i think i saw it a while back
<clever> yeah
<clever> check the journal then, `journalctl -b 0` and then scroll to the end with G
<clever> its possible that only the gui end is having issues
<clever> watch the logs over ssh and see if its actually hanging
<clever> jasongrossman: are you able to ssh into the machine?

2018-08-03

<clever> and the scripts in that git repo will generate a kernel+initrd for nixos, with the full rootfs inside the initrd
<clever> modern linux systems support kexec, which lets you just execute a new kernel + initrd and replace the currently running OS
<clever> then you just continue as-if you had started the liveusb
<clever> this allows you to upload a tar file to the system, run a few shell commands, and then nixos is running entirely from ram, no need for physical access
<clever> mikky: exactly the kind of use-case i wrote my kexec tools for
<clever> server in a datacenter?
<clever> ahh
<clever> mikky: nixos-install just works better when ran from another nixos machine
<clever> what is that reason?
<clever> mikky: and is there a reason you cant boot the liveusb?
<clever> it tends to only ever happen when changing versions
<clever> jasongrossman: i have had it hang on one of my recent updates also
<clever> a common problem is that it restarts dbus which crashes your gui session
<clever> that could just have been it switching to text mode because X quit
<clever> did it actually reboot, or did the screen just go blank?
<clever> dhess: oops, that was for d1rewolf
<clever> dhess: the crash happens once it has computed the drift rate and it tries to update the drift file on-disk
<clever> and thats when i ran gentoo
<clever> the kind of junk that is lost at a simple reboot! :P
<clever> dhess: and i was insane then, i did the entire setup imperatively, just manually typing in iptables commands and setting static ip's at both ends
<clever> dhess: i have turned my laptop into a wifi router before, when the hotel didnt have wifi, only an ethernet jack
<clever> dhess: doing fun things like copying the entire os to ram at boot, over wifi
<clever> dhess: at the time, i was making new initrd's every week :P
<clever> dhess: i have also had the fun of getting firmware loading in the initrd, without udev
<clever> g band only
<clever> dhess: a old as crap dlink router with the dhcp server disabled :P
<clever> i dont run my AP's from linux currently
<clever> dhess: not yet
<clever> my laptop will prefer the cellphone hotspot, even if its already on the home wifi
<clever> dhess: once wpa_supplicant is installed, its trivial to have multiple networks and priorities
<clever> yeah
<clever> ive had the fun of trying to connect to wpa for the first time with zero warning and not having wpa_supplicant installed :P
<clever> they change the device<->kernel api with every version
<clever> and lines 9/10 mean the kernel half supports versions 30 thru 34
<clever> dhess: the -2 at the end means not found
<clever> clever@c2d ~ $ perror 2
<clever> OS error code 2: No such file or directory
<clever> try one at a time, and check current-system before you reboot
<clever> or maybe hardware.enableAllFirmware
<clever> dhess: ive got 2 versions within the range your driver supports
<clever> -r--r--r-- 1 root root 2.6M Dec 31 1969 /run/booted-system/firmware/iwlwifi-9260-th-b0-jf-b0-34.ucode
<clever> -r--r--r-- 1 root root 2.6M Dec 31 1969 /run/booted-system/firmware/iwlwifi-9260-th-b0-jf-b0-33.ucode
<clever> [root@amd-nixos:~]# ls /run/booted-system/firmware/iwlwifi-9260-th-b0-jf-b0-3* -lhL
<clever> dhess: do any of those files exist in your nix store?
<clever> you can also insert ls and pwd into the patchPhase to look around and see where things are
<clever> drakonis: /usr/bin/env doesnt exist in the nix sandbox, you need to run patchShebangs over all shell scripts
<clever> petersjt014[m]: dont know if the 0 has special patterns, but these are the ones i found
<clever> for those who are too cheap to get the wifi+bluetooth model
<clever> the one i mentioned is a new rev of an old model
<clever> samueldr: i think it does have a rev mark on it, cant remember the exact name
<clever> samueldr: yeah
<clever> cheaper to just make the new cpu in bulk, then to make 2 types
<clever> some of the rpi2's (without wifi/bluetooth) are now using the aarch64 capable cpu from the rpi3
<clever> buildPhase maybe
<clever> azazel: any phase you want
<clever> azazel: substituteInPlace and use @foo@ in the bash code, thats one option
<clever> fresheyeball: add dontInstall = true; to the derivation
<clever> fresheyeball: skipping the mkdir is also optional
<clever> then you just get a naked /nix/store/hash-proposal.pdf in the store with no directory
<clever> fresheyeball: change `name = "proposal";` to `name = "proposal.pdf";` and then use `-o $out` for pandoc
<clever> you could just name = "foo.pdf" and tell pandoc to write to $out itself
<clever> $out doesnt even need to be a directory
<clever> updated it again
<clever> and the template thing, can just be inlined
<clever> didnt fully read it, lol
<clever> oh
<clever> but you could also do src = ./images;
<clever> updated more
<clever> and the mkdir on line 26 is likely going to break
<clever> yeah
<clever> use buildPhase
<clever> it just makes things harder on yourself
<clever> you almost never want to use builder
<clever> fresheyeball: can you gist your nix derivation?
<clever> and thats handled by the unpackPhase in the default builder
<clever> you want src = ./.;
<clever> fresheyeball: all of the source?
<clever> ah, so build the stuff not in the cache, while still quering more cache things
<clever> infinisil: then it will always start building the gcc bootstrap
<clever> fresheyeball: --option substituters ""
<clever> i could try that on mine
<clever> samueldr: pxe boot also relies on the same fuses
<clever> with a few tweaks to stage-1, it can still copy the squashfs to ram, so it wont care what you do to the card after booting
<clever> one of the newer ones with wifi&bluetooth
<clever> and if you have ssh, you can remotely reflash it
<clever> reflashing the sd card would be a lot more stable
<clever> and it doesnt retry the boot on its own
<clever> the main problem with this pxe boot, is that the rpi just hangs at bootin, blinking status 7 times
<clever> so i can just do `nix-env -p /nix/var/nix/profiles/per-user/root/rpi3-netboot --rollback` to unbrick it
<clever> and i have full rollback support
<clever> and then the tftp server shares whatever that symlink points to