2018-08-12

<clever> leotaku: nixops will write one kernel to /boot for every kernel in /nix/var/nix/profiles/system*
<clever> dhess: yeah, you should be able to tweak the nix that sub-command outputs, and then load it from hydra
<clever> Dedalo: umount one of the duplicates, then try nixos-generate-config again
<clever> Dedalo: what does "mount | grep boot" say?
<clever> dhess: that generates a nix file that calls eval-machine-info.nix with mostly the right args
<clever> dhess: this branch of nixops has a new sub-command, dump-debug-expression
<clever> dhess: one min
<clever> the tool just scans what is currently mounted, and creates config to keep those mounted
<clever> Dedalo: mount /boot and re-run generate config
<clever> Dedalo: /boot will be missing if you ran nixos-generate-config before mounting it
<clever> Dedalo: in the guide, rpool/root is just a folder to hold other filesystems, but i just skip that
<clever> sb0_: the storepath for the gcc wrappers
<clever> why not?
<clever> and if it works in nix-build, why use nix-shell?
<clever> it works for most things, but some of them need special handling
<clever> maerwald: why are you trying to build it in nix-shell?
<clever> just make sure your not using the same device twice, check `swapon --show`
<clever> you can add it to configuration.nix
<clever> swapDevices = [ { device = "/dev/nvme0n1p2"; randomEncryption.enable = true; } ];
<clever> that looks like you manually activated 2 swap devices, then turned the 1st off
<clever> sb0_: also, read `man configuration.nix` under swapDevices
<clever> sb0_: can you pastebin both your configuration.nix, hardware-configuration.nix, and `swapon --show` ?
<clever> sb0_: thats because its in your hardware-configuration.nix
<clever> do you already have swap setup?
<clever> swapDevices is a list of attribute sets
<clever> sb0_: you must set it on a specific swap device
<clever> maerwald: try instead running genericBuild
<clever> sb0_: its swapDevices
<clever> which is?
<clever> what command did you run in nix-shell to build it?
<clever> ah
<clever> there is already a nix package for it
<clever> how are you trying to build it?
<clever> maerwald: broken how?, it works for me
<clever> leotaku: proper cross-compile and qemu "cross" compile are seperate compilers as far as nix is concerned, and it will never mix the 2
<clever> leotaku: proper cross-compile will be faster, but is more complex to setup, and doesnt work for all packages
<clever> leotaku: yeah, it will be pretty slow
<clever> dmj`: yeah
<clever> dmj`: pong
<clever> not sure on that one
<clever> though `nix run nixpkgs.nox` will also use <nixpkgs>
<clever> ah
<clever> vodurden: nix-shell uses <nixpkgs> from $NIX_PATH
<clever> it may be changes with nix-shell, but id call that a bug
<clever> ah, but nix-shell -p nox should do the same..
<clever> vodurden: you need to `nix run nixpkgs.nox` first
<clever> ,locate nox-review
<clever> pikajude: nix-store -r /nix/store/path --option substituters cacheurl
<clever> ldlework: you must use python.withPackages
<clever> i suspect the ExecStart code is doing something naughty
<clever> ryantrinkle: try "${./blah}"
<clever> no such driver for amd
<clever> /run/booted-system/kernel-modules/lib/modules/4.14.54/kernel/arch/x86/events/intel/intel-cstate.ko.xz
<clever> cpu MHz : 2331.485
<clever> cpu MHz : 2684.090
<clever> and i can even see a 400mhz difference between 2 cores
<clever> cpu MHz : 3412.972
<clever> cpu MHz : 3844.199
<clever> vodurden: but despite it claiming to not have a cpufreq driver, the freqs in `grep MHz /proc/cpuinfo` change on their own
<clever> no or unknown cpufreq driver is active on this CPU
<clever> [root@amd-nixos:~]# cpufreq-info
<clever> fx-8350
<clever> amd cpu
<clever> windows on the same hardware definitely seems broken, it cant get over 60c at max load
<clever> vodurden: i also dont have any control over freq scaling, but it does seem to be doing some on its own internally
<clever> vodurden: mine would thermal shutdown around 85c
<clever> vodurden: i have since discovered that windows uses far less power at max load, but linux power usage matches the specs on the cpu, so windows is technically the broken one
<clever> vodurden: ah, that reminds me, i was having thermal shutdown troubles on my amd fx-8350

2018-08-11

<clever> with another nix/store in the middle
<clever> then it would be at /nix/store/s68qnm8r4w89fisjp9vx57hppjic2r77-hello-2.10/nix/store/s68qnm8r4w89fisjp9vx57hppjic2r77-hello-2.10/bin/hello
<clever> infinisil: so the derivation inside there will have different hashes and paths
<clever> infinisil: the storedir itself is included in the hash of the storepath
<clever> samueldr: ive even filed a PR to "fix" that malformed xml, and i wound up breaking tests
<clever> samueldr: look closely, they tend to do </para><para>
<clever> symphorien: and i dont think you can nest paras
<clever> symphorien: all descriptions are silently wrapped with <para>${description}</para>
<clever> Dedalo: hibernation draws zero power, so the battery will last longer
<clever> schmittlauch[m]: yeah
<clever> inquisitiv3: i use a hostname.nix style, and then configuration.nix is basically just 1 line, imports = [ ./nixos-configs/hostname.nix ];
<clever> inquisitiv3: i dont see any issues with running git as root, but the name configuration.nix will conflict when you add more hosts
<clever> Dedalo: yeah, once you have the root mounted, then you can copy the config
<clever> Dedalo: youll also want to copy /etc/wpa_supplicant.conf to /mnt/etc/wpa_supplicant.conf and also networking.wireless.enable = true; when installing, then it will continue to work after installing
<clever> for wep and unencrypted, you can use iwconfig bare
<clever> Dedalo: its the only way to connect to wpa networks
<clever> shapr: nope
<clever> ive had the fun of using wpa_supplicant for the first time, with no wifi access to look up how the heck it works :P
<clever> :D
<clever> i only used raw wpa_cli and never installed a gui for it
<clever> probably, i just never bothered to bind it to any gui
<clever> and obviously, linux doesnt support that 3rd position out of the box
<clever> MichaelRaskin: but the spring for the momentary position would make it snap back hard enough to pass the detent and sometimes switch itself off :P
<clever> MichaelRaskin: one of my older laptops had a physical switch with 3 positions, off, on, and a momentary position to open the wifi GUI
<clever> yep
<clever> Dedalo: also try the rfkill command
<clever> use the physical switch or fn key to turn it on
<clever> Dedalo: your wifi is disabled with the rfkill switch
<clever> in a different shell
<clever> Dedalo: ip link set wlp2s0 up
<clever> Dedalo: what about scan?
<clever> `wpa_cli -i wlp3s0` in my case
<clever> Dedalo: you need to use -i to get the non-p2p one
<clever> Dedalo: at the top level, outside the network blocks
<clever> Dedalo: add that to /etc/wpa_supplicant.conf and then restart the service again
<clever> ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
<clever> Dedalo: one sec
<clever> Dedalo: what did wpa_cli say when you ran status?
<clever> Dedalo: wpa_supplicant uses all wifi cards by default
<clever> Dedalo: because your card is called wlp2s0
<clever> Dedalo: check wpa_cli then
<clever> Dedalo: also try `wpa_cli -i wlan0` then check `status`, `scan`, `scan_results`, and `list_networks`
<clever> Dedalo: if you run `iwconfig` does it show an essid being set?
<clever> Dedalo: one sec
<clever> using the exact name of the network
<clever> Dedalo: run `wpa_passphrase name password > /etc/wpa_supplicant.conf` and then `systemctl restart wpa_supplicant`
<clever> Dedalo: is it wep or wpa?
<clever> Dedalo: then we want wpa_cli and wpa_passphrase
<clever> Dedalo: dod ypu try nmtui?
<clever> Dedalo: does the network have a password?
<clever> rhomboidcactus: you want just { pkgs, ... }:
<clever> rhomboidcactus: your importing a 2nd copy of nixpkgs, which reads /root/.config/nixpkgs/config.nix
<clever> rhomboidcactus: line 143 is to blame
<clever> rhomboidcactus: did you link the pastebin of your config?
<clever> ive had that work for me before
<clever> Brains: what happens if you just nix-shell -p mono and then run mono directly on the binary?
<clever> Brains: have you read spacechem-launcher.sh yet?
<clever> Brains: i dont think so, it just creates a /lib and /usr/lib with namespaces
<clever> Brains: youll need to add . to LD_LIBRARY_PATH
<clever> rhomboidcactus: can you pastebin your configuration.nix?
<clever> Brains: what dll is missing?
<clever> tilpner: dont worry, ive broken my desktop the same way
<clever> tilpner: ah, then your depending heavily on what the hoster provides
<clever> if you can find one that didnt depend on that squashfs
<clever> tilpner: try the rollbacks in grub first
<clever> and nix why-depends to find the link between them
<clever> tilpner: if it refuses to delete something, use `nix-store --query --roots` to see why
<clever> tilpner: never use ignore liveness, thats how you break everything :P
<clever> jonreeve: i dont think that will help any
<clever> cant find its attribute though
<clever> /home/clever/nixpkgs/pkgs/applications/kde/srcs.nix: url = "${mirror}/stable/applications/18.04.3/src/dragon-18.04.3.tar.xz";
<clever> neonfuz: ah, so it was a nix level error, just parsing the file
<clever> neonfuz: can you pastebin sage.nix?
<clever> neonfuz: and what is the exact error?
<clever> neonfuz: what is the attribute that is colliding?
<clever> neonfuz: yes
<clever> neonfuz: imports already does that
<clever> ahh
<clever> ah
<clever> but you need to then get gfx to work without expecting serial
<clever> i'm guessing you can just put the serial command into an if block, to detect its failure
<clever> if loadfont ($drive1)//converted-font.pf2; then
<clever> so i know if they are relevant or not
<clever> samueldr: just checking everything related to gfx in my config
<clever> samueldr: so that the linux is happy with the "current" mode on startup
<clever> samueldr: it looks like the gfxpayload has to do with what mode grub puts the gpu into, after you pick an os
<clever> i can see where it checks things that nixos's grub.cfg was setting
<clever> set gfxmode=auto
<clever> modevar = grub_env_get ("gfxmode");
<clever> nothing yet
<clever> and it just happens to be beside an attr that was passed as a file
<clever> samueldr: ah
<clever> infinisil: the nix daemon needs to support passing derivation attributes as files
<clever> infinisil: you need a newer nix-daemon
<clever> ouch
<clever> > a+b/3-2
<clever> it usually complains about division
<clever> when did it get that smart? lol
<clever> > ./foo/
<clever> vs functions
<clever> > a: b
<clever> a: b
<clever> jD91mZM2: and urls
<clever> > a:b
<clever> jasom: root passwd, ctrl+f the above file for passwd
<clever> jasom: the code to make it work is missing from nixos-install.sh
<clever> jasom: i suspect that might have been broken by the nixos-install rewrite
<clever> neither supports spaces
<clever> jasom: configure it normally under the fileSystems config in configuration.nix
<clever> samueldr: tried it, needs root
<clever> sphalerite: i need to confirm that and update my overlay
<clever> leotaku: yeah
<clever> it will also configure nix to understand that, so the above error wont happen
<clever> leotaku: if you clone this repo, add the relative path of qemu.nix to your imports, and set qemu-user.aarch64 = true;, then your machine can magically run aarch64 binaries
<clever> leotaku: one min
<clever> gchristensen: ive not noticed nixpkgs.system change on unstable, but i have noticed it being weird on mac
<clever> that makes sense then why it runs before preconfigure
<clever> ahh, was mixing that up with the hooks
<clever> and its difficult to know which preConfigure runs first
<clever> elvishjerricco: the autoreconfhook adds itself to the preConfigure list
<clever> elvishjerricco: postPatch

2018-08-10

<clever> sigtrm: go ahead
<clever> dhess: the timeouts may sometimes be picky
<clever> theres also nix-env -f https://github.com/nixos/nixpkgs-channels/archive/nixos-unstable.tar.gz -iA brightnessctl
<clever> try a nix-channel --update, but you may need unstable
<clever> fresheyeball: nix-channel --list
<clever> nix-env -iA nixos.brightnessctl
<clever> fresheyeball: what about running brightnessctl as root?
<clever> fresheyeball: do the fn keys on the keyboard work?
<clever> selfsymmetric-mu: you need to remove automake from systemPackages, and instead use nix-shell
<clever> ,library
<clever> selfsymmetric-mu: that says that automake must be in the build inputs, not the system packages
<clever> selfsymmetric-mu: why do you need automake installed to install pdf-tools?
<clever> selfsymmetric-mu: why do you have automake in systemPackages?
<clever> sigtrm: fire up wireshark on the ssh client, set it to capture port 22, and then try a single ssh, then stop capture and screenshot the packet listing
<clever> nope, but there was a chance you already had it
<clever> sigtrm: does `ls -l /nix/store/*/bin/tcpdump` find any copies?
<clever> sigtrm: from the nixos machine, run `tcpdump -i eth0 -p -n port 22`, it should have very little output, then try to ssh into it once, and pastebin the output tcpdump made
<clever> does it get any response back?
<clever> sigtrm: run this on the nixos machine: arping -D 192.168.10.126 -I eth0
<clever> sigtrm: and what is the name of the ethernet interface?
<clever> sigtrm: what is the IP on the problem nixos machine?
<clever> sigtrm: is that over ipv4 or ipv6?
<clever> sigtrm: having the error would help debug it a lot better
<clever> sigtrm: you have also not yet given the exact error the ssh client gives when failing
<clever> sigtrm: so you can just do a rollback to an exact build, without having to know how it was made
<clever> sigtrm: nixos also keeps the fully build copies of nixos as GC roots, in /nix/var/nix/profiles/system-*
<clever> sigtrm: thats why i try to keep it in a git repo, and also use zfs snapshots to archive it more often
<clever> sigtrm: correct
<clever> sigtrm: yeah
<clever> yorick: using netboot_server.nix you can just PXE boot every machine with a minimal disposable nix store that it keeps in ram
<clever> why not use a central binary cache instead? or nfs if you must share
<clever> and nix expects certain global locks to work when dealing with db.sqlite and related things
<clever> every other machine promptly falls over :P
<clever> "oh, nobody is using that, delete!"
<clever> yorick: and the instant you start to shadow that with variants, garbage collection will become a pain in the ass
<clever> yorick: the profiles will cause a lot of problems, since each system wants its own view of what /nix/var/nix/profiles/system points to
<clever> zfs will refuse to open it until you use force, and then its your own fault
<clever> ext4 may treat it as an improper shutdown, and then 2 writers will start to shred your disk
<clever> yorick: but it can also accidentally happen if your using something like iscsi to mount a drive, and you forget to umount it at another machine
<clever> yorick: a few filesystems support it, but need a seperate connection to a locking server to coordinate things
<clever> elvishjerricco: it will only import a pool that was last imported by the same hostid (an improper or clean shutdown, and not in use), or that has been cleanly `zpool export`ed (clearly not in use)
<clever> elvishjerricco: ZFS uses the hostid to detect if the given block device is in-use by another host, over a shared block device
<clever> dhess: yep
<clever> bigvalen: when using the autosnapshot option, it cleans them up automatically
<clever> so your going out of your way to not ping me :P
<clever> my irc client only triggers if you start the msg with my nick
<clever> kalbasit[m]: oh, you also want to use self.callPackage in there, not import
<clever> and it will recursively search imports as it does so
<clever> nixos will read all modules, merge the return value of every module, and create a single config set
<clever> grp: as soon as you try to read config, it no longer works by itself in nix repl, and you must load it via nixos
<clever> grp: and to view them in nix repl, use `nix repl '<nixpkgs/nixos>'` then try to eval config or options
<clever> grp: and you can just do { lib, ... }: or { config, lib, ... }: in most of those files, no need to import nixpkgs
<clever> grp: you want config.testvar
<clever> more parens!
<clever> not a list
<clever> map is a builtin
<clever> kalbasit[m]: line 6&7, you ran listToAttrs on map
<clever> grp: can you pastebin all related files?
<clever> if your in a normal nix file, then thats simply a list of paths called imports, and it does nothing special
<clever> grp: and only if you are inside a nixos module
<clever> grp: imports will store all of the results into the config tree
<clever> no nix files where created!
<clever> dhess: it disables version checks on tasty, then loads serokell-util.cabal from the current dir, and drops me into a shell containing a ghci + ghc, that have all that serokell-util wanted
<clever> dhess: this is something i had tossed together a month ago
<clever> nix-shell -E 'with import <nixpkgs> {}; ((haskellPackages.override { overrides = self: super: { tasty = haskell.lib.doJailbreak super.tasty; }; }).callCabal2nix "serokell-util" ./. {}).env'
<clever> benzrf: it works 90% of the time
<clever> benzrf: it just disables all version restraints
<clever> benzrf: haskell.lib.doJailbreak
<clever> benzrf: also, did you try just doing a jailbreak?
<clever> benzrf: probably why it got renamed to nix-tools, lol
<clever> benzrf: Cabal2nix might already do that (not to be confused with cabal2nix)
<clever> and now you have 2 copies of the src
<clever> but it would have to be a service you enable, and the fetch function has to still work without it
<clever> and since its not in the sandbox, it just keeps running
<clever> dhess: however, you can talk to localhost from the derivation, you could hijack an already-running torrent client
<clever> dhess: your entire bloodline must die!! :P
<clever> dhess: and it cant fork into the background, nix uses the uid to murder every single child you leave behind :P
<clever> and when you return, nix kills all proccesses
<clever> dhess: note that if you try to seed, nix wont consider the download done until you return
<clever> a couple of months ago i needed to scale up some relay clusters, and it took only ~10-20 mins to make the changes, and then deploy another 80 machines
<clever> neonfuz: it will just generate a docker image that contains the full closure of the given derivations, and you can then pipe it into `docker load`
<clever> neonfuz: the closest thing i know of is dockerTools.buildImage
<clever> jonreeve: there is also a newer `nix search`
<clever> yeah, the -q will always be slower
<clever> sigtrm: what is the exact error the ssh client gives?
<clever> primops are all written in c++
<clever> > lib.tail
<clever> grp: a lot of things are in lib first, then get moved to builtins, and lib becomes an alias
<clever> so you dont even need lib, currently
<clever> > builtins.readDir ./.
<clever> and readDir is not in lib!
<clever> > lib.readDir ./.
<clever> also, you probably dont want to quote the path
<clever> {lib ? (import <nixpkgs> {}).lib) }: with lib; { ls = readDir "/example" }
<clever> the } is missing
<clever> grp: that tries to call nixpkgs, and pass it a lib argument, and that attr set isnt valid
<clever> grp: or change it to: { lib ? (import <nixpkgs> {}).lib }:
<clever> grp: and then run nix repl on that
<clever> grp: create another file, that does: let lib = (import <nixpkgs> {}).lib; in import ./somefile.nix { inherit lib; }