2019-12-09

<clever> infact, with my download speed, i could probably download an entire album faster then i could rip a cd
<clever> simpson: i did go thru a phase where i was ripping every single cd in the house, but at this point, its faster to just pirate it, rather then find the physical copy on a shelf, then re-install a cdrom drive, lol
<clever> notgne2: not-os would probably run on 64mb of ram, might want to tweak the boot order a bit though, to leave the rootfs on disk, rather then copying to ram
<clever> i dont even have a cd drive in any of my functional machines
<clever> simpson: it should work on CD's too, but then you have to burn a cd
<clever> simpson: 2019-12-08 23:12:51 < keithy[m]> note installing on old imac so cant boot form usb
<clever> simpson: yep, that works when the bios supports usb booting
<clever> so you can customize the key, after making the tarball
<clever> but if it can find a /ssh_pubkey on the host, when you run the kexec script, it will paste that into /root/.ssh/authorized_keys
<clever> by default, it doesnt add any ssh keys, so you need physical access to control it after kexec
<clever> so you can just partition, format, mount, nixos-generate-config, edit, nixos-install
<clever> once you ssh back in, it will behave just like the normal livecd
<clever> so it doesnt care what you do to the hdd
<clever> keithy[m]: the kexec script i linked above, will copy the entire nixos rootfs to ram before "booting"
<clever> keithy[m]: why wouldnt it work?
<clever> it will basically then boot the livecd, without needing any cd/usb
<clever> keithy[m]: basically, you build a kernel+initrd+bash-script with nix, copy it to another machine, and run the bash script
<clever> keithy[m]: kexec can also be used
<clever> keithy[m]: what are you intending to do?
<clever> keithy[m]: it would be simplest to do a normal chroot (not a namespace one) as real root
<clever> keithy[m]: because you could just modify /etc/shadow and claim to know the root pw
<clever> keithy[m]: the chroot stuff entirely neuters any ability to gain root
<clever> similar to a symlink
<clever> you can use `mount --bind` to place any dir at any other dir
<clever> no need for a symlink
<clever> keithy[m]: if you can `mkdir /nix` then you can just `mount --bind /home/foo/bar /nix/`
<clever> keithy[m]: sounds like a normal fs on lvm, should have no trouble writing to it, `sudo mkdir /nix` ?
<clever> keithy[m]: what does `mount` say is mounted to / ?
<clever> keithy[m]: is / truely read-only, or just a tmpfs that is lost on shutdown?
<clever> if you want to change the path, you need to re-compile EVERYHING for the new path
<clever> keithy[m]: use namespacing to give yourself a chroot with a /nix you own, nix-user-chroot can do that

2019-12-08

<clever> zeta_0: `nixos-rebuild release0.nix` ??
<clever> and LICENSE doesnt exist, so cabal fails
<clever> yes, that tells cabal to copy LICENSE when installing
<clever> zeta_0: the cabal file, not the nix file
<clever> zeta_0: you need to either remove that line, or make a LICENSE file
<clever> zeta_0: the cabal file says that you have a LICENSE file
<clever> bbl
<clever> dongcarl: because that file is a set, containing key/value pairs, and its invalid to have the same key listed twice
<clever> dongcarl: if you just want to add rules, just systemd.tmpfiles.rules = [ <my new rule here ];
<clever> dongcarl: yes, nix already merges the value from other files for you
<clever> dongcarl: either use ++ to concat the lists, or use mkMerge with several sets
<clever> ah, correction, a btrfs specific ioctl
<clever> ioctl(4, BTRFS_IOC_CLONE or FICLONE, 3) = -1 EOPNOTSUPP (Operation not supported)
<clever> das_j: reflink?
<clever> gchristensen: ive looked at how --reflink=always, and i believe it was an xfs specific ioctl, lol
<clever> scasc: ive been sticking to zfs
<clever> there are string split map, and concat functions, and that can let you add something
<clever> my OCD isnt that bad, lol
<clever> id just ignore it then
<clever> betawaffle: does it need to be indented, or is it just to make the config pretty?
<clever> betawaffle: there was plans to make nix do that automatically, but it would mess up with the binary caching if it was applied globally
<clever> aterius: yeah, niv should work nicely there
<clever> but that default profile cant do system level things
<clever> nixos also has that profile
<clever> that would return a version of pkgs that obeys the config flag
<clever> to write to it, import <nixpkgs> { config.retroarch = something; }
<clever> kolbyjcrouch: if you want to read it
<clever> kolbyjcrouch: pkgs.config.retroarch ?
<clever> any tools you run at build time go into native
<clever> yeah
<clever> where does it say that thunderbird depends on nasm?
<clever> that was a typo
<clever> -A
<clever> lovesegfault: nix-shell -a pkg

2019-12-07

<clever> jjulianc: if you have write permission to /nix/ then it wont need to use sudo to install
<clever> and also set wantedBy
<clever> systemd.services.something.script = "${pkgs.something}/bin/something --config ${configfile}";
<clever> systemd.services.something.script = "
<clever> __marlene__: you may need nixos to auto-generate the entire unit, and ignore the one it ships with
<clever> but thats for when nixos is auto-generating a unit for you
<clever> usually, thats done with systemd.services.something.path = [ pkgs.iputils ];
<clever> you need to add iputils to the path
<clever> thats better
<clever> __marlene__: also, nothing happens when you @clever, so i dont notice the messages
<clever> andreoss: check the docs for dockerTools.buildLayeredImage
<clever> __marlene__: systemd stuff must go there, not nix-env or systemPackages
<clever> __marlene__: and i think you then need to add it to systemd.packages
<clever> __marlene__: add an echo to it, does anything print?
<clever> __marlene__: what happens if you use that override?
<clever> __marlene__: you could just set postInstall
<clever> __marlene__: override the derivation to put the systemd unit at a diff path within $out
<clever> aleph-: if you add options = [ "nofail" ]; to the fileSystems entry, then systemd wont fail horribly when it fails to mount
<clever> there is also a propagatedNativeBuildInputs
<clever> and i should get to bed, its nearly 2am now
<clever> not sure, i havent looked into the internals of the python code yet
<clever> lovesegfault: depending on how things are done in python, the normal buildInputs may not wind up in PATH
<clever> 2019-12-07 01:40:04 < clever> Miyu-saki: so you can simulate some cross-compile issues, without actually cross-compiling
<clever> 2019-12-07 01:39:49 < clever> Miyu-saki: there is an optional strict mode, that wont put the normal buildInputs into PATH
<clever> lovesegfault: also, your already adding flac in both files, so it should already be present
<clever> and python packages propagate the PYTHONPATH, so the non-check-beets version may override the check-beets
<clever> and the check version of beets depends on the beets-check
<clever> so beets-check depends on the non-check version of beets
<clever> lovesegfault: but the defaults beets doesnt have enableCheck
<clever> lovesegfault: beets-check depends on beets, which depends on beets-check, that should fail
<clever> lovesegfault: you also have a cycle, sorta
<clever> lovesegfault: you can also edit an existing gist
<clever> lovesegfault: just put all of the files in one gist
<clever> Miyu-saki: so you can simulate some cross-compile issues, without actually cross-compiling
<clever> Miyu-saki: there is an optional strict mode, that wont put the normal buildInputs into PATH
<clever> because `-p A` generates a derivation with buildInputs = [ A ];
<clever> i think so
<clever> but thats not needed for dependency tracking
<clever> propagatedBuildInputs just automatically adds it to the buildInputs of future derivations
<clever> it sounds like you dont need propagatedBuildInputs
<clever> have you tried just plain buildInputs ?
<clever> ah
<clever> if you expect to run them at "build time"
<clever> lovesegfault: binaries should probably be in the native inputs list
<clever> lovesegfault: are you expecting a binary or a library?
<clever> enless A also propagates B
<clever> if you open a shell with a built copy of A, you wont get C
<clever> only if you open the shell suitable for building A
<clever> lovesegfault: is it in the propagatedBuildInputs of something that is in beet's buildInputs?
<clever> lovesegfault: where are you expecting them to propagate to?
<clever> lsblk if i just care about dev names
<clever> i use fdisk if i want to see parititon type codes, table type, and positions
<clever> or just use `lsblk` and tell fdisk what to list
<clever> infinisil: ramdisks, they show up if a certain kernel module is loaded
<clever> yorick: thats supposed to be a symlink, moving there will break things
<clever> juxiemaotu: how long have you waited for it to finish downloading?
<clever> aleph-: this is an rpi3, with custom firmware
<clever> yeah, that borks everything, lol
<clever> [ 0.000000] arch_timer: cp15 timer(s) running at 0.00MHz (virt).
<clever> i think 0 ms have passed? lol
<clever> [ 0.000000] [<801a0c2c>] (clocks_calc_max_nsecs) from [<80c0ff28>] (sched_clock_register+0xcc/0x2f4)
<clever> eek, what have i done now? lol
<clever> [ 0.000000] Division by zero in kernel.
<clever> aleph-: try an older generating in the bootloader?
<clever> aleph-: did you change anything?
<clever> aleph-: yes, without that, it wont be able to find the root disk
<clever> aleph-: boot.initrd.availableKernelModules = [ "nvme" ];
<clever> aleph-: did you tell nixos to include nvme support in the initrd?
<clever> slack1256: the nixos manual has an example of how to get a shell that can build kernel modules
<clever> aleph-: is the disk on usb, sata, or nvme?
<clever> evanjs: 5.4 is also in unstable
<clever> and return a path
<clever> lovesegfault: all <nixpkgs> does, is look for nixpkgs in $NIX_PATH
<clever> lovesegfault: replace <nixpkgs> with ./.
<clever> evanjs: you shouldnt need an mkForce
<clever> lovesegfault: -A can only accept an attribute path, you want -E
<clever> ,unstable evanjs
<clever> evanjs: it will only exist in nixos-unstable, but you can still mix that into stable
<clever> evanjs: rather then override linux_latest, just set boot.kernelPackages to linuxPackages_5_3

2019-12-06

<clever> pamplemousse: not sure, i havent looked that closely at the python stuff
<clever> pamplemousse: pip likely wont play nicely with nix, can you try ignoring pip?
<clever> pamplemousse: but you can likely still import it if you run python in that shell
<clever> tobiasBora: after you update your channels, it will update nix
<clever> tobiasBora: or set `sandbox = false` in nix.conf
<clever> tobiasBora: the work-around is to --option sandbox false
<clever> tobiasBora: i dont think the fixed nix is in nixpkgs yet
<clever> lordcirth_: yeah
<clever> tobiasBora: already known and fixed, one min
<clever> lordcirth_: probably
<clever> lordcirth_: you want -A netboot.x86_64-linux
<clever> lordcirth_: yes
<clever> lordcirth_: run `nix repl ~/gitRepos/nixpkgs/nixos/release.nix` and then eval `netboot`, you should see that it is an attribute set containing many builds
<clever> hexo: stable wont get any version updates
<clever> > pkgs.all-cabal-hashes
<clever> selfsymmetric-pa: callHackage relies on it being in all-cabal-hashes
<clever> selfsymmetric-pa: you want callHackageDirect, which also needs a sha256
<clever> juxiemaotu: for a non-trusted user to specify his own substituters, they must already be listed in trusted-substituters, yeah
<clever> zeta_0: yep
<clever> > pkgs.hello
<clever> energizer: ^^^
<clever> oops
<clever> evils: fileSystems."/" = { fsType = "ext4"; device = "/dev/sda1"; };
<clever> just name = "whatever";
<clever> kyren: mkShell is a function that runs stdenv.mkDerivation for you, i just ignore mkShell entirely
<clever> evils: mostly out of ideas, and its now 12:01 am here, heading to bed soon
<clever> bot isnt as flexible as c++, lol
<clever> kyren: ccacheStdenv.mkDerivation
<clever> evils: not sure how you could make it better
<clever> evils: same as any other package, kicad-libraries.symbols.overrideAttrs (old: { src = something; name = "kicad-symbols-1.2.3"; })
<clever> and then do kicad-libraries.symbols
<clever> change this to callPackages
<clever> kicad-libraries = callPackage ../applications/science/electronics/kicad/libraries.nix { };
<clever> when you load that file with callPackages, it will put a set into pkgs
<clever> evils: nope, just return a set
<clever> evils: or use .overrideAttrs on a single drv from it, like any other drv
<clever> evils: it would need to accept a version and 5 hashes, which just makes it more confusing
<clever> evils: thats not a good idea, because you have to update 5 sha256's every time you change the version
<clever> evils: although, all calls of mkLib take the same version, so just remove that arg to mkLib, and keep it in the let block, ebwteen 6&7
<clever> evils: put it into the let block between 6&17
<clever> evils: and use callPackages to load the file, instead of callPackage
<clever> evils: just delete lines 18-21, and 42-50, then change 22 to a plain {
<clever> o1lo01ol1o: /var/lib/acme/

2019-12-05

<clever> i can just walk up to the kitchen, in the middle of a meeting :P
<clever> i prefer wireless, so i can be even more remote
<clever> but, its server-side echo reduction, so under high latency, it fails
<clever> fresheyeball: though google hangouts has somewhat decent echo reduction
<clever> fresheyeball: yeah, that happens any time you dont use headphones
<clever> fresheyeball: i know some people that wear a headset like the G533 around their neck, and use normal desk speakers
<clever> fresheyeball: cant really fit a hat over or under the G533
<clever> but no feedback when it does fail
<clever> less confusion for apps (the device doesnt vanish)
<clever> only real problem (both good and bad), is that the alsa device is still present and accepting data, even if the headset disconnects
<clever> fresheyeball: nixos thinks its just a plain old usb sound card in alsa
<clever> fresheyeball: a usb dongle
<clever> and better range too
<clever> stereo speakers + mic, something bluetooth cant do, lol
<clever> fresheyeball: ive been using a logitech G533 for a while now
<clever> fresheyeball: also using pulse full?
<clever> on both ends of the bluetooth link
<clever> fresheyeball: ive also heard that each bluetooth profile, needs specific support from the hardware
<clever> fresheyeball: in the configuration tab of pavucontrol, you must set it to headset profile
<clever> HugoB200: youll need to figure out how its booting nixos, and mount the right thing to /boot, and fix the configuration to automount it
<clever> HugoB200: then its failing to update the bootloader config, and just boots whatever it last made default
<clever> HugoB200: is /boot mounted when you run that?
<clever> HugoB200: how are you updating it?
<clever> cmacrae: then you can use config.local.id to read the id new-main.nix was setting
<clever> cmacrae: and then beside config=, add options={local={id=lib.mkOption { type = types.str; }; }; };
<clever> cmacrae: the whole contents of configuration.nix should be moved into a config= key, so it should return { config = { ... }; }
<clever> stagboot: python3Packages
<clever> stagboot: nixos.pythonPackages.mutagen
<clever> and _module.args.domain is a normal nixos option, to let you do { pkgs, lib, domain, ... }: in any module
<clever> cmacrae: if you define config for a machine called "defaults", nixops will apply it to every machine in the cluster
<clever> cmacrae: its in the main attributeset that main.nix returns
<clever> cmacrae: then compute defines options and config, and options makes local.id a valid option, config then uses it
<clever> cmacrae: for example, lines 19-29 of main.nix can do: compute1 = { imports = [ ./compute/configuration.nix ]; local = { id=; hostid=; ... }; };
<clever> cmacrae: and instead of _module.args, you can also just define your own custom options
<clever> cmacrae: same for hardware-configuration.nix, just put a path in the imports, dont import it yourself
<clever> that breaks everything
<clever> rather then the nixos config
<clever> cmacrae: line 12 of main.nix, is passing pkgs.config to a nixos module
<clever> cmacrae: oh, i think i see the problem
<clever> cmacrae: domain can be done via defaults._module.args.domain = domain;
<clever> cmacrae: line 11 of main.nix, you can do just net1 = ./net1/configuration.nix
<clever> cmacrae: thats only for the nixos parts, and they already default to linux in nixops
<clever> if you want `with import <nixpkgs> {}` to generate linux binaries, use { system = "x86_64-linux"; }
<clever> cmacrae: you lied to nix, and claimed the host can run linux binaries, so its running linux binaries
<clever> cmacrae: --option system is what breaks everything
<clever> cmacrae: did you use --option system?
<clever> cmacrae: which can leak darwin binaries into a linux build
<clever> cmacrae: if you do `import <nixpkgs> {}` anywhere, it will default to the host arch
<clever> betawaffle: it uses a mount namespace to isolate the rw mount to the builder, so its still ro from outside
<clever> ah
<clever> samueldr: so nix will try to GC your nix-env profile and all other nixos generations!
<clever> samueldr: if it gets ran again, anything you added to the store afterwards becomes invalid
<clever> selfsymmetric-pa: it should be in all nix-shells
<clever> when a library loads another library, it uses its own rpath, not the executables rpath
<clever> kai_w: you need to set the rpath of the libraries also
<clever> nixtacular: configurePhase = ''export makeFlags="$makeFlags PREFIX=$out"'';
<clever> > llvmPackages.openmp
<clever> pkgs/development/compilers/llvm/8/default.nix: openmp = callPackage ./openmp.nix {};
<clever> cinimod: search nixpkgs to see what references that file
<clever> cinimod: you may need to package openmp then
<clever> yep, the guest just thinks its a normal keyb/mouse
<clever> CMCDragonkai: kvm requires less config from the guest, but serial gives you better copy/paste and potentially higher res
<clever> cinimod: its possible that its not been packaged yet
<clever> cinimod: do you know the name for the .so file it noramlly ships?
<clever> > openmpi.meta.description
<clever> cinimod: does it also go by openmpi?
<clever> payas: yeah
<clever> payas: you can use boot.kernelPackages in configuration.nix to switch back to an older kernel
<clever> payas: that looks like the firmware is not compatible with the hardware
<clever> payas: just run dmesg and use grep to search it
<clever> payas: any firmware related messages in dmesg?
<clever> gchristensen: [root@router:~]# tcpdump -i enp4s2f1 ip6 -p -n | grep --color router
<clever> for*
<clever> gchristensen: this is the thing your looking ror
<clever> 02:56:29.606781 IP6 fe80::230:48ff:fec5:d2df > ff02::1: ICMP6, router advertisement, length 56
<clever> gchristensen: neighbor advertisement is something different, oh, i pasted the wrong thing above
<clever> gchristensen: what is your config file for radvd?
<clever> delroth: nix-shell is generation an rc file automatically, based on the nix expression you give it
<clever> gchristensen: i caught them with `tcpdump -i enp4s2f1 proto 58 -p -n`
<clever> gchristensen: you want to be seeing packets like this
<clever> 02:43:30.995676 IP6 fe80::d250:99ff:fe7a:8021 > fe80::230:48ff:fec5:d2df: ICMP6, neighbor advertisement, tgt is fe80::d250:99ff:fe7a:8021, length 24
<clever> gchristensen: checking my router...
<clever> delroth: at that point, your just re-implementing the stdenv, and nix-shell is a tool to run the stdenv for you
<clever> delroth: youll need to re-implement all of the -I, -L pkg-config, qt, cmake, and other things
<clever> delroth: and it will also add every buildInput to the CFLAGS automatically, for use with -I
<clever> delroth: oops, ^
<clever> gchristensen: when you run nix-shell, it will source the setup hooks in each buildInput, which can set env vars
<clever> delroth: i would just redo everything to use nix
<clever> gchristensen: any coming from the source ip of the radvd host?
<clever> delroth: also, anything nix does build, will fail if you copy it outside of a nix machine
<clever> so you must do the build under nix-shell
<clever> part of the issue, is that libraries dont really work as you would expect when installed
<clever> ah
<clever> delroth: just write a nix expression to build the thing, configure nix.buildMachines, and run nix-build
<clever> delroth: why not use nix-build?
<clever> delroth: it would be best to just configure it to run nix-shell or nix-build directly
<clever> gchristensen: use tcpdump to listen for the radvd packets
<clever> can you confirm its in the same broadcast domain?
<clever> thats fairly automated and hard to break...
<clever> gchristensen: do you know if the router is using radvd or dhcpv6?
<clever> fresheyeball: `cat /nix/var/log/nix/drvs/2q/i6b6qc4v73swpbkk16hjb6ci9775mj-invoice-06-26-19.pdf.drv.bz2 | bunzip2 | less` to read it
<clever> fresheyeball: the stdout/stderr from when the build was building
<clever> if you had the drv, you could use `nix show-derivation` and `nix diff` to recover things
<clever> not much you can do then
<clever> fresheyeball: is the output still in /nix/store? and its .drv file?