2017-05-23

<clever> this includes a custom fuse program, and a full nixos vm that has the program pre-installed
<clever> they can depend on eachother, as if they where in nixpkgs
<clever> so if i use the new callPackage to load my own default.nix files, and put them all into the self set
<clever> in this example, it will search self. first, then pkgs.
<clever> when you call newScope on an attrset, it returns a new instance of callPackage
<clever> stallion: you may want newScope more

2017-05-22

<clever> i had chosen to just hardcode the hd# and part#, which does fail every now and then (i have to edit it to hd2,msdos1)
<clever> SovereignBleak: you may need to load the right module for the filesystem and partition table your searching for
<clever> SovereignBleak: oh, your also missing a } inside the string, so the grub.cfg would become invalid and cease booting
<clever> SovereignBleak: and that option is of type string
<clever> SovereignBleak: attribute sets! must be in the form of key=value;
<clever> SovereignBleak: bare strings must be in the form of key=value;
<clever> SovereignBleak: you have a bare string inside an attribute set
<clever> that feels like a place a desktopmanager would look
<clever> bkchr: and if that is then put into systemPackages, it should appears in /run/current-system/sw/share/autostart/
<clever> bkchr: if you call it with the arguments listed on lines 5-11, it will copy the existing .desktop file from package to $out/share/autostart/
<clever> and the versions within that, only update when people make commits to nixpkgs
<clever> and a script will update that pointer when a set of jobs on hydra passes
<clever> the main nixos-unstable channel contains a snapshot of the nixpkgs git repo
<clever> not sure how to solve that, most of the framework in nix is designed to make things reproducable, so it doesnt just update to random versions without warning
<clever> ive never used that part of hydra
<clever> so adding it to the binary cache list wont help any
<clever> if things where working correctly, it would have complained that it didnt know how to build it
<clever> then it checks the binary caches for that path
<clever> and given that src hash, it will compute the path that the compiled ruma lands in
<clever> yeah, you need to put in a fixed-output derivation like fetchurl or fetchgit, and provide the hash of the src
<clever> thats exactly how nixpkgs and hydra.nixos.org work
<clever> Zer000: if you point the client at the exact same ruma expression, on the same nixpkgs, it will just use the hydra version
<clever> Zer000: try switching the import out to import the original nix expressions, not the hydra channel
<clever> its using fake derivations, with storepaths in them
<clever> yeah, theres the problem
<clever> can you gist the default.nix in that dir?
<clever> what does "nix-instantiate --find-file hydra_ruma" say?
<clever> is hydra_ruma in nix-channel?
<clever> Zer000: what is $NIX_PATH?
<clever> Zer000: strange
<clever> can you also gist the default.nix for hydra_ruma?, or is that another hydra input?
<clever> we need to see what <hydra_ruma> points to
<clever> Zer000: is this of type derivation, or string?
<clever> default = hydra_ruma.ruma;
<clever> what about just "ls -l /nix/store/h055a5gi0048fvm9lkmv51xs27zy126k-ruma"
<clever> Zer000: and what is in "ls /nix/store/h055a5gi0048fvm9lkmv51xs27zy126k-ruma/bin/" ?
<clever> what error is it having?
<clever> your using an absolute path, so it doesnt need to be "installed" to work
<clever> ExecStart = "${cfg.package}/bin/ruma run";
<clever> can you gist your nix expression?
<clever> https://nixos.org/nixos/options.html#systemd.services.<name>.path
<clever> put it in the .path of the service
<clever> Zer000: services dont use systemPackages
<clever> i also prefer chromium
<clever> 17.03 is a stable snapshot
<clever> its probably only on nixos-unstable
<clever> nix-env -iA nixos.skypeforlinux
<clever> there is
<clever> dont see it
<clever> this is also an option
<clever> nix-env -iA nixos.terminator
<clever> yeah, mate-terminal hasnt been added to 17.03 yet
<clever> sudo nix-channel --list
<clever> terminator is still a possibility
<clever> your channel might be too old for it then
<clever> it needs the A in -iA
<clever> i see it on this end, did you use -A?
<clever> nix-env -iA nixos.mate.mate-terminal
<clever> nix-envi -iA nixos.terminator
<clever> ive just been sticking to plain xfce+slim
<clever> probably
<clever> you can also enable a desktopManager, and it will usualy install a terminal for you
<clever> but xserver hasnt been enabled, so there is no display-manager systemd unit
<clever> lightdm is trying to change the env vars for the display-manager systemd unit
<clever> you probably also need services.xserver.enable = true;
<clever> ah
<clever> nixos-rebuild build 2>&1 | gist -p -
<clever> it also helps massively if you enable ssh, then remotely connect from another machine
<clever> yeah
<clever> Nobabs27: and what was the exact error?
<clever> Nobabs27: gist -p /etc/nixos/configuration.nix
<clever> Nobabs27: did you spell it correctly?
<clever> lukec1: it may also need other features, there is an open issue about it not saying why its blocked
<clever> lukec1: this is what i have on one of mine
<clever> supportedFeatures = [ "big-parallel" "kvm" "nixos-test" ];
<clever> lukec1: you have to list kvm as a supported feature on the buildMachine list
<clever> or 'man configuration.nix'
<clever> so the list remains in a text file i can archive with git
<clever> i prefer putting things into systemPackages or a buildEnv instead
<clever> maybe -iA each
<clever> i believe its nix-env -iA nixos.foo -A nixos.bar
<clever> yeah
<clever> which makes it much slower
<clever> -i searches the name attribute of every single package
<clever> Nobabs27: pretty much
<clever> Zer000: its been doing it for years
<clever> Zer000: because hydra always uses the buildMachines and will never try to build locally
<clever> --pure will stop that
<clever> by default, nix-shell lets the original $PATH leak in
<clever> you loose a lot of its feature when installing it, because gcc isnt supposed to be installed
<clever> because gcc must be in the env of the shell, not just installed
<clever> jackjackjack: what about nix-shell -p ncurses ncurses.dev gcc?
<clever> so that string needs to be corrected
<clever> Nobabs27: extraConfig is the right one, but the string inside isnt a valid sudoers config
<clever> Nobabs27: the extraConfig for sudoers isnt valid, check the man page or refer to your old sudoers on arch
<clever> Zer000: yeah, you can configure localhost as a build slave
<clever> Nobabs27: line 16 of the sudoers file, not line 16 of configuration.nix
<clever> Zer000: https://nixos.org/nixos/options.html#nix.buildmach
<clever> Zer000: then it has no slaves to build on
<clever> Zer000: did you add a build slave in nix.buildMachines?
<clever> oops with 1 more - at the end
<clever> Nobabs27: can you gist more of the error?, nixos-rebuild build 2>&1 | gist -p
<clever> can you double-check the error msg?
<clever> 16 looks normal to me
<clever> does it say where the syntax error is?
<clever> yeah
<clever> just | gist -p -
<clever> yeah
<clever> very first argument it lists
<clever> gist --help
<clever> can you gist the configuration.nix file?
<clever> Nobabs27: what exactly did the error say?
<clever> check the sudoers man page
<clever> i think
<clever> security.sudo.extraConfig = "youruser = ALL=(ALL:ALL) NOPASSWD: ALL";
<clever> you need to put in the same like you would normally add to /etc/sudoers
<clever> sudo.nix is the internal file, that makes it an option
<clever> you are supposed to put that in /etc/nixos/configuration.nix
<clever> so you can undo the change by picking the older option
<clever> and every time you make any change, it creates a new entry in grub
<clever> yes
<clever> can you pastebin the full output of "ls -l /nix/var/nix/profiles"
<clever> default is the current version of nix-env's profile
<clever> system is the current version of the system
<clever> system points to system-4-link
<clever> yes
<clever> default is part of nix-env
<clever> and another nixos-rebuild boot should update grub.cfg to match
<clever> "nix-collect-garbage -d" needs root to delete system generations
<clever> Nobabs27: then you didnt delete the old versions
<clever> Nobabs27: and what does this say, "ls /nix/var/nix/profiles/"
<clever> and the attribute path is just a list of keys to follow
<clever> mellowmaroon: the nixpkgs package set is just a giant attribute set (key/value list) of packages
<clever> -i says to install, -A says to use an attribute path
<clever> but gist is in the gist package
<clever> Nobabs27: nix-env -iA nixos.git

2017-05-21

<clever> you can also "gist -p /boot/grub/grub.cfg" from the cli
<clever> can you throw /boot/grub/grub.cfg into a pastebin?
<clever> Nobabs27: does "mount" show /boot as being mounted?
<clever> Nobabs27: and is /boot correctly mounted when running nixos-rebuild?
<clever> Nobabs27: what are the names of them in grub.cfg?
<clever> what 4 do you have?
<clever> yes
<clever> nix-collect-garbage -d
<clever> they dont take up that much disk space
<clever> why?
<clever> yeah, thats normal, and you usualy want to keep all of the others
<clever> and nixos has its own profile, seperate from the default for nix-env
<clever> Nobabs27: grub isnt updated until you do another rebuild switch
<clever> maybe also: users.users.clever = { isNormalUser = true; extraGroups = [ "wheel" ]; };
<clever> Nobabs27: users.users.clever = { isNormalUser = true; };
<clever> any time you update configuration.nix, and rebuild, it updates the grub config to point to the latest
<clever> and it will install it for you, and configure everything
<clever> in configuration.nix, set networking.networkmanager.enable = true;
<clever> since it changes system wide config
<clever> network manager is something that has to be enabled, not installed
<clever> there is also 'man configuration.nix'
<clever> same for nox
<clever> nix-repl has to be installed first, nix-env -iA nixos.nix-repl
<clever> a tool that will index nixpkgs and allow searching
<clever> Nobabs27: i usualy use nox or nix-repl to search
<clever> nixos-install is basicaly just a script to run nixos-rebuild under chroot, and deal with getting nix inside the rootfs
<clever> if you remount an existing install and run nixos-install on it again, it will update it to match the configuration.nix
<clever> mellowmaroon: it still allows interactive logins over ssh, but you need a keypair to get it
<clever> Nobabs27: there is a "nixos-install --chroot" flag that does it all for you
<clever> only ssh keypairs, no other way in
<clever> mellowmaroon: i usualy set services.openssh = { enable = true; permitRootLogin = "yes"; passwordAuthentication = false; }; once the install is done
<clever> yeah, i think thats all you can do
<clever> Zer000: i'm guessing it has to do with the regex in parseTOML
<clever> Zer000: do you know if hydra is using a different version of nix?
<clever> yeah, thats not right
<clever> yeah, i would expect that to work
<clever> Zer000: anything in the hydra-evaulator journal?
<clever> Zer000: does it give any line numbers or other details?
<clever> ah
<clever> drakonis: make sure /boot is in hardware-configuration.nix so it gets mounted on bootup
<clever> 2017-05-21 02:03:48 < clever> about all i can think of right now is "dd if=/dev/zero of=/dev/sda5 bs=512"
<clever> the dd will return when its done
<clever> threshold: i believe its in here
<clever> [clever@amd-nixos:~]$ nix-build apps/nixpkgs/pkgs/top-level/release.nix -A manual
<clever> threshold: i havent found an attribute that has the pdf manual
<clever> i try to isolate windows to its own drive whenever possible
<clever> ah yeah
<clever> drakonis: if you are reinstalling, it will be easy to fix
<clever> yeah
<clever> yeah, it will take some time
<clever> and its probably safe to wipe sda2 as well
<clever> try running the dd i gave over sda5, and then see what mount says
<clever> and has to wipe and repartition to make it fit
<clever> legacy booting needs an bios boot partition, and everybody forgets it
<clever> i have seen a minor need for that with a lot of gpt installs
<clever> and if windows ever needs another misc partition, it can shrink the reserve
<clever> so it just reserves 16mb for later use down the road
<clever> ah
<clever> i think its a backup thing windows uses
<clever> fdisk says sda2 is 'microsoft reserved'
<clever> i'm guessing wipefs didnt get the zfs header
<clever> to zero out all of sda5
<clever> about all i can think of right now is "dd if=/dev/zero of=/dev/sda5 bs=512"
<clever> even a usb stick would do
<clever> first, i would make a backup of the first 1mb, do you have another drive you can save files to?
<clever> so thats 0x600 bytes between the gpt and efisystem
<clever> efi system starts at 0x5000
<clever> and the EFI system starts at 40*512 i think, checking
<clever> 0x4400 i think is where the GPT header ends
<clever> drakonis: this should put a hexdump of the start of the disk on gist
<clever> drakonis: "hexdump /dev/sda -C | head -n1500 | gist -p -"
<clever> hmm, wikipedia says its ~34 sectors
<clever> and gpt's header is of an unknown length, so its hard to safely clear the zfs header
<clever> thats the gparted problem, but mount should only be looking in sda5
<clever> and i would risk the data loss of trying to clear random areas
<clever> yeah, i cant think of anything else right now
<clever> drakonis: does mount -v /dev/sda5 /mnt say anything more?
<clever> we could try to strace mount, "strace -o logfile mount /dev/sda5 /mnt ; gist -p logfile"
<clever> and it still fails when you use the right type on -t?
<clever> strange
<clever> you can probably run wipefs on sda5, and format it again
<clever> what about dmesg?
<clever> what error does mount give?
<clever> fdisk doesnt format things
<clever> did you format sda5?
<clever> can you do "fdisk -l /dev/sda | gist -p -" again?
<clever> because sda5 doesnt exist
<clever> the fdisk you gist'd only has sda1 thru sda4
<clever> yeah, fdisk says its gpt
<clever> fdisk says it only goes up to sda4
<clever> cant mount which partition?
<clever> can you just use fdisk instead?
<clever> kind of tricky, because gpt doesnt use just 1 sector
<clever> drakonis: i think the problem, is that zfs has a header near the start of the disk, so gparted assumes the whole thing is zfs
<clever> ah
<clever> drakonis: can you hit 'view->device information' in gparted, and screenshot that?
<clever> drakonis: one min
<clever> disasm: id add logic to detect if the db is missing, and auto-configure it
<clever> drakonis: what about fdisk -l /dev/sda ?
<clever> disasm: but i think it only works the first time postgress is installed
<clever> disasm: there is https://nixos.org/nixos/options.html#postgresql.initial
<clever> drakonis: partitions, or zvols?
<clever> zfs will then divide it up internally
<clever> drakonis: having 1 big partition is normal for zfs
<clever> drakonis: ah
<clever> drakonis: ah, its not currently mounted, what about "zfs list" and "zpool status -v" ?
<clever> drakonis: there is a gist command in nixpkgs, nix-env -iA nixos.gist ; df -h | gist -p -
<clever> since it can handle multiple files and editing
<clever> drakonis: i prefer gist.github.com
<clever> disasm: which db engine is it on?
<clever> drakonis: what does df say you have?
<clever> the above will install the xfce version of the tool
<clever> drakonis: nix-env -iA nixos.xfce.xfce4-screenshooter or nvm, lol
<clever> does anything happen when you hit the printscreen key?
<clever> drakonis: can you screenshot it?
<clever> users.users.root.initialPassword = "root";
<clever> check the current dir to see it
<clever> and initial only works on the first boot, so youll need to delete the qcow
<clever> youll need .initialPassword = "hunter2";
<clever> no defaults
<clever> yeah
<clever> and if you dont give it root, it has zero chance of breaking things
<clever> yep
<clever> disasm: i try to use "nixos-rebuild build-vm -I nixpkgs=/home/clever/nixpkgs -I nixos-config=./configuration.nix" for testing
<clever> threshold: for nix, this will make a result/manual.pdf
<clever> [clever@amd-nixos:~]$ nix-build nix/release.nix -A tarball -Q -j8
<clever> johnramsden: the activation scripts run much sooner in the bootup, and every time you rebuild-switch, so they wont have that issue
<clever> johnramsden: oh, and extraInit may also cause some issues, it will only run when you open a terminal, so running a program via the gui may skip creating the config
<clever> nope
<clever> one of them must work
<clever> johnramsden: loginShellInit vs interactiveShellInit vs shellInit vs extraInit
<clever> the example i linked is what links /etc into the latest etc build in the store
<clever> and its free to mutate the system state
<clever> johnramsden: the activation script gets ran as root, on bootup, and when you nixos-rebuild-switch
<clever> activation scripts are a second option
<clever> johnramsden: i also remembered another way of doing it
<clever> johnramsden: try adding an echo before the if statement, and then open another shell
<clever> other then when a service reads pkgs.foo
<clever> and it will have no impact on services
<clever> i think overlays are only a way to give a list of packageOverrides

2017-05-20

<clever> ben: and nix tries to upload 2gig of closure to a remote build slave, because its "faster"
<clever> ben: another more anoying thing, buildEnv merely symlinks paths from all of the inputs 99% of the time
<clever> or /nix/store/hash-foo.service/foo.service, which confuses new users
<clever> but a lot of things like systemd use scripts in $out/bin/ when it doesnt have to
<clever> so writeTextFile could be modified, to call toFile if the arguments are simple
<clever> but can it put it in $out/bin/foo, and +x it?
<clever> oh
<clever> rather then writing a string into the store, at a potentialy complex path, with +x