2017-08-13

<clever> if you call the argument pkgs, then pkgs.callPackage can populate it for you
<clever> catern: skip relying on NIX_PATH and just put the nixpkgs url directly into the default.nix
<clever> catern: instead of importing <nixpkgs>, just import (builtins.fetchurl foo), where foo is what you would have put into NIX_PATH
<clever> just set services.tor.enable = true; and it will be installed and configured for you
<clever> its in the nixos side of things
<clever> Infinisil: i have also made a bash script that can fully automate a nixos install on zfs: https://github.com/cleverca22/nix-tests/blob/master/kexec/justdoit.nix#L33
<clever> and /nix has 75gig
<clever> i'm seeing as much as 2x compression on /nix and / for my desktop
<clever> updated the gist with compression info
<clever> but i do have one for /home
<clever> nothing for /root
<clever> and the journal
<clever> a large chunk of that 6gig is systemd/coredump
<clever> amd/root 22G 6.8G 15G 31% /
<clever> Filesystem Size Used Avail Use% Mounted on
<clever> and then / is pretty small most of the time
<clever> sphalerite: i try to keep /nix in its own dataset, so i can turn snapshots off there
<clever> so that only leaves a very expensive option, dedup, but that would only work if the original data had been written when dedup was on
<clever> and i dont know of any special zfs utils that would optimize it
<clever> linux thinks the 2 filesystems are on seperate partitions, so it cant do an atomic move via rename()
<clever> sphalerite: ive been thinking about doing that on my NAS, the only thing i can think of is to create a new filesystem and move the contents over while the system is offline
<clever> but i have ran into problems where zfs doesnt mount other things right on its own sometimes, so it helps to just make everything legacy
<clever> which would be / and /nix
<clever> legacy is only a requirement for things that stage-1 is mounting
<clever> and it all acts like one big directory
<clever> zfs expects those filesystems to land at /pool/, /pool/nix/, /pool/home/ and /pool/root/
<clever> but i think its mainly a left-over, from when you dont set the mountpoint
<clever> i use it for bulk storage of things that dont fall into the other 3 classes
<clever> and i left the pool itself with the default mountpoint, so zfs places it at /pool/
<clever> yep
<clever> srhb: i just use pool/root pool/nix and pool/home for my systems
<clever> brb
<clever> might help
<clever> hackage-packages.nix does things like this
<clever> 77527 }) {inherit (pkgs.gnome3) webkitgtk;};
<clever> and if you follow the --show-trace output?
<clever> now foo winds up getting bar123, when it asked for only bar
<clever> foo = pkgs.callPackage ./foo.nix { bar = pkgs.bar123; };
<clever> Myrl-saki: if you only want to affect one thing, you can insert it into the {} for its callPackage
<clever> rcschm: or indirectly use it, via the haskellPackages frameworks in nixpkgs
<clever> rcschm: you must use ghcWithPackages to get ghc packages
<clever> bbl
<clever> i think its something that has to be compiled into the ld.so
<clever> which is weird, i didnt think that elf worked like that
<clever> from what ive seen, ld.so is a dynamic executable without any interpreter set on it
<clever> ld.so is a special binary
<clever> so you need to use an unpatched ld.so
<clever> i suspect that ld.so normally has a default search path, that nixpkgs turned off
<clever> Myrl-saki: and --print-interpreter on the main binary your using?
<clever> Myrl-saki: what does "patchelf --print-rpath /lib/libz.so.1" say?
<clever> i dont think so
<clever> Myrl-saki: does libz have /lib in its rpath?
<clever> Myrl-saki: when ld.so handles the requirements for libz, it will use the rpath on libz
<clever> Myrl-saki: can you gist the logs it generates if you set the LD_DEBUG=all env var?

2017-08-12

<clever> ow!
<clever> [root@amd-nixos:~]# systemd-analyze
<clever> Startup finished in 6.447s (kernel) + 15.572s (userspace) = 22.020s
<clever> ylwghst: nixos doesnt have a /usr/share/
<clever> ylwghst: check the man page, "man modprobe.d"
<clever> ixxie: and also, "nixos-rebuild switch --upgrade" changes 2 different things (nixos, the channel), each needs its own rollback
<clever> ixxie: update always creates a new item at the end, and rollback always goes backwards ONE, not back to previous
<clever> ixxie: ive found 2 issues with rollbacks, if you update, rollback, update, rollback, it doesnt do what you expect
<clever> ylwghst: thats what the config i gave you did
<clever> Infinisil: the last time i had it working was on ubuntu
<clever> exim and dovecot have many options, and dont always name them the same
<clever> yeah, that was tricky to setup the last time i did it
<clever> phdoerfler: run "mail" i think, to read them?
<clever> in pulseaudio, i can use master to scale the mix, and fix that shit
<clever> the problem in windows, is that i have about 2 or 3 pixels of resolution to adjust my volume, because the speakers are naturally loud
<clever> and if i try to raise an app higher, it just raises master
<clever> in windows, master is a hard-cap for every app, so if i set master to 10%, then the apps can only go from 0% to 10%
<clever> in pulseaudio, it does a multiply operation, so i can set master to 10%, then an app to 50%
<clever> ive found the volume controls in windows to be even worse
<clever> ylwghst: in my case, i have several snd_hda devices, so its a list of enables for each one
<clever> ylwghst: boot.extraModprobeConfig = "options snd_hda_intel enable=1,0";
<clever> Infinisil: pavucontrol is the only way to tame the beast
<clever> and id rather avoid things getting stuck on /dev/null
<clever> and pulseaudio likes to switch to a random device when the output is lost
<clever> in my case, i'm disabling the audio output over hdmi, because the monitors lack speakers
<clever> ylwghst: boot.extraModprobeConfig = "options snd_hda_intel enable=1,0";
<clever> ylwghst: i'm doing it just fine, let me dig out the code
<clever> yeah
<clever> my dad was surprised at how the ipad can answer phone calls, if the phone is on the same wifi
<clever> fire nation attacked?
<clever> sphalerite: thats why i have never bought apple hardware :P
<clever> they want to track everything :P
<clever> tilpner: you still need a license to run debug builds i believe
<clever> pretty sure you need the license to sign things, otherwise, the device will refuse to run it
<clever> 2017-08-12 08:45:43 -nix-gsc-io`bot:#nixos- Channel nixos-unstable advanced to https://github.com/NixOS/nixpkgs/commit/abdb58e407 (from 5 hours ago, history: https://channels.nix.gsc.io/nixos-unstable)
<clever> just raw ghcWithPackages
<clever> i prefer doing it without any stack or cabal
<clever> Myrl-saki: which passes a single haskell overlay to the haskellPackages set
<clever> Myrl-saki: i believe you need to do haskellPackages = haskellPackages.override { overrides = something: something: { ... }; };
<clever> for example?
<clever> any form of gc
<clever> nix-collect-garbage cleans it up automatically
<clever> yegortimoshenko: as long as you can read the cert acme creates, you can use it for anything on that (sub)domain
<clever> just set that on a virtualhost and your done
<clever> yegortimoshenko: nginx has an option to just 100% automate acme
<clever> yegortimoshenko: what about self.callPackage ./foo {}; ?
<clever> sphalerite: just the kernel modules as far as i know
<clever> it sounds like you did a nixos-rebuild and upgraded, but nixos has to keep the old version around
<clever> yeah
<clever> Myrl-saki: run nix-store --query --roots on both of them, what does each have?
<clever> sphalerite: depends on how many amphours its rated for i guess?
<clever> so they couldnt just change the UPS
<clever> half the problem, is that while it did have redundant power supplies, it only had 1 power input
<clever> sphalerite: yeah, that was it
<clever> sphalerite: but i do have other stories from reddit bookmarked like https://www.reddit.com/r/talesfromtechsupport/comments/2bh79k/status_has_been_changed_to_wont_fix/
<clever> sphalerite: would probably take an hour to find
<clever> Myrl-saki: it was VPN'd back into the datacenter, and they probably had bgp control to route it wherever they want
<clever> Myrl-saki: it involves a UPS, tethering it to a phone via a laptop, a hand-cart, and a subway train
<clever> Myrl-saki: i saw a reddit thread (and youtube video) where they moved a server to a new datacenter, without it going offline
<clever> sphalerite: du uses compressed size by default
<clever> the closure for my primary desktop, including the effects of zfs compression
<clever> 3.9G total
<clever> 272M /nix/store/6nzb1s93l7rzaa0s6cflnm4hf59fg2ba-clang-4.0.1
<clever> but that netbook lacks an x server
<clever> Myrl-saki: a single build of nixos is just under 1gig right now
<clever> but if there are automated nix builds, it needs automated gc
<clever> if all nix building is manual, then i also manually gc
<clever> yeah
<clever> i have a netbook with only 4gig for the entire drive
<clever> that just runs nix-collect-garbage, which cant deal with result links left all over the place
<clever> yeah
<clever> it doesnt root the entire build-time closure
<clever> Myrl-saki: /nix/var/nix/gcroots/auto is a list of symlinks pointing to those result links
<clever> Myrl-saki: find all of the result symlinks you left everywhere and delete them
<clever> Myrl-saki: that command should also show which store paths take up the most space
<clever> Myrl-saki: does this help?
<clever> [clever@amd-nixos:~]$ du --max=0 -hc $(nix-store -qR /run/current-system) | sort -h
<clever> if it was made by nixos, then nixos will also delete it
<clever> then re-add it
<clever> comment the user out in configuration.nix so nixos deletes it
<clever> it probably only triggers when creating the user
<clever> oborot: boot.supportedFilesystems = [ "nfs" ];
<clever> and nixos will automatically install nfs support
<clever> oborot: just add an entry under fileSystems. that has a type of nfs
<clever> gchristensen: and i think he is on the road for a few days
<clever> gchristensen: yeah

2017-08-11

<clever> gwang: you appear to have a ghcWithPackages being recompiled
<clever> gwang: the error was unrelated to tmux
<clever> Phillemann: the bootstrap stuff in ghc is a bit of a mess, you sometimes have to build 2 or 3 ghc's to get the one you want
<clever> the things in the shell are prefered
<clever> disasm: a:, the overrides are there, b: nix-build -A system-config-printer in the root of a nixpkgs checkout
<clever> pkgs/top-level/all-packages.nix: system-config-printer = callPackage ../tools/misc/system-config-printer {
<clever> [clever@amd-nixos:~/apps/nixpkgs]$ grep -r system-config-printer
<clever> we would need to either bisect nixpkgs, or find somebody that knows the python stuff better
<clever> something must be setting it elsewhere and has stopped doing it
<clever> disasm: so its prefixing PATH with --set, then failing that CUPS_DATADIR isnt a valid flag
<clever> disasm: i think $program_PATH isnt set
<clever> ah, the problem is in something you didnt modify?
<clever> disasm: what did you call makeWrapper with?
<clever> not sure then, all i can think of is to strace dovecot while logging in
<clever> ah, i see it in the source now
<clever> with the name dovecot?
<clever> phdoerfler: do you have a dovecot entry in /etc/pam.d/ ?
<clever> at the time that the bot posted that, the channel advanced to commit 5def5bab3c, which was already 68 minutes old
<clever> 2017-08-11 00:05:41 -nix-gsc-io`bot:#nixos- Channel nixos-unstable-small advanced to https://github.com/NixOS/nixpkgs/commit/5def5bab3c (from 68 minutes ago, history:
<clever> only thing i can think of there is to patch nixos-rebuild to do things after the nix-build part
<clever> yeah
<clever> so i now have logs in here, of every state that has become a generation
<clever> lrwxrwxrwx 1 root root 50 Dec 31 1969 /nix/var/nix/profiles/system-310-link/nixcfg -> /nix/store/ipr0929j1jww82kc03rf52v02wndn3rn-nixcfg
<clever> sphalerite: this will archive the nix expressions within the nixcfg subdir of the nixos storepath
<clever> sphalerite: system.extraSystemBuilderCmds = "ln -sv ${./.} $out/nixcfg";
<clever> sphalerite: i have a trick very close to that
<clever> (dont worry, i had to search as well)
<clever> gnupg
<clever> unpackPhase
<clever> nix-shell '<nixpkgs>' -A gpg2
<clever> thats something ive been saying for years
<clever> lol
<clever> luke, use the source
<clever> lol
<clever> i think this is the biggest and most well documented comment ive seen in the nix source
<clever> Infinisil: oh yeah, this is also interesting
<clever> and then nix will hash the entire tree of results
<clever> and storing any files that 200
<clever> Infinisil: this will brute-force download a range of file patterns, from a list or mirrors, ignoring all 404 errors
<clever> Infinisil: and the file on line 92 (arg!, so many improves i want to make now that i look at this mess, lol)
<clever> and the hash is wrong, so it tells me the right one
<clever> then the output i claim to have doesnt exist, so it runs it
<clever> i usualy increment a random number in the hash
<clever> because its fixed-output, and you are claiming it still has the same output
<clever> nix wont re-build it
<clever> but you give the exact same name and outputHash
<clever> and one common mistake, if the inputs change in a way that should affect the output
<clever> yeah
<clever> exactly
<clever> so if its not determisistic, your going to have a really hard time getting the build to pass :P
<clever> and if its not, the build fails
<clever> nix will enforce that the hash of $out is outputHash
<clever> sort of, if its not determisistic, things will go very badly for you :P
<clever> Infinisil: any derivation that has these 3 attributes is fixed-output
<clever> but you can still add it if you know the right name
<clever> its usually not of much use
<clever> now those mutations are part of the fixed-output
<clever> previously, only the zip was fixed-output, and there was a derivation applying mutations to make the real package
<clever> Infinisil: one bonus i can see to this, the raw derivation at that attribute, can now be shared between platforms, and will likely never be impacted by a mass-rebuild
<clever> Infinisil: now its directly a fixed-output, with nothing in the middle
<clever> inflames: it was a normal derivation, that just blindly copied files from a fixed-output derivation
<clever> :D
<clever> hmmm, maybe hangouts has an xmpp gateway...
<clever> IRC is the only protocol in it that i use
<clever> and also, the usefulness of pidgin seems to have taken a nose-dive
<clever> when i install that expression, i do get OTR as an option in plugins
<clever> then everything on the nix side is working as it should
<clever> that should have a pidgin-otr.so entry
<clever> ls -lh /nix/store/dzaza6ziz6qyakx1aqrxvzj119lglign-pidgin-with-plugins-2.12.0/lib/pidgin
<clever> inflames: cat /run/current-system/sw/bin/pidgin
<clever> inflames: and "realpath /run/current-system/sw/bin/pidgin
<clever> what does "type pidgin" show now?
<clever> no other pidgins
<clever> only that line
<clever> (pidgin-with-plugins.override { plugins = [ pidginotr ]; })
<clever> try adding just this to your systemPackages
<clever> nix is a bit odd, you cant just install plugins and it finds them
<clever> yeah, and pidgin also wont know where to find it
<clever> guessed wrong at how its used
<clever> pidginotr contains no binaries
<clever> ah
<clever> one min
<clever> even when ran as just "pidgin" in the console?
<clever> strange
<clever> 2017-08-11 01:00:08 < clever> only pidginotr, remove the old pidgin
<clever> correct
<clever> what does the above command say?
<clever> realpath /run/current-system/sw/bin/pidgin
<clever> to remove that extra one
<clever> you need to nix-env -e pidgin
<clever> that has priority over the one in systemPackages
<clever> you also installed it with nix-env
<clever> what does "type pidgin" say?
<clever> did you restart pidgin?
<clever> only pidginotr, remove the old pidgin
<clever> inflames: did you install the pidginotr package?
<clever> yeah, so create a bios boot partition
<clever> so just make another partition and squeeze it into that hole
<clever> and the bios boot can be smaller then 1mb
<clever> because gpt uses more then 512 bytes
<clever> atondwal: the problem, is that grub doesnt know where the "free space" starts
<clever> it is not safe to install grub on gpt without a bios boot partition
<clever> then grub.device = "/dev/sda"; will work without errors
<clever> 1mb, no fs, never mounted
<clever> you must create a bios boot partition for grub to sucessfully install
<clever> is sda gpt?
<clever> atondwal: do you want to boot with efi or legacy?
<clever> atondwal: what was device set to previously?
<clever> was boot mounted to /mnt/boot/ when you ran things?
<clever> nixos-install will ask you for the root password automatically
<clever> either use just straight nixos-install, or "nixos-rebuild boot" under chroot
<clever> atondwal: switch doesnt work under chroot
<clever> oh, and how did you try rebuilding it after adding hashedPassword?
<clever> atondwal: it has to be recompiled after changing the configuration.nix
<clever> atondwal: try nixos-install again, while everything is mounted
<clever> atondwal: try turning that off, and re-run passwd to set the password again
<clever> atondwal: users.mutableUsers=false; disables changing the password with passwd
<clever> atondwal: can you pastebin your configuration.nix?
<clever> atondwal: does your user have isNormalUser = true; ?
<clever> jonjitsu: what is the contents of /mnt/etc/nixos/configuration.nix?
<clever> yes
<clever> jonjitsu: try just normal "nixos-install", that already does a nixos-rebuild for you
<clever> jonjitsu: did you use nixos-install --chroot or just normal chroot?
<clever> $ <command> | curl -F 'text=<-' http://nixpaste.lbr.uno
<clever> jonjitsu: can you paste the cmd you ran and all of the console output into a pastebin?
<clever> switch will fail
<clever> never use switch or test
<clever> also, only use "nixos-rebuild boot" in a chroot
<clever> jonjitsu: can you paste the cmd you ran and all of the console output into a pastebin?
<clever> jonjitsu: did you mount the install to /mnt first?
<clever> jonjitsu: why didnt it work?
<clever> jonjitsu: "nixos-install --chroot"
<clever> yep
<clever> and both obs-studio and steam "work", if i 100% disable opengl
<clever> when other things work fine
<clever> both obs-studio, and steam, just 100% fail on startup due to a single missing opengl feature
<clever> just changing my xserver.videoDrivers from "ati" to "amdgpu", nearly all of my wonky opengl problems have vanished
<clever> holy crap
<clever> and skip the IFD and reading hashes from derivations
<clever> then pre-generate a single nix file, containing all of the fixed-output derivations
<clever> when things change
<clever> catern: and how will nix know when to rebuild that derivation?
<clever> catern: and is the file containing the hash in an IFD thingy?
<clever> catern: the problem there, is that it wont know what hash the fixed-output uses, until it reads and hashes the file
<clever> catern: it has to be a fixed-output derivation to stop the re-hashing, and requireFile is the simplest one i can think of, that doesnt require it to be on http
<clever> or just fetchurl
<clever> id make something like hackage2nix, that hashes each one, and generates a nix expression that calls requireFile