2018-09-20

<clever> zduch4c: i glanced at the source for the driver, and i think it relies on a second module, for the serio interface
<clever> zduch4c: next thing id check is what dmesg says on nixos, when you rmmod and modprobe again
<clever> zduch4c: and evtest shows xy coords when you touch the screen?
<clever> zduch4c: if you reload it, does it work again?, does evtest list it?
<clever> zduch4c: does the touchscreen stop working?
<clever> zduch4c: what happens if you try to `rmmod wacom_w8001` on ubuntu?
<clever> ah, found it
<clever> zduch4c: dont see the link for the ubuntu modinfo
<clever> so oyu could use a vm or 2nd machine to speed up comparison
<clever> ubuntu doesnt have to actually be booted on the tablet
<clever> zduch4c: next thing i would do then is compare `modinfo wacom_w8001` on both ubuntu and nixos
<clever> zduch4c: what does dmesg say involving wacom?
<clever> zduch4c: what about in evtest?
<clever> zduch4c: does it work once loaded like that?
<clever> zduch4c: and does nixos also show it in lsmod?
<clever> zduch4c: what module did ubuntu show in lsmod?
<clever> LnL: the process was involved in creating backups, so it would also have write to the backups
<clever> LnL: the backups where also mounted over NFS
<clever> LnL: ive heard a horror story of basically that, with rm -rf /${backuppath}
<clever> samueldr: i suspect that the boot firmware is responsible for checking the hat i2c, and injecting it into the DTB, but i'm not entirely sure

2018-09-19

<clever> gchristensen: maybe its been fixed since i saw the bug
<clever> Mic92: dont let NM in!
<clever> rawtaz: if its using fetchFromGitHub, then the name is just "source"
<clever> rawtaz: the storepath ignores the version entirely
<clever> hashing a string that contains the hash, name, and other params
<clever> rawtaz: a fairly complex algo, where the inputs are the hash and derivation name
<clever> rawtaz: you claimed the file hasnt changed, so its not bothering to re-download
<clever> rawtaz: if the hash is identical, nix will use the old download
<clever> it might have been fixed in the years since i memorized how everything works
<clever> probably
<clever> at least, last time i messed with containers, it didnt
<clever> gchristensen: nixos-rebuild doesnt understand @ based units
<clever> gchristensen: so if you have a declarative container in a nixops machine, it wont update
<clever> gchristensen: with declarative containers, systemd/nixos-rebuild wont restart them on activation
<clever> gchristensen: havent tried it yet
<clever> catern: fetchgit returns a path, so you could just src = (fetchgit { ... }) + "/foo";
<clever> postUnpack can then append to that var
<clever> and unpackPhase creates a dir named after the tar, and auto-sets sourceRoot to that dir
<clever> catern: sourceRoot is the path relative to $NIX_BUILD_TOP
<clever> append to the sourceRoot in postUnpack
<clever> astronavt: its normal for non-root to lack it
<clever> astronavt: which user is missing .nix-channels ?
<clever> astronavt: run realpath on that path
<clever> nDuff: default location for the file is still /etc/nix/machines
<clever> nDuff: its still configured with the same format, via the same env var
<clever> nDuff: the remote building is now built into nix, and doesnt need that external hook
<clever> anything the profile previously contained will be ignored (if it even existed to begin with)
<clever> Henson: the above command will just set the given profile to point to a certain storepath
<clever> nix-env -p /nix/var/nix/profiles/per-user/clever/profile --set /nix/store/x2f60fy8xc5rkr56ixwg1c2nikjl3v5n-user-environment
<clever> lrwxrwxrwx 1 clever users 60 Sep 12 18:23 /nix/var/nix/profiles/per-user/clever/profile-418-link -> /nix/store/x2f60fy8xc5rkr56ixwg1c2nikjl3v5n-user-environment
<clever> ah right, an example of how to install things
<clever> its now part of nix!
<clever> *delete*
<clever> and :r matches between them as well
<clever> ghci also has :q
<clever> astronavt: it tells you :? for help on startup, and :q is listed in the help
<clever> astronavt: :q
<clever> astronavt: nix-repl is deprecated, you must now use nix repl
<clever> astronavt: what command did you run? are you on nixos or other?
<clever> nix might be doing the same?
<clever> sphalerite: ssh for example, will open /dev/tty, which can bypass all redirection and get the controlling tty of the process
<clever> catern: but with config.nix, you need to manually merge them into a single file
<clever> catern: its easier to use many overlays at once
<clever> you could use mapAttrs to run a function over every package in a set, before putting it into LnL's userPackages
<clever> and you can remove any single package as normal, or nix-env -iA one to just upgrade it
<clever> the same as if you had just ran nix-env -iA nixpkgs.hello against each one
<clever> when you nix-env -iA a set, it will install each attribute of the set, as a seperate entry
<clever> yeah
<clever> so you dont have to remember the incatation to update it
<clever> catern: yeah, LnL's gist uses an overlay instead, and includes a bash script to run nix-env for you
<clever> catern: and there is a different flag (i forget which one), which will uninstall everything you previously had, so its an atomic swap to the new version of mystuff, and no old stuff left
<clever> catern: if you nix-env -iA nixpkgs.mystuff, it will install everything in the set
<clever> catern: i just create a packageOverride in config.nix, that contains a set, like mystuff = { inherit (pkgs) hello firefox; };
<clever> selfsymmetric-pa: `ls -ltrh /nix/var/nix/profiles/per-user/root` will confirm when you last ran it as root
<clever> selfsymmetric-pa: and you ran `nix-channel --update` as root?
<clever> selfsymmetric-pa: what does `nix-instantiate --find-file unstable` report?
<clever> catern: the stdenv can be modified to add it automatically
<clever> selfsymmetric-pa: and which version are you expecting to get?
<clever> or fix nixpkgs to include man in the right field
<clever> add the buildEnv to config.nix as an override
<clever> sphalerite: which is why i mentioned a buildEnv a few hours ago
<clever> selfsymmetric-pa: what if you just `nix-build '<unstable>' -A kubernetes-helm`
<clever> ah
<clever> and then the old version just wont exist
<clever> selfsymmetric-pa: an override would change the package the nixos module is already installing
<clever> selfsymmetric-pa: you usually want to use an override, using systemPackages may lead to 2 versions being in systemPackages, and then you dont always get the right one
<clever> selfsymmetric-pa: did you also enable kurbernetes-helm with a services. option?
<clever> selfsymmetric-pa: `nixos-rebuild --upgrade` only updates the nixos channel, and ignores the others
<clever> selfsymmetric-pa: when did you last `nix-channel --update` ?
<clever> selfsymmetric-pa: what does `nix-channel --list` report?
<clever> selfsymmetric-pa: uninstall wont help any
<clever> selfsymmetric-pa: how did you install it and what channel are you on?
<clever> selfsymmetric-pa: this says the commit exists in nixos-unstable
<clever> selfsymmetric-pa: check the nixos-unstable branch of the nixpkgs-channels repo
<clever> grp: AAAAAASomeThingsFailToEvaluate sorts first, and gives a saner error
<clever> grp: some people will just `nix-build` in the root of nixpkgs, or `nix-env -i` and then nix tries to install literally every single package
<clever> that might be a new error, to make it less confusing then a weird division error
<clever> sphalerite: it also sometimes treats the trailing / as a division operator
<clever> sphalerite: error, trailing slash on path
<clever> yes
<clever> but its paths, not pkgs trees
<clever> the same set -iA acts on
<clever> sphalerite: its passing you a set, containing every channel
<clever> sphalerite: nix-env -iE '_: with import <nixpkgs> {}; symlinkJoin {name = "utillinux"; paths = [ utillinux utillinux.man ]; }'
<clever> sphalerite: nix-env supports -E
<clever> catern: it will need an override that can change outputsToInstall, or just buildEnv 2 things together
<clever> i can just omit man pages from everything in my kexec image
<clever> yeah
<clever> gchristensen: that may fix it then
<clever> systemPackages deal with man pages better
<clever> manpages are in its own output, which nix-env has trouble with
<clever> been there, done that
<clever> maybe i got which one needs help with that mixed up
<clever> vandenoever: alexherbo2 was asking about /boot earlier, thought it was EFI issues
<clever> vandenoever: what does `mount | grep boot` report?
<clever> mpickering: run `nix-store --query --roots` on one of them
<clever> sphalerite: i type too fast and it thinks i'm a spammer!!
<clever> sphalerite: it has warned me before, when i was just typing by hand!
<clever> virtio_pci and virtio_blk depend on it, and nixos will figure it out
<clever> virtio itself doesnt have to be listed
<clever> oh, and virtio_pci
<clever> my simple test probably did sata
<clever> so it cant find any disk
<clever> your initrd likely lacks virtio support
<clever> eeva: add virtio and virtio_blk to boot.initrd.availableKernelModules
<clever> eeva: oh, drivers
<clever> and then there are matching -device entries to create pci nodes for each disk
<clever> both have if=none, so the -drive wont create an interface
<clever> eeva: first disk has format=qcow2, second is format=row, that looks good
<clever> eeva: perhaps kvm isnt treating it as a qcow2, what does the commandline look like in `ps aux` when its running the vm?
<clever> but it hangs bringing up eth0, but thats not your issue
<clever> 2nd just boots it
<clever> so all writes go to the 2nd disk.img, and all reads initially come from the nix store
<clever> 1st command creates a 2nd qcow2, using the read-only file as its base
<clever> eeva: it boots
<clever> [clever@amd-nixos:~/apps/9bddb5012384d8f16e42fc78109f989c]$ ./qemu/bin/qemu-kvm -drive file=disk.img
<clever> [clever@amd-nixos:~/apps/9bddb5012384d8f16e42fc78109f989c]$ ./qemu/bin/qemu-img create -f qcow2 -o backing_file=result/nixos.qcow2 disk.img
<clever> eeva: testing the image locally...
<clever> eeva: unrelated, lines 13-15, isNormalUser=true; will do most of that
<clever> just /quit your msg
<clever> /quit is part of the irc protocol, it should work the same way in every client
<clever> Henson: /exit
<clever> s
<clever> Henson: you can just delete all of its symlink
<clever> so you cant test the pre-compiled version
<clever> haslersn: it is, but you cant run the script without that fixing
<clever> haslersn: only /bin/sh and /usr/bin/env exist, all else is in /run or /nix
<clever> haslersn: /bin/bash doesnt exist on nixos
<clever> growpotkin: nix's stdenv will even patch that to the absolute path of bash when installing scripts
<clever> growpotkin: #!/usr/bin/env bash
<clever> haslersn: if you run `nix-env -iA` on a set, it will install every attr of the set
<clever> yeah, try just booting the ubuntu livecd and see what happens, and inspect how its workng
<clever> acpi is on by default
<clever> zduch4c: also check https://github.com/NixOS/nixos-hardware
<clever> zduch4c: then it could be translated to nixos
<clever> zduch4c: see if you can find directions on how to enable it, or find evidence of it in lspci or lsusb
<clever> zduch4c: anything listed by evtest?
<clever> zduch4c: also try running evtest and see if the wacom device is visible
<clever> zduch4c: and check dmesg for anything wacom related
<clever> zduch4c: check lsmod to see if any wacom things are loaded, and try manually loading things with modprobe
<clever> zduch4c: so wacom would auto-load if a compatible hid device is present
<clever> zduch4c: the wacom one has aliases on hid devices
<clever> zduch4c: this finds 4 modules on my machine, wacom, wacom_i2c, wacom_w8001, and wacom_serial4
<clever> zduch4c: [root@nas:~]# find -L /run/booted-system/kernel-modules | grep wacom
<clever> Henson: you probably want to do python27Packages = super.python27Packages.extend (pysuper: pyself: { ... }); i believe
<clever> yep
<clever> tobiasBora: nixos modules are responsible for creating /etc files
<clever> tobiasBora: that would be handled in the nixos module
<clever> tobiasBora: can it accept the path to that config at runtime? via /etc or a cli arg to the daemon?
<clever> tobiasBora: no idea, ive only used exim and postfix
<clever> yeah
<clever> tobiasBora: and which user is ssmtp being ran as?
<clever> tobiasBora: are you connecting to port 25 on localhost or piping it into the sendmail binary?
<clever> tobiasBora: is a from: header being set when talking to ssmtp?
<clever> tobiasBora: i think thats only for incoming mail
<clever> jasongrossman: i have sometimes answered a question with a pastebin of a convo from 2 hours prior :P
<clever> oops, didnt read it that closely
<clever> and its already 1.7.1 on master and unstable
<clever> > znc
<clever> so you need to use an overlay to change the znc attribute
<clever> bb010g[m], jasongrossman: it runs whatever pkgs.znc provides

2018-09-18

<clever> modify it to accept patches=? , or to run the patchPhase
<clever> ah
<clever> ah, what is that other thing?
<clever> what do you plan to do after patching the src?
<clever> do you even need to build it? heh
<clever> elvishjerricco: what about just using the patches arg of mkDerivation?
<clever> bbl
<clever> gchristensen: this env var also has nearly max priority, if the file exists
<clever> NIXPKGS_CONFIG=/etc/nix/nixpkgs-config.nix
<clever> gchristensen: add -v and look for any config.nix's
<clever> and then hosts.nix contains { "127.0.0.1" = [ "foo.com" ]; }
<clever> you can just networking.hosts = import ./hosts.nix;
<clever> doesnt have to be a module
<clever> hosts is a set, so it would need imort
<clever> extraHosts is just a string, in the standard /etc/hosts format
<clever> booglewoogle: or import
<clever> booglewoogle: builtins.readFile ./foo
<clever> d1rewolf: i nix-channel --update and nixos-rebuild every now and then
<clever> i dont use that
<clever> norfumpit: yeah
<clever> behind the scenes, `nix-shell -p hello` is identical to `nix-shell -E 'with import <nixpkgs> {}; pkgs.runCommand "shell" { buildInputs = [ (hello) ]; } ""'`
<clever> so you need to either use -E or -I nixpkgs=...
<clever> wpcarro: -p always does import <nixpkgs> {}
<clever> nix-env -e nix-repl to remove it
<clever> you installed nix-repl with nix-env, so it will remain there and ignore all updates until you install another
<clever> what does `which nix-repl` return?
<clever> nix-repl has been removed from nixpkgs
<clever> the tab completion and history also behave differently
<clever> yeah
<clever> wpcarro: nix-repl only uses 1.11, you want nix repl
<clever> the only other difference is that fetchzip can support zips
<clever> adisbladis: fetchurl uses the hash of the file it downloads, fetchzip uses the hash of the NAR that results from unpacking the thing it downloads
<clever> oldandwise: by default, qemu sets up userland nat and it just works
<clever> fetchzip still works on tar files, the name is a bit misleading
<clever> adisbladis: use fetchzip to get an unpacked copy
<clever> copumpkin: yeah, not seeing any real way to make it build the thing
<clever> so copyPaths(src,dst,pathset) can support drv's
<clever> copumpkin: ok, i can confirm that `nix copy` supports copying drvs over ssh-ng, without building
<clever> [clever@amd-nixos:~]$ nix copy --to ssh-ng://root@system76 /nix/store/v2l3ncp0ypdssjf7b8rxyppn3kyq3w87-hello-2.10.drv
<clever> ah
<clever> ?
<clever> then you should run `nix-store -r` on that drv first i guess
<clever> the s3 backend doesnt really support drv files
<clever> ah, some may not handle it at all
<clever> they can also be given paths to finished builds
<clever> copumpkin: all of the nix 2.0 commands will try to build the .drv you give it before doing the action you requested
<clever> copumpkin: thats what i feared, and why i would prefer copy
<clever> oldandwise: and how did you install vde2?
<clever> oldandwise: what command did you run?
<clever> copumpkin: you can probably use `--store s3://` but i would prefer to use `nix copy --to s3://`
<clever> ,locate vde_switch
<clever> but extending that to everything, 3d models, textures, map layout, music
<clever> and just render at startup
<clever> the basic idea of how they made it so damn small, is to store svg rather then png
<clever> but you are free to modify the build instructions for any asset, and it will just rebuild it locally
<clever> so it would download pre-rendered game assets on startup
<clever> growpotkin: oh god, you could even have a binary cache, lol
<clever> and if the args to it havent changed, nix just pulls the old image out of /nix/store/
<clever> you basically just have a pkgs.runCommand derivation, that does whatever you want, and produces an image with the texture as $out
<clever> nix will hash the build instructions to compute the $out
<clever> yeah, it wold be all of the hashing nix already does
<clever> and yet i didnt write a single line of code, lol
<clever> growpotkin: which would allow you to create a game like https://en.wikipedia.org/wiki/.kkrieger but leverage nix for caching
<clever> so you could have a derivation to compile the texture from a set of directions
<clever> and with the right code, it can support building derivations to produce values passed to opengl
<clever> and then run the nix function for any event, and to compute the state changes
<clever> you just need to make a primop that accepts a nix function for the state machine and event handling
<clever> in theory, you can just eval a file with nix-instantiate, and it would fire up opengl and do anything you want
<clever> go nuts!
<clever> growpotkin: that value can be a set containing more primops (functions that run c++ code)
<clever> growpotkin: builtins.importNative("${foo}/lib/libfoo.so") will return an artbitary nix Value*
<clever> growpotkin: plan a, haskell :P
<clever> growpotkin: with recent changes, its actually easier
<clever> growpotkin: i have since gotten over that temporary insanity :P
<clever> growpotkin: including using nix derivations to cache computation in the store, with normal GC to clean up the cache
<clever> growpotkin: when i first got into nix, i had ideas on how to add a c ffi to nix, and use it for opengl stuff, lol
<clever> oldandwise: services.timesyncd.enable = false;
<clever> Lisanna: nice
<clever> Lisanna: probably
<clever> Lisanna: yeah, the values in the set are thunks, that run the function once and remember the result
<clever> Lisanna: a branch with that already exists
<clever> and those 2 let you measure the effect and see if your actually improving it
<clever> ,profile
<clever> as long as you are using the same let block instance, and not re-importing that file too much
<clever> a let block may also work
<clever> but if you save that into an attr, it will only call it once
<clever> Lisanna: the master branch of nix isnt capable of remembering what a function returned for a given value
<clever> Lisanna: one min

2018-09-17

<clever> and if the dep's name existed in a certain env var, it didnt bother adding it
<clever> infinisil: i think it searched for the name of a dep to decide if the cflags are already setup or not
<clever> and due to the hashes in store paths, it gets false positives
<clever> infinisil: i just remembered, there is a package that will search $PATH for a given string to auto-detect support for something
<clever> rawtaz: check the journal, systemd failed to mount the fs, and it assumes the fs is mission critical
<clever> rawtaz: systemd is to blame there
<clever> it must have a /, so src = ./.;
<clever> xok: then use ./.; ?
<clever> you also dont need rec on line 1
<clever> remov the / at the end of line 4
<clever> mostly personal preference, i just ditch hardware-configuration.nix entirely
<clever> rawtaz: b: mount it manually, and re-run nixos-generate-config to update hardware-configuration.nix
<clever> rawtaz: a: nixos always merges them
<clever> nix will then copy the entire html_root dir over, and configure nginx to use that copy
<clever> lesh: i would do something like services.nginx.virtualHosts."www.example.com".root = ./html_root;
<clever> lesh: depends on where the files need to be, what they are used for, and if they contain any secrets
<clever> last one, plus some quotes
<clever> its /lib64/ld-linux-x86-64.so.2 that doesnt exist, and causes file not found