2018-04-30

<clever> 38 The format is described in
<clever> which made the doc unreadable
<clever> and the entire string vanished on https://nixos.org/nixos/options.html
<clever> there is another, where they used some markup to do a manpage(3)
<clever> aszlig: let me find an example...
<clever> aszlig: ive also found that a lot of the special markup just breaks horridly on the site
<clever> and that para tag is not visible in the description script your editing
<clever> aszlig: the nixos doc generation wraps every description in a <para>${description}</para>
<clever> aszlig: i cant remember which one, but i later tracked down the cause
<clever> aszlig: i once tried to fix that, and wound up breaking tests on hydra
<clever> i think thats the name for the .desktop file

2018-04-29

<clever> nix-shell -p 'haskellPackages.ghcWithPackages (ps: [ ps.yaml ])' i believe
<clever> but it will only have the binaries, not the libraries
<clever> boxscape: nix-shell -p haskellPackages.yaml
<clever> and due to namespace issues, it doesnt support garbage collection
<clever> elvishjerricco: but due to problems with manifest.nix, it currently doesnt support nix-env -i
<clever> elvishjerricco: it gives you a fully working shell with nix, and can optionally have other derivations in the initial config
<clever> elvishjerricco: that is the rough plan i had when making nix-installer.nix
<clever> but for smaller nix packages, you can just put the full app there
<clever> hence it being an installer script, not the real application
<clever> but i ran into performance issues, it has to untar ~300mb every time that happens
<clever> elvishjerricco: when the resulting bundle is ran, the installer script (line 90) gets ran in a namespace
<clever> elvishjerricco: here is soemthing i did recently with it: https://github.com/input-output-hk/daedalus/blob/develop/installers/nix/nix-installer.nix#L4-L8
<clever> Orbstheorem[m]: you can also use nix-bundle to just ship an entire nix store and a namespacing util
<clever> Orbstheorem[m]: sometimes its enough to call makeStaticLibraries on the stdenv before letting a package use it, sometimes it needs more work
<clever> Myrl-saki: pong

2018-04-28

<clever> infinisil: id expect it to only use 2 or 3 times the storepath size
<clever> kreetx: i think each top-level directory in /nix/store is copied as a single unit, and the whole thing has to fit in ram
<clever> dhess: yeah, that flag would still be of use there i believe
<clever> dhess: the default in nixpkgs has recently changed, all binaries are now static by default
<clever> leo60228: git clone my repo, then add the path to the qemu.nix to your imports list
<clever> leo60228: so you just set qemu-user.aarch64 = true;, nixos-rebuild switch, and it can magically run aarch64 binaries, and nix can even run an "aarch64 only" compiler
<clever> leo60228: i also have a module that fully configures binfmt, nix, and qemu: https://github.com/cleverca22/nixos-configs/blob/master/qemu.nix
<clever> that is weird
<clever> arianvp2: the docs imply you need to set localAddress
<clever> arianvp2: https://gist.github.com/cleverca22/136dfc7d28a5843cc5bb30b52040a251 ah, i used nat instead, let me see what the bridge option does exactly
<clever> let me double-check what ive done locally...
<clever> other then all the machines sharing a mac, an outside observer has no way to tell if you have 10 physical computers, or 10 containers
<clever> and at that point, each container will be available to the local LAN, and it will act like normal machines on the lan
<clever> arianvp2: then youll want to put the host eth0 into the bridge, and move any ip config from eth0 to br0, if you have any
<clever> arianvp2: if you dont connect it to any interface, the containers will have zero internet access, and can only ever talk to eachother
<clever> you should be able to configure port-forwarding to allow it
<clever> elvishjerricco: weird
<clever> Myrl-saki: the daemon will first try to get a lock file on A, and block
<clever> elvishjerricco: also of note, the stdenv will pass both -j and -l to make, to keep the loadavg under the target core count
<clever> elvishjerricco: ive been told that the interface file parsing makes that worse
<clever> i would have expected ld to say that it was out of disk
<clever> ~1h 10mins total
<clever> more
<clever> once i gave it more space, it finishes within half an hour
<clever> the weird ld error at 30 mins in, was out of disk space, lol
<clever> i also figured out most of my build failures
<clever> interface files take a while to parse, and --make shares that cache within the process
<clever> but can share caches between the units
<clever> it acts like make -j8
<clever> i think ghc --make will build one module per thread
<clever> try turning on thread mode, its H in regular top
<clever> is that top or ps?
<clever> how many cores?
<clever> boomshroom: #nixos-aarch64 may also be of interest to you then
<clever> boomshroom: is it a 32bit or 64bit arm cpu?
<clever> boomshroom: but its also a lot smaller then full nixos, and could be usefull to get a kernel+rootfs working before you switch to something bigger
<clever> boomshroom: it has zero gui, and doesnt even run a login prompt on the main tty, but the rootfs stuff can be modified easily
<clever> boomshroom: the initrd downloads the rootfs over tftp, and then boots into not-os, which has sshd and nix-daemon
<clever> boomshroom: this generates a directory in my tftp server, that serves rpi firmware, a kernel, an initrd, and the root.squashfs (40mb)
<clever> boomshroom: nixos on a switch?
<clever> kreetx: and some things will be removed automatically if removed from the config, and that includes users
<clever> kreetx: once the user has been created, it stops checking for that flag
<clever> kreetx: createHome only applies when its first creating a user
<clever> MichaelRaskin: this is a nixos module i wrote back in march to run slack as a daemon, with the slack plugin pre-installed
<clever> yes
<clever> causing horid stutter in the game
<clever> and you have no way of knowing what combination the game will use, until the frame is needed
<clever> translating the unique combinations of texture combiners and stuff into modern shaders takes time
<clever> kreetx: for more static things like the public_html of a website, you can build and manage it with nix, but a gallery is a bit too dynamic to bother with in nix
<clever> kreetx: yeah
<clever> kreetx: id just manually scp the images up once the system is deployed
<clever> kreetx: and should tbe folder be read-only, writable, and if writable, what happens to the changes at next boot?
<clever> kreetx: where would you want the folder to turn up?
<clever> lol
<clever> ah
<clever> aristid: what does `nix-store --query --roots /nix/store/wahtever` say, when ran against the mono path?
<clever> bbsl: if your working in a fork of nixpkgs, edit all-packages.nix to add your package, and use the default.nix in the root of the whole nixpkgs tree
<clever> bbsl: you have to load that default.nix with callPackage
<clever> s
<clever> but i dont like how its tab-completion work
<clever> that one just works
<clever> daveo: the replacement is now `nix repl` without a -
<clever> daveo: but nix 2 now auto-detects that, and nixos 18.03 leaves NIX_REMOTE unset
<clever> daveo: the issue is that nix-repl uses nix 1 libraries, and expects NIX_REMOTE to be set
<clever> its a bug between nix1 and nix2
<clever> daveo: export NIX_REMOTE=daemon
<clever> daveo: i started with the command inside the $( to confirm it worked, then just used copy/paste to build the outer cmd
<clever> env is in /usr/bin, not /bin
<clever> daveo: it looks like i added qemu-user-arm to my os in generation 401
<clever> + qemu-user-arm-2.11.1
<clever> • The set of input names do not match:
<clever> [clever@amd-nixos:~]$ nix-diff $(nix-store -q --deriver /nix/var/nix/profiles/system-400-link) $(nix-store -q --deriver /nix/var/nix/profiles/system-401-link)
<clever> daveo: /bin/sh and /usr/bin/env are the only 2 executables that are at "standard" paths
<clever> daveo: for the #! line, #!/usr/bin/env bash, for everything else, just do "bash" and let $PATH do its job
<clever> justan0theruser: also, all of those options lack a type, which means it will get very buggy if 2 modules try to set the same option
<clever> justan0theruser: which itself gets the default value from line 41
<clever> justan0theruser: line 11
<clever> daveo: some are installed with environment.systemPackages and others with nix-env
<clever> daveo: yep
<clever> daveo: nixos is always in an environment with nix available, you can just skip 3.1
<clever> daveo: link?
<clever> daveo: thats only needed if you are not on nixos
<clever> daveo: which one?
<clever> pirateking: you can probably change the init= in grub to init=/bin/sh to get a very basic single-user shell and attempt repairs, but it would probably be simpler to boot into the original installer ISO and repair it from there
<clever> pirateking: where does it fail when booting nixos?
<clever> xorg and gparted could be included in that "rescue" blob, and then you have gparted and the ability to shrink windows filesystems
<clever> and nuke windows from orbit with wipefs!
<clever> which means i could take ~4 files from the rescue_boot system, stick them in c:\, modify boot.ini, and then f8 my way to the nixos installer
<clever> PolarIntersect: and i believe grub can be configured to support an ntfs "/boot" partition
<clever> PolarIntersect: something i have been wanting to do, is to modify boot.ini to be able to chainload grub
<clever> yep
<clever> yay!
<clever> the blkid output in the gist confirms
<clever> i wondered why the uuid was so short
<clever> oh, lol
<clever> PolarIntersect: let me double-check something...
<clever> PolarIntersect: oh, add boot.shell_on_fail to the kernel params in grub (hit e), then poke around and see what it cant find
<clever> PolarIntersect: and then the uuid based search will just work
<clever> PolarIntersect: nixos will always check for and activate lvm in the initrd, even if you dont have any
<clever> PolarIntersect: it does
<clever> i have used it to convert systems that lack a rescue mode!
<clever> (except when your hoster has a rescue mode)
<clever> the only major issue with that method, is that if you mess up at all, and the machine doesnt boot, it doesnt boot, game over :P
<clever> you can then either nixos-install or justdoit
<clever> PolarIntersect: within 120 seconds, it will be running nixos from a ramdisk, reconnect ssh, have fun
<clever> PolarIntersect: you generate a tarball with these nix expressions, upload it to a remote machine, unpack to /, then just /kexec_nixos
<clever> PolarIntersect: ah, kexec is more suited for that
<clever> ghostyy: and that could help you too in the future
<clever> so you can just go back to the installer at any time
<clever> PolarIntersect: and this does similar, with a ~400mb blob sitting in /boot/ and on your grub menu
<clever> PolarIntersect: so typing "justdoit" into the shell would just nuke the disk and install nixos
<clever> PolarIntersect: any machine that network-boots within my house lands into the nixos installer, and justdoit is in the ramdisk
<clever> PolarIntersect: and if you have control of your dhcp server, you could do something like: https://github.com/cleverca22/nixos-configs/blob/master/netboot_server.nix
<clever> daveo: the nix and nixpkgs manuals
<clever> this one uses nix to conditionalize everything
<clever> and all combinations of the above that make sense
<clever> PolarIntersect: that automates the entire process, it works on sata and nvme drives, legacy and uefi, with and without luks
<clever> PolarIntersect: i also use this script to do most of my installs: https://github.com/cleverca22/nix-tests/blob/master/kexec/justdoit.nix
<clever> and yeah, id try rebooting now
<clever> and /mnt/boot was mounted during that install?
<clever> PolarIntersect: your firmware could be buggy
<clever> PolarIntersect: and see what happens then
<clever> PolarIntersect: id recomend you set boot.loader.grub.efiInstallAsRemovable = true; and then re-run nixos-install
<clever> PolarIntersect: that appears to be your windows drive
<clever> ghostyy: because the installer itself is a program that has to exist in /nix/store/
<clever> ghostyy: the iso includes an MBR partition header, so you have to use the losetup flag for obeying partition tables, installing from a squashfs is also tricky
<clever> PolarIntersect: can you add the `fdisk -l /dev/sdb` to the output?
<clever> which one is it?
<clever> it looks like the efi vars are not updated correctly, so the firmware doesnt know about the new install
<clever> PolarIntersect: if you do `blkid /dev/sd??` do you see the uuid from Boot0001?
<clever> PolarIntersect: Boot0001 doesnt look right, and why do i see a microsoft thing in Boot0000?
<clever> PolarIntersect: everything looks fine, what does efibootmgr -v say?
<clever> so you actually set it to [ 22 22 ];
<clever> it concats the value of that option from every module
<clever> yeah
<clever> you cant lock yourself out easily
<clever> PolarIntersect: also line 28, the ssh service automatically allows port 22 in the firewall
<clever> PolarIntersect: hardware.nix is also of interest
<clever> PolarIntersect: and what is the contents of your configuration.nix file? youll need to open the luks and mount the fs within
<clever> PolarIntersect: its the bash wildcard for 1 character
<clever> PolarIntersect: the ? is missing from the command
<clever> PolarIntersect: blkid /dev/sdc?
<clever> PolarIntersect: fdisk -l /dev/sdc
<clever> then ssh in from a machine with a working mouse and irc client
<clever> passwd ; systemctl start sshd
<clever> PolarIntersect: do you have a 2nd machine with ssh client?
<clever> though the gist url's are still an issue
<clever> PolarIntersect: nix-env -iA nixos.gist ; gist --login; gist -p file.txt
<clever> PolarIntersect: if possible, can you just throw it all into a pastebin?
<clever> PolarIntersect: what does lsblk say when booted into the installer?
<clever> PolarIntersect: i think systemd-boot and grub should warn you
<clever> leo60228: i'm out of ideas
<clever> PolarIntersect: yeah, efi firmware can only boot in efi mode from a gpt disk
<clever> wilornel: ive had zero problems resizing things while the machine was running
<clever> no
<clever> correct
<clever> so it has never been partitioned
<clever> nvme1n1 doesnt even have a disk label type
<clever> yeah
<clever> wilornel: fdisk doesnt show any partitions on the 80gig one
<clever> its entirely unused
<clever> the 80gig drive has no partitions on it
<clever> you cant grow the nixos, because the drive its on is already full
<clever> and the 80gig drive is unused
<clever> nixos is installed to the 40gig drive
<clever> wilornel: you didnt resize it, you added another disk, you have 3 hard-drives, with sizes of 40gig, 80gig, and 8gig
<clever> wilornel: oh, i think i see whats going on
<clever> wilornel: your hard-drives
<clever> wilornel: ah, i dont think nixos supports resizing the nvme drives currently, those are pretty new
<clever> wilornel: what about fdisk -l /dev/vda, or whatever it happens to be called?
<clever> wilornel: i didnt even shutdown mine
<clever> wilornel: nixos will automatically growpart and resize for you on bootup, just reboot the machine after growing the ELB
<clever> leo60228: try turning docker back on by uncommenting the old config, and nixos-rebuild switch
<clever> leo60228: and since you did a channel update, what does `systemctl status docker` say now?
<clever> yep, exactly what i would expect
<clever> leo60228: try turning on services.openssh.enable and then pastebin the output of nixos-rebuild switch

2018-04-27

<clever> leo60228: thats also fairly good, it will basically force nixos to rebuild everything, so anything that might have somehow gone corrupt and un-detected is going to be rebuilt
<clever> leo60228: something changed that caused a mass-rebuild
<clever> leo60228: as an experiment, try turning on services.openssh.enable and then pastebin the output of nixos-rebuild switch
<clever> looks standard, nothing that would break things
<clever> leo60228: what is in /etc/nixos/hardware-configuration.nix ?
<clever> leo60228: https://gist.github.com/cleverca22/c32a60d5e65e0f3be4b45211e8975738 are some old kernel changes i used to do, but thats just config flags, not patches
<clever> imgur works just fine for me
<clever> leo60228: can you screenshot the whole terminal?, it shouldnt be that small
<clever> leo60228: if you remove docker from systemPackages and comment out the 2 virtualisation.docker lines, what does `nixos-rebuild switch` print?
<clever> leo60228: and /etc/nixos/configuration.nix is what you included in a previous pastebin?
<clever> yeah
<clever> leo60228: ?
<clever> leo60228: what does `echo $NIX_PATH` say?
<clever> leo60228: what is the output of: nix show-derivation /nix/store/9y0gqcdg6228qgrjvz4qax7m2iw4z0gq-system-units.drv
<clever> leo60228: and then pastebin the output of `nix-store -qR /nix/store/vzsfy8hy86zw4qdmb022wniww4src6rf-nixos-system-leonix-18.03.132083.06c576b0525.drv`
<clever> leo60228: what does `sudo nix-channel --list` say?
<clever> leo60228: what is the output of `nix-store -q --deriver /run/current-system` ?
<clever> has the --verify finished?
<clever> once those 2 are ran, that "corrupt" path will be gone
<clever> leo60228: nix-env -p /nix/var/nix/profiles/per-user/leo60228/profile --delete-generations 135 ; nix-store --delete /nix/store/8ly4sghqh667iqhwywwfw8jcqwhxxsv6-user-environment
<clever> leo60228: then nix has already undone whatever you changed, and its safe to delete that directory using the proper tools
<clever> leo60228: and if you `ls -l /nix/var/nix/profiles/per-user/leo60228/profile`, what number does it point to?
<clever> leo60228: nix-store -q --roots /nix/store/8ly4sghqh667iqhwywwfw8jcqwhxxsv6-user-environment
<clever> but that wont cause docker/systemd weirdness
<clever> leo60228: something in a nix-env profile is either corrupt or was modified improperly
<clever> ah
<clever> Mic92_: i think you forgot an `ip` in the start:`ip route get 192.168.2.1`
<clever> leo60228: forcibly editing the nix store like that can cause all kinds of weird problems
<clever> ghostyy: try downloading the iso to /dev/shm and then dd it to a usb stick?, /dev/shm/ will bypass the hdd and just eat ram
<clever> leo60228: ok, and what if you run: nix-store --verify --check-contents
<clever> ghostyy: got a spare computer to re-make the usb?
<clever> leo60228: what is the current output when you run `nixos-rebuild switch` ?
<clever> ghostyy: not easily from the broken system, cant you just boot the ISO you originally installed with?
<clever> leo60228: what about `ls -l /run /nix/var/nix/profiles/` ?
<clever> leo60228: can you pastebin the contents of configuration.nix and the output of `ls -l /etc/systemd/system/` ?
<clever> leo60228: virtualization.docker.enable adds it to systemPackages for you
<clever> leo60228: your not supposed to add docker to systemPackages
<clever> leo60228: can you pastebin the contents of configuration.nix and the output of `ls -l /etc/systemd/system/` ?
<clever> leo60228: and?
<clever> leo60228: just re-run nixos-rebuild switch
<clever> leo60228: nix will try again since it failed
<clever> leo60228: did it fail during the build or activation?, have you rebooted since the failure?
<clever> leo60228: how exactly is it broken?
<clever> leo60228: what hash was already calculated?
<clever> ghostyy: nix will check the checksums as it does that
<clever> attempt to open /nix/store/lkqf5fk1q1vysrsn7dvywr6jhkhkq46s-boocollect2: error: ld returned 1 exit status
<clever> ive been having this error for weeks, it can wait
<clever> sphalerite: you got time to debug an arm linker problem ive run into?
<clever> wilornel: the zip format decided to have a new epoch i think
<clever> the regex -e uses to match names can sometimes get confuse
<clever> ldlework: run `nix-env -e /nix/store/hash-name` to uninstall it
<clever> M-bbigras: nix deletes the build directory after the build has finnished, but you can view the log with `nix-store -l /nix/stor/epath` or maybe `nix log`
<clever> AGTT: https://hydra.angeldsis.com/build/82147/nixlog/5 is the build log with the failure i'm having
<clever> AGTT: its not currently maintained by hydra, so you would have to compile it, and binutils currently fails to build on arm, so that wont work with current nixpkgs
<clever> AGTT: you would need an arm build of nix to start with
<clever> AGTT: depends on the target, one machine ive wanted to convert has a 1tb / and a 20gig /home
<clever> AGTT: yeah, both the fs and partition layout
<clever> AGTT: i also have a kexec trick that lets you do similar and change the partitioning however you like
<clever> AGTT: i have done that manually before, and i nixos-in-place automates it, but you are still limited to the existing partition layout
<clever> Myrl-saki: and i get link failures on real arm: https://hydra.angeldsis.com/build/82147/nixlog/5
<clever> probably will, once binutils passes
<clever> Myrl-saki: havent noticed any recently
<clever> Myrl-saki: i have even seen it happen twice in regular x86-64 linux git, without any emulation at play
<clever> Myrl-saki: its been happening for me for years, so its in all stable branches
<clever> let me find a better charger and boost the pi
<clever> ah, nice
<clever> and then it waits forever for a child process that is already dead
<clever> Myrl-saki: which results in make loosing a sigchld
<clever> Myrl-saki: one of the getline functions or something is un-interuptable, and can drop signals
<clever> Myrl-saki: thats a bug ive found in make or libc
<clever> Myrl-saki: thats the nixpkgs and notos rev, release.nix, -A dist_test.armv7l-linux
<clever> sure
<clever> Myrl-saki: i'm on 2.11.1
<clever> lrwxrwxrwx 1 root root 77 Apr 26 23:56 arm -> /nix/store/q6ag9k4n2r7rq1ad65psbhbpvm04yplw-qemu-user-arm-2.11.1/bin/qemu-arm
<clever> i'll need to check that version in a bit
<clever> binutils cant build
<clever> its breaking my qemu-user-arm builds
<clever> Myrl-saki: ping
<clever> timokau[m]: i have a screen tab with `sudo -i`
<clever> in my case, i'm on rev 6c064e6b1f3
<clever> "18.09pre135256.6c064e6b1f3"
<clever> [root@amd-nixos:~]# nix-instantiate '<nixpkgs>' --eval -A lib.nixpkgsVersion
<clever> M-bbigras: first checkout a nixpkgs revision that is the same as your nixpkgs channel
<clever> Myrl-saki: heh
<clever> so the service simply didnt auto-start for an odd reason
<clever> ah