2016-12-14

<clever> and it also takes an attribute set of further overrides
<clever> angerman: yeah
<clever> angerman: callPackage will import it, inspect what arguments its asking for, then call it with those arguments from pkgs.
<clever> angerman: import just returns the top level expression in the given file
<clever> sphalerite: buildInputs = [ foo.bin ];
<clever> Dezgeg: https://gist.github.com/cleverca22/ae4bdcde92da16d222e91b6df35905b5 this is the code behind that image
<clever> this one is pretty massive, i even stumbled across a finite state machine when reading the docs
<clever> Dezgeg: http://www.qooxdoo.org/current/widgetbrowser/ a demo of all of its widgets
<clever> Dezgeg: http://www.qooxdoo.org/
<clever> Dezgeg: how does this look? http://imgur.com/a/UlpoI
<clever> sphalerite: 2016-12-11 12:14:02< clever> sheenobu: here is a tool i wrote to simplify patchelf a while back: https://gist.github.com/cleverca22/fcd3e6d18073804b9357a26c468aaa70
<clever> sphalerite: one min
<clever> but that only works if both sets of drivers are in the same fork of linux
<clever> in theory, i could make a kernel that has both the rpi gpu stuff, and the Cubox stuff compiled in, and the DT tells it which one to fire up, and what address the hardware is at
<clever> the idea behind DT, is that you could have 1 kernel that works on many boards, and the DT tells it what hardware is available
<clever> yep
<clever> berce: pkgs.dtc contains the utils to convert between text<->blob
<clever> they shouldnt be, but some kernel driver guys are naughty
<clever> nix-shell -p ghc --pure
<clever> rly: the nixos or nixpkgs in -iA nixos.ghc is the name of a channel from nix-channel --list
<clever> sphalerite: nox-review?
<clever> maybe run one nix-shell inside the other nix-shell?
<clever> except, that will put it inside itself, and now it has a infinite cycle
<clever> Cypi: normaly id say to put foo into the buildInputs with an override
<clever> Cypi: you gave it conflicting options, so i'm not sure what its going to do
<clever> Cypi: and you cant mix -E and -A
<clever> Cypi: -p just makes it run -E 'with import <nixpkgs> {}; runCommand "foo" { buildInputs = [ somepackage ]; } ""'

2016-12-13

<clever> digitalmentat: double-check to see if you have a 2nd /boot filesystem thats not mounted?
<clever> digitalmentat: is /boot mounted correctly?
<clever> but -delete saves a couple processes
<clever> it seperates the files with \0
<clever> and that xargs command would have failed if there was spaces in the path, i always use find -print0 | xargs -0 to fix that
<clever> so you dont need xargs there
<clever> eacameron: oh, and find has a -delete
<clever> eacameron: also, you dont need to inherit src;, you can also cp -r ${src}/* $out/ as another way of doing it
<clever> eacameron: yeah
<clever> cant*
<clever> eacameron: which means you cany add things to it on line 34 until you +w it
<clever> eacameron: the $out/craft you copied came from the nix store, so its read-only
<clever> eacameron: can you gist your expression?
<clever> nope
<clever> gcc is something that recently got moved around though
<clever> eacameron: those commands should be available
<clever> hoNO: if the type is set to "none" then it will expect nixos to already be on the machine, and it will use nix-copy-closure to deploy to it
<clever> gchristensen: that UI is running fully in a browser
<clever> gchristensen: http://imgur.com/a/HV4s1
<clever> Cypi: things like stack and npm are already covered in nixpkgs
<clever> Cypi: or write a proper package for it
<clever> Cypi: nix-shell sets up special env variables needed by gcc
<clever> Cypi: then use nix-shell -p gmp
<clever> Cypi: you should never install things on nixos just to get the headers
<clever> Cypi: put that package into your pckages buildInputs list
<clever> gchristensen: http://imgur.com/a/Fi9VC
<clever> and powersave just tells the chip to do whatever it wants?
<clever> sounds like they put ondemand into the hardware?
<clever> then key repeat does its job
<clever> sometimes, it would drop key release events, and think i was holding a key
<clever> then it would drop keyboard events while it tries to make up its mind
<clever> and "ls -ltrh" was enough to make it bump up to a higher speed
<clever> and the first laptop i had with cpufreq, would lock up for 700ms, every time the freq changes
<clever> my laptop is using acpi-cpufreq
<clever> it sounds like that driver ignores all governors, and implements its own
<clever> heh
<clever> sphalerite: what does this say?
<clever> [root@laptop:~]# cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver
<clever> before ondemand was a thing, i had to run powernowd, which did things in userland via the userspace governor
<clever> the drivers might not support it, though ive never run into that myself
<clever> what is in the list of available governors?
<clever> sphalerite: and check to see which ones are available
<clever> [root@laptop:~]# cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors
<clever> sphalerite: try doing it without tee, just "sudo -i" and echo normaly
<clever> sphalerite: you probably need to "modprobe cpufreq_ondemand" first
<clever> gchristensen: http://www.qooxdoo.org/5.0.1/demobrowser/#widget~Tree.html
<clever> JonReed: configuration.nix doesnt manage nix-env
<clever> gchristensen: a basic QX app with 1 button compiles down to 739kb, including the images for its themes
<clever> goibhniu: possibly
<clever> i did some pretty crazy things against that codebase, without server access
<clever> but unminified, you can track down the leaks and make it run great
<clever> the minification got in the way of me fixing that
<clever> the game i saw it used on, didnt, and leaked memory like nuts
<clever> so you must delete things when your done with them
<clever> gchristensen: and it has a minor problem, they implement c++ destructors, on javascript objects, and to do that, all objects are kept in a global array
<clever> similar to the gcc linker just deleting unused code
<clever> it will dynamicaly inspect the code to see which classes you use
<clever> this is a fairly flexible framework
<clever> that was after all of the game logic was added
<clever> gchristensen: yeah, i have previously played a game that used this framework, it was a solid 6mb of javascript after minification
<clever> it even has a window manager, check the window tab
<clever> gchristensen: between the imgur and the last link, which would you prefer?
<clever> how does this framework look?, i have done things with in it the past
<clever> gchristensen: as you can see in that screenshot, i'm a bit rusty at making a good UI
<clever> jekor: i have also done things with just bare make: https://github.com/cleverca22/fusenar/blob/master/Makefile
<clever> jekor: does it get any simpler then this? https://github.com/edolstra/nix-repl/blob/master/default.nix#L11
<clever> avn: ah, but how would it get the nix expression?
<clever> avn: what kind of local cache?
<clever> avn: https://github.com/cleverca22/nixos-installer is the project page
<clever> avn: so you could input a url for the channel and a url for the configuration.nix tar
<clever> avn: thats also in my plans
<clever> avn: http://ext.earthtools.ca/docroot/ is the UI i have for editing configuration.nix
<clever> avn: partitioning, and nixos-install
<clever> gchristensen: and it works entirely over http, so i could open the port and give you control
<clever> gchristensen: http://imgur.com/a/uxYR8 i can now list partitions, and create a partition table
<clever> and it will always use the kernel you picked in configuration.nix
<clever> thats all it needs
<clever> joepie91: boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
<clever> joepie91: i have gotten loopback to work before, one sec
<clever> jazzencat: you need a 1mb partition, with the correct type code, https://en.wikipedia.org/wiki/BIOS_boot_partition
<clever> jazzencat: the problem has nothing to do with nixos, its because you used GPT and skipped the bios boot partition
<clever> jazzencat: i said that you need a dedicated bios boot partition
<clever> /nix/store/0pfy69722ghxdbfnyfsv9arhbgz09ala-grub-2.x-2015-11-16/sbin/grub-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
<clever> jazzencat: most of the log isnt saved, it just goes to stdout
<clever> nixos will concat each instance of systemPackages for you
<clever> ixxie: and then add both of those to imports
<clever> ixxie: yet another option, make 2 modules, one with envionment.systemPackages = with eclipses; [ eclipse-platform eclipse-scala-sdk-40 ];, one with the other
<clever> ixxie: you can also do with eclipses; with pkgs; [ eclipse-platform eclipse-scala-sdk-40 other stuff ];
<clever> (with eclipses; [ eclipse-platform eclipse-scala-sdk-40 ]) ++ (with pkgs; [ other stuff ]);
<clever> ixxie: you need to put it outside, you can also use ++ to concat the 2 lists
<clever> ixxie: with eclipses; [ eclipse-platform eclipse-scala-sdk-40 ];
<clever> ixxie: for that, you want with pkgs; with eclipses; [ ..... ];
<clever> ixxie: inherit (x) a b c; ?
<clever> jazzencat: can you pastebin the output of fdisk -l /dev/sda and your configuration.nix?
<clever> jazzencat: if your using GPT and legacy booting, you need a dedicated 1m bios boot partition, https://en.wikipedia.org/wiki/BIOS_boot_partition
<clever> jazzencat: you want nixos-generate-config --root /mnt
<clever> jazzencat: i think ef02 is the bios boot partition, that is for booting GPT drives on non-efi machines
<clever> without that, an MBR only tool may think its a blank disk, and will offer to format it
<clever> so tools that cant handle gpt will still say the disk has something
<clever> in addition to gpt tables, it has an MBR table claiming the entire disk is in use
<clever> i have gpt on all of my recent non-efi systems
<clever> gpt on its own isnt an indicator of the firmware support
<clever> eacameron: they should be identical as far as nix is concerned
<clever> eacameron: looks like .git* was removed, and 2 files where added so nixpkgs knows which commit it came from
<clever> jazzencat: boot.loader.grub.efiInstallAsRemovable = true; lets you skip the last requirement, to modify the firmware variables
<clever> jazzencat: for EFI to work correctly, the boot partition must be fat32, with the right type, on GPT, and the path to the bootloader has to be set in a firmware variable
<clever> eacameron: and diff -r them
<clever> eacameron: try fetching the url that works, and the url that doesnt, then unpack both to different directories
<clever> to do the same thing every time, even if wiped and reinstalled
<clever> yep, thats the goal of nix
<clever> and i confirmed the commit in that url is the latest nixpkgs-unstable
<clever> eacameron: looks like it should be valid, assuming that file now exists
<clever> eacameron: what is it set to on your end?
<clever> /etc/ssl/certs/ca-certificates.crt
<clever> clever@c2d ~ $ echo $SSL_CERT_FILE
<clever> nekroze: you will need to import it, call it with an IP, then put the resulting value into the imports list
<clever> eacameron: the nixpkgs-unstable builds for x86 and mac
<clever> eacameron: yep, that should have been built: http://howoldis.herokuapp.com/
<clever> eacameron: out of ideas for that then
<clever> eacameron: which branch did you download?
<clever> simpson: some things like qt do fairly complex stuff in there
<clever> simpson: you can
<clever> eacameron: the binary cache cache may have been poisoned, try deleting /nix/var/nix/binary-cache-v3.sqlite*
<clever> simpson: i think you can NIX_DEBUG = true; and then nix-build it
<clever> jazzencat: if you boot the installer ISO in efi mode, you should see something efi related in "mount"
<clever> then you can just manualy redo the steps you wanted to keep
<clever> nix-env --rollback should be able to undo that
<clever> eacameron: ah, LnL already thought the same thing
<clever> eacameron: which channel are you on?

2016-12-12

<clever> id say its a bug in the bind package, but youve got it working in systemPackages, so could just open an issue and leave it for now
<clever> yeah, systemPackages ignores collisions by default
<clever> can you pastebin the full error?
<clever> maybe nix-env -iA nixos.bind.bin ?
<clever> what about ls -l ~/.nix-profile/bin/host ?
<clever> but maybe you have an older something else, what does nix-env -q say?
<clever> should be able to just nix-env -iA nixos.bind
<clever> ah, are you trying systemPackages or nix-env?
<clever> that should take care of everything for you
<clever> roconnor: you should be able to just enable it in services.bind, no need to install it manualy
<clever> sent in PM
<clever> gchristensen: got a min to look at something?
<clever> i'm still not sure if it was really that deep, or i was just much shorter then :P
<clever> LnL: the snow used to be above my head when i was a kid at the old house
<clever> LnL: thats not cold, it gets to -20c around jan or feb
<clever> outdoor: -8.75c(16.25f) and its snowing today
<clever> gchristensen: covers most of this area: https://www.google.ca/maps/@46.745609,-65.3481445,7z?hl=en
<clever> it covers about 3 provinces, and i think brazil is in the same zone
<clever> gchristensen: it doesnt :P, i eat when i get hungry, i sleep when i get tired, the clock means nothing
<clever> gchristensen: atlantic canada, its currently 1:14 pm
<clever> but first, food!
<clever> gchristensen: now i need a function to create a new table
<clever> Error: /dev/vdb: unrecognised disk label
<clever> gchristensen: ok, and the javascript can now open the partitioning tables, it is correctly detecting that there are none
<clever> now it stays on the stack long enough to do its job
<clever> QJsonObject *ref = &reply; args.append(Q_ARG(QJsonObject*, ref));
<clever> and then fun ensues :P
<clever> then gcc ditches the temp pointer, and reuses the address for other things
<clever> q_arg then makes a pointer to that pointer
<clever> this code, dynamicaly creates a pointer type to hold the address, passes that to q_arg
<clever> gchristensen: args.append(Q_ARG(QJsonObject*, &reply));
<clever> gchristensen: and solved!
<clever> gchristensen: aha, he tracked it down to the same spot i did, *reads more*
<clever> ah, 0002 is the pointer, and QJsonObject then tries to this->something, resulting in 000a
<clever> oh, the number changed
<clever> valgrind at least helps automate the stack traces, but no more info yet
<clever> ==1373== Address 0xcc0000000a is not stack'd, malloc'd or (recently) free'd
<clever> there isnt even code there to cause anything like a buffer overflow
<clever> bool ClientHandler::openDevice(QJsonObject *reply, QString device) { qDebug() << "reply is at" << reply << device;
<clever> gchristensen: the funny part, is that gdb confirms its correct, fairly deep inside the QT library, but it messes up at the last step, as it leaves QT
<clever> lol
<clever> gchristensen: and c++ strikes again, one of my pointers is just magicaly turning into 0xcc0000002 after passing thru a few functions
<clever> i havent gotten around to re-opening it
<clever> chrome segfaulted when i ran out of disk space a few days ago (nix-build and 400mb tars)
<clever> gchristensen: that might be enough ram for me to open chrome without it crashing
<clever> in theory, i could rip the bloody ram off the mobo and it wont crash....
<clever> the entire root filesystem could fit on the L4 cache!!
<clever> gchristensen: and as a random example, i have a not-os image that has a 40mb squashfs, and can function as a nix build slave
<clever> gchristensen: its insane, because i used to run servers with only 64mb of ram
<clever> gchristensen: but if the gpu isnt active, then the cpu will benefit from that L4 cache
<clever> gchristensen: taktoa's laptop has a GPU on the cpu, including the gpu memory, as 128mb? of L4 cache
<clever> gchristensen: they didnt multiplex the video output, they made a framebuffer-less 3d GPU, that renders into the framebuffer memory of a weaker 2d GPU
<clever> gchristensen: i have heard of a non-apply vendor that did 2 GPU's in a laptop
<clever> gchristensen: even then, wait until the user is trying to recover it before you bring the wifi up
<clever> gchristensen: why is the wifi even active that early in the boot??
<clever> a systemd unit could automate that
<clever> all you have to do with that one, is ssh in and run justdoit
<clever> Mic92: heh, i'm now trying to merge one of my older installer projects into my kexec project
<clever> gchristensen: left is qemu, i ran the headless nixos-installer, right is the GUI
<clever> gchristensen: http://i.imgur.com/bS5FbIT.png
<clever> needs writable store flipped on
<clever> ah right, using build-vm
<clever> and read only FS!
<clever> it needs a --update
<clever> ah, the channel is in "nix-channel --list", but the profile for the channel is MIA
<clever> i think the unicode is just nix trying to fancy up its quotations in the error
<clever> gchristensen: http://imgur.com/a/uby50 eek!
<clever> yeah
<clever> gchristensen: just the node in /dev, or the actual array?
<clever> c0bw3b: i prefer "nixos-rebuild boot" if i know i'm going to reboot right away
<clever> and then you just !install http://example.com/configuration.nix and it goes
<clever> gchristensen: this is also reminding me of how some malware and c&c servers work, the kexec tar could join an irc channel
<clever> and then you can monitor its comign back on via that
<clever> gchristensen: so on bootup, it sends an http request out to a server
<clever> gchristensen: one thing ive thought of, is to add some signaling, thru a 3rd party
<clever> gchristensen: looks pretty simple :)
<clever> gchristensen: nice
<clever> for nix
<clever> and emacs doesnt actualy have an AST
<clever> causing it to get stuck in a feedback loop and grow to infinite size
<clever> but most of the projects for that have a dynamicaly sized terminal emulator, and try to make it longer when you render at the bottom
<clever> i also looked into options like running a tty over a websocket, so you could jusr run a "real" editor like emacs on the server, and have it render in the browser
<clever> so people can reuse the same code nix used, and there is no need to keep the AST stuff in sync
<clever> the idea from nixexpr, is to seperate the AST and the AST->expression stuff into 2 parts, and make nixexpr the main parser in nix
<clever> domenkozar: http://xkcd.com/927/
<clever> domenkozar: there is also https://github.com/groxxda/nixexpr
<clever> and the parser in nix returns an expression object to be evaled
<clever> main limitation i ran into with nixos-installer, is that i wanted a proper AST for nix, so i could alter the expressions via code
<clever> thats before i decided to use html for the UI to make it more remote-able
<clever> domenkozar: i did automate the older x11 gui under qemu and record that: https://www.youtube.com/watch?v=ETVJW59bL2s
<clever> and it would have an option to just run nixos-installer in an automated fasion, against pre-generated directions
<clever> for servers and the kexec stuff, you just browse the same UI over the web
<clever> for an ISO with xorg, you just run the browser localy
<clever> and then thru the web-browser, you can pick your options, format, and install
<clever> so you run nixos-installer on a box, and it presents an http server, with the above UI
<clever> or immediately apply it
<clever> and then either save it as a file that can be automaticaly built later
<clever> my idea, is to have a UI like this, to build your configuration.nix, and configure the partitioning
<clever> click an option and hit use, and it fills the <textarea> in with the name&default
<clever> domenkozar: http://ext.earthtools.ca/docroot/ see how you can list&search all nixos options?
<clever> ive also started something similar, let me grab the UI first
<clever> domenkozar: i can build the config.system.build.kexec_script, nix-copy-closure it over, and run that, and now i can repartition it
<clever> domenkozar: for example, the base nixops image might be ext4, but lets say i want to use zfs or btrfs for special reasons
<clever> i can also see this being usefull to repartition a server already controled by nixos, if you wish to customize it via nixops
<clever> forgot the link for it, but describing the partitions in nix would be better
<clever> domenkozar: another variation of that script: https://gist.github.com/grahamc/ae0b4a470cbba9a99dca572e7a9f9e38
<clever> domenkozar: with just the addition of a systemd unit, it could automaticaly install a base nixos to the hdd, and reboot into it, leaving you a bare system for nixops to target
<clever> which also means, you dont need physical access
<clever> yeah
<clever> my kexec idea runs entirely from a ramdisk, so the hdd can be umount'd and fully partitioned
<clever> domenkozar: then nixops can upload that tar, and repartition the drive, and install nixos, in a fully automated manner
<clever> domenkozar: in theory, if you have a server with a linux kernel that has kexec enabled, the hoster obeys the MBR, and you have root
<clever> domenkozar: in the current form, you just upload a tar to a server, put some ssh public keys in /ssh_pubkey, unpack the tar to /, and run /kexec_nixos as root, and it will behave like it had booted from the ISO
<clever> yep
<clever> and the nixos is the name of a channel from the defexpr, so it has to be dropped in nix-build
<clever> nix-build needs a path given, like '<nixpkgs>'
<clever> AtnNn: nix-env loads a default expression from ~/.nix-defexpr/
<clever> AtnNn: casting it to a string fixes that
<clever> "/nix/store/v99lwg5653wrwbifgdyb2nd30x2aj46r-nix-1.11.4-doc"
<clever> [clever@amd-nixos:~/Downloads]$ nix-instantiate --eval -E '"${(import <nixpkgs>{}).nix.doc}"'
<clever> Rotaerk: main issue with that one, is that it wont build/download, so if you dont already have it, file not found

2016-12-11

<clever> i havent looked into how to configure it manualy on systemd
<clever> ashkitten: in xfce, i can go settings->power manager, and there is a drop-down to configure that
<clever> gchristensen: though only if i unbind it first
<clever> gchristensen: aha, at least in the vbox case, virtualisation.virtualbox.guest.enable = true; allows the GPU to recover after a kexec
<clever> m`: and every time you remove something with nix-env -e
<clever> m`: yes
<clever> m`: so it wont have an effect on your ability to boot
<clever> m`: if you run that without root, then it can only delete the user profiles, it cant delete system profiles
<clever> m`: id try just doing "nix-collect-garbage -d" then, that should get rid of a decent chunk of things, at the cost of rollbacks
<clever> m`: yes
<clever> m`: yes
<clever> m`: yep
<clever> m`: yes