2019-08-12

<clever> lucus16: can you gist both the nix expr and the error?
<clever> lucus16: what is the outputHashMode?
<clever> lucus16: is $out a file or a directory?
<clever> ,tofu lucus16
<clever> jlv: makeWrapper
<clever> exarkun: another handy thing is, nix edit -f ~/nixpkgs hello
<clever> exarkun: yeah
<clever> zeta_0: i answered
<clever> zeta_0: the biggest question is why your installing 2 haskell things, since they will both provide a ghc binary, and always collide
<clever> Miyu-chan: ^^
<clever> > builtins.listToAttrs (lib.mapAttrsFlatten (k: v: { name = v; value = k; }) { key = "value"; })
<clever> zeta_0: what is nixpkgs.pkgs set to?
<clever> o1lo01ol1o: weird
<clever> o1lo01ol1o: maybe it was just slow at booting, and the problem solved itself?
<clever> o1lo01ol1o: try with -Pn i think it was
<clever> o1lo01ol1o: what happens if you try to just nmap the ip?
<clever> o1lo01ol1o: and does the console output in aws show it as having booted?
<clever> o1lo01ol1o: if you open the aws console, can you confirm the security group is attached correctly?
<clever> pie__: there are partition undelete tools, that do things like search at multiples of the block size
<clever> lucus216: or just mkRemovedOptionModule
<clever> lucus216: i believe this will alias it over to another name, and print a warning if the old name is used
<clever> lucus216: ah
<clever> lucus216: simplest is to just not define the option, anything not in options= will be an error
<clever> pie__: yeah
<clever> pie__: ive read similar things about nuclear bomb computers, how they want to spread the data around the physical chip, so even if you recover a 1x1mm fragment of the silicon, it wont be of use in recovering keys, lol
<clever> pie__: something i have noticed they do, is that the key slot material is striped, i think so that if any one block range is recovered, you cant actually make use of it
<clever> sometimes, its simpler to just treat it like windows
<clever> or just reboot? lol
<clever> samueldr: time to reverse engineer hydra-in-a-bag!
<clever> but somebody eventually fixed that bug, which broke synergy
<clever> any user on the machine could connect to :0 and do anything
<clever> originally, it "just worked" because somebody had accidentally disabled xauth cookies, since basically day 1 of nixos having xorg support, lol
<clever> one thing i should look into, to see if its ever been fixed, is the synergy services
<clever> ornx: you probably also want to use `nix-build` when testing, not nix-env

2019-08-11

<clever> selfsymmetric-mu: you can also `nix-store --query --roots /nix/store/foo` to see what is rooting it, and `nix-store --delete /nix/store/foo` to just remove it
<clever> exarkun: you imported nixpkgs without setting overlays= so it loads the overlays from $HOME
<clever> exarkun: line 17 causes nixpkgs.overlays to never work
<clever> exarkun: oh wait
<clever> exarkun: it might be the bootstrap coreutils, which is at a different attrpath, not sure where
<clever> exarkun: nix.package must be the result of building it, but fetchTarball returns a directory, in this case, of nixpkgs which isnt a even nix (the package manager)
<clever> slabity: after a full power cycle, the card returned from beyond, and never did it again
<clever> slabity: just once, the ethernet in my laptop failed hard, dmesg spewed errors, and after a soft reboot, lspci claimed the device didnt even exist
<clever> slabity: double-check that the pci device is seated properly?
<clever> slabity: what about lspci?
<clever> exarkun: that might be a bug in the argv0 handling of the qemu stuff, i would just disable the tests
<clever> > "${pkgconfig}/nix-support/setup-hook"
<clever> Shyim[m]: hexdump both MBR's and diff em!!
<clever> in the case of pkgconfig, it will add all other buildInput's to the PKG_CONFIG_PATH
<clever> nh2: the stdenv will source the setup-hook for every buildInput, which is then free to mutate how the stdenv behaves
<clever> nh2: ${pkgconfig}/nix-support/setup-hook
<clever> currently, it doesnt build on the latest nixos-unstable, so youll need to be on a stable channel
<clever> nexgen: git clone nixos-configs, add the (relative|absolute) path of qemu.nix to your imports list, and then set qemu-user.arm = true;
<clever> nexgen: it takes ~2 lines of nix code if your host is nixos
<clever> nexgen: but i have a trick with qemu-user to let you run arm binaries on an x86 linux kernel, so you can do a "native" arm build
<clever> nix packages can, nixos cant
<clever> nexgen: but no help from the binary cache, so you must build it all from source
<clever> nexgen: already supported by nixpkgs/nixos, and works on a raspberry pi and others
<clever> nexgen: armv6/7l linux?
<clever> --find-file doesnt use the angle bracks
<clever> oh right
<clever> yeah
<clever> rnhmjoj: is it quoted correctly?
<clever> that should also work
<clever> rnhmjoj: what does that look like?
<clever> rnhmjoj: i wonder, `nix-build '&lt;nixpkgs/nixos&gt;' -A system -I nixos-config=./configuration.nix`
<clever> rnhmjoj: that would explain things
<clever> yes
<clever> rnhmjoj: what does `nix-instantiate --find-file '<nixpkgs/nixos/default.nix>'` return?
<clever> try the command i gave in bash, fish might be messing with parts of it
<clever> rnhmjoj: those should be seperated by :'s not spaces
<clever> rnhmjoj: and your NIX_PATH is set right?
<clever> rnhmjoj: try `nix-build '<nixpkgs/nixos>' -A system -I nixos-config=./configuration.nix`
<clever> rnhmjoj: ^^
<clever> nexgen: that looks like it would fail even with plain nix-build ?
<clever> Shyim[m]: that seems weird, to fail that early on
<clever> youll want to be carefull with efi vars, and boot.loader.grub.device
<clever> then all the methods of skipping nixos-install dont apply!
<clever> rnhmjoj: ah
<clever> rnhmjoj: what are you trying to do?
<clever> if its a mount point*
<clever> rnhmjoj: yeah, nixos-install does some sanity checks to see if its a dir
<clever> rnhmjoj: then nixos-install as usual
<clever> rnhmjoj: `mount --bind /foo /mnt/`
<clever> box* lol
<clever> bpx*
<clever> dosbos is only dos era
<clever> for example
<clever> petercommand: doesnt work for win95 era games
<clever> because wine has better backwards compat then windows
<clever> ive heard of people building wine, under cygwin, to play old windows games, on windows
<clever> not sure
<clever> ive not heard of any
<clever> nexgen: then how will it chroot into the nixos image?
<clever> nexgen: can it run static ELF files from linux?
<clever> nexgen: and you can use the nix package manager on any linux distro, and even darwin
<clever> nexgen: half the power of nixos, is the service management, which starts stuff under systemd
<clever> petercommand: probably every time the discord client complains that you have to update
<clever> just nix
<clever> but its not really nixos anymore
<clever> nexgen: probably
<clever> nexgen: that should work fine, just bind-mount /tmp/.X11-unix/ between the 2
<clever> 2019-08-11 12:59:06 < clever> petercommand: yarn2nix.nix in the root of the repo
<clever> petercommand: yeah
<clever> petercommand: yarn2nix.nix in the root of the repo
<clever> petercommand: the main difference, is the lack of sandboxing, its not able to have conflicting versions co-exist, so rollbacks are missing, and no official binary cache, so you must build everything from source
<clever> petercommand: similar, its just a giant heap of shell scripts that build everything, and define what the deps are
<clever> prior to nixos, i ran gentoo
<clever> sphalerite: reminds me of the old days when people joined christian channels, then made the bot quote a verse that had a curse word in it, causing the bot to get auto-banned :P
<clever> DigitalKiwi: in my favor, it was an apt question, so it applied to either distro
<clever> DigitalKiwi: i once got banned from #debian for asking ubuntu questions
<clever> Athas: i think its so when 2 different builds get into the env, it can uniquely identify which is which
<clever> Athas: ghc does, to give each build a unique id
<clever> Athas: it shares the entropy with the host currently
<clever> Athas: yeah, parallel builds have caused issues before, which is why parallelish is off by default
<clever> Athas: some of the manual's in nixos used rng to generate links in the html, to make the links unique within the document
<clever> Athas: its basically spinning up a dynamicly created container for every build
<clever> simpson: the only time ive seen runtime detecting be a problem, was on an avr, where the cycle count of an `if` statement in an irq was too much, lol
<clever> simpson: mplayer solves that by having runtime cpu detection, it just builds multiple variants of key functions, and selects the right one at runtime
<clever> infinisil: as long as no funny cpuid stuff is going on
<clever> dminuoso: ive not re-read them in a while
<clever> dminuoso: probably
<clever> dminuoso: yeah
<clever> infinisil: nix's purity doesnt prove that the binary cache isnt malicious, bit-per-bit reproducible prooves that the binary cache hasnt done anything nasty
<clever> nexgen: nix also has an option to repeat the same build N times, and fail if they didnt produce bit-identical results
<clever> nexgen: https://r13y.com has been focusing on getting that for all nix packages
<clever> imdoor: the rev is d567c486ca5 and tofu the sha256
<clever> dminuoso: it might work better in systemPackages
<clever> dminuoso: you probably want `nix-shell -p ncurses6
<clever> dminuoso: files from .dev are usually ignored by nix-env
<clever> nexgen: the source for electron, once you run gclient, is over 30gig, so iterating on a proper package takes hours per attempt
<clever> nexgen: some things like electron are still blob based, even though they are open source
<clever> nexgen: thats also just the binary blog being patched
<clever> no need to compute a delta from the previous
<clever> nexgen: so if a sub-step of the build has already been done before, it gets reused
<clever> nexgen: basically, you just define how to build the final setup, and nix will use the hash of those directions to see if something is already built
<clever> maralorn: `sudo -i` and `unset SSH_AUTH_SOCK`
<clever> nexgen: yep
<clever> maralorn: can you ssh into myhost as root?
<clever> steam works just fine on nixos, and thats a giant mess of closed-source everything
<clever> this video points out a number of "quirks" with JS
<clever> manveru: i'm not sure what you did differently to make the src appear in . ...
<clever> i would expect yarn2nix to have done that already
<clever> possibly, check the constraints package.json is asking for
<clever> similar to daedalus, where webpack is ran to heavily process the js, and then dist/ is throw into a dir for later use by electron
<clever> yep
<clever> makes it very obvious the hash is "wrong"
<clever> your unlikely to see long strings of 0's in a hash, outside of cryptocoins
<clever> i prefer just mashing 0 while in replace mode
<clever> tokudan: are you using the right sha256 for hopglass?
<clever> manveru: daedalus uses it to generate the webpack files for electron
<clever> if you toss an `ls` into the installPhase, is it there?
<clever> is there a gruntfile in the repo?
<clever> or possible just grunt and nothing else
<clever> probably
<clever> the deps have already been installed by yarn2nix
<clever> tokudan: dont use `yarn install`
<clever> tokudan: is almond 0.3.3 in yarn.lock?
<clever> copy output.txt to yarn.lock and it should be fixed
<clever> and `diff -u` is a lot more readable
<clever> tokudan: the build you ran produced the -3 output, but your diffing against -2
<clever> tokudan: and what is the full error msg?
<clever> tokudan: origPackage isnt needed, i had to mess with the name field to make electron happy
<clever> no, but it could cause it
<clever> tokudan: are you using yarnLock = ./yarn.lock; ?
<clever> tokudan: did you apply that patch to yarn2nix yet?
<clever> if you build with --keep-failed, nix wont delete $NIX_BUILD_TOP, and then you can copy output.txt over yarn.lock to fix it
<clever> tokudan: this patch causes yarn2nix to create a $NIX_BUILD_TOP/output.txt containing the expected yarn.lock content
<clever> tokudan: yarn2nix will parse the lock file, then serialize it back out, and diff the result, and complain if the lock file differs
<clever> tokudan: `yarn run build` tells it to lookup `build` in `package.json` and run that
<clever> tokudan: for grunt, you probably want the main installPhase, where i'm running `yarn run build`
<clever> and it needs a patchelf to work
<clever> flow-bin for example, downloads an ELF file using yarn
<clever> you can also specify nix level postInstall's for each dep
<clever> and then tell electron to use it
<clever> export ELECTRON_CACHE=${electron-cache}
<clever> so i have to generate a compatible cache dir
<clever> and yarn/npm isnt aware of that
<clever> in my case, electron-packager wanted to download a windows build of electron at build time
<clever> then you dont have to PR yarn support to the project, or fork it
<clever> joepie91: you can use yarnLock = ./yarn.lock; to use an out-of-tree lock file
<clever> joepie91: the source doesnt even need to contain a yarn.lock, as i confirmed a few days ago
<clever> tokudan: most of the complex stuff in my example is to deal with cross-compiling to windows
<clever> a patch to remove patching? lol
<clever> ,ifd
<clever> i think that readme is showing the IFD route
<clever> yarn2nix has 2 ways to run, either with IFD, or where you pre-generate the nix once
<clever> or use fetchFromGithub
<clever> clone yarn2nix, and then put the path of your clone there
<clever> unstable here
<clever> the one in nixpkgs throws an error at eval time, lol
<clever> nix-repl> yarn2nix
<clever> error: Use upstream https://github.com/moretea/yarn2nix
<clever> moretea's fork is the one ive had experience with
<clever> tokudan: have you tried yarn2nix?

2019-08-10

<clever> at boot time, its binary
<clever> device tree blob, an arm way of configuring things
<clever> and all merging is done by nix before creating the main dtb, rather then using dt overlays
<clever> you could even do something like having a services.foo.enable auto-config the DTB's for you
<clever> Fahrradkette: if you can define all of that in device tree, then it should be possible to write a nixos module to configure it and enforce rules, then generate a DTB based on a config file
<clever> that would explain how its aboe to restore certain elements of the state
<clever> ahh, someone else linked crui to me recently
<clever> pie_: thats a staticly linked c binary, using the namespace api's, to mount a nix store to /nix/
<clever> pie_: have you seen nix-bundle and nix-user-chroot?
<clever> > let foo = { a = 42; }; in foo.b or "not found"
<clever> > let foo = { a = 42; }; in foo ? a
<clever> > let foo = { a = 42; } in foo ? a
<clever> > pkgs.hello.meta.position
<clever> Orbstheorem: id say go ahead, its even used by things like
<clever> Orbstheorem: ^^
<clever> > builtins.unsafeGetAttrPos "hello" pkgs

2019-08-09

<clever> pie_: pivot_root just changes what / is, it wont remap any existing open ahndles
<clever> pie_: something something open handles pointing to the wrong fs and things still being written to :P
<clever> pie_: when you literally swap the root out from under its feet and nothing is where it was
<clever> pie_: systemd would get very upset, better to just reboot, lol
<clever> pie_: a fuse app being ran in the initrd, to create the root-to-be
<clever> pie_: thats how things like root on fuse function
<clever> pie_: yes
<clever> yep
<clever> > builtins.length (builtins.attrNames haskell.packages.ghc865)
<clever> zeta_0: that will print out every single package on hackage
<clever> averell: you find all kinds of neat things if you read the man page, like this:
<clever> watch uname -r
<clever> You can watch for your administrator to install the latest kernel with
<clever> are send and recv on the same box?
<clever> pie_: whats more important is if one of them goes up faster, when the hdd is active
<clever> pie_: those most appear to be related to idle activity, though line 4 might be a hdd
<clever> the -d makes the differences light up
<clever> nope
<clever> pie_: years of poking around in /proc out of bordem :P
<clever> pie_: yeah
<clever> karetsu: more likely, its logind that knows you are at a physical terminal
<clever> pie_: thats not going to be visible in a static pastebin
<clever> pie_: what thing counts up when a device is active?
<clever> karetsu: you can also configure sudo to allow certain commands without a pw
<clever> karetsu: something involving systemd/logind, but ive never used it
<clever> pie_: what irq is tied to what device, any sharing?
<clever> pie_: watch -d cat /proc/interrupts
<clever> pie_: check top anyways
<clever> karetsu: `sudo systemctl suspend`
<clever> pie_: that sounds like a gpu problem
<clever> pie_: you may need to enable trim in luks first
<clever> Zer0xp: try logging out fully
<clever> Zer0xp: oh, and locking may not go thru gdm
<clever> Zer0xp: not sure what else to check then
<clever> Zer0xp: any errors from google
<clever> or G
<clever> Zer0xp: the end key
<clever> journalctl -u display-manager
<clever> Zer0xp: check the logs for display-manager
<clever> Zer0xp: i do see google_authenticator in gdm now
<clever> Zer0xp: that tells it which file under /etc/pam.d to put it into
<clever> Zer0xp: you replace <name> with gdm
<clever> Zer0xp: can you pastebin both your configuration.nix and /etc/pam.d/gdm files?
<clever> Zer0xp: did you create ~/.google_authenticator?
<clever> Zer0xp: googleAuthenticator.enable does that for you
<clever> Zer0xp: one min
<clever> lpil: nixos-unstable probably has it
<clever> lpil: check the nixos-19.03 branch on the nixpkgs-channels repo
<clever> lpil: youll want to pick a new channel, and do `nix-channel --add https://nixos.org/channels/nixos-19.03 nixos` for example
<clever> ,howoldis lpil
<clever> lpil: as root, run `nix-channel --list`
<clever> lpil: which channel are you on?
<clever> Miyu-chan: so its more like data Foo a = Foo { startSet :: [a], operator :: a -> [a] } and then genericClosure :: Foo a -> [a]
<clever> Miyu-chan: equality testing on .key is used to prune dups, and any other attrs on the set are ignored, and just come out the end
<clever> Miyu-chan: startSet must be a list of { key = ... };, and operator must take one of those things, and return a list of more
<clever> Miyu-chan: 1st argument must be a set, in the form of { startSet = ...; operator = ...; }
<clever> ,howoldis typetetris
<clever> Miyu-chan: builtins.genericClosure is now nixops and nixos trace a tree, and turn it into a flat list, while avoiding recursion in the tree
<clever> Miyu-chan: lib.toposort
<clever> Zer0xp: and anything involving pam needs to be in configuration.nix
<clever> and if you set passthru with overrideDerivation?
<clever> infinisil: but what if you set passthru in overrideAttrs?
<clever> infinisil: maybe its overrideDerivation where it fails
<clever> petercommand: not sure if overrideAttrs will work with passthru or not, they may be at different stages
<clever> petercommand: .overrideAttrs would undo the //
<clever> petercommand: line 29, passthru lets you add attrs to a derivation
<clever> and that results in buildFHSEnv not giving you a shell in the fhs, but a shell suitable for building the fhs
<clever> petercommand: nix-shell sets the vars suitable for building the derivation you point it at, and wont actually build the thing for you
<clever> petercommand: so you can nix-shell -A env
<clever> Miyu-chan: nixops export | jq, can do the same thing