2017-10-20
09:24
<
clever >
tazjin: and the code doesnt even exist in the latest master
09:23
<
clever >
tazjin: at a glance, it looks like it will only do something if there is a reference to system.build.toplevel-docker
09:13
<
clever >
hyper_ch: just a pair of matching eeepc 701's
09:03
<
clever >
goibhniu: i do have 2 of my netbooks managed by nixops
07:05
<
clever >
andrewrk: once something in the store has been built, its read-only and can never be modified
05:14
<
clever >
pie___: it looks like its only a qt5 thing
05:14
<
clever >
qt5.qtbase.dev 2,541 x /nix/store/vv5by93zr05xv69hnp4nl9anl57j3n6g-qtbase-5.8.0-dev/include/QtDBus/qtdbusglobal.h
03:37
<
clever >
glibc should be in the stdenv, so it will just work
03:36
<
clever >
which has the -I paths based on your buildInputs
03:36
<
clever >
andrewrk: you need to make sure the compiler obeys $NIX_CFLAGS_COMPILE
03:26
<
clever >
that will append it to the bash variable at build time, rather then doing it at eval time
03:26
<
clever >
cmakeFlags="$cmakeFlags $(dirname $(cc -print-file-name=crtbegin.o))"
03:25
<
clever >
andrewrk: preConfigure = ''
03:10
<
clever >
"/nix/store/hlm2kkh1f1zbcssza8pzhsk2imd7c0h6-gcc-6.4.0"
03:10
<
clever >
nix-repl> "${stdenv.cc.cc}"
03:07
<
clever >
gcc should just find it automatically
03:07
<
clever >
why do you need crtbegin.o?
03:06
<
clever >
andrewrk: what do you need that path for?
03:06
<
clever >
but stdenv.cc.cc is the real gcc
03:06
<
clever >
stdenv.cc is a bash script wrapping gcc
03:06
<
clever >
andrewrk: pkgs.gcc.cc
02:56
<
clever >
ldlework: returns a list without any keys
02:55
<
clever >
nix-repl> lib.mapAttrsFlatten (key: value: value*10) { a=1; b=2; }
02:55
<
clever >
lib.mapAttrsFlatten is another one
02:54
<
clever >
another example
02:54
<
clever >
nix-repl> lib.mapAttrs (key: value: value*10) { a=1; b=2; }
02:54
<
clever >
{ a = 10; b = 20; }
02:53
<
clever >
ldlework: this
02:53
<
clever >
nix-repl> lib.mapAttrs (key: value: "${key} = ${value}") { a="1"; b="2"; }
02:53
<
clever >
{ a = "a = 1"; b = "b = 2"; }
01:18
<
clever >
or "git diff"
01:18
<
clever >
the standard output of "diff -ur"
01:15
<
clever >
patches = [ ./foo.patch ];
01:14
<
clever >
pie___: add it to the patches list witin the derivation
2017-10-19
08:48
<
clever >
geolocated dns replies and cloudfront mirrors
08:46
<
clever >
looks normal
08:46
<
clever >
gilligan_: 404 for me
08:33
<
clever >
availableKernelModules are just available, and udev will auto-load them as needed
08:33
<
clever >
kernelModules are forcibly loaded
08:29
<
clever >
which calls under hci
08:29
<
clever >
you also need a usb driver for the controller
08:28
<
clever >
check lsmod for anything hci, usb, or hid related and throw it into boot.initrd.availableKernelModules
08:27
<
clever >
hyper_ch: yeah
08:26
<
clever >
no idea what you will loose by going to such an old version
08:26
<
clever >
yep, thats what nix-locate said
08:22
<
clever >
gnupg1orig.out 3,414 x /nix/store/6d7cs7ivz6lh9m0rji4jlbk67l3w501j-gnupg-1.4.21/bin/gpg-zip
08:22
<
clever >
]$ nix-locate gpg-zip
06:34
<
clever >
not sure then
06:24
<
clever >
ldlework: that allows you to access "bar" at pkgs.plugins.foo
06:24
<
clever >
ldlework: overlays dont add it to the search path
06:14
<
clever >
ldlework: but what values you assign to the attributes, dont matter, you can store anything
06:14
<
clever >
ldlework: i believe the overlays must be in the form of self: super: { ... }
06:01
<
clever >
ldlework: that sets pkgs.plugins to a function
05:59
<
clever >
ldlework: so having a 3rd argument would break it
05:59
<
clever >
ldlework: the overlays systems expects to pass 2 arguments to the overlay, and get a set back
05:59
<
clever >
yeah, i have runit on mine, and it was able to work as a nix build slave, but not much more
05:59
<
clever >
MichaelRaskin: i also applied an override to a few things, to get systemd out of the closure
05:58
<
clever >
Li[m]1: yep
05:57
<
clever >
for fetch functions, you want to use super
05:56
<
clever >
super is the result from applying all previous overlays (using it wrongly can lead to some overlays not appearing)
05:56
<
clever >
self is the result after all overrides (it can cause infinite recursion)
05:56
<
clever >
both self and super are instances of pkgs
05:56
<
clever >
your arguments on line 1 arent right
05:56
<
clever >
ldlework: also, an overlay should have 2 arguments, self: super:
05:54
<
clever >
your already being given pkgs at line 1
05:53
<
clever >
ldlework: line 3 loads nixpkgs, which need overlays, which need nixpkgs, which need overlays.....
05:53
<
clever >
ldlework: line 3 is a problem
05:48
<
clever >
ldlework: can you gist the file you changed that triggered that?
05:45
<
clever >
Li[m]1: postInstall would be where i would usually do it
05:42
<
clever >
ldlework: its a nixos option, on the page i just linked
05:41
<
clever >
ldlework: not sure if home-manager includes that one or not
05:41
<
clever >
Li[m]1: writeFile will create a new derivation
05:41
<
clever >
ldlework: which is done at nixpkgs.overlays
05:41
<
clever >
ldlework: package overrides are better when you want to modify the list of pkgs directly
05:39
<
clever >
thats also how pkgs winds up in the args to begin with
05:39
<
clever >
ldlework: you can add custom arguments that get passed to every module
05:39
<
clever >
ldlework: i think your better off at this point putting things right into imports where they belong
05:01
<
clever >
so overlays help when you want to trivialy take overrides others have made, and add them to your own
05:01
<
clever >
yeah, the only real benefit i see to overlays, is that it you can only have 1 packageOverride, but you can have many overlays
04:59
<
clever >
but they take a super and self argument, and then return a set of overrides
04:59
<
clever >
i havent actually used them much yet
04:55
<
clever >
then they will already be loaded for everything
04:55
<
clever >
ldlework: you could also just use config.nix (or an overlay) to store your plugins at pkgs.your-plugins
04:54
<
clever >
it wont even load a file called plugins.nix!
04:54
<
clever >
and then <plugins.nix> will map to /home/clever/something-else.nix directly
04:54
<
clever >
you can also add plugins.nix=/home/clever/something-else.nix
04:52
<
clever >
it can be anywhere
04:52
<
clever >
just preference
04:52
<
clever >
thats how $NIX_PATH works
04:52
<
clever >
and then <plugins.nix> will look for a file called plugins.nix, inside /etc/nixos/plugins
04:51
<
clever >
ldlework: ah, you can just add /etc/nixos/plugins to the NIX_PATH
04:51
<
clever >
ldlework: what are you thinking of?
04:41
<
clever >
both of them went out of range while i was still within spitting distance
04:40
<
clever >
the music profile buffered lost packets, until it had 30 seconds of latency
04:40
<
clever >
the phone profile sounded like crap
04:09
<
clever >
when it should be looking directly in the store, at the right version
04:09
<
clever >
simpson: sounds like something is incorrectly looking in /run/current-system/sw/lib/
03:26
<
clever >
sirkha_: patchelf, its in the nixpkgs manual
03:03
<
clever >
ison111: for example, preConfigure = ''export DESTDIR=''${out}'';
02:59
<
clever >
ison111: you need to escape that ${ and then eval it at bash time, not nix time
02:57
<
clever >
dont import it either
02:57
<
clever >
ldlework: you must put the result of the fetch in your list on imports
02:57
<
clever >
ldlework: so callPackage wont work, and giving it args will also fail
02:57
<
clever >
ldlework: thats a module, not a package
02:57
<
clever >
ldlework: oh
02:55
<
clever >
ldlework: it will use pkgs.config pkgs.lib and pkgs.etc
02:55
<
clever >
ison111: its only an environment variable, that exists at build time
02:55
<
clever >
ison111: that is refering to the nix variable out, which doesnt exist
02:55
<
clever >
ldlework: nix will inspect the function to see what arguments it wants, and pass those values from pkgs.
02:54
<
clever >
ison111: and what happens when you try to build that?
02:54
<
clever >
ldlework: pkgs.callPackage (fetchFromGitHub { ... }) {};
02:54
<
clever >
ldlework: also, you want to use callPackage, not import and args
02:53
<
clever >
ldlework: import (fetchFromGitHub { ... }) args
02:53
<
clever >
ldlework: you have to import the result of the fetch
02:52
<
clever >
ldlework: gist the expression and i can take a look?
02:44
<
clever >
ison111: something must have unset the variable
2017-10-18
23:24
<
clever >
rnhmjoj[m]: (drv: { patches = drv.patches ++ [ ./foo.patch ]; })
23:23
<
clever >
rnhmjoj[m]: ahh
22:24
<
clever >
that wont be restricted to any user, so sudo wont be required
22:24
<
clever >
ariutta: try using /nix/var/nix/profiles/default/bin/jq
22:21
<
clever >
ariutta: what does "ls -lh /home/ariutta/.nix-profile" say?
22:20
<
clever >
ariutta: no
22:17
<
clever >
ariutta: you may need to get the path to be set better
22:17
<
clever >
ariutta: run "type jq" to see where jq is coming from $PATH
22:11
<
clever >
so its being wrapped with 2 bash scripts
22:11
<
clever >
voiceftp: "emacs" is a bash script, that runs .emacs-wrapped, which is a symlink to emacs-25.3, which itself is an identical wrapper, over .emacs-25.3-wrapped
22:10
<
clever >
voiceftp: and i found a bug
22:10
<
clever >
voiceftp: i see why, that .emacs-wrapped is just a symlink
22:10
<
clever >
lrwxrwxrwx 1 root root 10 Dec 31 1969 .emacs-wrapped -> emacs-25.3
22:09
<
clever >
voiceftp: ah, that name includes the version, and it got truncated because the struct in the kernel has a limited size
22:06
<
clever >
voiceftp: what about the Name: field under /proc/<PID>/status ?
22:04
<
clever >
voiceftp: what name does "ps aux | grep emacs" show?
22:03
<
clever >
voiceftp: killall .foo-wrapped?
22:03
<
clever >
elvishjerricco: the only solution ive seen is to configure root@localhost as a build slave
22:02
<
clever >
elvishjerricco: it will only use build slaves defined in /etc/nix/machines
21:47
<
clever >
CrazedProgrammer: currently, you need to add some swap, or start with a smaller installation
21:47
<
clever >
euniarte, CrazedProgrammer: thats a bug in the current nixos-install
21:42
<
clever >
inherit doesnt get tripped up, and without the ref, foo=foo; does what you would expect in nix
21:41
<
clever >
nix-repl> let foo = 5; in rec { inherit foo; }
21:41
<
clever >
{ foo = 5; }
21:40
<
clever >
the only time inherit foo is different from foo=foo, is when rec comes into play
21:40
<
clever >
{ foo = error: infinite recursion encountered, at (string):1:29
21:40
<
clever >
nix-repl> let foo = 5; in rec { foo = foo; }
20:58
<
clever >
rnhmjoj[m]: nix keeps the $out of failed builds, but doesnt flag them as valid, so they are the first target for GC
20:58
<
clever >
rnhmjoj[m]: after it fails again, grep its output
20:40
<
clever >
rnhmjoj[m]: so you need to grep for /nix/store/[...]-gcc-wrapper-6.4.0 within /nix/store/[...]-firefox-56.0.1
20:40
<
clever >
rnhmjoj[m]: the problem is in the storepath, not the tmp directory
20:34
<
clever >
tnks: "found it, one min" with my hand being offset a column
20:32
<
clever >
tnks: its part of cabal2nix
20:31
<
clever >
tnks: fiybd utm ibe nun
20:30
<
clever >
tnks: interesting...
20:30
<
clever >
pkgs/development/haskell-modules/hackage-packages.nix: preConfigure = "sed -i hmatrix.cabal -e 's@/usr/@/dont/hardcode/paths/@'";
20:25
<
clever >
tnks: this file has overrides, to apply fixes to the generated content
20:23
<
clever >
tnks: there should be directions on how its generated in the same directory, and i believe peti does that most of the time
20:23
<
clever >
rnhmjoj[m]: use grep -r to find the gcc-wrapper path within the firefox output, after it fails
19:50
<
clever >
infinisil: if its usb, just unplug and replug the device, after the switch has finished
19:45
<
clever >
tnks: yeah
19:44
<
clever >
tnks: packages could still do that in $out/share/doc/
19:40
<
clever >
but its great if you just want to delete the user and all traces of the service when it stops
19:40
<
clever >
cransom: i dont think that plays nicely with having state that must be owned by the service
19:39
<
clever >
infinisil: thats just a set of every service that has been given an id
19:38
<
clever >
infinisil: and services are typically given a static gid
19:38
<
clever >
infinisil: automatic gid's lead to a different gid on every machine
19:35
<
clever >
woffs: ahh
19:33
<
clever >
eacameron: if you throw the entire output into a gist i can look over it
19:32
<
clever >
eacameron: and thats where /boot lives!
19:32
<
clever >
User Capacity: 160,041,885,696 bytes [160 GB]
19:31
<
clever >
eacameron: and the drive is at a toasty 35c right now
19:31
<
clever >
194 Temperature_Celsius 0x0002 171 171 000 Old_age Always - 35 (Min/Max 13/56)
19:31
<
clever >
eacameron: in this case, i have had a total of 2 sectors fail on this drive, and it has silently remapped them to other spares
19:30
<
clever >
196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always - 2
19:30
<
clever >
eacameron: other numbers like this can also be of use
19:30
<
clever >
5 Reallocated_Sector_Ct 0x0033 100 100 005 Pre-fail Always - 2
19:30
<
clever >
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
19:29
<
clever >
eacameron: smartctl -a will check everything and print it all to stdout
19:28
<
clever >
ldlework: i havent read the source for home manager yet, so not sure what else you can do to make it work that way
19:27
<
clever >
yrashk: it looks like virtualbox is somehow mixing qt 5.9.1 and 5.9.1, youll need to investigate the output of "nix-store -qR" ran against the virtualbox binary, and some other things
19:26
<
clever >
yrashk: what does "type VirtualBox" return?
19:25
<
clever >
yrashk: how is virtualbox installed?
19:24
<
clever >
tnks: that gets compiled into the html docs, that are visible somewhere
19:21
<
clever >
Unode: also, is this from the burp proxy suite?, i was thinking about getting it working recently
19:20
<
clever >
Unode: try adding set -x to the start of that script
19:18
<
clever >
Unode: the whole .service
19:17
<
clever >
Unode: can you gist the resulting .service file from /etc/systemd/system/ ?
19:15
<
clever >
but at this point, its probably better to just patch lib/default.nix instead
19:15
<
clever >
so when things try to use normal import, they instead get a scopedImport that overwrites builtins
19:14
<
clever >
ldlework: overwrite builtins.import = path: builtins.scopedImport { builtins = new_builtins; } path;
19:13
<
clever >
ldlework: but it only works at one level of depth, so you also have to wrap the new builtins.import if you want it to be recursive
19:12
<
clever >
ldlework: this even allows you to overwrite builtins with another attrset of your own creation
19:12
<
clever >
ldlework: this will import a given file (eval-config in this case) and forcibly set __nix_path as a global variable in that scope
19:12
<
clever >
ldlework: builtins.scopedImport { inherit __nixPath; } <nixpkgs/nixos/lib/eval-config.nix> {})
19:11
<
clever >
tnks: as long as the nix-daemon is from the old version, it should be safe, as long as the new nix doesnt gain root
19:11
<
clever >
infinisil: then you need a udev rule to assign a better group to that node, and put your user in the group
19:10
<
clever >
tnks: the new version of nix will upgrade the db in /nix/var/ and then the old nix wont work anymore
19:09
<
clever >
infinisil: what about the group of 006?
19:09
<
clever >
ldlework: scopedImport is an impure way of doing all kinds of fun things
19:08
<
clever >
tnks: its part of nixUnstable, "nix-shell -p nixUnstable" and avoid giving that nix root, enless you want to commit to using it forever
19:07
<
clever >
tnks: its the new replacement for nix-copy-closure
19:07
<
clever >
but some things like "nix copy" want to talk to the daemon and local
19:02
<
clever >
tnks: i prefer ssh agent over giving the builder my secrets
19:01
<
clever >
srhb: it can upgrade your db.sqlite, and then the old nix wont be able to do anything
19:01
<
clever >
srhb: you need to "nix-shell -p nixUnstable" and be careful to not run that nix as root
19:00
<
clever >
sheyll: and this will copy from the default store, to /mnt/nix/store/
18:59
<
clever >
nix copy --to local?root=/mnt
18:59
<
clever >
then you need to secure /mnt so nobody can peek inside it
18:59
<
clever >
srhb: a command like this would operate on /mnt/nix/store/
18:59
<
clever >
NIX_REMOTE=local?root=/mnt nix-build ...
18:58
<
clever >
srhb: checking my notes...
18:50
<
clever >
there is a createHome option on ever user
18:49
<
clever >
Unode: is it also the home directory for a user?
18:49
<
clever >
Unode: what is the path?
18:43
<
clever >
taaperotassu: and if the nixos manual lacks the details, you lookup where nixos uses it, and then check the xorg manuals
18:42
<
clever >
taaperotassu: the manual says its , seperated
18:42
<
clever >
Example value:"grp:caps_toggle, grp_led:scroll"
18:29
<
clever >
taaperotassu: services.xserver.xkbOptions = "caps:swapescape";
18:27
<
clever >
taaperotassu: there is a nixos option for that
18:22
<
clever >
Unode: and you also need to add it to nixos/modules-list.nix i believe
18:22
<
clever >
Unode: you need -I nixpkgs=/path/to/nixpkgs
18:17
<
clever >
taaperotassu: nixos can do that, one min
18:13
<
clever >
wmertens[m]: in my case, i was able to open the luks for the rootfs, but i forgot to add zfs support to that netboot image
18:11
<
clever >
wmertens[m]: i just grabbed the netboot kernel&initrd, and jammed them into /boot, with a menuentry
18:11
<
clever >
wmertens[m]: locally
18:09
<
clever >
jtojnar_: routing tables?
18:05
<
clever >
wmertens[m]: got the rescue shell working
17:40
<
clever >
the script for building that derivation is telling emacs to write somewhere it shouldnt
17:40
<
clever >
ldlework: the error was at build time, so --show-trace wont help any
17:34
<
clever >
eacameron: nix-env -iA nixos.smartctl
17:33
<
clever >
eacameron: smartctl -a
17:31
<
clever >
jtojnar_: the NAT could also be the problem, is it only happening with idle connections?
17:29
<
clever >
jtojnar_: if the dhcp server is crap, and changes the IP you are given, yes
17:27
<
clever >
eacameron: ive memorized an unreasonable percentage of the nixpkgs codebase ...
17:26
<
clever >
eacameron: also look at line 99-102 in the same file
17:25
<
clever >
eacameron: i believe --cores is the one that gets routed to NIX_BUILD_CORES
16:43
<
clever >
wmertens[m]: that 2nd instance of nixos should also get a simple configuration.nix with things like boot.supportedFilesystems = [ "btrfs" ]; and a way to login
16:42
<
clever >
wmertens[m]: basicaly, you want to import a 2nd instance of <nixpkgs/nixos> (as i do in the netboot_server.nix above), and then refer to the kernel, initrd, and kernelParams like netboot.nix does
16:40
<
clever >
and presents a gui over ssh for selecting a different kernel
16:40
<
clever >
it would probably be a custom initrd with dropbear that just kexec's the default kernel in the config
16:38
<
clever >
so you dont need console access from the provider
16:38
<
clever >
wmertens[m]: i have also been thinking about a bootloader that gives you a network console, to deal with this kind of problem
16:37
<
clever >
and have 2 interfaces on one
16:37
<
clever >
but you would need to specialy route the network between 2 VM's
16:36
<
clever >
wmertens[m]: remote or local vm?
16:35
<
clever >
wmertens[m]: another option, does this machine have an ethernet port, and do you have a 2nd machine with both wifiðernet?
16:35
<
clever >
wmertens[m]: after compression its about 200-300mb
16:34
<
clever >
TweyII: lib.optional and its friends can probably do it
16:32
<
clever >
which could fit into /boot/
16:32
<
clever >
i have another trick in mind, that gives you a full nixos environment, running from a ramdisk
16:31
<
clever >
so its simpler to just write that down and manualy append it when things go wrong
16:31
<
clever >
the tricky part, is that the names for the kernel and initrd are in constant flux
16:29
<
clever >
boot.debug1mounts would give you a shell in the initrd, with the rootfs mounted to /mnt/
16:28
<
clever >
boot.debug1 boot.debug1devices boot.debug1mounts force a shell at various points in the stage-1 script
16:28
<
clever >
boot.shell_on_fail lets you get a shell when it fails to run stage 2
16:28
<
clever >
wmertens[m]: these are all options that the initrd script will accept
16:27
<
clever >
ah, what is the total size of the /boot partition?
16:26
<
clever >
wmertens[m]: eek, my idea for a rescue shell needs ~300mb
16:24
<
clever >
wmertens[m]: i have been thinking of a simple option for that, how big is your /boot?
16:14
<
clever >
thats for normal nix-env use, and wont have the nixos generations
16:13
<
clever >
thats the profile for nixos-rebuild
16:11
<
clever >
keta_suki: you also need to give it -p, to tell it which profile to list the generations in
16:07
<
clever >
wmertens[m]: the metadata pool is full
16:07
<
clever >
wmertens[m]: btfs does that a lot
16:05
<
clever >
it may be partially corrupt
16:04
<
clever >
ah, then your rootfs is still good
16:04
<
clever >
wmertens[m]: there is also a rdinit= to change the init within the initrd, but the stage-1 script has other stuff thats better
16:02
<
clever >
wmertens[m]: take the existing init that ends in /nix/store/<hash>/init and change it to end in <hash>/sw/bin/sh