2018-02-07

<clever> Ndrei2: one method ive had luck with before, recreate the old partitions, guessing at sizes, and confirm with blkid, make sure your partition editor doesnt try to wipe old FS's out
<clever> gchristensen: add this to both the kexec image and the final install
<clever> gchristensen: one minute
<clever> gchristensen: are you on digital ocean?
<clever> gchristensen: nothing currently to read things like /etc/network/interfaces
<clever> gchristensen: thats something i always forget to do, let me see...
<clever> mojjo: what error happens when you try to cat it?
<clever> hyper_ch: looks related to nixpkgs, try nix-channel --update
<clever> which one?
<clever> hello
<clever> any unused arguments are silently ignored
<clever> Lisanna: for each attribute in the -A, it will try to apply all --arg's to the function, if it is a function
<clever> Lisanna: --arg does weird things in combination with -A

2018-02-06

<clever> srhb: i cant think of any other easy ways
<clever> sphalerite_: that forces nix to intern all of nixpkgs, while mine keeps it as a path
<clever> srhb: oops, ^^
<clever> sphalerite_: pkgs.path + "/nixos"
<clever> freeman42x[NixOS: ^^
<clever> «lambda»
<clever> nix-repl> stdenv.mkDerivation
<clever> asdfjkljkl: and grub will use that
<clever> asdfjkljkl: then you must create a bios boot partition, 1mb, no filesystem, dont mount it
<clever> asdfjkljkl: are you using EFI?
<clever> asdfjkljkl: gpt or mbr, and are you using efi?
<clever> pie_: only if the cmakelists.txt file says how to install things
<clever> tilpner: you could change -I nixpkgs=foo
<clever> jluttine: read the grub config file in /boot
<clever> jluttine: correct
<clever> pie_, tilpner: -p loads nixpkgs for you, so nix-shell -p '(callPackage ./. {})'
<clever> jluttine: after you collect garbage, you have to get nixos to rebuild the bootloader menu, run nixos-rebuild switch
<clever> and then the directory has the "list" of files
<clever> bsima: you can also put an overlay.nix in a certain directory
<clever> bsima: oh, and the overlays.nix file should contain a list of overlays
<clever> bsima: what is the 1st line of your overlay?
<clever> neonfuz: is there a boot flag you can set, or a sysctl?
<clever> yeah, probably mkBefore
<clever> i think if several things have an override level of 50, they merge together, and only the 50's apply, ignoring the 1000's?
<clever> there is order, and override
<clever> or rather, 1000 is for a seperate thing
<clever> and 1000 is the default
<clever> and there are presets for 500 and 1500, called before and after
<clever> and the mkOrder ensures that the microcode is always 1st in that list of things to prepend
<clever> a list of things to prepend to the initrd
<clever> .prepend is an option
<clever> it will sort everything assigned to boot.initrd.prepend by the order, and then merge
<clever> mkOrder can do that
<clever> you usually turn off whatever was setting the thing you dont want
<clever> in an env variable
<clever> mkaito: i think it will use : to seperate when merging
<clever> mkaito: yeah, the type is a list of str
<clever> but it is possible to overwrite the entire thing with things like mkForce
<clever> removing a value isnt easy
<clever> commas itses ","
<clever> mkaito: the lines type uses "\n" to seperate the values, list just concats each list
<clever> mkaito: all types have a merge function on them, that deals with merging duplicate definitions
<clever> it depends on the type
<clever> mkaito: have you seen the nix pills series?
<clever> "rm result/" tries to delete the directory the link points to
<clever> "rm result" deletes the symlink
<clever> "rm result", not "rm result/"
<clever> depends on who owns the directory where result is
<clever> and the missing result link allows it to be GC'd
<clever> nix knows where the result symlink is/was
<clever> it will be deleted later when you do a garbage collection
<clever> pie__: rm result
<clever> nixos doesnt know to reload modules
<clever> ivanivan: you need to do rmmod, then modprobe
<clever> genesis: you need to increment a digit on the hash
<clever> genesis: if you supply that flag, it switched to fetchgit behind the scenes
<clever> genesis: it does
<clever> nahamu: yeah, those look fine, i also modified it like that so you could easily .overrideDerivation more flags in
<clever> and the kvm feature

2018-02-05

<clever> dhess: i had issues with timing sensitive protocol tests failing because the machines clocks got out of sync
<clever> dhess: but aws is coming out with baremetal instances soon
<clever> dhess: EC2 is virtualized, so kvm fails
<clever> samueldr: if qemu can find /dev/kvm, it will force kvm usage, and then hard-fail if vbox has claimed the mutex
<clever> cant think of anything else then
<clever> Baughn: ls -l /dev/kvm
<clever> Baughn: is kvm enabled?
<clever> of it colliding*
<clever> there is a very very low chance of it being invalid
<clever> genesis: i just increment one of the digits in the hash when i know it should be invalid
<clever> so your not changing the right inputs for fetchgit
<clever> if its not re-running fetchgit, then nix believes the output would have been identical
<clever> genesis: also, there is no point in trying to delete stuff like that in the first place
<clever> and dont use the --force flag, that can break the entire system
<clever> also, try using that on the above path, so nix knows its gone
<clever> that tells nix that it has been removed
<clever> always use "nix-store --delete" to delete things
<clever> nix thinks the file still exists, so it tries to just access it
<clever> ah
<clever> genesis: have you had an improper shutdown recently?
<clever> genesis: what does nix-store -qR say when ran on that path?
<clever> you can use /ssh_pubkey to maintain access, without re-generating a new initrd for each user
<clever> sphalerite: gchristensen: the kexec_nixos script will also modify the initrd, to embed your ssh key into things, have you been using that?
<clever> sphalerite: :D
<clever> sphalerite: nohup or screen can be used to disconnect things
<clever> Baughn: so you can verify the install works
<clever> Baughn: also, qemu_test2 will then boot the machine with the same hdd, but without the install media
<clever> tweak that to use bcache, and your basically done
<clever> and it includes the justdoit script that installs nixos
<clever> configuration.nix in that directory defines what is in the ramdisk
<clever> Baughn: if you build the qemu_test attribute, and then run qemu_test1, it will boot the installer from a ramdisk
<clever> Baughn: one min
<clever> yeah
<clever> thats explained in the ssh man page
<clever> ive just been doing <enter>~.
<clever> nice
<clever> gchristensen: ah, and then ssh fails faster?
<clever> that would intern and hash the source in the store and still be safe
<clever> hard to say without reproducing the problem first
<clever> so nix wont rebuild things when the file changes
<clever> but the file wont be hashed
<clever> pie__: if you try to access a file like /home/foo/bar inside a build script, it will just work
<clever> or wasting hours rebuilding things that had impurities in them
<clever> pie__: its also a small performance hit
<clever> pie__: set nix.useSandbox = true; in configiration.nix
<clever> its off by default
<clever> pie__: if you keep sandboxing on, such things just break, and then you cant do things wrong
<clever> pie__: sounds like you have sandboxing turned off, and an impurity is doing nasty things
<clever> chisui: where every library is built to match the version your stack and cabal files listed
<clever> chisui: there is also stack2nix, which will scan a stack file, and generate a nix expression that returns a custom haskellPackages
<clever> my original use for that was to edit generic-builder.nix
<clever> dhess: this uses the un-modified ghc in one nixpkgs (where you may override base, i think), to create a 2nd ghc, and then builds a haskellPackages around it
<clever> but then you need 2 nixpkgs branches
<clever> i have gotten it down to 1 ghc rebuild
<clever> it is avoidable :P
<clever> but youll need to rebuild ghc 2 or 3 times
<clever> which will control base, in every package set
<clever> dhess: which will impact the upper layers, that are used to build ghc
<clever> dhess: if i use an override to create pkgs.overrides, then the callPackage that loads every haskell packages would pass it in
<clever> dhess: then i realized, if i make an override to the package "overrides", it might work, lol
<clever> dhess: i was just thinking, how could i apply an override to every haskell packages at once
<clever> there are a few core packages like that, that are locked in
<clever> dhess: base cant be changed with overlays, due to how its built
<clever> ambro718: if you turn nix sandboxing off globally, then the network will be enabled
<clever> ambro718: ive done a little bit with sbt, but ive found it to be a bit broken in nix right now, under darwin, sbt doesnt even include java, so it fails, with exit code 0, lol
<clever> ambro718: and you cant pre-download the files using fetchurl, then point sbt at that?
<clever> ambro718: why do you want network access?
<clever> chisui: hydra should still be building them
<clever> chisui: all the versions are set in nixpkgs, and dont change
<clever> chisui: and cabal2nix cant change what versions you actually get
<clever> ah, didnt know about that part
<clever> and it helps if you know what the package name starts with
<clever> ixxie: just run nix-repl '<nixpkgs>' then type in pkgs.<tab><tab>
<clever> ixxie: i prefer tab-completion inside nix-repl
<clever> chisui: this would use 8.2.2
<clever> nix-repl> haskell.packages.ghc822.callPackage
<clever> chisui: it depends on which haskellPackages set you use to load the resulting expression
<clever> chisui: cabal2nix doesnt care, and cant control that
<clever> kini: also, why are you using nix inside the nix shell?, the nix-shell should just do everything you need in one step
<clever> kini: nix-shell might block .bashrc, because its not pure
<clever> kini: when things like your original $PATH leak things that cause breakage
<clever> hyper_ch: maybe
<clever> kini: yeah, --pure wipes all env vars
<clever> and there is no nix left by then
<clever> that process only gets involved after the eval is finished
<clever> the stuff nix downloads isnt covered
<clever> but that only works for the eval inputs
<clever> then use ssh based URL's in the hydra inputs
<clever> dhess: change to this user, then ssh-keygen, no passphrase, and give it access on github
<clever> [root@nas:~]# sudo -u hydra -i
<clever> dhess: just `hydra`
<clever> dhess: yep
<clever> id just manually make the directory and give hydra ownership of it
<clever> hydra doesnt use sudo, so the wheel group makes no difference
<clever> TonyTheLion: nothing looks wrong, but why is the hydra user in the wheel group?
<clever> TonyTheLion: can you pastebin your current configuration.nix file?
<clever> TonyTheLion: what did you do to enable hydra and install it?
<clever> TonyTheLion: that option has no effect on the current problem
<clever> how did you configure hydra?
<clever> how did you configure hydra?
<clever> and what user is hydra-server running as?
<clever> TonyTheLion: what user owns /var/lib/hydra/ ?
<clever> TonyTheLion: i gave the exact path to it
<clever> not sure where the example.com came from then
<clever> TonyTheLion: and what is with line 5??
<clever> TonyTheLion: that paste is configuration.nix, not nix.conf
<clever> TonyTheLion: what is in your /etc/nix/nix.conf?
<clever> nahamu: there should be nixos config fragments in the release.nix
<clever> nahamu: you need to set the nixpkgs.overlays option in the nixos config
<clever> pie_: and the main downside with that method, is that your now importing nixpkgs 3 times, and that slows the eval down some more
<clever> pie_: it helps if you put a .nix extension on the file in gist, and it does allow renaming via the edit button
<clever> pie_: which part of it?, the nixpkgs on line 7-ish needs the config value
<clever> nahamu: the nixos instances in release.nix tell nixpkgs to not load overlays from the environment
<clever> thats what i do
<clever> you could also just give in and use nixos-unstable for everything :P
<clever> only rstudio will be using a different qt
<clever> so now the unstable.rsudio, is using stable QT
<clever> instead of putting the override into stable, and its all stable, except boost&qt
<clever> now, i'm putting the override into unstable, and i'm forcing it to use everything unstable, except the QT
<clever> pie_: see what i swapped in this latest diff?
<clever> let me edit the gist a bit more
<clever> we can also do the reverse
<clever> oh
<clever> look at what -A did
<clever> the only attribute inside there, takes 1 arg, and returns a string, using all 3 args
<clever> the only attribute inside there, takes 1 arg, and returns another set
<clever> line 5 defines a function that takes 1 arg, and returns a set
<clever> also, --arg does things you would never have expected
<clever> if its a function, it calls it with the args set via --arg
<clever> nix-shell works with both
<clever> because if i override boost on 4, and pass that config to nixos on 8, EVERYTHING that uses boost has to rebuild, with the unstable boost
<clever> also, line 4 is passing boost directly to rstudio, rather then overriding boost
<clever> now its just a single let block, which returns a derivation, and accepts zero arguments
<clever> if you remove that...
<clever> its complicated by the fact that shell.nix accepts 2 package sets
<clever> and when you call the function on line 8, it returns the derivation on line 43
<clever> so in the end, nix returns the function defined on line 8
<clever> lines 9-42 have the main body, and 43-50 is the "value" where they can apply
<clever> which itself, contains a second let statement
<clever> and that is inside another function definition, whose body is on lines 9-50
<clever> line 8 calls that function on the unstable set, to create the config, then passes it to stable
<clever> line 2 defines a function, that accepts the unstable package set, and returns some overrides
<clever> line 1-7 defines the let statements, and line 8 onwards is the "value" where they apply
<clever> at the top leve, you have a let block
<clever> edited the gist again, though its a bit more twisty now
<clever> can you gist your current config?
<clever> and the body of the function is another let block
<clever> that defines an entirey pure config set, then defines a function, which can refer to config
<clever> you can also do let foo = bar in { ... }: let more = stuff; in stufffff
<clever> and you dont need the thing in the with the wrapper in the last pastebin
<clever> the stable wrapper, then uses the unstable studio
<clever> this sets the package overrides for the stable nixos, to mutate the rstudio to be unstable
<clever> then nixos ? import <nixos> { inherit config; }
<clever> config = { packageOverrides = pkgs: { rstudio = pkgs.callPackage <unstable/pkgs/applications/editors/rstudio> {};
<clever> which is done by setting the config.packageOverrides of the nixpkgs rstudioWrapper comes from
<clever> so you need to override the rstudio that is passed to rstudioWrapper
<clever> rstudioWrapper takes rstudio as an input
<clever> 16935 rstudio = libsForQt5.callPackage ../applications/editors/rstudio { };
<clever> 11778 rstudioWrapper = callPackage ../development/r-modules/wrapper-rstudio.nix {
<clever> yeah, i see the problem
<clever> it*
<clever> oh, maybe thats in
<clever> or not
<clever> i think i see the issue
<clever> which makes things more predictable
<clever> by passing it a set with config, it will ignore your config.nix
<clever> import <unstable> { config = {}; }
<clever> another thing that can cause problems, and you may want to try
<clever> so you could unstable.path + "/pkgs/development/r-modules/wrapper-rstudio.nix"
<clever> also, pkgs.path is the path the pkgs came from
<clever> but then you also have to put the full path on the callPackage lines
<clever> and skip the NIX_PATH entirely
<clever> you can also just fo unstable ? import /path/to/unstable {}
<clever> pie_: what are the contents of shell.nix?, and the exact nix-env command you ran?
<clever> pie_: what did you nix-env?
<clever> try experimenting with just rstudio, and see what happens
<clever> that would look for a development directory, one up from where your config.nix is
<clever> so you might get away with just one
<clever> the override mutates whats in the pkgs set, which is fed to everything else
<clever> you will need to override one, or maybe both of them
<clever> unstable being a placeholder for whatever you called the channel in nix-channel --list
<clever> change it into an override, rstudio = pkgs.libsForQt5.callPackage <unstable/pkgs/applications/editors/rstudio> {}
<clever> then use stable as the root
<clever> so you have to mix them together, with an override that always uses unstable for rstudio
<clever> but i think you said you wanted the version of rstudio in unstable?
<clever> so you have to nix-env -iA stable.rstudio
<clever> pie_: and if that doesnt match the QT of everything else, kaboom
<clever> pie_: if you do nix-env -iA unstable.rstudio, it will use unstable's version of QT
<clever> simpson: all QT apps you install must come from the same nixpkgs rev, then it will work
<clever> pie_: youll want to model it on how rstudio is loaded in all-packages.nix
<clever> pie_: then if you do nix-env -iA stable.rstudio (using the name of stable from nix-channel --list), it will use that channel for the qt libs
<clever> pie_: which will always grab the rstudio/default.nix from unstable, but then eval it against the current nixpkgs
<clever> pie_: so you could do rstudio = pkgs.callPackage <nixpkgs-unstable/pkgs/foo/bar/rstudio> {};
<clever> pie_: that would be a bit tricky, but when you do import <foo>, it loads the channel called foo

2018-02-04

<clever> ivanivan: should be minor
<clever> but kernel modules are a grey zone, elf, dynamicaly, linked, but not your normal .so
<clever> ivanivan: aha, line 16 checks if its an elf file, and skips non-elf files
<clever> ivanivan: dontPatchELF would also let you disable it, if you cared to
<clever> and kernel modules just arent supported, so it prints a warning and ignores it
<clever> ivanivan: this just blindly tries to run patchelf --shrink-rpath on everything
<clever> nothing can be writeable
<clever> ivanivan: after the build job finishes, the nix daemon will sanitize the entire output
<clever> yeah
<clever> { stdenv, metakit }:
<clever> the same as any other input
<clever> because its longer, and you have to put the name in twice
<clever> iqubic: its the same as { metakit = metakit; };
<clever> iqubic: all that does is allow the other package to depend on metakit
<clever> iqubic: can you link what you have right now?
<clever> so if your firmware cant boot nvme, grub has no way to open nvme, even if you can somehow boot the grub via other means
<clever> all grub can do, is make use of the nvme drivers, in the board firmware
<clever> grub technically has zero support for nvme drives