2017-10-09

<clever> nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs:.....
<clever> [root@amd-nixos:~]# echo $NIX_PATH
<clever> gchristensen: legacy stuff
<clever> trying to brb, lol
<clever> pop: ~/.config/nixpkgs/config.nix
<clever> tilpner: the nixpkgs manual sort of
<clever> nix-env -iA nixos.mystuff
<clever> { packageOverrides = pkgs: { mystuff = { inherit (pkgs) hello firefox chromium; }; }; }
<clever> pop: #2, create a set of packages in config.nix, and nix-env -iA nixos.setname
<clever> pop: #1 https://nixos.org/nixos/options.html#users.users.%3Cname%3F%3E.packages
<clever> pop: 2 options
<clever> makefu: that would help a lot
<clever> makefu: i have played with "nixos-rebuild build-vm" on gentoo before
<clever> makefu: yeah, things have improved with linode, but the old guide is still handy to forcibly install nixos-install on any distro
<clever> ij: brb
<clever> ij: you may need to run nix-daemon as root, and then set NIX_REMOTE=daemon for the non-root user
<clever> ij: which user did that error happen as?
<clever> ij: is that of any use?
<clever> it tries to throw temp symlinks into the current directory
<clever> ij: run it in a different directory
<clever> ij: dont run that in /boot
<clever> ij: can you pastebin the full error, and several lines around it
<clever> nh2: it has changed at least once since i began using nixos
<clever> viric: and every time you leave nix-shell, you have to remove it to let nix-shell work again
<clever> nh2: nix doesnt allow any setuid files within /nix/store/, so nixos has to create wrappers at bootup, that add the setuid in
<clever> nh2: only /run/wrappers/bin/sudo is setuid root
<clever> otwieracz: but i'm getting an error i cant really make sense of when trying to add cl-curl to the package list
<clever> otwieracz: and then it will have the env setup right
<clever> otwieracz: once cl-curl is packaged, you should be able to do something like nix-shell -A lispPackages.cl-curl
<clever> hyper_webirc: so /dev/ will cover the luks devices, and any other things you may have in the future
<clever> hyper_webirc: everything in mapper is just a symlink to a node in /dev/
<clever> lrwxrwxrwx 1 root root 7 Sep 24 10:12 media-swap -> ../dm-0
<clever> [root@nas:~]# ls -l /dev/mapper/
<clever> hyper_webirc: this has to go into configuration.nix
<clever> hyper_webirc: boot.zfs.devNodes = "/dev";
<clever> hyper_webirc: i gave you the config to fix that yesterday
<clever> hyper_webirc: my laptop is setup with zfs on lvm on luks
<clever> ah
<clever> and why are you using a different one?
<clever> otwieracz: where are you getting your cl-curl from then?
<clever> its now genrating packages
<clever> i added cl-curl to the txt file, and ran the provided nix-shell command
<clever> otwieracz: at a glance, it looks like cl-curl needs ot be packaged: https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/lisp-modules/quicklisp-to-nix-output
<clever> otwieracz: done
<clever> [nix-shell:~]$ quicklisp --version
<clever> Unknown parameter [--version]
<clever> otwieracz: can you pastebin a simple lisp program that uses openssl or curl, and the command to compile/run it?
<clever> otwieracz: and what is in /run/current-system/sw/lib/ ?
<clever> otwieracz: nix-env puts it into ~/.nix-profile/{bin,lib}
<clever> otwieracz: nix-shell puts them in env variables, systemPackages puts it into current-system
<clever> otwieracz: libraries that are installed land in /run/current-system/sw/lib/
<clever> can you write an example program that has the same problem?
<clever> otwieracz: can you paste some example code and how to run it?
<clever> "LD_LIBRARY_PATH=/nix/store/54cdgs1hvjp9jzj935jhanndcdnlxvpq-curl-7.55.1/lib"
<clever> nix-repl> "LD_LIBRARY_PATH=${lib.makeLibraryPath [ curl ]}"
<clever> you can set LD_LIBRARY_PATH to change the search path
<clever> does that accept the -I flag?
<clever> ah
<clever> so when you #include <curl.h>, it just works
<clever> otwieracz: and the gcc in nix will obey that search path
<clever> otwieracz: nix will set $NIX_CFLAGS_COMPILE to include the right -I flags
<clever> it will be far simpler to work with if you do it the right way
<clever> the stdenv in nixos isnt really made to work under an FHS env, you will be fighting the normal code all the way
<clever> otwieracz: "nix-shell -p curl stdenv", this will give a shell that can build things
<clever> compiling isnt meant to run under the FHSUserEnv
<clever> you must use nix-shell to get an environment that can use headers
<clever> nixos doesnt install header files

2017-10-08

<clever> this string is passed to -d within the initrd
<clever> boot.zfs.devNodes = "/dev"; # fixes some virtualmachine issues
<clever> so the initrd can also find it
<clever> there is a matching nixos option you will need
<clever> hyper_ch: you may need to tell import to look in /dev/mapper/
<clever> -d dir Searches for devices or files in dir. The -d option can be specified multiple times
<clever> mmts: any time you make any change to configuration.nix or nix-channel, the grub config will get regenerated
<clever> mmts: you may want to fix the python in pygrub, since nixos-rebuild will put the double-slashes in every time you change something
<clever> mmts: ah, then i was off about grub.cfg being 1, but it sounds like it still fixed it
<clever> tilpner: but it sounds like you cant even have 2 roots on the same user (or maybe even machine wide)
<clever> tilpner: i was hoping there was some windows utility to just unpack the tarball and execute an ELF with chroot
<clever> tilpner: but you need to install a full ubuntu image just to unpack the nixos tar, lol
<clever> tilpner: i was interested in building a nixos image purely, using nix, then just installing and running it
<clever> tilpner: so if you wanted to install another distro, you have to untar it inside WSL, then use explorer to perform an atomic move and swap the entire root dir
<clever> tilpner: ive also looked into it some, it has no pid 1, and the +rwx bits are stored on NTFS extended attributes, which no windows program can recreate (explorer even looses them upon copy)
<clever> tilpner: ive seen screenshots of the entire gnome desktop env running
<clever> and nix will complain about any missing paths
<clever> hyper_ch: so if you rollback the database, every "new" path will be invalid, and nix will delete it
<clever> hyper_ch: db.sqlite keeps track of what paths are valid in /nix/store/
<clever> mmts: that will force it to 1 while letting you keep domU.nix
<clever> mmts: try just doing boot.loader.grub.version = lib.mkForce 1;
<clever> hyper_ch: you could, but anything you added since the backup will get eaten as invalid data
<clever> hyper_ch: you never did anything with the sqlite files
<clever> then the remote one shut itself off
<clever> infinisil: it used x11 RPC to open a new window in the local session
<clever> infinisil: oh, did you already have a firefox running locally?
<clever> infinisil: where is the target machine?
<clever> hyper_ch: also try /nix/var/nix/binary-cache-v3.sqlite
<clever> first time ive seen that happen
<clever> which would mean your entire nix store is now hosed
<clever> hyper_ch: probably /nix/var/nix/db/db.sqlite
<clever> since ssh makes new keys
<clever> i dont think copying will work right
<clever> try creating the xauth file with touch
<clever> the other one goes into services.openssh.extraConfig
<clever> programs.ssh.forwardX11 controls /etc/ssh/ssh_config (client config
<clever> yeah
<clever> programs.ssh.forwardX11 is for the client, it requests forwarding to happen
<clever> ona: services.openssh.forwardX11 is for the server, it allows forwarding
<clever> infinisil: one is only for server, the other is only for client
<clever> infinisil: i see 2 different forwardX11 options in nixos
<clever> infinisil: within the ssh session, is $DISPLAY and XAUTHORITY set?
<clever> mmts: i think grub.cfg is grub 1, so you have to tell nixos to use grub 1
<clever> infinisil: what methods have you tried?
<clever> mmts: and the only way to do that, is to either go HVM and run grub inside the guest, or use pvgrub
<clever> mmts: nixos relies heavily on being able to edit its own grub config every time you nixos-rebuild, and that the bootloader obeys it
<clever> which means doing a full hvm guest with grub in the virtual MBR
<clever> mmts: ive done it once before, its a bit tricky, because you have to obey the grub.conf
<clever> tilpner: but yeah, bare xterm does clip things when the window shrinks, and the text doesnt come back upon growing in size
<clever> tilpner: whenrunning screen, text reflow works fine in my terminals
<clever> and again with -v
<clever> hyper_ch: what does "zpool events" say?
<clever> i havent gotten io errors on my arrays
<clever> ive read the source for grub
<clever> yes
<clever> when grub is installed into the MBR, the boot flag means nothing
<clever> hyper_ch: the boot flag in the partition table hasnt done anything in decades
<clever> but then somebody started to spam
<clever> if the channel was -n, it could message without joining
<clever> bonk``: because it also reports to projects other then nixos
<clever> yep
<clever> i need to get to bed now, its 4:30 am
<clever> you can do ./../../foo
<clever> making everything relative will fix it
<clever> something got changed recently and its a bit wonky
<clever> oh, and did you use an absolute or relative path for hardware-configuration.nix?
<clever> the nixos-config will need to be adjusted a bit
<clever> that is the default value
<clever> nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels
<clever> unset it, then try nixos-rebuild boot again
<clever> srhb-console: env | grep /run/user
<clever> unset the tempdir variable
<clever> srhb-console: nixos-install --chroot
<clever> mbrgm: either disable the auto-update, or run it in an FHS env like steam does
<clever> mbrgm: then the only problem would be #!/usr/bin/perl and the perl search path
<clever> mbrgm: it will have the wrong elf headers, and you have to re-run patchelf over it every time it updates
<clever> yeah, it is in patches
<clever> ah
<clever> gandreani: did you add it to the patches attribute of the derivation?

2017-10-07

<clever> infinisil: give cp -vs a try
<clever> infinisil: yeah, the symlink points to a bar inside foo
<clever> and also if you give it multiple sources or not
<clever> cp, ls, and ln behave wildly different depending on if the destination exists or not, and what the type of the destination is
<clever> netflix knows one of them is a lie, and blocks everything
<clever> infinisil: v4 says i'm in canada, v6 says i'm in america
<clever> infinisil: so i'm using a tunnel
<clever> infinisil: the reason its broken, is because my isp doesnt offer v6
<clever> infinisil: and android gives no way to turn v6 off
<clever> infinisil: ive got other weird problems, netflix only works over v4, v6 complains loudly

2017-10-06

<clever> disasm: what happens if you manualy run the same command?
<clever> yeah, you sort of need some system level config for that
<clever> Mic92: it could obey overrides set within config.nix
<clever> Mic92: then symlink it from the profile to /etc/nix/
<clever> Mic92: i would just yank the nix expression from nixos, and then throw it into config.nix, and nix-env -iA nixpkgs.custom_nix_conf
<clever> so systemd doesnt consider it "online" until it says its online
<clever> it will need to use sd_notify and type=notify
<clever> proc and sys all have 0 byte files with real content
<clever> then reading that many
<clever> ah yeah, i remember something about nix checking the length with stat
<clever> and can then switch to the right image
<clever> i would have done that server side, the boot.php script given to ipxe gets the mac
<clever> sphalerite: dhcp has a protocol in it, to assign the hostname that the dhcp server gave it
<clever> sphalerite: i dont think systemd has any units that wait for dns to be working
<clever> fearlessKim[m]: yeah
<clever> it has a read-only mode
<clever> it may only notice it upon read
<clever> fearlessKim[m]: dce = if pkgs ? ns3 then something else pkgs.dce;
<clever> its possible you have bad sectors
<clever> hyper_ch: what files?
<clever> correct
<clever> correct
<clever> and it has enough ram
<clever> as long as nixos can boot on it, and fire up the network and sshd without user intervention
<clever> even if its on the other side of the world
<clever> you can now turn ANY linux machine into a nixos machine
<clever> ssh back in, run justdoit, reboot
<clever> and fire up sshd so you can get in
<clever> in the case of this script, it will then boot nixos from a ramdisk
<clever> and then line 31 just improperly kills the currently running os, and gives the loaded kernel control of the CPU
<clever> this loads a kernel and initrd into ram
<clever> it replaces the currently running OS with another one
<clever> then just boot, and run justdoit
<clever> build that into an installer image (kexec, iso, netboot image, nixos-install to a usb stick)
<clever> line 72 adds itself to systemPackages
<clever> line 8-30 defines some additional options you can tweak to customize it
<clever> hyper_ch: its a nixos module that you add to the imports of a nixos
<clever> hyper_ch: yes
<clever> havent seen the name before
<clever> this was a 1 byte fix: https://github.com/NixOS/nixpkgs/pull/30141
<clever> yeah, been thinking about that a bit lately
<clever> gchristensen: dang, already merged, orivej beat you to it
<clever> gchristensen: yes
<clever> that lets you override most options in nix.conf
<clever> viaken: nix-build --option build-use-sandbox true
<clever> yeah, its generated by nix
<clever> oops, wrong name on that 2nd msg
<clever> nicklaf: the entry in configuration.nix is used to generate nix.conf, when you run nixos-rebuild
<clever> viaken: nix will use whatever is in /etc/nix/nix.conf

2017-10-05

<clever> cement: there is also a nixos option for it
<clever> iqubic: the code in the current build of nixos generates the menu for all of them
<clever> sphalerite: ipxe reports its mac to the boot.php file, which then decides what to boot, based on a switch/case statement
<clever> sphalerite: one neat thing i did with this setup: https://gist.github.com/cleverca22/ffc78783ba91940d62f57cbdf9e285a3#file-gistfile1-txt
<clever> MichaelRaskin: it needs the stateVersion to continue using the "right" version for your database
<clever> MichaelRaskin: yeah
<clever> yeah
<clever> the on-disk format for postgresql databases also changed
<clever> iqubic: but applying that change would set off mitm warnings for every single client
<clever> iqubic: for example, the ssh hostkey type was changed
<clever> iqubic: backwards compatability problems
<clever> iqubic: yes
<clever> iqubic: because that would break the very things its meant to fix
<clever> iqubic: no
<clever> sphalerite: then i added the grub and ipxe, when i ported it to a laptop
<clever> sphalerite: i had originally written it with a fat32 /boot on the SD card of an rpi
<clever> sphalerite: this also works with a local /boot on each machine
<clever> sphalerite: never got around to that, and i wrote this before the initrd supported networking
<clever> sphalerite: so when grub tries to read the local hdd, it transparently gets relayed over iscsi
<clever> sphalerite: sanboot in ipxe is part of the magic, it hijacks the legacy bios api for the hdd's
<clever> sphalerite: do you see how simple line 7-10 of configuration.nix is?
<clever> csingley: -I prepends things to the search path, so the old nixos-config in $NIX_PATH survives
<clever> csingley: use -I instead
<clever> sphalerite: https://gist.github.com/cleverca22/d7132a37ea5755b60aa5 half of the config
<clever> let me find the gist
<clever> sphalerite: i did that on one of my laptops
<clever> sphalerite: another option is iscsi rootfs
<clever> yeah
<clever> sphalerite: ah, like not-os
<clever> sphalerite: but also, what kind of changes are you needing to make to this installer after it boots?
<clever> sphalerite: nixos-rebuild the small changes after boot?
<clever> sphalerite: sure
<clever> which was world-readable
<clever> ive seen a similar problem in redhat, the root password was in a log file of all input the installer received
<clever> skimming thru the comments, i think it saves the password into the hint field
<clever> nixy: makeWrapper $originalcmd $out/bin/wrapper
<clever> pie_: first, you appear to want callPackage, eggs = callPackage ./eggs.nix {};
<clever> savage: you may also need to uninstall gcc and the linker, to avoid any potential problems
<clever> graperoot: wine.override { wineBuild = "wineWow"; };
<clever> graperoot: one min

2017-10-04

<clever> yep
<clever> graperoot: what exactly does leksah do?, ive just been doing everything in vim and ghci
<clever> graperoot: ive also documented the issue on https://github.com/NixOS/nixpkgs/issues/30087, if you subscribe you will probably see when it gets fixed in nixpkgs
<clever> graperoot: this successfully builds leksah
<clever> graperoot: [clever@amd-nixos:~/apps/nixpkgs]$ nix-build -E 'with import ./. {}; leksah.override { ghcWithPackages = (haskellPackages.override { overrides = self: super: { ltk = haskell.lib.doJailbreak super.ltk; leksah-server = haskell.lib.dontCheck super.leksah-server; leksah = haskell.lib.doJailbreak super.leksah; }; }).ghcWithPackages; }'
<clever> graperoot: i'm testing a second override
<clever> then other things got updated
<clever> it probably worked when it was originally packaged
<clever> but got: Right (PlanJson {pjPlan = [PlanItem {piId = "Cabal-1.24.0.0", piType = "pre-existing", piComps = [(ComponentLib,fromList ["array-0.5.1.1","base-4.9.0.0"])]},PlanItem {piId = "QuickCheck-2.9.1-ec9a1c39266d75ed2c3314f6e846a8f11853eff43fc45db79c7256d9bfd94602", piType = "configured", piComps = [(ComponentLib,fromList ["base-4.9.0.0","containers-0.5.7.1","random-1.1-fe6ccf72ebd63a2d68570bb45b42bd08df5570c6151cb9af54907d40ef9af454"])]}], pjCabalVersion =
<clever> expected: Right (PlanJson {pjPlan = [PlanItem {piId = "Cabal-1.24.0.0", piType = "pre-existing", piComps = [(ComponentLib,fromList ["array-0.5.1.1","base-4.9.0.0"])]},PlanItem {piId = "QuickCheck-2.9.1-ec9a1c39266d75ed2c3314f6e846a8f11853eff43fc45db79c7256d9bfd94602", piType = "configured", piComps = [(ComponentLib,fromList ["base-4.9.0.0","containers-0.5.7.1","random-1.1-fe6ccf72ebd63a2d68570bb45b42bd08df5570c6151cb9af54907d40ef9af454"])]}]})
<clever> graperoot: and now it has compile errors in leksah-server
<clever> and grabs the ghcWithPackages function from the new haskellPackages, and uses override on leksah to change which ghc it uses
<clever> then it uses override to pass that overrides function to haskellPackages
<clever> then it makes a set containing the new ltk, and returns that from a self-super function stored in the overrides argument
<clever> at the deepest layer, it calls doJailbreak on ltk, which disables the version requirements in the cabal file
<clever> graperoot: testing this mouthfull of nix expression
<clever> [clever@amd-nixos:~/apps/nixpkgs]$ nix-build -E 'with import ./. {}; leksah.override { ghcWithPackages = (haskellPackages.override { overrides = self: super: { ltk = haskell.lib.doJailbreak super.ltk; }; }).ghcWithPackages; }'
<clever> you may still want to --update, to get the latest version
<clever> --add doesnt take effect until you --update
<clever> xd1le: and did you nix-channel --update ?
<clever> xd1le: did you read its man page?
<clever> looking into that ...
<clever> graperoot: it downloads version 1.0, then the cabal file demands 0.0.*
<clever> haskell-gi-overloading ==0.0.*
<clever> *** Downloading ‘https://cache.nixos.org/nar/1527b3j9abvq15hmwkq4vdyl8bzhcmslnvjpk59dhzgmb0yvlwgd.nar.xz’ (signed by ‘cache.nixos.org-1’) to ‘/nix/store/zlszbymdn9pcgvvgm550l14qpjq05ljq-haskell-gi-overloading-1.0’...
<clever> i can confirm the same problem on this end
<clever> xd1le: double-check with nix-channel --list that you gave it the right name, and there is only one channel
<clever> xd1le: your -I is pointing to a path that only exists on the host, use nix-channel instead
<clever> graperoot: so leksah never even started to build, the problem is over in ltk
<clever> graperoot: it normally has an exit code after the word failed
<clever> graperoot: was there anything else on that line?
<clever> graperoot: to start with, what package did nix say failed to build?
<clever> graperoot: you need to create an override against the package that is failing to build
<clever> graperoot: they are all sandboxed
<clever> graperoot: nix builds never see anything you install with nix-env
<clever> hyper_webirc: i wrote that before zfs had encryption
<clever> graperoot: nothing you install manualy can be used by a nix build
<clever> yeah
<clever> and it can use swap
<clever> linux defaults to 50% for a tmpfs
<clever> yeah, its trying to build the entire target on a ramdisk
<clever> xd1le: mount /nix/.rw-store -o remount,size=5g
<clever> normal gc