2018-08-13

<clever> q3k: requireFile
<clever> make a new set, where drv is a value inside it
<clever> and dont // onto drv
<clever> the with statement is missing
<clever> in { inherit drv; }
<clever> its kind of a basic thing
<clever> not sure
<clever> not a new derivation that builds nothing
<clever> pie__: you want to return an attribute set, containing drv
<clever> pie__: what do you expect line 50 to be building?
<clever> pie__: the derivation on line 50 doesnt have a src
<clever> and .env only applies to the drv on line 44
<clever> the mkDerivation on 50 doesnt work with env
<clever> .env is only for nix-shell
<clever> pie__: you want a name and version
<clever> pie__: because nix-shell doesnt try to unpack the source
<clever> pie__: you need to add a src= to the derivation to nix-build it
<clever> if the sha256 is missing, it wont know what storepath to reuse
<clever> dmj`: using an ssh agent should also solve it
<clever> dmj`: if you use a sha256, it should be able to compute the storepath and find it was already downloaded
<clever> inquisitiv3: probably
<clever> ocharles: but sets are obviously the biggest cost
<clever> ocharles: i think environments are scopes for lambdas, not sure though
<clever> 379mb of values, 2130mb of sets
<clever> 131mb of environments
<clever> 606mb worth of lists
<clever> 3,612mb of memory allocations...
<clever> ocharles: can you use a pastebin that doesnt screw with the selection buffer?
<clever> ocharles: can you gist the output from NIX_SHOW_STATS=1 ?
<clever> ocharles: and then add these env vars
<clever> ,profiling
<clever> ocharles: nix-instantiate shell.nix should measure the same time
<clever> > "dhess> ${dhall}/bin/dhall-format does exist"
<clever> gchristensen: when building the given package, ensure bootstrap-tools is not in the runtime closure
<clever> symphorien: a texinfo from in the middle of the stdenv stages was leaked to the outside
<clever> symphorien: thats broken with multiple outputs, and the stdenv didnt depend on bootstrap-tools in this case
<clever> dhess: in my case, i believe it was just the `info` command, but it shouldnt be depending on the bootstrap-tools
<clever> and now the bootstrap tools are in the closure of my router
<clever> gchristensen: this results in pkgs.texinfo depending on the bootstrap perl, which links to the bootstrap libc
<clever> gchristensen: oh, something ofborg could check ...
<clever> :D
<clever> inquisitiv3: you can also try something like f12 or the boot order config and see if nixos is listed
<clever> inquisitiv3: and if you check efibootmgr -v, you should now see grub
<clever> gchristensen: i was able to shave several gig of memory usage off the eval, just by not installing nixops in every machine
<clever> inquisitiv3: yeah
<clever> LnL: i have nixops evals that consume 30gig of ram and take 15-20mins :P
<clever> add more options to the module!
<clever> LnL: but options like secret-key-files are not supported, leading to user error
<clever> LnL: most of that is already where, and i think nix-darwin is just stealing the nixos module
<clever> inquisitiv3: the lack of efiSupport = true perfectly explains why it was not in the efi vars
<clever> inquisitiv3: remove efiInstallAsRemovable, set canTouchEfiVariables = true again, and also set boot.loader.grub.efiSupport = true;
<clever> inquisitiv3: oh, thats why grub didnt work earlier, oops
<clever> mightybyte: correct, its just a single path
<clever> inquisitiv3: boot.loader.efi.canTouchEfiVariables = false;
<clever> mightybyte: its opening the file [ that you put in the config
<clever> mightybyte: line 19 is to blame
<clever> mightybyte: what is the content of /etc/nix/nix.conf ?
<clever> inquisitiv3: we will know for sure once we see if efiInstallAsRemovable helps
<clever> inquisitiv3: your motherboard firmware is broken i believe
<clever> mightybyte: if you do `set -x` and re-run `nix-env -i htop` does it fail again? and what output does it produce?
<clever> inquisitiv3: pvscan and vgchange -a y
<clever> jD91mZM2: systemd-boot also failed mid install
<clever> jD91mZM2: we changed the config over to grub
<clever> mightybyte: does the error happen only with nix commands, or all commands?
<clever> inquisitiv3: re-open the luks device with cryptsetup, then re-activate lvm, and mount your rootfs and /boot, then edit configuration.nix, add boot.loader.grub.efiInstallAsRemovable = true; and re-run nixos-install
<clever> inquisitiv3: thats a crap-ton of uefi options, and the nixos one is missing
<clever> mightybyte: ls -l ~/.nix-profile/bin/
<clever> mightybyte: ls -l ~/.nix-profile/bin/\[
<clever> mightybyte: can you screenshot it?
<clever> Dedalo: i just run plain bash here
<clever> inquisitiv3: boot the installer again and run `efibootmgr -v` what does it list?
<clever> what error?
<clever> now we just umount everything, reboot, and pray!
<clever> yay
<clever> that option is only for use with legacy booting
<clever> boot.loader.grub.device = "nodev";
<clever> inquisitiv3: change line 14 of https://pastebin.com/yMgBBGSk to "boot.loader.grub.enable = true; and re-run nixos-install
<clever> all i can think of is "boo systemd" and to try grub, lol
<clever> everything should just be working...
<clever> yeah
<clever> inquisitiv3: and also `fdisk -l /dev/sda ; cat /mnt/etc/nixos/hardware-configuration.nix`
<clever> yes
<clever> inquisitiv3: what about the contents of hardware-configuration.nix and the output of `mount` ?
<clever> yeah
<clever> inquisitiv3: nixos-rebuild reads /etc/nixos/configuration.nix, but nixos-install reads /mnt/etc/nixos/configuration.nix
<clever> ah
<clever> acowley: are you using nix-shell?
<clever> that also works and is better
<clever> acowley: if you put cmake into the buildInputs, then the cmakeConfigurePhase is automatically set when the stdenv is loading
<clever> inquisitiv3: yes
<clever> d1rewolf: the `nox` tool will cache that, `nix search` also uses multiple threads to speed it up i think
<clever> and if your client GC's one, it has to recreate it, and then the clients one is technically wrong
<clever> which are effectively identical
<clever> tilpner: given the same input files, it can produce different squashfs files
<clever> tilpner: its possible that mksquashfs is not deterministic
<clever> inquisitiv3: you can run `nixos-rebuild build` to check the file again
<clever> tilpner: what file are you trying to force a re-copy, and how exactly is it differing?
<clever> tilpner: if --verify-path says its good, then --repair-path will probably not want to change it
<clever> inquisitiv3: what error did you get?
<clever> tilpner: did the client garbage collect the path, then rebuild it?
<clever> tilpner: run `nix-store --verify-path /nix/store/foo` on both ends
<clever> inquisitiv3: ah, didnt notice that
<clever> tilpner: why exactly do you want to re-copy it?
<clever> tilpner: there is no need to re-copy the path, nix ensures that that is never needed
<clever> i think your example may also work
<clever> 2018-08-13 11:26:30 < clever> boot.initrd.luks.devices = [ { name = "root"; device = "/dev/nvme0n1p2"; preLVM = true; } ];
<clever> overlays is a sibling to config, not a child
<clever> > pkgs.config
<clever> acowley: that would be nice, it already does it with config
<clever> there is also that attribute
<clever> > pkgs.path
<clever> you can also do this
<clever> ocharles: nix-build ~/nixpkgs --arg overlays '[ (import ./overlay.nix) ]' -A hello
<clever> and if the network does come back, cancel the timer
<clever> pie__: i was thinking use at to start a timer to activate the current build, activate the new one, and if the network doesnt come back, the timer fires and undoes it
<clever> sphalerite: ah, that looks like it does most of whats needed
<clever> > at.meta.description
<clever> at may be better
<clever> since it has to be started without a rebuild, and then aborted after the switch
<clever> pie__: i wouldnt really use a systemd timer for this task
<clever> pie__: and obviously abort that timer when you confirm network is still working
<clever> acowley: ah, that looks like it would fix it
<clever> acowley: i used nix-repl for that (the 1.0 one), but it was just recently removed from nixpkgs
<clever> gchristensen: pie__: you could setup a timer to run $(readlink /run/current-system)/bin/switch-to-configuration test after a timeout
<clever> :)
<clever> and that can help as well
<clever> and at that point, you might as well just do: nix-env -f /home/brandon/workspace/nixpkgs -i ats-pkg
<clever> bebarker: you need to use -f '<nixpkgs>' to make it search the path
<clever> bebarker: nix-env basically ignores NIX_PATH and -I by default
<clever> acowley: it will just log the error to the journal and continue
<clever> acowley: https://nixos.org/nixos/options.html#displaymanager.sessioncommands probably
<clever> yep
<clever> all paths in nix are immutable, so you where cd'd into the old one, and nix-env -e made a new dir
<clever> yeah
<clever> and you where left cd'd into the old version
<clever> the symlink for .nix-profile was changed
<clever> thats why
<clever> Dedalo: did you cd ~/.nix-profile/ ?
<clever> Dedalo: no background tasks like that
<clever> and then nixos-rebuild switch
<clever> tyil: no, you have to set security.chromiumSuidSandbox.enable = true; in configuration.nix
<clever> tfc[m]: this is required to make the sandbox helper setuid root
<clever> tfc[m]: in the case of hello.src, its a fetchurl based derivation
<clever> Dedalo: ls -lh ~/.nix-profile/etc/i3
<clever> tfc[m]: yeah, i rewrote my own usecase specific test in lua just to avoid that, lol
<clever> tfc[m]: thats the same thing the torrent test is doing, cp ${file} ...
<clever> Dedalo: what is the name of the thing in ~/.nix-profile/etc you want to get rid of?
<clever> > "${./.} can force it"
<clever> tfc[m]: the repl checks the type, and doesnt treat it as a string
<clever> tfc[m]: that happens entirely automatically when you do things like src = ./local.zip;
<clever> tfc[m]: where are you using x ?
<clever> tfc[m]: just treat x as a string
<clever> fresheyeball: the only thing that happens when it gets big, is that it uses more disk space
<clever> fresheyeball: there are also the vacuum family of options in `man journalctl` to do a one-time clearing
<clever> Dedalo: does `nix-env -q` list those packages?
<clever> SystemMaxUse=, SystemKeepFree=, SystemMaxFileSize=, SystemMaxFiles=, RuntimeMaxUse=, RuntimeKeepFree=, RuntimeMaxFileSize=, RuntimeMaxFiles=
<clever> and `man journald.conf`
<clever> fresheyeball: https://nixos.org/nixos/options.html#journald.extraco i think
<clever> yep
<clever> yeah
<clever> thats claiming its in a multi-user mode
<clever> unset it
<clever> what is $NIX_REMOTE set to?
<clever> ah, then not needed
<clever> but it should also support a --single-user i think
<clever> its been changed recently
<clever> it might be that the new install script defaults to expecting it
<clever> tyil: is there a nix-daemon.service somewhere in /etc/systemd/?
<clever> it failed to even start the install, so i can see how things would be broken
<clever> yep
<clever> tyil: what does `mount | grep noexec` print?
<clever> and i believe a udev rule can automate that
<clever> sphalerite: last time i did it, nixos-generate-config didnt detect luks
<clever> its a list, containing an attribute set
<clever> boot.initrd.luks.devices = [ { name = "root"; device = "/dev/nvme0n1p2"; preLVM = true; } ];
<clever> too many ='s in the like, its not valid
<clever> thekolb: yeah, you cant really change it with nixos-rebuild
<clever> thekolb: thats normal
<clever> tricky question
<clever> is it still security thru obscurity if its a real password prompt?
<clever> those that dont know, wont even know its a password prompt!!
<clever> security thru obscurity!!
<clever> try blindly giving it a password?
<clever> zfs may have stolen all input
<clever> that does sound right
<clever> check to see what luks and zfs both do
<clever> check the plymouth docs?
<clever> if its just using the framebuffer
<clever> try ctrl+alt+f1 maybe?
<clever> and i dont reboot often enough to care about it
<clever> elvishjerricco: unknown, i only used plymouth on not-os, lol
<clever> that will do it
<clever> elvishjerricco: where did you set allowUnfree, and where are you referencing vscode?
<clever> pikajude: i heard hpack is already fixed on master
<clever> selfsymmetric-mu: i think it also works with facebook
<clever> pikajude: ah, yeah, it really should print an error first
<clever> infinisil: these let you measure things
<clever> ,profiling
<clever> the build is ran with `set -e` active, so any command returning non-zero will kill the whole thing
<clever> possibly using overrideAttrs
<clever> pikajude: add NIX_DEBUG=1; in the derivation
<clever> Dedalo: or use overrides to modify the existing package
<clever> Dedalo: unknown, i only use x11 right now
<clever> selfsymmetric-mu: youtube-dl supports a number of platforms, try just giving it a twitch url
<clever> probably anti-abuse
<clever> Dedalo: yeah, just need to correctly define the changes in configuration.nix, and it builds everything
<clever> if you have sudo, dont bother with su
<clever> i prefer doing `sudo -i` then edit things, and `nixos-rebuild switch`
<clever> yeah
<clever> so its mostly personal choice there
<clever> you could just chown the file or directory to make it editable by another user
<clever> Dedalo: if immutable users is set to false (the default) then useradd works, but its recomended to use users.extraUsers in configuration.nix
<clever> Dedalo: you can use mkForce to force things, but its better to split it into 2 files, and then choose just the files that dont conflict
<clever> adamantium: grub is mainly for when you break it so badly that it cant boot
<clever> adamantium: as long as it can boot, you can use `nixos-rebuild --rollback`
<clever> nixos will just merge it all together
<clever> Dedalo: then file1 and file2 have the same format, and define more things
<clever> Dedalo: so configuration.nix has imports = [ ./file1.nix ./file2.nix .... ];
<clever> Dedalo: you can add as many files into the imports field as you want
<clever> but zfs solves that
<clever> and one is going to get full before the other
<clever> adamantium: the issue with trying to split things up like your plan, is that your going to underestimate how big to make / or /home
<clever> adamantium: i use a single pool for everything, with datasets for / /nix and /home
<clever> so now its pre-cached, and i can see if it builds or not
<clever> drakonis: i recently configured my hydra to pre-build my router and nas for the latest nixos-unstable
<clever> also, if you changed nixpkgs and forgot to update, you have to update everything at once, to make a 1 line change to a config file
<clever> on the minus side, everything updates at once, and 1 thing breaking stops you from doing any updates
<clever> on the plus side, everything updates at once
<clever> the atomic nature of systemPackages is also a double-edged sword
<clever> in general, i try to use systemPackages for everything, but if i'm just testing something short-term i use `nix run` or `nix-env -i`
<clever> Dedalo: systemPackages in configuration.nix will be updated to the current nixpkgs every time you nixos-rebuild
<clever> Dedalo: nix-env -i will add it to ~/.nix-profile, and it wont update on its own, so you can wind up with something years out of date
<clever> i believe so
<clever> adamantium: and there is https://nixos.wiki/wiki/NixOS_on_ZFS
<clever> adamantium: this is a bash script generator i made, that will automate an entire zfs based install: https://github.com/cleverca22/nix-tests/blob/master/kexec/justdoit.nix#L49
<clever> adamantium: i run zfs on all of my machines, and Dedalo just did a zfs install
<clever> then nixos ignores the extra file, and grub sources it
<clever> adamantium: you could also modify your script to create a grub-extra-entries.cfg, and then just use extraEntries = "source grub-extra-entries.cfg";
<clever> adamantium: lines 50/51 and others come from configuration.nix, and thats how the entra entries get in
<clever> adamantium: nixos will run this script, to scan /nix/var/nix/profiles/system* and generate the grub config
<clever> adamantium: you would need to heavily modify the grub setup in nixpkgs
<clever> you need to use configuration.nix to define what to append/insert
<clever> but you could chainload a different grub on another drive, with its own config
<clever> nixos generates its own grub config
<clever> but that cant deal with the rootfs and /nix/
<clever> yeah, those
<clever> infinisil: with nixos-unstable, there are now systemd units to discover and obey mountpoint=, but it doesnt work for the rootfs
<clever> Dedalo: ive never really messed with the console font, i just enable xorg or use ssh from a client with xorg
<clever> Dedalo: ah

2018-08-12

<clever> you can also just undo the changes and switch again
<clever> Dedalo: and if the keyboard is still in a semi-usable state (or ssh works), you can use `nixos-rebuild --rollback` to undo the last change
<clever> Dedalo: as long as the filesystems are not corrupt, you can always rollback from the bootloader, and just select an olver version there
<clever> yeah
<clever> wpa_cli and wpa_gui can be used to control it more
<clever> Dedalo: and there is something else you can probably just google, to just allow it to auto-connect to any open wifi
<clever> Dedalo: for non-encrypted networks, its just a network block with only an ssid="foo" and key_mgmt=NONE
<clever> Dedalo: you can set priority=10 inside a network block, so when 2 are available, it will prefer one
<clever> Dedalo: let me grab you some other useful things
<clever> wpa_gui also uses it
<clever> and it lets members of the wheel group connect, so you dont need sudo for that
<clever> yeah, that is needed to allow wpa_cli
<clever> nonfreeblob: you should be able to just rename your account in the github settings
<clever> and restart the service
<clever> then youll need to run wpa_passphrase again to create a new one
<clever> status
<clever> wpa_cli -i wlp2s0
<clever> iwconfig
<clever> ah, nvm then, should be all good
<clever> Dedalo: can you pastebin all of `mount`?
<clever> check the order of things in `mount`
<clever> Dedalo: oh, maybe you mounted /mnt/boot, then /mnt, which shadowed it
<clever> thats seperate from the type code in the gpt tables
<clever> id expect that to just work
<clever> Dedalo: and blkid /dev/nvme0n1p1
<clever> Dedalo: p2 is not set as swap
<clever> Dedalo: `systemctl start sshd ; passwd` then you can ssh into root
<clever> Dedalo: can you pastebin the output of `fdisk -l /dev/nvme0n1`?
<clever> the root device first
<clever> oops, blkid /dev/nvme0n1
<clever> Dedalo: blkid nvme0n1
<clever> Dedalo: did you flag it as efi system partition in fdisk?
<clever> Dedalo: you could just comment those out, and get them to work later
<clever> i was thinking of wpa_supplicant when i answered
<clever> Dedalo: oh, no, that has to go into the config
<clever> dhess: you need to provide a list of all, i forgot to finish that part
<clever> dhess: thats the name of one of the machines in the cluster
<clever> i dont manage that with nix
<clever> Dedalo: just copy it to /mnt/etc/
<clever> read the hostid section in the man page of configuration.nix
<clever> no
<clever> Dedalo: and also youll want to copy /etc/wpa_supplicant.conf over
<clever> Dedalo: ah, then yeah, nixos-install
<clever> Dedalo: is the install done or not?
<clever> Dedalo: did you set networking.wireless.enable = true; ?