2017-05-27
05:27
<
clever >
dash: i remember when you had to install winsock
05:26
<
clever >
teaching them how to use it and helping to maintain it is a whole other beast
05:26
<
clever >
yeah, installing it is one thing
05:26
<
clever >
so if you ever break it, shove the stick in and call, i can remotely wipe and reinstall
05:25
<
clever >
and i could also make a usb stick that boots directly into nixos, with my vpn and ssh key pre-configured
05:25
<
clever >
setup a vpn, and just remotely update it
05:25
<
clever >
boomshroom: one thing i have been thinking about, using nixops to manage nixos on machines for family members
05:24
<
clever >
dash: i found my dad driving a jeep on the front lawn one day, shining the headlights in the livingroom windows
05:23
<
clever >
dash: and i have yelled "get off the lawn"
05:23
<
clever >
dash: 30 years old :P
05:23
<
clever >
same, was kicked out in 2004, grade 11
05:22
<
clever >
i only really got into it in late highschool
05:20
<
clever >
turns out, i left xorg up, with screensavers
05:20
<
clever >
i remember one day trying to figure out why my server cpu usage was all going to a weirdly named program, i think it was pipes
05:19
<
clever >
i think that had a 2.4 kernel
05:19
<
clever >
it was already out of date by then
05:19
<
clever >
tywkeene: well, i used redhat9 in 2004 :P
05:18
<
clever >
it now sits in storage and i just netflix it
05:18
<
clever >
i have the entire sg1 series on dvd
05:17
<
clever >
stop making me feel old!
05:16
<
clever >
i remember having to visit my uncle, because i didnt have the space channel
05:13
<
clever >
line 37, it will use dd to wipe the old partition table and boot sector
05:12
<
clever >
or run "justdoit" and let the script do it all
05:12
<
clever >
ssh back into it, and either do a normal install (fdisk, nixos-generate-config, nixos-install)
05:12
<
clever >
and within 2 minutes, its running nixos from a ramdisk
05:12
<
clever >
this collection of nix expressions will compile down to a ~250mb .tar file, upload it to any linux machine, unpack to /, and /kexec_nixos
05:11
<
clever >
tywkeene: another fun thing i did recently is this
05:08
<
clever >
as an added benefit, you cant forget to undo debug stuff and leave the system in a weird state
05:08
<
clever >
to test a fix out
05:08
<
clever >
or in the case of some scripts, cp /run/current-system/sw/bin/foo foo; chmod +w foo; $EDITOR foo ; ./foo
05:07
<
clever >
next time you boot or nixos-rebuild, that will be undone, and the symlink restored
05:07
<
clever >
for example, copy the contents of /etc/nix/nix.conf to a new file, delete the symlink, and rename the copy
05:07
<
clever >
in some cases, you can temporarily cheat by copying
05:05
<
clever >
and neither is writable
05:05
<
clever >
same contents in 2 different places, potentialy with different names
05:04
<
clever >
that does file-level dedup
05:04
<
clever >
so if 2 files have the same hash, they wind up hardlinked to eachother, via the .links/<hash>
05:04
<
clever >
tywkeene: it hardlinks every file in the nixstore to /nix/store/.links/<hash>
05:03
<
clever >
tywkeene: have you seen what nix-store --optimize does?
05:01
<
clever >
and a decade ago, i had a working tape drive that connected to the floppy drive ribbon
05:00
<
clever >
i think i have 2 or 3 scsi tape drives
04:59
<
clever >
only protection against a single failing drive
04:59
<
clever >
dash: no real backup plans for the nas or desktop
04:58
<
clever >
the desktop is a zfs mirror
04:58
<
clever >
my nas is a 3 drive raidz1 with nfs
04:54
<
clever >
and the hdd failed one day, but i luckily had a backup image
04:54
<
clever >
it was one massive imperative heap
04:53
<
clever >
i never once updated a single package on my LFS system
04:53
<
clever >
and this script handles the bulk of that
04:53
<
clever >
and stdenv.mkDerivation provides a default builder
04:52
<
clever >
99.99% of the other arguments just pass on to the environment of the build, and bash scripts in the stdenv handle them
04:52
<
clever >
as a bare minimum, every derivation must have system, name, builder, and args set
04:52
<
clever >
here is an example derivation that doesnt use the stdenv
04:51
<
clever >
and if i pulled up the lfs docs, i could probably recreate it ontop of bare nix
04:51
<
clever >
i have looked at how the stdenv bootstrap works in nixpkgs
04:50
<
clever >
including the interpreter and libc
04:50
<
clever >
and LFS did fun things like building an entire toolchain based under /tools/
04:49
<
clever >
but the internals of linux you learn in LFS also apply to all of the edge-cases nix hits
04:49
<
clever >
the LFS system was mainly a toy to learn, and i stayed mainly gentoo after that
04:48
<
clever >
boomshroom: i used LFS as my router for several years
04:47
<
clever >
roughly in that order
04:47
<
clever >
i ran redhat9, ubuntu, gentoo, and LFS
04:42
<
clever >
ah yeah, nothing references it
04:42
<
clever >
and 125 can be nuked
04:41
<
clever >
that will override the config, and make it more reproducable
04:41
<
clever >
import nixpkgspath { config = {}; };
04:40
<
clever >
so root's overrides will randomly come and go
04:40
<
clever >
and line 4 might be a problem, if you import nixpkgs with {}, it will load config.nix from $HOME
04:39
<
clever >
isNormalUser auto-sets home
04:39
<
clever >
line 125 of the gist is also of no use
04:39
<
clever >
so yeah, just nuke that whole string
04:39
<
clever >
but thats probably not needed if you only have 1 card
04:39
<
clever >
BusId is the only part that could remain
04:37
<
clever >
110 as well
04:37
<
clever >
and line 111 is a duplicate, 631 of xserver.nix already sets the driver
04:36
<
clever >
lines 109 and 113 have to be deleted
04:36
<
clever >
tywkeene: the .deviceSection string is inserted into an existing section "device" block
04:31
<
clever >
nixy: makewhatis isnt being ran, so that might be to blame
04:29
<
clever >
so you can gist -p /etc/nixos/configuration.nix /nix/store/foo-xorg.conf
04:29
<
clever >
there is a gist command in nix
04:28
<
clever >
are you able to ssh in from another machine?
04:28
<
clever >
can you gist the xorg.conf and the configuration.nix?
04:25
<
clever >
not sure then
04:22
<
clever >
tywkeene: what does "journalctl -u display-manager" say?
04:19
<
clever >
tywkeene: are you manualy running startx?
03:18
<
clever >
at least in chromium
03:18
<
clever >
i have flash disabled and twitch works
2017-05-26
23:25
<
clever >
nix-channel --remove nixpkgs
23:22
<
clever >
by default, nixos only has 1 channel on it, called "nixos"
23:21
<
clever >
nixos must run one of the nixos-* channels
23:21
<
clever >
and also, dont use nixpkgs-unstable for nixos, that can brick the machine
23:21
<
clever >
nixos-rebuild uses nixos, nit nixpkgs
23:18
<
clever >
sophiag: report a bug to nixpkgs, and/or switch to nixos-unstable
23:16
<
clever >
Infinisil: the groups are only set when dropping from from root to your user
23:16
<
clever >
Infinisil: you need to logout and back in
23:15
<
clever >
so it can install versions that are backwards compatible with data on-disk
23:15
<
clever >
stateVersion tells nixos what version of nixos you originally installed
23:14
<
clever >
c: nothing in configuration.nix can influence what version of nixpkgs it downloads
23:14
<
clever >
b: stateVersion has no impact on what channel it downloads
23:14
<
clever >
a: stateVersion should never be changed
23:13
<
clever >
where in the config did you do that?
23:12
<
clever >
sophiag: and also, 17.03 is a snapshot of the nixpkgs state from march, so changes from 3 days ago wont be in it
23:10
<
clever >
17.09 doesnt exist
23:00
<
clever >
just a normal 404 from upstream deleting things on us
22:58
<
clever >
sophiag: so you need to find a mirror that still has 1.0.53.758, and prefetch-url that mirror
22:57
<
clever >
1.0.55.487 vs 1.0.53.758
22:56
<
clever >
sophiag: on line 1, you gave it the url for version g256699aa-16_amd64, but on line 25, its asking for version gde3fc4b2-33_amd64
22:52
<
clever >
sophiag: can you gist the full output of nix-prefetch-url (and its command), and also the full error nixos-rebuild gives?
22:50
<
clever >
sophiag: after the nix-prefetch, try running "file" on the path it gives you, does the type look right?
22:48
<
clever >
sophiag: if the hash doesnt match up, nix will just try to download again
22:47
<
clever >
sophiag: you must prefetch the right file, with the exact hash nix is expecting
22:38
<
clever >
id have to check its source
22:38
<
clever >
i'm not sure what thats doing either
22:37
<
clever >
the with pkgs; on 80 may also spread to every part of the list
22:34
<
clever >
line 129 is core_extended
22:34
<
clever >
sophiag: the error is now pointing to ocalm-core-extended
22:32
<
clever >
what does the backtrace now say?
22:23
<
clever >
yeah, thats in that range
22:23
<
clever >
sophiag: line 133, i think the error said pa_test was failing
22:17
<
clever >
look at the wrapProgram code at the bottom
22:17
<
clever >
wrapProgram will rename things so you can only pass it 1 argument
22:17
<
clever >
output will become a bash script that runs input
22:17
<
clever >
player1_: makeWrapper needs 2 arguments, input and output file
22:12
<
clever >
sophiag: no idea about that one
22:11
<
clever >
sophiag: i have had ubuntu and gentoo do that before
22:10
<
clever >
sophiag: unlike things like ubuntu though, it wont break and leave you in a weird half-updated state
22:08
<
clever >
sophiag: nix-env has priority over systemPackages
22:08
<
clever >
sophiag: another option is to just nix-env -iA nixos.dropbox
21:58
<
clever >
sophiag: you could temporarily remove spotify from the systemPackages
21:44
<
clever >
or oracle changed the rules again
21:41
<
clever >
sophiag: read line 20-23 of the gist
21:40
<
clever >
sophiag: you need to go to the java website and download a given version
21:14
<
clever >
and my poor rpi has been working on gcc for 1h 33mins now, lol
21:14
<
clever >
LnL: already saw the email and opened the pr!
21:11
<
clever >
Drako365: it supports btrfs, ext4, zfs, and some others
21:10
<
clever >
emacs25PackagesNg now
21:05
<
clever >
sophiag: just run nix-channel --add to set nixos to 17.03
21:04
<
clever >
does --list say nixos is 17.09?
21:02
<
clever >
sophiag: once you update the channel to point nixos to 17.03, nixos-rebuild should work and get chrome
21:01
<
clever >
sophiag: ah, nixos uses the channel called nixos, which you still have set to 16.09
20:56
<
clever >
ekleog: find $(nix-store -qR ...)
20:55
<
clever >
sophiag: yeah
20:53
<
clever >
ekleog: oops, ^^^
20:53
<
clever >
equalunique: nix-store -qR /run/current-system/
20:51
<
clever >
sophiag: what does sudo nix-channel --list currently say?
20:51
<
clever >
sophiag: nixos-17.09 is able to build google-chrome on my end
20:44
<
clever >
ive got my git clone setup so i can test any channel easily
20:44
<
clever >
[clever@amd-nixos:~/apps/nixpkgs]$ git checkout channels/nixos-16.09
20:44
<
clever >
let me check the channels on this end
20:42
<
clever >
yeah, it looks like he was asking if he was on the latest 17.03
20:41
<
clever >
it can also be fixed by just finding that exact version of another mirror and running nix-prefetch-url on it
20:39
<
clever >
but 16.09 is also starting to get old, maybe you should update to 17.03?
20:38
<
clever >
ah, they probably didnt fix 16.09
20:36
<
clever >
which channel are you on?
20:34
<
clever >
sophiag: the full one, there may be more info above that
20:33
<
clever >
sophiag: what was the old error?
20:29
<
clever >
though i'm on chromium
20:28
<
clever >
i run chrome and havent had any issues like that
20:27
<
clever >
if you can find it anywhere, you can run nix-prefetch-url on it
20:25
<
clever >
sophiag: nixos-rebuild is atomic, it either updates everything, or it updates nothing
20:23
<
clever >
player1_: wrapProgram can prefix $PATH with things, there should be tons of examples in nixpkgs
20:15
<
clever >
and you may need to pass those on, or run terra inside nix to set them again
20:14
<
clever >
nix sets up a $NIX_CFLAGS_COMPILE that has right right -I flags
20:11
<
clever >
player1_: did you try clangStdenv.mkDerivation?
20:01
<
clever >
but its configured to reboot at the end of every hour, so if you get the network wrong, it returns control to the original OS
20:00
<
clever >
hardest part is guessing what systemd will name the main NIC
20:00
<
clever >
and if they dont offer dhcp, you have to configure the correct ip in the nixos config files (2 places, configuration.nix and target-config.nix)
19:59
<
clever >
but it could be changed to also support EFI
19:59
<
clever >
yeah, it only works on machines where you can change the kernel,and the host boots via the legacy MBR sector
19:58
<
clever >
danbst: it uses kexec to forcibly take over the cpu
19:55
<
clever >
so in about 6 shell commands, you can turn any remote linux server into a nixos machine
19:54
<
clever >
just yesterday, i redid this kexec trick, so it can fully automate the install
19:54
<
clever >
ekleog: upgrade.patch will add an option for that in nix.conf
19:53
<
clever >
ekleog: but you also need to force nix to run elf files for the "wrong" arch
19:53
<
clever >
ekleog: it will take every syscall, and translate it to suit the host kernel
19:53
<
clever >
ekleog: yeah
19:51
<
clever >
LnL: yeah, just enable the right 32bit compat thing in the kernel
19:50
<
clever >
it lets an x86 machine run arm binaries, without emulating the entire arm os
19:50
<
clever >
ekleog: i sometimes use qemu-user to boost my build times
19:50
<
clever >
so you can cover all the platforms
19:50
<
clever >
the rpi3 is also able to run v6, v7, and aarch64
19:49
<
clever >
LnL: the rpi3 has built in wifi
19:49
<
clever >
only 1 derivation at a time
19:49
<
clever >
correction, its still unpacking the gcc source, has been for the last 7 minutes!
19:48
<
clever >
ekleog: but i now have a single v7 running rasbian as the hydra slave
19:48
<
clever >
ekleog: when i was running the v6's, i had them registered as build slaves in my hydra
19:47
<
clever >
oops, wrong e name
19:47
<
clever >
elasticdog: you could just dd it to the right partition
19:46
<
clever >
raw ext4, no partition table, and it needs a /boot on the SD card
19:46
<
clever >
/media/videos/4tb/drives/rpi-iscsi/nix2.img: UUID="03a9d037-3155-43c7-9a4c-c02f7eba0273" TYPE="ext4"
19:46
<
clever >
ekleog: yep, found the disk image
19:45
<
clever >
32G -rw-r--r-- 1 root root 32G Aug 13 2016 /media/videos/4tb/drives/rpi-iscsi/nix2.img
19:44
<
clever >
ekleog: i never got around to switching the v7 to proper nixos, its rasbian with nix on the side
19:43
<
clever >
ekleog: i did have full nixos on the v6's, with an iscsi root, so i can access the disk image at any time
19:43
<
clever >
glibc for v6 took 47 minutes, gettext took 25mins
19:42
<
clever >
the nixpkgs release i have only does v7
19:42
<
clever >
only a few things are configured to do v6
19:42
<
clever >
but v6 itself isnt really that much slower, when on v7 capable hardware
19:41
<
clever >
yeah, twice the time, because it has to do everything again
19:41
<
clever >
LnL: ah, and i see that mass-rebuild, it just started gcc
19:39
<
clever >
both on the exact same machine
19:39
<
clever >
LnL: 17m9s to build nix on v6, and 16m48s to build nix on v7
19:37
<
clever >
LnL: the rpi1 is v6 only and was so slow i just turned it off
19:37
<
clever >
LnL: the rpi2 and rpi3 are backwards compatible to v6
19:32
<
clever >
elasticdog: the runtime error should have a backtrace pointing to it
19:31
<
clever >
elasticdog: and just patch that to use an absolute path to the so?
19:31
<
clever >
elasticdog: yeah, thats tricky in the python stuff, can you find where in the python its trying to open the library?
19:24
<
clever >
disasm: i think it was marked as broken because it had errors at runtime
19:08
<
clever >
elasticdog: yeah
19:06
<
clever >
and it appears to be in 2 different derivations
19:06
<
clever >
kerberos.out 0 s /nix/store/1lcj3bwfpfy0bi5qmnbw66xz8lg7639d-libkrb5-1.15/lib/libgssapi_krb5.so
19:05
<
clever >
or have an absolute path pathed into the python source
19:05
<
clever >
elasticdog: that does exist, it just needs the right LD_LIBRARY_PATH when python does get ran
19:05
<
clever >
krb5Full.out 0 s /nix/store/vcamvm7mcypf16y594dsdfas2gkblhnr-krb5-1.15/lib/libgssapi_krb5.so
19:00
<
clever >
disasm: nixpkgs.config.virtualbox.enableExtensionPack = true;
17:02
<
clever >
or mkForce to replace the default list entirely
17:01
<
clever >
kykim: swap this to before or first i think, and double-check the resulting nix.conf it generates
17:01
<
clever >
extraCommands = lib.mkMerge [ (lib.mkAfter ''
17:01
<
clever >
kykim: i think either mkOrder or mkFirst
16:45
<
clever >
but with aws, its easy enough to delete, and spawn a new one from the AMI
16:45
<
clever >
just beware that the custom configuration.nix may brick the machine
16:45
<
clever >
you can either write your own configuration.nix from scratch (nixos-generate-config can help) or switch to nixops
16:43
<
clever >
kykim: the ami is normally used with nixops, which will upload a pre-built nixos using nix-copy-closure
16:11
<
clever >
and if there is a common dep, each derivation will re-make it internally
16:11
<
clever >
but yeah, you still need something to dynamicaly generate the list
16:11
<
clever >
let f = target: stdenv.mkDerivation { buildInputs = [ cmake ]; makeFlags = [ target ]; };
16:08
<
clever >
debug = f "debug";
16:08
<
clever >
let f = target: stdenv.mkDerivation { buildInputs = [ cmake ]; cmakeFlags = [ "-DTARGET=${target}" ]; };
16:07
<
clever >
and then call that 5 times
16:07
<
clever >
maybe, make a nix function that takes a target name, sets the right env variable, and returns a derivation
16:04
<
clever >
ssh back in, and run justdoit, and your install is done
16:04
<
clever >
and within ~2 minutes, it will be running nixos from a ramdisk
16:04
<
clever >
then ssh in, unpack it to /, and run /kexec_nixos
16:04
<
clever >
so you can now use nix-build to generate a .tar file, upload that to any linux server in any datacenter
16:02
<
clever >
gchristensen, sphalerite: i also updated my kexec stuff, it can now do the entire nixos install in 1 command
16:01
<
clever >
sphalerite: and line 518 stops it
16:00
<
clever >
sphalerite: i think one of these is responsible for that
15:59
<
clever >
because this is the script that passes the nixos config to grub
15:59
<
clever >
doing it in here may also work
15:58
<
clever >
sphalerite: at this point, you would need to remove the 1 at the end, and your done
15:58
<
clever >
[root@amd-nixos:~]# realpath /dev/disk/by-partuuid/ad3e9290-ae0f-4953-b67b-1dfdeebed926
15:58
<
clever >
lrwxrwxrwx 1 root root 10 May 21 01:34 /dev/disk/by-partuuid/ad3e9290-ae0f-4953-b67b-1dfdeebed926 -> ../../sdb1
15:57
<
clever >
/dev/sdb1: PARTLABEL="bios boot" PARTUUID="ad3e9290-ae0f-4953-b67b-1dfdeebed926"
15:57
<
clever >
[root@amd-nixos:~]# blkid /dev/sdb1
15:57
<
clever >
/dev/sdb1 2048 67583 65536 32M BIOS boot
15:57
<
clever >
do you want it to be able to support persistant nixos-rebuild?
15:56
<
clever >
the nixos installer iso can already do that
15:55
<
clever >
so it can never update the mbr, but it will still boot
15:55
<
clever >
sphalerite: in those cases, i usualy set grub.device to "nodev" after the mbr has been "flashed"
15:55
<
clever >
though the gpt trick i was thinking of is also missing
15:54
<
clever >
and yeah, finding out if its /dev/sda or /dev/sdb is one reason i dont like mbr
15:54
<
clever >
if your creating the image, then you should know ahead of if its mbr or gpt
14:20
<
clever >
thats exactly what patchelf is for
14:19
<
clever >
a chroot is almost never what you want
14:18
<
clever >
guillaum2: you would write a nix expression, that computes the correct paths
13:30
<
clever >
yeah, forgot to mention the audio group
13:17
<
clever >
one of the outputs is probably on mute
13:17
<
clever >
tanonym: check alsamixer
13:08
<
clever >
the switch action can apply most changes without a reboot
13:03
<
clever >
and has never been defaulting to false
13:03
<
clever >
hardware.sound.enable was created before 2013, and was defaulting to true even then
13:02
<
clever >
(facepalm)
13:00
<
clever >
what error does it throw?