2019-11-08

<clever> > lib.trivial.versionSuffix
<clever> yeah, when the channel tarball is put together, those files get added
<clever> 140 versionSuffix =
<clever> 141 let suffixFile = ../.version-suffix;
<clever> 130 release = lib.strings.fileContents ../.version;
<clever> 127 version = release + versionSuffix;
<clever> leo___: if your deploying to an existing nixos install, your using the none backend, which requires that you specify all of the fileSystems and boot stuff yourself
<clever> there is no local backend
<clever> aws, packet, heznet...
<clever> leo___: depends on the backend, most backends provide it for you
<clever> rotaerk: you can download the windows install iso from the microsoft site
<clever> nixos_user: so it should just work now
<clever> nixos_user: 0001 is also first in your boot order
<clever> nixos_user2: it added nixos-boot at boot0001
<clever> nixos_user: try doing `NIXOS_INSTALL_BOOTLOADER=1 /nix/var/nix/profiles/system/bin/switch-to-configuration boot`
<clever> nixos_user2: until efibootmgr shows the right path for boot0000, there is no point in trying a reboot
<clever> nixos_user2: did you have canTouchEfiVariables enabled in configuration.nix?
<clever> nixos_user: try nix-build '<nixpkgs>' -A efibootmgr instead
<clever> nixos_user: if you use nixos-enter, does efibootmgr -v still report data?
<clever> nixos_user2: does `EFI\Microsoft\Boot\bootmgfw.efi` exist on nvme0n1p1 ?
<clever> nixos_user2: thats listed in efibootmgr, as `windows boot manager`, lol
<clever> thats it
<clever> nixos_user2: i need the part uuid, which blkid outputs, lsblk shows the wrong uuid
<clever> nixos_user: and if you run blkid on the efi system partition, what does it print out?
<clever> nixos_user: can you pastebin it all?
<clever> nixos_user: what does efibootmgr -v output, without nixos-enter
<clever> nixos_user: you probablt want to disable the CSM
<clever> nixos_user: you can also run `/nix/var/nix/profiles/system/bin/switch-to-configuration boot` inside the chroot to fix the bootloadr
<clever> nixos_user: you need to fix the dns in /etc/resolv.conf, check the file outside the chroot, then edit it inside
<clever> nixos_user: then install it
<clever> nixos_user: what does `efibootmgr -v` print out?
<clever> ah
<clever> nixos_user: efi or legacy?
<clever> nixos_user: also, make sure the boot.loader.grub.device is pointing to the right disk
<clever> nixos_user: if your using a nixos rescue image, you can use nixos-enter to automate the chroot
<clever> nixos_user: how did you try to reinstall grub?
<clever> yeah
<clever> CMCDragonkai: i think so
<clever> CMCDragonkai: hardware.opengl.enable = true;
<clever> Miyu-saki: havent heard of any
<clever> Miyu-saki: CAM?
<clever> leo___: to make you feel worse, my router has 8gig of ECC ram :P
<clever> leo___: 32gig of ram in my main desktop
<clever> leo___: mostly software, but i do dabble in electronics and eletrical sometimes
<clever> and when the insulation melts, the wires can touch eachother, and short out
<clever> Miyu-saki: your more likely to melt the insulation, before you melt the copper
<clever> you can inspect it from a remote (windows only, ugh) machine, over usb
<clever> the motherboard i have is a bit special, in that the os on the mobo doesnt have to support such tools
<clever> the software just sucks, and doesnt expect such a beefy cpu :P
<clever> but comparing the voltage, and the TDP of the cpu, it really should be off the charts
<clever> you cant zoom out enough to see how many amps the cpu pulls
<clever> Miyu-saki: my motherboard has a util to monitor voltage and amps from another pc, over usb
<clever> and the amps graph, literally goes off the top of the chart
<clever> model name : AMD FX(tm)-8350 Eight-Core Processor
<clever> Miyu-saki: 62.5 amps according to my math
<clever> Miyu-saki: i too was surprised, when my cpu literally went off the charts in amps, lol
<clever> Miyu-saki: all of my primary systems have 32gig of ram, i just cant work on less, lol
<clever> and if somebody tries to write to it, linux just discards the copy in swap, flags the ram as r/w, and retries the operation
<clever> and the way linux keeps track of things, is that it flags that 1gig of ram as "read only"
<clever> so if i do need a gig of ram, its already in swap, and linux can just instantly drop those pages
<clever> this is saying, that i have ~1gig of data in both ram and swap (the same data)
<clever> SwapCached: 1092588 kB
<clever> ]$ grep Cached /proc/meminfo
<clever> rotaerk: i think windows will just ignore it (like any other disk) until you start playing with the intel optane utils
<clever> and the dozen hours thing, is because ntfs isnt designed to use an l2arc
<clever> i think the cpu rules, are to ensure you can afford the overhead, and then have no reason to complain and give optane a bad name
<clever> rotaerk: but on windows, they have silly rules like you must use a certain cpu, and it takes a dozen hours to re-configure your ntfs to use it
<clever> rotaerk: optane is just an nvme block device, as far as linux is concerned
<clever> Miyu-saki: and there can be 2? outstanding transactions at once
<clever> Miyu-saki: from what ive heard, multiple writes get batched into a single transaction
<clever> the L2ARC is basically swap dedicated to zfs
<clever> examples are all over nixpkgs
<clever> something like that
<clever> inkbottle: /home/clever/apps/nixpkgs/pkgs/games/oilrush/default.nix: patchelf --set-rpath ${stdenv.cc.cc.lib}/lib64:${makeLibraryPath [ stdenv.cc.cc libX11 libXext libXinerama libXrandr ]}\
<clever> inkbottle: you need to patchelf the binary
<clever> inkbottle: are you patching a prebuilt binary or compiling something?

2019-11-07

<clever> would need to see the --show-trace
<clever> not sure
<clever> { machine1 = { ... }: { nixpkgs.overlays = [ (import ./foo.nix) ]; }; }
<clever> i would just define that in the deployment files
<clever> should have zero impact on the deployed machines
<clever> only at eval time for nixops
<clever> if you dont reference the given package, then the overlay will have zero impact on it
<clever> this is where nixops adds extra arguments to all modules
<clever> leo___: why does each machine need different overlays?
<clever> leo___: i would just not use the name in the overlays, give every machine the same overlays
<clever> leo___: it is
<clever> leo___: where is that name argument coming from?
<clever> leo___: you want to do nixpkgs.overlays = mkIf ...; nix.nixPath = mkIf ...; system.extraBuildCmds = mkIf ... ;
<clever> leo___: the problem is config = mkIf
<clever> Bryophyllum: nixos-rebuild rollback, will undo nixos-rebuild's, nix-channel --rollback will undo nix-channel --update
<clever> leo___: does it still fail with a single overlay in the directory, that only contains `_: _: {}` ?
<clever> leo___: can you pastebin the config?
<clever> Bryophyllum: if you want the version for the currently running nixos, you want nixos-version instead
<clever> Bryophyllum: and what is the path to something it started building?
<clever> Bryophyllum: nix eval nixpkgs.lib.version ?
<clever> Bryophyllum: what does `nix-channel --list` report as root?
<clever> rotaerk: that is the linux 5.3 iso image, for the current build of nixos-unstable
<clever> rotaerk: comparing https://hydra.nixos.org/jobset/nixos/trunk-combined to https://howoldis.herokuapp.com to see which eval has a stable rev...
<clever> rotaerk: yep, thats 5.3
<clever> > linux_latest
<clever> boot.kernelPackages = pkgs.linuxPackages_latest;
<clever> module = ./modules/installer/cd-dvd/installation-cd-minimal-new-kernel.nix;
<clever> but 2723 isnt in iwlwifi, so it wont work with that driver
<clever> rotaerk: and i can see that vid and pid in the aliases of iwlwifi
<clever> $ modinfo iwlwifi | grep --color 8086 | grep --color 24fd -i
<clever> alias: pci:v00008086d000024FDsv*sd00009074bc*sc*i*
<clever> it will include a vendor and productid at the end
<clever> 03:00.0 Network controller [0280]: Intel Corporation Wireless 8265 / 8275 [8086:24fd] (rev 78)
<clever> rotaerk: lspci -nn
<clever> rotaerk: did it leave any errors in dmesg?
<clever> rotaerk: try `modprobe iwlwifi` and see what happens
<clever> rotaerk: then youll need to find out which driver you need on linux
<clever> ah
<clever> rotaerk: with `lspci -vv`, does it show a `Kernel driver in use` ?
<clever> rotaerk: not entirely clear though
<clever> rotaerk: that looks like an ethernet card
<clever> rotaerk: what does lspci say?
<clever> rotaerk: then you dont have any wireless devices (or no drivers)
<clever> but then sudo wont pass that pipe on to wpa_supplicant
<clever> <(...) will create a pipe, and let sudo inherit that pipe
<clever> rotaerk: oh, < should work with sudo, but <(...) wont
<clever> rotaerk: it should work
<clever> rotaerk: /proc/self is an alias to the pid of whichever process tries to read it
<clever> lrwxrwxrwx 1 root root 13 Nov 1 14:01 /dev/fd -> /proc/self/fd
<clever> rotaerk: efiInstallAsRemovable lets you do an efi install, preferably you should use a second ESP for nixos, then the bios should let you pick which ESP to boot (ideally)
<clever> rotaerk: you can then either continue with a legacy install, or use boot.loader.grub.efiInstallAsRemovable=true; to do an efi install while booted into legacy
<clever> rotaerk: try legacy mode then, it sounds like the efi menu is booting the kernel with the wrong flags
<clever> rotaerk: sounds like some weird edgecases with efi
<clever> rotaerk: try both of them?
<clever> rotaerk: if efi is failing, you could try forcing a legacy boot instead, you may need to turn on the CSM
<clever> rotaerk: can always re-download it
<clever> rotaerk: try booting from the usb in efi mode
<clever> rotaerk: is the bios using legacy or efi?
<clever> red[m]: given that he booted an older nixos image from the same usb just before...
<clever> red[m]: sounds like you need to bisect the host, ever done a git bisect before?
<clever> red[m]: so any accelerated guest is failing
<clever> red[m]: the kvm driver in your host is possibly busted
<clever> red[m]: try `rmmod kvm_intel` and then run the vm again
<clever> red[m]: what about `lsmod | grep kvm` ?
<clever> red[m]: does /dev/kvm exist?
<clever> red[m]: it boots perfectly here
<clever> [clever@amd-nixos:~/apps/red/874ba64f72eedf20e7fb122af4318b82]$ nixos-rebuild build-vm -I nixos-config=./configuration.nix -I nixpkgs=https://github.com/nixos/nixpkgs/archive/7827d3f4497.tar.gz -Q
<clever> red[m]: still building from your fork...
<clever> red[m]: you even caused nix itself to rebuild! lol
<clever> building '/nix/store/9d10vsw9ndgwl3d8md4zqx2kblz80s41-nix-2.3.1.drv' on 'ssh://builder@192.168.2.32'...
<clever> switching to your fork confirms, its on the icu-issue-71142 branch
<clever> and due to how github works, i pulled your fork without even trying, because i specified a git rev from your fork
<clever> red[m]: your nixos-version pointed to a rev in your fork of nixpkgs!
<clever> red[m]: the rev you gave, is not even in nixos/nixpkgs!
<clever> red[m]: aha, one minute!
<clever> red[m]: your configuration.nix + rev caused an icu build, since that path isnt in the cache
<clever> 404
<clever> copying path '/nix/store/f7hvfim5kiqs6pxa9jk7207cndyf369w-icu4c-64.2' from 'ssh://builder@192.168.2.32'...
<clever> infinisil: yeah, the git util makes it a few characters longer, so its somewhat safe
<clever> red[m]: its building icu and boost, was this rev on a channel?
<clever> infinisil: via hydra
<clever> infinisil: i think nixos is getting it from a git util to print out a short but safe rev
<clever> red[m]: it likely differs a bit due to nixpkgs not knowing its own rev, for the nixos-version baked into the image
<clever> [clever@amd-nixos:~/apps/red/874ba64f72eedf20e7fb122af4318b82]$ nixos-rebuild build-vm -I nixos-config=./configuration.nix -I nixpkgs=https://github.com/nixos/nixpkgs/archive/c8bfae0.tar.gz
<clever> red[m]: can you pastebin your configuration.nix and say which rev of nixpkgs your on?
<clever> nh2[m]: ~/.config/nixpkgs/config.nix is the new path
<clever> nh2[m]: oh, and ~/.nixpkgs/config.nix is the deprecated path
<clever> red[m]: what is the exact command you used, and the full output from it?
<clever> nh2[m]: you could say it comes from the "default expressions" that are setup by nix-channel by default, and maybe have a new section explaining defexpr
<clever> so i can nix-env -iA foo.hello, to grab from a git checkout
<clever> nh2[m]: and this winds up at foo=
<clever> $ cat ~/.nix-defexpr/test/foo/default.nix
<clever> import /home/clever/apps/nixpkgs
<clever> so this winds up at nixos=
<clever> -r--r--r-- 1 root root 968 Dec 31 1969 /home/clever/.nix-defexpr/channels_root/nixos/default.nix
<clever> basically, it will recursively search ~/.nix-defexpr/ until it either finds foo/default.nix or foo.nix, then import that, and store it at the foo key
<clever> nh2[m]: also, its not directly getting that magic set from nix-channel, but rather from ~/.nix-defexpr/ via some more complex rules
<clever> nh2[m]: in the first block, you say -f is given, when it isnt
<clever> red[m]: you can always use -I nixpkgs=whatever to override things
<clever> red[m]: there is a nixpkgs= entry in $NIX_PATH, that points to the root channel on root
<clever> red[m]: note, that --add wont take effect until you --update
<clever> red[m]: then nixos-rebuild should be using 19.09
<clever> which maps to the nixos channel by default
<clever> red[m]: its always <nixpkgs>
<clever> CMCDragonkai: if you use my netboot_server.nix as an example, you can pull in just netboot-base, and skip minimal
<clever> CMCDragonkai: that was pulled in by netboot-minimal
<clever> yep
<clever> ah, one min
<clever> CMCDragonkai: did you services.xserver.enable = true; ?
<clever> which nobody will notice if they dont switch to it
<clever> it will just be auto-logged in on ctrl+alt+f1
<clever> nope
<clever> CMCDragonkai: or you can just reproduce the symlinkJoin part, and reference a subset of the netboot modules: https://github.com/cleverca22/nixos-configs/blob/master/netboot_server.nix#L7-L19
<clever> disabledModules may help you there
<clever> and if the cfg gets too long, --arg configuration 'import ./configuration.nix'
<clever> CMCDragonkai: the simplest option, is nix-build '<nixpkgs/nixos/release.nix>' -A netboot.x86_64-linux --arg configuration '{ nixos config here; }'
<clever> 141 netboot = forMatchingSystems [ "x86_64-linux" "aarch64-linux" ] (system: makeNetboot {
<clever> 6 , configuration ? {}
<clever> 39 makeModules = module: rest: [ configuration versionModule module rest ];
<clever> 105 modules = makeModules module {};
<clever> 101 makeNetboot = { module, system, ... }:
<clever> so its better to put such a thing into config.nix, so it persists
<clever> and in either case, youll forget what you did 6 months down the road, and `nix-env -u mplayer` will undo the override
<clever> nix-env -iA nixos.mplayer.override --arg pulseSupport true, should also work, because .override is now a function, but it might give trouble
<clever> nix-env -iA nixos.mplayer --arg config '{ pulseaudio = true; }' is one option (the default.nix defaults the pulseSupport flag to config.pulseaudio)
<clever> but it silently does nothing, because <nixpkgs> doesnt accept such a flag, and .mplayer isnt a function
<clever> i often see users doing something somewhat like: nix-env -iA nixos.mplayer --arg pulseSupport true
<clever> > builtins.functionArgs ({ a, b }: 42)
<clever> CMCDragonkai: it will use builtins.functionArgs to figure out what each function wants
<clever> leading to confusion when users try to use --arg on flags that only .override accepts
<clever> and any unused arguments are silently ignored
<clever> correct
<clever> yeah
<clever> nope, the --eval just makes nix-instantiate prett-print the value, rather then demand a derivation at the end
<clever> every time -A encounters a function, it just calls it with all of the --arg values
<clever> CMCDragonkai: it goes to both, check the gist i linked
<clever> CMCDragonkai: is it still in the let block? it should fail due to it being undefined
<clever> CMCDragonkai: -A foo.bar will auto-call foo and bar (and the file itself) with any --arg values
<clever> then nix-env -f '<nixpkgs>' -E 'foo: ...' now replaces the entire set with a single function, which you must still call!
<clever> and you must now call it yourself
<clever> but nix-env -i -E 'foo: ...' passes that whole set as foo
<clever> nh2[m]: and when you nix-env -iA nixos.yarn, it auto-calls the nixos attr, with any supplied --arg
<clever> nh2[m]: so, nix-env, without -f, is setting the scope to a set of functions, each importing a channel, so { nixpkgs = import <nixpkgs>; nixos = import <nixos>; } basically
<clever> nh2[m]: basically, -A will auto-call any function it stumbles into
<clever> nh2[m]: one minute
<clever> nh2[m]: oh, that might be related to the auto-call stuff in -A
<clever> and if you point -f elsewhere, it evals to a different version?
<clever> i'm not sure what will happen if you mix both
<clever> nh2[m]: but -E can just import somethng directly
<clever> nh2[m]: doesnt really make sense, -f tells it to import something for use with -A
<clever> best to add an override to config.nix, and install that overrive
<clever> though id recomend against that, 6 months later, you wont remember what the magic expr was, and cant reproduce things
<clever> if you still need an expr, nix-env -i -E '_: with import <nixpkgs>; yarn`

2019-11-06

<clever> same as my own shadow file
<clever> Access: (0600/-rw-------) Uid: ( 0/ root) Gid: ( 0/ root)
<clever> karetsu: only root should have permission to read shadow, otherwise shadow is pointless
<clever> jd823592: so you can just set services.emacs.package = unstable.emacs;
<clever> jd823592: the service runs whatever you put into services.emacs.package
<clever> jd823592: you can use an overlay in configuration.nix to mutate what version the service is going to install
<clever> ,unstable jd823592
<clever> jd823592: then its likely already the latest version in 19.03
<clever> jd823592: yep, thats why channels have names
<clever> jd823592: yep
<clever> jd823592: i try to avoid having channels on the user, because they you have to `nix-channel --update` twice to update all of them
<clever> jd823592: thats the one that nixos-rebuild will be updating if the channels update
<clever> jd823592: that sounds like the ones nixos is managing, you should also find it under `ls /etc/systemd/user`
<clever> jd823592: what about a -q --roots on those?
<clever> jd823592: just delete the dangling link, and then we can go from there
<clever> jd823592: something must have made the symlink to that file, and nix wasnt aware it was even in use
<clever> jd823592: nix-store -q --roots /nix/store/l0jy8gr3cs363bib2ahmkbpc0y5gqp3k-unit-emacs.service/emacs.service
<clever> jd823592: first, id check if its a gc root, `ls -lh /nix/var/nix/gcroots/auto/ | grep emacs`, what does this turn up?
<clever> jd823592: so something else you did left one there, and nixos/nix-env will never try to update it
<clever> jd823592: nixos and nix-env will never put a symlink into that directory
<clever> jd823592: and the directories themselves are real directories?
<clever> jd823592: is any element of ` .config/systemd/user` also a symlinl?
<clever> jd823592: what was the path to the emacs .service file?
<clever> chessai: yep
<clever> chessai: yeah, its not really required
<clever> deni: you can use disabledModules to test the change, and then open a PR to nixpkgs to make it official
<clever> deni: it would be best to modify the module to make that a proper option
<clever> red[m]: build-vm uses -kernel on the cmdline, and no kernel actually exists in the image
<clever> red[m]: you can disable rebooting entirely
<clever> deni: you would then copy the whole module file, edit the copy, and use imports to bring the copy in
<clever> chessai: all attributes of mkDerivation become env vars, so you could just directly `CUDA_PATH = cudatoolkit;`, and to make it optional, use `// lib.optionalAttrs ...`
<clever> chessai: `strOnLinux = str: stdenv.lib.optionalString stdenv.isLinux str` could be reduced to `strOnLinux = stdenv.lib.optionalString stdenv.isLinux`
<clever> chessai: ah
<clever> deni: overlays can only change the contents of the pkgs set, you want https://nixos.org/nixos/manual/#sec-replace-modules
<clever> red[m]: if you know how to debug kernelsin gdb, you could probably do that, but it sounds like some pretty big breakage, can others reproduce it?
<clever> chessai: i meant upstream arrayfire
<clever> chessai: how many times has arrayfire updated in the last week?
<clever> red[m]: it sounds like the kernel may just be bad?
<clever> red[m]: i believe that flag will just wire stdio to a serial port on the guest, and configure linux to use that serial port
<clever> red[m]: try with `virtualisation.graphics = false;` and see what it prints to stdout
<clever> red[m]: toss that into configuration.nix and build-vm again to update it
<clever> red[m]: its a nixos config flag
<clever> red[m]: that may be a bit low, try increasing it?
<clever> red[m]: how much ram is assigned to the vm?
<clever> red[m]: is it giving an error?
<clever> no clue
<clever> karetsu: no need to reinstall either, just change the channel, nixos-rebuild boot, and reboot
<clever> karetsu: yeah
<clever> karetsu: does it happen if you change channels?
<clever> karetsu: not sure, i would expect that to just work
<clever> karetsu: what uid are they assigned when you view /etc/passwd?
<clever> karetsu: users.nix is missing from github
<clever> niso: edit the expr that is doing patchelf, and make it do `ls -lh ${gcc}/lib`