2017-09-05

<clever> but you may want to clear the old boot out and chmod 0 /boot
<clever> only zfs does that
<clever> mount /dev/sda2 /boot
<clever> those can also come from just doing nixos-install 4 times
<clever> and you never noticed, because you never changed configuration.nix
<clever> then this has likely been broken since you first installed
<clever> how often do you change configuration.nix?
<clever> andrewrk: how old is this install?, how often do you change configuration.nix?
<clever> andrewrk: you must mount sda2 to /boot and re-run nixos-generate-config to fix hardware-configuration.nix
<clever> sda2 *, *doh*
<clever> sda1 is not mounted
<clever> andrewrk: can you gist the output of: df -h ; ls -ltrhR /boot/
<clever> andrewrk: double-check your partition list, do you have any extra boot partitions by mistake?
<clever> sphalerite: oh right, i forget about that
<clever> you should also be able to run nix-env -i against the above gist
<clever> nix-shell -p can only load from nixpkgs
<clever> if you want to use it in a nix shell, create a second derivation, that depends on the new youtube-dl
<clever> ToxicFrog: if you just want to build the thing in that overlay, run nix-build against https://gist.github.com/cleverca22/3dbc7ec96e1d5dc16ad7ee7111f18c80
<clever> ToxicFrog: also, nix-shell -A and -E give you an environment suitable for building something, not using it
<clever> nix-shell -E 'with import <nixpkgs> {}; youtube-dl.overrideAttrs ... '
<clever> you can do the same thing with nix-shell
<clever> working fine, or silently having zero effect?
<clever> ToxicFrog: the overlay still has to load it with callPackage
<clever> ToxicFrog: i think an overlay would still have the same problem
<clever> and its missing in a recent-ish checkout of master
<clever> odd, its present in my nix-repl
<clever> /home/clever/apps/nixpkgs/pkgs/top-level/python-packages.nix: youtube-dl = callPackage ../tools/misc/youtube-dl {};
<clever> grw: yeah, it is present
<clever> ToxicFrog: did you spell it all correctly?
<clever> «lambda»
<clever> nix-repl> pythonPackages.callPackage
<clever> double-check that pkgconfig is in the inputs for networkmanager-iodine
<clever> not the same issue i had then
<clever> grw: by chance is this build slave on nfs?
<clever> grw: the error says pkg-config cant be found
<clever> you have to load it the same way all-packages.nix loaded it
<clever> ah, you want pythonPackages.callPackage
<clever> ive done it so much that i can type it with my eyes closed, lol
<clever> nix-shell -E 'with import <nixpkgs> {}; callPackage ./. {}'
<clever> oh, thats simple
<clever> ToxicFrog: for nix-shell, nix-build, and nix-env, it will obey ~/.config/nixpkgs/overlays and <nixpkgs-overlays>
<clever> ToxicFrog: nix-shell will never read configuration.nix
<clever> andrewrk: is /boot mounted?
<clever> or /boot isnt even mounted
<clever> andrewrk: what does /run/current-system point to, before and after a reboot?
<clever> 2017-09-05 13:23:42 < andrewrk> avn, when I boot, docker isn't even a command I can run. if I do rebuild switch without changing anything, then it becomes a command I can call
<clever> or he re-ran nixos-rebuild after logging in
<clever> setup-etc is the closest thing to what you want, but that only works in /etc
<clever> '';
<clever> repeat as needed
<clever> cp -vi ${./file1} $out/file1
<clever> mkdir -pv $out
<clever> runCommand "name" {} ''
<clever> Lisanna: runCommand
<clever> there is also "man configuration.nix"
<clever> and the info file says where to dl it
<clever> any that 404 have to be built locally
<clever> nix downloads those for everything it wants to install, and any that 200 are in the cache
<clever> its just the hash from any storepath
<clever> you know the url for narinfo files?
<clever> Rotaerk: only thing i can think of is to read nix.conf and then try to curl each .narinfo in order
<clever> fearlessKim[m]: your not supposed to install a package like foo-dev, but rather, create a shell.nix that gives you an environment suitable for building something

2017-09-04

<clever> silver_hook: when does it complain that it cant find it?
<clever> i tried adding xterm as a "game"
<clever> oh, so thats how you do that, lol
<clever> ls -ltrhd /tmp/nix-build*
<clever> Rotaerk: ive seen it take upwards of 12 hours when no emulation is at play
<clever> Rotaerk: peek into its /tmp/nix-build directory, and know the internals of how ghc builds
<clever> Rotaerk: gcc is the same way
<clever> Rotaerk: ghc always builds 2 or 3 phases
<clever> Rotaerk: ah, ghc just always takes a long time to build
<clever> i typicaly use ps -eH x
<clever> Rotaerk: can you gist the process tree?
<clever> Rotaerk: check cpu usage and the process tree

2017-09-01

<clever> /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos
<clever> [clever@amd-nixos:~]$ nix-instantiate --find-file nixpkgs/nixos
<clever> ah
<clever> ?
<clever> grub.device should still be set to the root of the device (like "/dev/sda") not the bios boot partition
<clever> mfiano: you must create a bios boot partition, 1 mb, no fs, never mounted
<clever> mfiano: on gpt?
<clever> mfiano: do you want efi or legacy booting?
<clever> hodapp: and also, the line 52 alone sets it to an empty string, causing the same issue (in the false case)
<clever> hodapp: line 43-52 overwrites that, so you loose pre/post patch
<clever> hodapp: the patchPhase is responsible for running the post-patch hook
<clever> hodapp: can you gist your entire nix expression?
<clever> this appears to work
<clever> [root@amd-nixos:~]# nix-shell -A config.boot.kernelPackages.kernel '<nixpkgs/nixos>'
<clever> you have to run <nixpkgs/nixos> and that will then load the config
<clever> nixos-config is just a path to the configuration.nix, it cant be ran by nix-env or nix-shell

2017-08-30

<clever> so your output can only ever use inputs that where hashed by nix
<clever> the docker builds are still pure, just like every other nix build
<clever> if you want to download files, you need to use things like fetchurl
<clever> kiloreux: runAsRoot runs the command in a qemu vm, so you can create files owned by uid 0
<clever> kiloreux: all network is disabled in builds
<clever> dieggsy: there is also xorg.callPackage, which passes in the attributes of xorg first
<clever> and stdenv picks the var over the function
<clever> and when you override a function, it creates a variable, of the same name as the function
<clever> there are bash functions that act as defaults
<clever> disasm: try set | grep Phase
<clever> and if you dont, its just unpackPhase
<clever> i think that only works if you have a custom unpackPhase
<clever> but overriding the stdenv passed to one package wont change the stdenv given to all of its deps
<clever> fpletz: i dont think that would happen
<clever> or patch the source to not have errors and send it upstream

2017-08-29

<clever> and the partition must have a type of efi system partition
<clever> if you want to boot with EFI, you need a ~512mb vfat mounted to /mnt/boot/
<clever> fresheyeball: and use the right type for how you want it to boot
<clever> fresheyeball: you need to also create a boot partition and mount it to /mnt/boot/
<clever> fresheyeball: what does "df -h /mnt/" say?
<clever> fresheyeball: did you format the rootfs and mount it to /mnt/ ?
<clever> ?
<clever> fresheyeball: which command is hanging?
<clever> fresheyeball: what point is the installer stopped at?

2017-08-28

<clever> Delta_VII: you didnt enable kde or the xserver
<clever> fresheyeball: any chance you can just plug in an ethernet cord?
<clever> fresheyeball: have you read the directions on how to install nixos?, its not automated like ubuntu
<clever> 3: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
<clever> fresheyeball: then check the status with "ip link", does it say up?
<clever> fresheyeball: and then restart wpa_supplicant
<clever> fresheyeball: run "iwlist scan", find the essid, then run "wpa_passphrase essid > /etc/wpa_supplicant.conf"
<clever> fresheyeball: is the wifi open, wep, or wpa?
<clever> fresheyeball: id just use wpa_supplicant directly
<clever> fresheyeball: hit enter a few times, you should still have a shell
<clever> fresheyeball: the error is because you havent told it what to connect to yet
<clever> fresheyeball: just configure it with wpa_supplicant or network manager
<clever> fresheyeball: and yeah, you pretty much need internet access to do an install
<clever> fresheyeball: thats a generic wifi error, things trying to use it before you connected
<clever> and that it didnt come unplugged mid-write
<clever> double-check that its still at sdc
<clever> you must write it directly to sdc
<clever> but the image contains its own partition tables
<clever> that writes it to sdc1, which is a partition
<clever> that wont work
<clever> yeah
<clever> loopback device, for mounting a filesystem inside a file
<clever> fresheyeball: did you download the iso from the nixos site?
<clever> the loop0 should automatically be configured to point to a squashfs on the usb
<clever> that one should work
<clever> what directions did you use to make the usb?
<clever> ah, it has to be the other shell option, not pid 1
<clever> after you mount, you can do exit and pick continue
<clever> which instructions?
<clever> fresheyeball: how did you put the iso onto the usb?
<clever> fresheyeball: or booting from the iso on usb?
<clever> fresheyeball: oh, is this failure while booting from the cd, or booting the installation?
<clever> fresheyeball: do you remember how you laid out the partitions when installing?
<clever> fresheyeball: if you look in /nix/store there should be an fs-into file, that says what device and mount options it needs
<clever> that might not be available in the initrd
<clever> yeah
<clever> just run "mount /dev/sdaX /mnt-root" with the correct sda path
<clever> fresheyeball: pick that, then try to manually mount the rootfs to /mnt-root
<clever> fresheyeball: is there an option to launch a shell?
<clever> pxc: ah
<clever> i think it was jake_
<clever> pxc: i was helping soembody in #nixos with a problem a few months ago
<clever> pxc: this generates a perl script, that will obey ExecStart and many other flags, to run the service defined in nixos
<clever> 2017-07-17 14:38:31< clever> qknight: nix-build '<nixpkgs/nixos>' -A config.systemd.services.nginx.runner -I nixos-config=./configuration.nix
<clever> pxc: there is also a runner script for nixos services, meant for testing
<clever> i think it only needed chroot and maybe nsenter on the host, and then it uses everything from the store
<clever> pxc: in my case, it needs root, and would be much simpler if systemd-nspawn is available on the host, but i think the start script was mostly working
<clever> doesnt matter how loud you yell "shut up and take my money", they wont accept it :P
<clever> yeah, kindle fire hd7
<clever> a year later, they unlocked canada, and then the appstore worked fine
<clever> but in amazon's defense, they refused to even ship to canada, i had to cheat the system to even get the device
<clever> benley: and i'm in canada
<clever> benley: i had to root my first android device on day 1, because the amazon app stored demanded an american billing address, for free apps
<clever> and its pre-configured to behave as a container
<clever> pxc: basicaly, its a bash script that uses nsenter to setup a container, and then runs nixos stage-2, which launches systemd
<clever> though i think it still needs root
<clever> pxc: this is a thing i had started ~2 months ago, similiar idea to JuNest, with the goal to make it even work under android
<clever> pxc: have you seen how nixos handles systemd in containers?
<clever> nwuensche: not yet
<clever> nwuensche: what is the contents of lpd/.brdcp145cfilter-wrapped ?
<clever> i think submodules work differently
<clever> oh, line 102, hmmmm
<clever> because its commented out, the kubelet options no longer exist
<clever> what rev?
<clever> MoreTea: which channel are you on?
<clever> Shados: nixops uses "ssh -i /tmp/foo" to load its own key, which breaks loading of the default in ~/.ssh/id_rsa, but the ssh-agent remains working
<clever> Shados: both work, you can use an ssh-agent i believe to allow nixops to ssh in
<clever> i need to get some sleep now, its 5am, lol
<clever> hyper_ch: boom, i now auto-generated mountpoints for 3 nfs shares
<clever> { fileSystems = { a = { device = "server:/media/a"; fsType = "nfs"; }; b = { device = "server:/media/b"; fsType = "nfs"; }; c = { device = "server:/media/c"; fsType = "nfs"; }; }; }
<clever> nix-repl> :p { fileSystems = (builtins.foldl' (state: item: state // { ${item} = { device = "server:/media/${item}"; fsType = "nfs"; }; }) {} [ "a" "b" "c" ]); }
<clever> and you can use any type you want
<clever> { a = "value"; b = "value"; c = "value"; }
<clever> nix-repl> builtins.foldl' (state: item: state // { ${item} = "value"; }) {} [ "a" "b" "c" ]
<clever> until it has run out of items
<clever> the function must then return a new state, and foldl' will re-run it on the new state and next item
<clever> and "" is the initial state
<clever> the function is given the current state, and an item from the list
<clever> "i is a, i is b, i is c, "
<clever> nix-repl> builtins.foldl' (state: item: state + "i is ${item}, ") "" [ "a" "b" "c" ]
<clever> hyper_ch: "lib.range 1 3" is a function that returns a list of [ 1 2 3 ]
<clever> and/or foldl'
<clever> [ 1 2 3 ]
<clever> plus map
<clever> hyper_ch: nix-repl> lib.range 1 3
<clever> yep
<clever> ive used eclipse, and its java features are pretty damn strong
<clever> i just use vim with basic tab completion
<clever> so it breaks just by rebooting
<clever> and nix-shell puts those into a random path under /tmp/
<clever> qt-creator needs the paths to all of the qt libs and bin/qmake
<clever> qt-creator has even worse problems
<clever> or nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz
<clever> and then run nix-build -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz
<clever> with import <nixpkgs> {}; stdenv.mkDerivation { name = "yourproject"; src = ./.; buildInputs = [ mesa_noglu openscenegraph ]; nativeBuildInputs = [ cmake ]; }
<clever> create a default.nix file with the following contents:
<clever> you usually want to build things with nix-build
<clever> also, nix wont be aware of anything you build like this, and nix may delete the libraries
<clever> this will download the nixos-unstable versions of mesa, cmake, and openscenegraph
<clever> and drop you into a shell with those available
<clever> nix-shell -p mesa_noglu cmake openscenegraph -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz
<clever> you can build your package against unstable while running the os on stable
<clever> 3.4.0 is the version in nixpkgs
<clever> what is the version you need?
<clever> and mesa is an alias left-over from the old days, you probably want to use mesa_noglu
<clever> the mesa package is just generic libGL headers, and nixos will swap out the libGL.so at bootup
<clever> nix goes out of its way to ensure the compile doesnt care what gpu you have
<clever> is the project on github?
<clever> and builds must always be done within nix-shell
<clever> but everything else, just makes building harder
<clever> gdb is one thing you could install system-wide
<clever> what if you configure kdevelop to just run "gdb", and then run kdevelop under a nix-shell that provides gdb?
<clever> aanderse-laptop: and for that 2nd question, run kdevelop under nix-shell
<clever> pkgconfig wont work right in that shell, so you need to at least use "nix-shell -p mesa pkgconfig cmake", that should make it work faster
<clever> what arguments did you give to nix-shell?
<clever> cmake, gcc, and pkgconfig MUST NOT be in configuration.nix
<clever> configuration.nix wont ever help with compiling things
<clever> aanderse-laptop: did you use nix-shell?
<clever> nope, bathurst is the one with the more complex schedules
<clever> about a 1 hour drive from here, its a different truck each week, for either recyclables or garbage, and you need a cellphone app just to know when its coming next, lol
<clever> in my area, its just one truck every week on monday, simple
<clever> :D
<clever> probably
<clever> i'm in the middle of nowhere, all the major industries in town have closed up, and they are building a new seniors home every 2-3 years, lol
<clever> yeah, NB Canada
<clever> i'm also in Canada

2017-08-27

<clever> bigvalen: while setting the Environment vars listed in the .service
<clever> bigvalen: in the case of debugging serives, i usualy tell systemd to stop the service, then i read the /etc/systemd/system/foo.service file, drop to the right user with sudo, and then run the ExecStart under gdb
<clever> either a container, or a broken system while in a rescue cd
<clever> bigvalen: and with this, i can view the journals within something not mounted at / currently
<clever> [root@edgenodes-scaling:~]# journalctl --root=/var/lib/containers/instance1
<clever> and then both of you at once, here is the journal for a random container!
<clever> -rw-r-----+ 1 root systemd-journal 8.0M Aug 26 16:22 system@6d0d720baf6243a3a6b4cd18395eb58c-0000000000000001-000557a407f85f86.journal
<clever> total 609M
<clever> [root@edgenodes-scaling:~]# ls -ltrh /var/lib/containers/instance1/var/log/journal/1eee236909a04035bf155336e7d7fbd7/
<clever> jeaye: the containers already exist on the rootfs, just look in /var/lib/containers
<clever> bigvalen: systemd writes everything to /var/log/journal/
<clever> logger*
<clever> bigvalen: in my case, logged is systemd/journald based
<clever> libsystemd.so.0 => /nix/store/nvzg17v5vn2awbimflw6lrfb8gbdrwq0-systemd-233-lib/lib/libsystemd.so.0 (0x00007f833a2eb000)
<clever> $ ldd /nix/store/2cnpvwmrd95gjw0ay9ysyskc1yq8ahmh-util-linux-2.30-bin/bin/logger
<clever> $ realpath $(which logger)
<clever> /nix/store/2cnpvwmrd95gjw0ay9ysyskc1yq8ahmh-util-linux-2.30-bin/bin/logger
<clever> bigvalen: what is the absolute path to the logger binary?
<clever> try a search for en_US or locale
<clever> which path are you looking for?
<clever> alunduil: adding -f to strace will go deeper into the search
<clever> maybe
<clever> nix-hash --type sha256 default.nix --base32
<clever> hodapp nix-hash i think
<clever> ah
<clever> it appears to be for running a nixos container in docker
<clever> so the docker containers are more restricted then the nixos containers
<clever> ah
<clever> sphalerite: what part of docker breaks systemd?
<clever> if systemd is available on the host, it should be as simple as systemd-nspawn with the right args
<clever> simpson: and this is a project i worked on ~2 months ago, to boot nixos in a container without systemd support on the host: https://github.com/cleverca22/nix-tests/tree/master/container-generator
<clever> simpson: if you set boot.isContainer = true; in the nixos config, it will omit the initrd and kernel image
<clever> and just slap .patch on the end
<clever> github also has tools for that
<clever> edit the -new, then make a patch with "diff -r -u"
<clever> then copy the entire source directory, so you have a -orig and -new
<clever> samae: as for creating the patch, nix-shell '<nixpkgs>' -A xmonad, run unpackPhase
<clever> for deps, it gets more complex
<clever> samae: for top-level things like xmonad its easy, just use (xmonad.overrideAtrrs (drv: { patches = [ ./foo.patch ]; }))
<clever> hyper_ch: xfce
<clever> samae: you can override the derivation and add to .patches just like any other package in nix
<clever> ah
<clever> hyper_ch: every time you eval the nix expression, it may re-download the nix file, and possibly rebuild things again

2017-08-26

<clever> and the 2nd part is an undocumented internal part, of how arguments get passed to all modules
<clever> the first part is just how you load nixos, so you can access all the config in nixos
<clever> not really
<clever> timclassic: nix-repl '<nixpkgs/nixos>' and config._module.args.pkgs
<clever> kini: and if your doing legacy on gpt, you also need a bios boot partition, 1mb, no fs, not mounted
<clever> yeah
<clever> kini: i prefer an ext4 /boot for legacy booting, or a fat32 /boot for efi
<clever> yeah
<clever> thats probably it