2018-07-25

<clever> ,locate rt2870.bin
<clever> firmware: rt2870.bin
<clever> [clever@amd-nixos:~/apps/nixpkgs]$ modinfo rt2800usb
<clever> abueide: then continue to the modprobe
<clever> not enabled or not loaded?
<clever> abueide: try doing `rmmod rt2800usb ; modprobe -v rt2800usb` then check dmesg again, it should have a new error at the bottom
<clever> samueldr: yeah, the firmware is a seperate thing, and can be missing
<clever> abueide: does dmesg say anything?
<clever> abueide: a quick check says its part of linux itself, so its not optional
<clever> /nix/store/r4h3cbf952lqjakmm1d4rp72hzflq2a8-linux-4.14.54/lib/modules/4.14.54/kernel/drivers/net/wireless/ralink/rt2x00/rt2800usb.ko.xz
<clever> abueide: does lsmod | grep rt2800usb show anything?
<clever> abueide: oh, and boot.kernelModules = [ "rt2800usb" ]; wont do anything to install it, all it does is try to load the driver
<clever> abueide: before we can answer that, we need to know which wifi drivers are missing
<clever> abueide: and then you can plug that usb stick into a machine that can get internet, change things, and nixos-rebuild
<clever> abueide: if you have nixos on another machine, you can just format and nixos-install against the usb stick, then youll have a non-live install
<clever> abueide: it probably needs network access to get network access, it can be a pain to deal with that
<clever> abueide: and its a livecd, so all changes are lost at shutdown/reboot
<clever> abueide: the `switch` tells it to apply the changes without rebooting
<clever> abueide: no
<clever> fresheyeball: thats only for when the default is a derivation, and you dont want that drv in the documents
<clever> fresheyeball: it doesnt need a defaultText on that option
<clever> countingsort: what is it trying to compile?
<clever> countingsort: then your only choice is to either compile firefox or switch to firefox-bin
<clever> countingsort: is the cpu 32bit only?
<clever> countingsort: ahh, 32bit, hydra doesnt pre-compile a 32bit firefox
<clever> abueide: try to chmod +w the file first
<clever> abueide: ls -l /etc/nixos/configuration.nix
<clever> abueide: you can still freely edit /etc/nixos/configuration.nix and nixos-rebuild switch
<clever> countingsort: and also `nix-info`
<clever> countingsort: can you pastebin the output of `nix-build '<nixpkgs>' -A firefox --dry-run` ?
<clever> countingsort: have you changed your version of nixpkgs any?
<clever> fresheyeball: you can use disabledModules to test out the hoogle.nix changes, before you make that PR
<clever> fresheyeball: you can also file a PR to nixpkgs to fix hoogle.nix
<clever> countingsort: what is the content of /etc/nix/nix.conf ?
<clever> countingsort: the nixos binary cache should provide a pre-compiled copy of firefox
<clever> fresheyeball: you can then copy that file to /etc/nixos/, edit it however you want, and imports = [ ./hoogle.nix ]; to load the new version
<clever> fresheyeball: if you use disabledModules correctly, then nixos will just entirely ignore the services/development/hoogle.nix in your channel
<clever> fresheyeball: another option is to just change out the whole module
<clever> Ankhers: `inherit (beam.package) erlangR20` is just `erlangR20 = beam.package.erlangR20` and test.net wont accept a erlangR20 param
<clever> fresheyeball: youll need to copy its definition over to configuration.nix
<clever> fresheyeball: its in a let block, so you cant
<clever> that lets you forcibly change any nixos option
<clever> fresheyeball: systemd.services.hoogle.serviceConfig = lib.mkForce { .... };
<clever> fresheyeball: you need to use mkForce to overwrite systemd.services.hoogle.serviceConfig
<clever> you probably want { erlang = beam.packages.erlangR20; } then
<clever> Ankhers: so you can only pass one of those 3 in the {} after callPackage
<clever> Ankhers: test.net only accepts 3 arguments, stdenv, erlang, and rebar3
<clever> Ankhers: can you add test.net to the gist?
<clever> Ankhers: why are you trying tp pass that to test.nix?
<clever> Ankhers: you probably want { inherit (beam.packages) erlangR20; }
<clever> Ankhers: inherit doesnt take dots like that
<clever> and all of the hostname.nix's have imports = [ ./core.nix ];
<clever> d1rewolf_: nixcfg is a git repo, and each machine has its own hostname.nix that acts as an entry point
<clever> d1rewolf_: what i do, is i put the bare-minimum required to boot into configuration.nix, and then i do imports = [ ./nixcfg/hostname.nix ];
<clever> d1rewolf_: the only real difference is that nixos-generate-config will silently overwrite one of them
<clever> d1rewolf_: there is no real difference between the 2 files, they just get merged together automatically
<clever> d1rewolf_: just put the luks stuff in configuration.nix
<clever> Myrl-saki: makeBinPath and makeLibPath just pass "bin" or "lib" to makeSearchPath
<clever> d1rewolf_: you can mount a new disk anywehre you want, and re-run nixos-generate-config to update hardware-configuration.nix to match the new hardware config
<clever> mightybyte: but if all your doing is nix-build, hydra is a better option
<clever> mightybyte: it also has support for windows (though we dont use it), so you could get win/linux/mac all on buildkite if you wanted
<clever> mightybyte: much more control over the build capacity, never stuck in a queue and unable to do anything about it
<clever> d1rewolf_: you generally need to change the grub settings, and nixos-generate-config is designed to be re-ran again in the future, and it will overwrite hardware-configuration.nix
<clever> Myrl-saki: ^^^
<clever> > lib.makeSearchPath python.sitePackages [ hello nix ]
<clever> mightybyte: the travis file i grabbed the above from was deleted in jan, we switched to buildkite
<clever> mightybyte: nix2 renamed the option to substituters
<clever> mightybyte: -- echo "binary-caches = https://cache.nixos.org https://hydra.iohk.io" | sudo tee -a /etc/nix/nix.conf
<clever> mightybyte: ah, one min
<clever> Sonarpulse: madknight has a new package on hackage and i was wondering how often hackage-packages.nix updates?
<clever> mightybyte: and at that point, i would just add the substituter to nix.conf
<clever> mightybyte: you have to be listed as a trusted user in /etc/nix/nix.conf to specify your own substituters
<clever> Sonarpulse: *poke*
<clever> madknight: then it should just appear automatically next time the file is regenerated
<clever> madknight: hackage-packages.nix is auto-generated from hackage
<clever> madknight: can you see how this would work?
<clever> > lib.makeSearchPath "a" [ hello ]
<clever> madknight: usually master
<clever> Myrl-saki: there is an attribute that tells you what the suffix is
<clever> > python.sitePackages
<clever> it also has a lib variant
<clever> > lib.makeLibraryPath [ xorg.libX11 ]
<clever> Myrl-saki: this function may also interest you
<clever> > lib.makeBinPath [ nix nixops ]
<clever> infandum: you may need to update glib as well to make things happy
<clever> Myrl-saki: id also put nixops into PATH to make the commandline shorter
<clever> Myrl-saki: ah, ive used turtle a bit
<clever> Myrl-saki: nope
<clever> d1rewolf_: so i could have an AWS based backup server defined in house.nix, and auto-backup my nas/router to it, if i wanted to
<clever> you are free to mix non-cloud and cloud things in the same file if you choose to
<clever> d1rewolf_: https://github.com/cleverca22/nixos-configs/blob/master/deployments/house.nix this one doesnt use aws, but it manages my NAS and router within the house
<clever> and absolutely nothing is installed
<clever> d1rewolf_: this file creates a single vm, and allows ssh to it
<clever> d1rewolf_: https://gist.github.com/cleverca22/7ae0ee0847b3da2150d22ee63175dbad is a dummy file left-over from when i was testing something
<clever> d1rewolf_: ive used that to spin up another 60 machines in just a few hours before
<clever> d1rewolf_: then nixops will use the aws api to automatically create all the VM's and deploy your config to them
<clever> d1rewolf_: nixops has aws support, so you just make a .nix file that describes your cluster of nixos machines, and hit deploy
<clever> d1rewolf_: aws is pretty simple
<clever> Myrl-saki: you give this function a chunk of haskell code that creates a $out, and it runs it, no more bash to deal with!
<clever> at least on the nix derivation side
<clever> Myrl-saki: i have a trick to solve this need for bash, one min
<clever> heh
<clever> oops, yeah, bottom left
<clever> d1rewolf_: now click the thing in the bottom right, and select complexity is beutiful
<clever> yeah
<clever> d1rewolf_: iohk.io is also using nixos heavily
<clever> infandum: your override to change things like gdm is breaking things
<clever> infandum: thats line 52 of glib, not line 52 of configuration.nix
<clever> infandum: can you pastebin the original error?
<clever> infandum: and then you can strip the nixpkgs.config from it
<clever> infandum: you want to put it inside the pkgsConfig
<clever> infandum: can you also pastebin the error?
<clever> d1rewolf_: its almost always in services, so /services.tor
<clever> d1rewolf_: `man configuration.nix`
<clever> infandum: line 14 makes no sense at all, thats in the let block still
<clever> d1rewolf_: services only happen when you enable nixos modules, installing things can never create a service
<clever> and it can edit the same file in several buffers
<clever> srk: you can :tabe to make a new tab without splits
<clever> it will need to be added to ~/.vimrc
<clever> d1rewolf_: just google "vim disable mouse"
<clever> infandum: can you gist your entire configuration.nix file?
<clever> its hard to encode that into the dns config
<clever> and to deal with some subdomains being managed by aws and others not
<clever> coconnor: i think its more for breaking up the permission models
<clever> coconnor: one of the more advanced dns setups ive seen (which i have theorized would work) is the dns under iohk.io, it has at least 5 or 6 subdomains, each with its own NS records, pointing to seperate entities within route53, that all behave like seperate self-contained domains
<clever> yeah
<clever> bind just uses zone files that almost exactly match the dns protocol and the output from `dig`
<clever> but as soon as you want something more complex, i can see it getting to be a lot more complex
<clever> i do see how dnsmasq makes all the fun things "simple"
<clever> create a .local TLD, and then add some NS records to define what ip handles the cluster.local subdomain
<clever> for that, you want NS records
<clever> that tells it to relay the requests to a given server when its from that domain
<clever> and i have a second file for the reverse dns
<clever> *.agh.dev IN A 1.2.3.4 i think
<clever> thats a wildcard subdomain then
<clever> coconnor: create a zone file for dev, like i did with localnet, and give agh.dev an A record
<clever> coconnor: at a glance, i think that just maps agh.dev to an ip
<clever> coconnor: run wireshark on port 53 and see what kubernetes does and the replies it gets
<clever> coconnor: i would just get rid of dnsmasq
<clever> coconnor: and line 138 tells everything to use it
<clever> coconnor: this sets up a cache that weill respond to my lan (line 90), and will also serve some custom domains
<clever> coconnor: i have a bind cache on the router
<clever> just input the server url, domain, name, password
<clever> some routers also have dyndns support right in them
<clever> in my case, i have nixos on the router, so i could create a dhcpcd hook that only updates the dns when the dhcp gives me an ip
<clever> so as long as the router stays on, the ip doesnt change
<clever> in the case of my connection, the IP only changes if i disconnect
<clever> there are free dynamic dns services
<clever> you just open the router config, type in the port and ip of your server box, and hit save
<clever> iqubic: install nixos on any machine you can leave on 24/7, enable services.nginx, setup a port forward in the router, done
<clever> the router manages sharing 1 modem ip between every machine in the house
<clever> route packets
<clever> i did that with both my nas and router
<clever> you can always convert the box to nixops at a later time
<clever> iqubic: with this file, and the ones it references, i can update my router and nas with 1 command
<clever> iqubic: nixops makes it far simpler to manage and update many headless machines at once
<clever> then unplug the monitor
<clever> iqubic: just do a normal nixos-install, and then dont enable xserver
<clever> iqubic: i use nixos for my nas and router
<clever> coconnor: you can read all of the container files in /var/lib/containers
<clever> i dont really use the imperative containers
<clever> add it to the systemPackages of the container i believe
<clever> d1rewolf__: its always mounted readonly, no option to change that
<clever> d1rewolf__: the container doesnt have a writable store by default
<clever> d1rewolf__: what command did you run to cause that error?
<clever> its both an attribute in the set that configuration.nix returns, and a nixos option
<clever> and if you click the "declared in" link on the page i previously gave, you can go directly to it
<clever> thats not a function
<clever> tertle||eltret: can you name one as an example?
<clever> iqubic: yes
<clever> tertle||eltret: yeah
<clever> cant think of any
<clever> yep
<clever> tertle||eltret: https://nixos.org/nixos/options.html#sudo.wheel

2018-07-24

<clever> samueldr: github removed the option for annonymous gists
<clever> syntax highlight often reveals user problems instantly
<clever> updating helps for many things
<clever> RetardedOnion: gist supports several files, syntax highlight on nix, updating, comments, and deleting
<clever> i always gist --login on new machines, then use `gist -p foo.nix` to upload files, and `gist -u <url> foo.nix` to update a gist
<clever> thats the only way to apply group changes to yourself
<clever> you may need to logout and log back in
<clever> tertle||eltret: nixos-rebuild switch
<clever> tertle||eltret: a nixos option
<clever> i have a bad habbit of opening a new window, opening the reddit front page, middle-clicking 20-30 links that look interesting, reading 5, and then never closing it :P
<clever> tilpner: i also have vimium installed in chrome, if i hit T i can then search all tabs by title
<clever> tilpner: yes
<clever> RetardedOnion: 32gig of ram, 32gig of swap, and sometimes it fills both fully
<clever> it only has problems at startup, once it stabalizes, it runs fine
<clever> i have 700+ tabs open regularly with normal chromium
<clever> RetardedOnion: open the chrome task manager and see what is using it all
<clever> then you can run ./ghcjs-with-lens/bin/ghc to compile ghcjs stuff that needs lens
<clever> nix-build -E 'with import <nixpkgs> {}; haskell.packages.ghcjs.ghcWithPackages (ps: with ps; [ lens ])' -o ghcjs-with-lens
<clever> iqubic: run emacs inside nix-shell
<clever> and installing it wont work right, because you need to constantly reinstall it to add/remove packages from ghc
<clever> you must give nix a list of packages that you want to use
<clever> lens is just an example
<clever> done :P
<clever> iqubic: nix-shell -p 'haskell.packages.ghcjs.ghcWithPackages (ps: with ps; [ lens ])'
<clever> stranger___: i think openjdk needs a pre-compiled javac to bootstrap itself
<clever> > (import <nixpkgs> { system = "aarch64-linux"; }).openjdk8
<clever> > (import <nixpkgs> { system = "aarch64-multiplatform"; }).openjdk8
<clever> stranger___: does openjdk not build on aarch?
<clever> weird
<clever> ,locate libGL.so
<clever> stranger___: openjdk is an option
<clever> TheBrayn: for efi, each os puts its own bootloader into the efi system variables, and then you can select at the firmware level
<clever> TheBrayn: its in the nixos-rebuild man page, --install-bootloader
<clever> zclod: what does `sudo nix-channel --list` report?
<clever> yeah
<clever> can you pastebin your nix file, and the error?
<clever> ah
<clever> zclod: then nix-channel --update has to be ran as root to have an effect
<clever> zclod: single or multiuser nix?
<clever> ah
<clever> ,-iA
<clever> !-iA
<clever> BennoFnfstck[m]: nix-env -i is also somewhat worse on an rpi
<clever> samueldr: yeah, i see 2 replies, heh
<clever> until it has fully downloaded it
<clever> BennoFnfstck[m]: for each storepath nix downloads, it keeps the entire thing in a single std::string in ram
<clever> BennoFnfstck[m]: thats when ghc is likely to use the most ram, ah, not sure then
<clever> *doh*
<clever> BennoFnfstck[m]: is there anything haskell related in your configuration.nix?
<clever> i dont remember all of the commands for ofborg
<clever> stranger___: not sure if it will actually make a difference, since fridh already requested an eval after your last push
<clever> DeltaEvo: pkgs.stdenv.mkDerivation
<clever> tilpner: i prefer to just put zfs on everything now
<clever> DeltaEvo: yep
<clever> id still expect that to fail though
<clever> DeltaEvo: oh wait, line 3, systemd-resolve is listening, on 127.0.0.53:53, lol
<clever> DeltaEvo: edit resolv.conf to use 8.8.8.8 and it should all be fixed
<clever> DeltaEvo: resolv.conf is configured to use localhost as a dns server, but localhost is not running a dns server, so all dns is broken on that machine
<clever> DeltaEvo: and as root: `netstat -anp | grep 53`
<clever> fetchFromGitHub also has a flag to fetch submodules (it will switch to fetchgit behind the scenes)
<clever> so in theory, the hash of the tar can change, even if the contents of the tar havent
<clever> ryantm: and i think github is generating the tar dynamically from the git repo
<clever> ryantm: fetchFromGitHub works on the hash of the contents of the tar, while fetchurl works on the hash of the tar itself
<clever> archaeron: ah
<clever> DeltaEvo: can you pastebin the output of: `nix show-derivation /nix/store/rxdndspww2lprbvrwk3ivjrmmkb8cda9-https.patch.drv ; cat /etc/resolv.conf`
<clever> an empty $NIX_PATH will definitely break things
<clever> Denommus: what about `nix-instantiate '<nixpkgs>' -A lib.version --eval` ?
<clever> Denommus: dont see that helping
<clever> Denommus: your <nixpkgs> in $NIX_PATH may need to point to a newer nixpkgs
<clever> archaeron: when did you last trying building stack2nix from nix?, it had some changes just 21 hours ago
<clever> angerman: there are also 2 configurations at play
<clever> angerman: and optionally, set the defaults in configuration.nix right, and use justdoit to perform the install
<clever> angerman: just nix-build the tarball, upload it to a machine, unpack to /, run /kexec_nixos, and then ssh back in
<clever> tilpner: but that relies on the hoster providing a rescue env, while my kexec trick doesnt
<clever> tilpner: ah, it may have changed since i last looked at it
<clever> angerman: but my kexec method doesnt have that limit, so your free to zfs it up
<clever> angerman: i think the hetzner script uses the lustrate option in the initrd, so your forced to use whatever partitioning the hoster gave you
<clever> archaeron: what methods and what errors did it crash with?
<clever> angerman: correct, it just installs nixos onto an existing linux machine
<clever> archaeron: i'm thinking your version of stack2nix is bugged, and isnt including primitive in the generated file, can you try building stack2nix from source?
<clever> angerman: of note, i have a script to convert almost any linux machine into nixops, as long as you have root and the kernel has kexec enabled
<clever> archaeron: the scientific package wants primitive
<clever> archaeron: my stack2nix file is 91,196 lines long, and yours is only 4111!
<clever> archaeron: thats not huge :P
<clever> archaeron: i know it is, i read that file on a weekly basis
<clever> archaeron: can you also gist stack.nix ?
<clever> archaeron: what about nix-build -A api ?
<clever> primitive still?
<clever> archaeron: what is the error?
<clever> if you give it `.`. then it expects all sources to be inside the nix dir
<clever> archaeron: also, you want to run `stack2nix .. > stack.nix` inside the `nix` dir
<clever> archaeron: stackPackages should contain an attribute named after your package
<clever> archaeron: stack2nix is already generating that for you, in stack.nix
<clever> archaeron: yeah, and where did app.nix come from?, stack2nix should include your app in stack.nix
<clever> archaeron: try just `import ./stack.nix {}`
<clever> the stack.nix shouldnt be ran with haskellPackages.callPackage
<clever> re-reading things...
<clever> i think, wait
<clever> archaeron: so it is trying to load EVERY SINGLE PACKAGE IN STACKAGE
<clever> archaeron: you didnt tell nix-shell which derivation to load
<clever> archaeron: can you link your current code on github?
<clever> etu: self includes all future overlays as well, when there is a list of them
<clever> you probably just want pkgs.php56
<clever> Izorkin: why are you doing callPackage <nixpkgs> ?
<clever> elvishjerricco: theres a bug in one of the hydra versions, that just doesnt allow any IFD
<clever> the CLI tool may be more flexible in its parsing of the file
<clever> i just ran `aws configure` and answered its prompts
<clever> ah
<clever> how did `aws s3` work then? lol
<clever> same on this end
<clever> AWS: [DEBUG] 2018-07-24 09:25:43 Aws::Config::ConfigFileProfileFSM [140549153786816] found access key
<clever> AWS: [DEBUG] 2018-07-24 09:25:43 Aws::Config::ConfigFileProfileFSM [140549153786816] found profile default
<clever> elvishjerricco: what kind of ACL does that accesskey have?
<clever> can you pastebin the output with 5 v's and i can diff things?, feel free to censor out the keyid
<clever> it will then do a read against 3
<clever> 3 is the file handle for the file it just opened