<clever>
in the above example, we provide a value for configuation, so it wont use the default
<clever>
which loads configuration.nix from $NIX_PATH
<clever>
the default value for configuration is <nixos-config>
<clever>
yeah, that will be all the 'guest' config
<clever>
the config argument will be the result of the config returned by that function (with that hostname), merged with the config from all nixos modules
<clever>
c74d: default config?
<clever>
c74d: so that vm only has a hostname set, and nothing else
<clever>
c74d: it will entirely ignore the host config
<clever>
mrrtump: when compiled, this makes a shell script, and if you run that shell script as root, you get nixos running from a ramdisk, with zero changes to the hdd
<clever>
mrrtump: part of it is just the power that comes from nix expressions
<clever>
mrrtump: too many things to list, heh
<clever>
mrrtump: its pretty easy, just partition the drive, format it, mount it, and then nixos-generate-config --root /mnt, edit some config, and nixos-install
<clever>
brh: since you have the with statement, you can do all = with pkgs; hiPrio ( buildEnv{...});
<clever>
brh: ah, i often forget about the order of operations, try all = pkgs.hiPrio (buildEnv { .... });
<clever>
c74d: correct
<clever>
brh: i think you can just do all = pkgs.hiPrio buildEnv { ....
<clever>
brh: there is a lib.hiPrio function that i think sets the default under nix-env
<clever>
brh: ah, didnt read what you said fully
<clever>
brh: now i can just nix-env -iA nixos.mystuff and i'm done
<clever>
sebastian: ocamlPackages.utop is the attribute for utop, so nix-shell -p ocamlPackages.utop would get that, there is something else missing though
2016-12-04
<clever>
all cameras should start with video
<clever>
crw-rw----+ 1 root video 81, 0 Dec 2 18:35 /dev/video0
<clever>
$ ls -lh /dev/video*
<clever>
savanni: which channel does "sudo nix-channel --list" give?
<clever>
savanni: when chrome is using the webcam, there is a webcam icon in the address bar, you can change the camera in there
<clever>
savanni: what kind of problems is it giving?
<clever>
and now the desktop has 2 keys
<clever>
i ran ssh-add on my laptop, under an ssh -A (forwarding desktop agent to the laptop) once
<clever>
the agent inside gpg doesnt, it saves (in encrypted form) all keys, and will pop up a gui to ask for the pw as-needed
<clever>
the ssh-agent in openssh looses all keys upon restart
<clever>
maybe it got restarted at some point without you noticing
<clever>
you need to add a key to the agent with ssh-add
<clever>
that would explain things
<clever>
digitalmentat: and what does "ssh-add -l" say?
<clever>
grep use-sandbox /etc/nix/nix.conf
<clever>
digitalmentat: are sandboxes enabled?
<clever>
digitalmentat: and what does "ls -lh /tmp/hax" say?
<clever>
digitalmentat: what nix-build command did you run?
<clever>
digitalmentat: and is socat still running?
<clever>
digitalmentat: can you gist what you have in the console?
<clever>
Dezgeg: have you heard the lastest update on my kernel issues?
<clever>
joko: so your x86 machine gives the build an arm pkg-config, and then the build falls over
<clever>
joko: cross-compiling is tricky, there is support for it in nixpkgs, but not all packages make it easy, many claim they want the pkg-config for the target arch by mistake
<clever>
joko: and it will just compile everything thats missing, nix build slaves can also help to spread the workload to nearby arm's
<clever>
joko: this explains how to get nixos-install outside of nixos, which allows you to install against some external storage (another sd card for ex)
<clever>
joko: but the rest of the OS was natively compiled, i just installed nix on a raspbian rpi2
<clever>
joko: and the cross compiled worked instantly
<clever>
joko: the native compiled kernel in nixpkgs is broken, and after putting up with 2 hour rebuilds for minor changes, i tried testing a cross-compiled kernel
<clever>
viric_: ive been working against master with my current tests
<clever>
viric_: ssh or arm question?
<clever>
but it needs root to set the group
<clever>
in this gist, socat is acting as a proxy, and can either run as your user or root
<clever>
they overdid the security
<clever>
digitalmentat: the issue, is that if any user other then you or root tries to use the socket, ssh-agent hangs up instantly
<clever>
digitalmentat: the socat command in the gist along with the -I's in the nix-build should solve everything
<clever>
and in this exact case, there is nothing left, so it uses /foo directly
<clever>
yeah, when you fo nixpkgs=/foo, it will strip the nixpkgs off, and then look in /foo
<clever>
and return the first one it can find
<clever>
in all <other> cases, it will look for bar/other, and bim/other
<clever>
and if you try to resolve <somethingelse> it will use baz
<clever>
so if you try to resolve <nixpkgs> it will use foo
<clever>
heh, second word in the paragraph
<clever>
A colon-separated list of directories used to look up Nix
<clever>
NIX_PATH
<clever>
the separator is just :
<clever>
so its a bit confusing as to what that would do in such an example
<clever>
that tells it to find <nixpkgs> in foo, and to also search for things in bar, the & will either get parsed by your shell, or, its part of the directory "baz&someting" but thats before an = token
<clever>
so it doesnt make sense to have 2 nixpkgs= entries within $NIX_PATH
<clever>
i think duplicate nixpkgs= entries override eachother
<clever>
i rarely touch NIX_PATH directly
<clever>
this is something i was doing recently, where i wanted to force which nixpkgs to use
<clever>
[root@router:/tftproot/try2]# nix-build netboot_rpi3.nix -o result --show-trace -I nixpkgs=/tftproot/try2/nixpkgs/ -Q
<clever>
and you can use -I on the commandline to append things
<clever>
jasom: what does "ls /nix/var/nix/profiles/per-user/root/channels/nixos" say?
<clever>
ah that is the current path, i thought it had a nixpkgs entry
<clever>
nixos?
<clever>
jasom: what does echo $NIX_PATH say?
<clever>
Rotaerk: the plugin options in chrome/firefox work the same way, because compiling chrome takes forever
<clever>
and then install it with nix-env
<clever>
you can extract part of it and put it into ~/.nixpkgs/config.nix
<clever>
that configures some bash aliases to map vi -> vim, and to install vim system wide
<clever>
so i add it to the imports list of configuration.nix
<clever>
the one i pasted earlier is a nixos module
<clever>
so each user, gets their own 2 line bash script, and their own vimrc, but they all share the actual vim build
<clever>
its a 2 line bash script, exec /nix/store/33kvljzvmq0h9gw3x5ysa7qycb9kgvlp-vim_configurable-8.0.0005/bin/vim -u /nix/store/frha47l567ral1a7v5xc9c75x3g9wk8g-vimrc "$@"
<clever>
and thats the filesystem rounding up
<clever>
Rotaerk: that build of vim is 5kb in size
<clever>
but this does
<clever>
[nix-shell:~]$ qemu-system-arm
<clever>
[clever@amd-nixos:~]$ nix-shell -p qemu
<clever>
yeah
<clever>
but you need an arm cpu or qemu to run the kernel
<clever>
this expression configures it to target arm
<clever>
gccCrossStageStatic is the derivation for a cross-compiler
<clever>
there is a package for it in nixpkgs, but it must have something wrong with it
<clever>
Dezgeg: something must be wrong with the kernel in nixpkgs
<clever>
viric, Dezgeg: sucesses!, i manualy cross-compiles a kernel under nix-shell, and it boots just fine
<clever>
eacameron: nice
<clever>
eqyiel[m]: that lib is the final one, after all overrides
<clever>
eqyiel[m]: i would always use the lib passed into the module, simpler
<clever>
made some bad choices, lol
<clever>
i need to configure things better
<clever>
gchristensen: i dont use gpg much, and its a bit of an anoyance, because the main passphrase is managed by lastpass, and lastpass is only configured in chrome, and chrome takes an hour to load