2018-08-03

<clever> dhess: this builds the entire image, and updates the rpi3-netboot symlink
<clever> nix-env -p /nix/var/nix/profiles/per-user/root/rpi3-netboot -f not-os/release.nix -A rpi_image -I nixpkgs=./nixpkgs/ --set
<clever> yeah, one min
<clever> dhess: but the rpi firmware is fighting back, and it doesnt even start the linux kernel half the time
<clever> dhess: ive got a netboot based not-os on my rpi that i sometimes use as an arm build slave
<clever> it will also overwrite any other patches nixpkgs was adding
<clever> dhess: the above file will fetch the patch directly from my PR, and apply it
<clever> exactly
<clever> and then systemd never tries to restart it
<clever> dhess: so the pid goes defunct, and the parent is never notified that the proccess has died
<clever> dhess: for an unknown reason, when it uses openat() (which the sandbox doesnt allow), it kills the process without actually killing it
<clever> dhess: yeah, that one does both 32 and 64bit
<clever> dhess: i believe it does, let me check it
<clever> nlyy: nixos-rebuild test -I nixpkgs=https://github.com/nixos/nixpkgs/archive/dae9cf6106d.tar.gz would run the version i have
<clever> dhess: half of the fix, the typo means it only fixes on 32bit ntp
<clever> ah, plenty of time
<clever> gchristensen: when is the next stable fork happening?, so i can get it in before then
<clever> i need to file another PR to nixpkgs to fix it fully
<clever> when i filed the pr to nixpkgs
<clever> dhess: so my fix only fixes 32bit ntp
<clever> dhess: i made a typo in the patch, because it has a seperate syscall list for 32bit and 64bit
<clever> dhess: i suspect it might be due to nixos enabling the drift file
<clever> dhess: i had also opened a pr to nixpkgs, and before i noticed the typo (it only effects 32bit ntp), it got merged!
<clever> dhess: was waiting on ntp upstream to merge the PR first
<clever> nlyy: you can also make use of nix loading files for you
<clever> nix-instantiate '<nixpkgs>' -A lib.version --eval
<clever> "18.09pre145679.dae9cf6106d"
<clever> WilliamGHatch[m]: // will merge 2 sets and overwrite when keys conflict
<clever> WilliamGHatch[m]: nixos is using @ services, mainly in containers@
<clever> WilliamGHatch[m]: i think you need to start syncthing@name
<clever> thoughtpolice: this could come in handy
<clever> > writeCBin "name" "int main(int argc, char **argv) { return 42; }"
<clever> oh, and there is a new writeCBin
<clever> there is also writeScript, writeScriptBin, and writeShellScriptBin
<clever> > pkgs.writeTextFile { name = "name"; text = "body"; }
<clever> > pkgs.writeText "name" "body"
<clever> Taneb: its in pkgs
<clever> "2018-08-02 22:30:35 bedroom temp: 28.38c(83.08f), kitchen: 27.31c(81.16f), living room: 27.12c(80.83f), outdoor: 20.25c(68.45f), server: 30.75c(87.35f) VCC: over 4.5 volts portb: 00000000"
<clever> i need to get off to bed, getting late now
<clever> base ==4.10.*
<clever> Setup: Encountered missing dependencies:
<clever> srk: yep, and i can see that extra-statsd fails to build now, so there is no point in trying to update
<clever> then you get this
<clever> and if you keep the nixops config seperate from the nixos config, you can just eval the nixos configs like this
<clever> correct
<clever> that will override the NIX_PATH uses at deploy
<clever> as for pinning the nixpkgs rev, use -I with create and/or modify
<clever> kalbasit: one machine i'm working on uses tarsnap to backup the state file at regular intervals
<clever> kalbasit: its generally recomended to just have a central ec2 instance you run nixops on and keep the state in
<clever> but any virtualbox images it makes will exist within the normal virtualbox paths
<clever> kalbasit: ~/.nixops is the nixops state
<clever> removing httpd.enable should also solve the error
<clever> but id recomend nginx over httpd
<clever> and thats more of a nixos issue, enabling httpd requires you to also set an adminAddr
<clever> v0|d: wrap it with ( and )

2018-08-02

<clever> rain1: what about the https://nixos.org/nix/install script?
<clever> aristid: lol
<clever> ah
<clever> so its an intermitent failure, that caused it to not actually fail the build?
<clever> was the source changed to fix the failure?
<clever> aristid: --check, and why do you want to rebuild?
<clever> most of my other wireless usb devices (keyboard, mouse, headset) claim to always be present, even if the wireless link is broken
<clever> and some games only check for that at startup
<clever> infinisil: so the ev input device doesnt exist until i turn on the controller
<clever> infinisil: the usb receiver will dynamicaly (de)register HID devices, based on the controller(s) being wirelessly connected
<clever> infinisil: i'm using an xbox 360 controller, and the receiver does some funky things
<clever> infinisil: now its just weird things like steam claiming the controller is not detected, yet the controller can ack the warning :P
<clever> infinisil: oh, and originally, steam had trouble with my gpu drivers, but its been fixed long ago
<clever> phry: nix-store --query --deriver is how i get the .drv of a given output
<clever> infinisil: i tried again about 2 weeks ago, and it now works perfectly
<clever> infinisil: all mods where unable to render text, resulting in ui elements being 0x0 pixels in size
<clever> infinisil: a patchelfed KSP, the steam sandbox KSP, and even windows KSP under wine all had the identical bug!
<clever> infinisil: when i first got into nixos, i had a weird font problem with KSP
<clever> abueide: just like you would from the livedisk
<clever> abueide: parition, format, mount, nixos-generate-config --root /mnt, edit things, nixos-install
<clever> so, breaking it even worse, is the way to find the answer! :D
<clever> boot.kernelPackages = pkgs.linuxPackages.extend (self: super: { zfsUnstable = null; zfs = null; zfsStable =null; zfsLegacyCrypto =null; });
<clever> phry: but now that you know, you can use extend yourself to properly apply an overlay to the kernel packages
<clever> phry: so the zfs is restored
<clever> phry: its calling extend to mutate the kernel within the set, and re-create all driver modules
<clever> phry: ah, that would explain things
<clever> phry: what if you just boot.kernelPackages = {}; ?
<clever> phry: and then also nuke spl as well
<clever> phry: using `builtins.elem 1 [ 1 2 3 4 ]` you can adjust your filterAttrs to take a list of keys
<clever> phry: which channel are you on?
<clever> phry: yeah, i would expect that to hail fail
<clever> phry: same, i keep mine in a github repo
<clever> phry: yeah, i would expect that to fail hard, can you pastebin the entire configuration.nix and the output from nixos-rebuild?
<clever> and it has several isolated networks
<clever> gchristensen: i always use it as the best example of how to excersise the vlan features of the nixos test framework
<clever> dhess: yeah, you would need to copy the entire definition of callCabal2nix
<clever> dhess: this is also a handy function
<clever> > builtins.unsafeGetAttrPos "haskellSrc2nix" haskellPackages
<clever> > haskellPackages.haskellSrc2nix
<clever> dhess: line 166 appears to be exporting it
<clever> dhess: i think your only option is to call it yourself, check lines 173-182
<clever> phry: which will overwrite the attribute on the final set, and override the zfsUnstable within
<clever> phry: i think your best bet is to do something like, linuxPackages = self.linuxPackages // { zfsUnstable = super.linuxPackages.zfsUnstable.overrideAttrs (old: { src = ...; }); };
<clever> phry: all-packages.nix contains a linuxPackagesFor function, which takes a given kernel derivation, and generates module derivations for every module, including zfs
<clever> infandum: ah, so $sessionType will just be whatever the 1st arg to xsession was
<clever> sessionType="$1"
<clever> # Expected parameters:
<clever> # $1 = <desktop-manager>+<window-manager>
<clever> 15719 ? S 0:00 /nix/store/8zkg9ac4s4alzyf4a8kfrig1j73z66dw-bash-4.4-p23/bin/bash /nix/store/3akbkdg5qzn8kc4dkmk7qydzkxdqybm6-xsession xfce
<clever> i'm a bit fuzzy on the exact value, let me check
<clever> ugly, but it would work, even when you change your session at the login page
<clever> so you could maybe do: services.xserver.displayManager.sessionCommands = '' if [ $sessionType == xmonad ]; then .... fi '';
<clever> infandum: i think $sessionType will be set at this point
<clever> infandum: then you can just use a bash if statement inside there
<clever> infandum: i believe some bash env vars will contain the session name
<clever> tilpner: it could be done either on the host, or maybe apparmor
<clever> tilpner: thats one solution to secrets in the store
<clever> tilpner: if you -r /nix/store, or even just disallow reading /nix/store, then you can only open things if you know the name
<clever> those extra stores can still be optimized, but wont share with the original or eachother
<clever> try the above nix copy and youll see what i mean
<clever> zfs dedup would then cancel out the extra disk usage it causes, as an optional step
<clever> that will setup a complete copy of the closure, that you just need to chroot or mount at the right spot
<clever> nix copy /nix/store/root --to local?root=/var/lib/name/roots/foo
<clever> another more expensive option (zfs dedup to the rescue) is nix copy
<clever> ah
<clever> tilpner: and you cant just export the entire host store to the vm?
<clever> what for?
<clever> so you need to make mount setuid, and use the user flag in fstab, and it will still limit the users to using the exact device+mountpoint in the config
<clever> on gentoo, mount is setuid, but on nixos it isnt
<clever> -rws--x--x 1 root root 39872 Dec 20 2014 /bin/mount
<clever> if mount was setuid root i believe, which it isnt on nixos
<clever> tilpner: if you add the user flag to an entry in fstab, then a user is allowed to mount it
<clever> ajs124: yeah, thats how i believe it works, fork a branch from release-18.03, then file a PR back to it
<clever> srhb: does it ever make use of /usr/bin/env?
<clever> thats strange then
<clever> and does your drv have the exact same hash as hydra?
<clever> nf
<clever> srhb: grep sandbox /etc/nix/nix.co
<clever> srhb: do you have the nix sandbox enabled?
<clever> ekleog: only 160 bits in the storepath hashes
<clever> i think it opens a shell inside emacs, that auto-runs nix-shell, something like that
<clever> iqubic: i think it was called nix-buffer
<clever> it also handles getting you autoreconf itself, so you dont need that in the inputs
<clever> carlosdagos: put autoreconfHook into the buildInputs, and nix will run that for you at the right time
<clever> carlosdagos: there is a 3rd option
<clever> iqubic: python.withPackages
<clever> when using nixops locally, you would start by just getting nixos to install normally, then you can upgrade ti to nixops
<clever> sphalerite has also been doing some work with an android tablet i believe
<clever> i have had it working on an armv6 and v7 raspberry pi before, and others have it working on aarch64
<clever> nixops would let you trivially update the tablet from another system, so then you just need to services.xserver.enable = true; and install a graphical media player
<clever> xorg is also untested under not-os, so getting graphics may be more difficult
<clever> either way, you have to find something to handle the ui and install it
<clever> ah, both nixops and not-os entirely ignore the UI perspective
<clever> nixops would be simpler
<clever> jasongrossman: id use either nixops or not-os for something like that
<clever> its a function that takes another function
<clever> yes
<clever> the 2nd is using ps to get numpy
<clever> the 1st is defining a function that takes 1 arg, called ps
<clever> stick it into the buildInputs of your nix-shell
<clever> this generates a python that already has numpy in its search path
<clever> python.withPackages (ps: [ ps.numpy ])
<clever> iqubic: drawing a blank, can you name a python package?
<clever> iqubic: python.withPackages in nix
<clever> cmcdragonkai: the above code should do what you want
<clever> > lib.splitString "." "a.b"

2018-08-01

<clever> d1rewolf: this option allows anybody in the wheel group to use sudo without a pass
<clever> d1rewolf: try `sudo -u username -i`
<clever> d1rewolf: how did you get a shell as that user?
<clever> d1rewolf: did you set isNormalUser = true; ?
<clever> so it still depends on feh, its just not in the default PATH now
<clever> and a now useless needBGPackages, that installed it system wide
<clever> jtojnar: ah, there is a seperate needBGCond that controls the running of feh
<clever> jtojnar: and nothing even uses needBGPackages now, so it could be removed?
<clever> jtojnar: looks like things have changed since i went thru and memorized all of nixpkgs: https://github.com/NixOS/nixpkgs/commit/71a8dbb956f5735030cd3982263d72f1bffdae23
<clever> worldofpeace: the root window one?
<clever> infinisil: it was a french porn site :P
<clever> infinisil: and nixos.com was not work safe for several years
<clever> so the whole point of that image util being optional is moot
<clever> jtojnar: the "none" desktop env is unconditionally enabled, and doesnt support that
<clever> jtojnar: one anoying thing ive noticed, if any of the enabled desktop envs lack support to set the wallpaper, an image util is added to systemPackages, and used to blank the root window
<clever> but since http lacks locking, it just never had that safety implemented
<clever> woffs: it probably wants to grab a lock so things cant be altered while its reading them

2018-07-31

<clever> endformationage: nice
<clever> testuser: no need for the -d, just normal nix-collect-garbage
<clever> should be safe to just remove it
<clever> testuser: i dont know of anything using that system-profiles subdir
<clever> endformationage: thats what i get with speedtest-cli
<clever> Hosted by Pioneer Wireless (Presque Isle, ME) [206.16 km]: 20.756 ms
<clever> Upload: 150.67 Mbit/s
<clever> Download: 293.44 Mbit/s
<clever> endformationage: `nix run nixpkgs.speedtest-cli` and `speedtest-cli`
<clever> endformationage: iperf or a cli speedtest would maybe go faster
<clever> endformationage: that could be a browser problem as well
<clever> ah dang, iperf3 is single-threaded, -P wont help that
<clever> endformationage: with the -P 2 flag
<clever> endformationage: have you tested it with iperf3?
<clever> electrocat: when cross-compiling, nativeBuildInputs can run on the host that is building, but buildInputs will be for the target
<clever> heh, that will do it
<clever> whole
<clever> Myrl-saki: can you gist the while file?
<clever> bigvalen: zfs list -o name,used,refer,written,type -t all
<clever> bigvalen: there are 3 types of objects within a zfs pool, filesystems, volumes, and snapshots
<clever> bigvalen: this option will auto-create, and destroy many snapshots, on every filesystem you enabled it on
<clever> only on the terminal where it happened for the most part
<clever> bigvalen: ive also used kexec to reinstall nixos over a baremetal machine, without any proper remote management
<clever> symphorien: nixos tests can run without /dev/kvm but are much slower
<clever> bigvalen: the last time i encountered a datacenter like that, i reconfigured the raid controller to passthru every disk, then threw zfs at it
<clever> d1rewolf: i run unstable on all of my machines
<clever> Myrl-saki: just partition and format as normal
<clever> /dev/sde2 48M 28M 17M 63% /boot
<clever> Filesystem Size Used Avail Use% Mounted on
<clever> Myrl-saki: one of my machines has /boot on a 64mb usb stick :P
<clever> bigvalen: and it needs about 400mb on /boot
<clever> bigvalen: it only works as long as /boot remains undamaged
<clever> then you can perform operations like that send|receive with the main nixos "off"
<clever> bigvalen: add the above file to your imports section, and then youll have an option in grub to boot a rescue system
<clever> bigvalen: i used rescue_boot.nix to move my /nix from the root dataset to its own dataset, and you can also use it to apply similar operations like renaming datasets
<clever> bigvalen: grub or systemd-boot?
<clever> the metadata may take up a few kb
<clever> i typicaly skip making it, and just use pool/root and pool/nix directly
<clever> you have an extra filesystem that is just being wasted
<clever> bigvalen: rpool/root is simply not mounted
<clever> d1rewolf: qute did not change in 18.03, so no real need to update again
<clever> 18.03 also just updated
<clever> d1rewolf: its as simple as forking nixpkgs, making a new branch based on release-18.03, and then filing a PR to change the src
<clever> so its 1.3.3 with CVE patches
<clever> samueldr: oh, i see them
<clever> d1rewolf: somebody will need to backport the security update to 18.03
<clever> nixos-unstable is on 1.4.1
<clever> d1rewolf: 18.03 is on 1.3.3
<clever> d1rewolf: checking...
<clever> gchristensen: run `env` in the setup hook and grep for something you know you passed to nix-shell ?
<clever> nixos-unstable will get the latest updates, but may sometimes be more unstable
<clever> d1rewolf: but if your on the 18.03 channel, you likely wont get such updates
<clever> d1rewolf: what did you change that you are epecting to see update?
<clever> gchristensen: and the deps become propagated deps, so when your hook is in the buildInputs, it will dynamically add everything from deps
<clever> gchristensen: substitutions becomes the env vars for the runCommand, so you can also substitutions = { foo = "whatever"; }; and then use @foo@ in the hook too
<clever> gchristensen: and because it runs substituteAll, you can use @out@ easily
<clever> gchristensen: yep
<clever> pkgconfig will scan every build input, and add them to the pkgconfig search path
<clever> cmake will swap out the entire configure phase
<clever> in the case of autoreconfHook, it adds its own function to the preconfigure phases
<clever> preConfigurePhases+=" autoreconfPhase"
<clever> the script is free to mutate the bash scripts the stdenv uses
<clever> gchristensen: and the stdenv will source that script as it walks the buildInputs
<clever> gchristensen: autoreconfHook, cmake, python, and others, have a nix-support/setup-hook in their output
<clever> cat autoreconfHook/nix-support/setup-hook
<clever> nix-build '<nixpkgs>' -A autoreconfHook -o autoreconfHook
<clever> one sec
<clever> nix copy supports s3
<clever> why do you want to rebuild it when you already have a local copy?
<clever> but you can use nix-store --delete to remove the local copy
<clever> you cant really
<clever> continue
<clever> pie_: read the comment block starting at line 139
<clever> pie_: it will also change some compatability mode flags, so it can emulate older versions
<clever> pie_: looks like it doesnt actually change the version, it just falsifies the output from glGetString(GL_VERSION)
<clever> ekleog: for x in $(ls *.nix); do
<clever> galaxite: thats likely just X starting, then crashing, check the journal for errors
<clever> ldlework: ldconfig will never work on a nix based system
<clever> nix never uses ldconfig
<clever> you said ldconfig, not ld
<clever> ldlework: nix-shell -p freetype --run 'echo $NIX_LDFLAGS' | grep --color freetype
<clever> nix adds some -L flags to gcc, to extend the search path
<clever> ld doesnt know where freetype is either
<clever> and the cache it generates is in a global location, which is anti-nix
<clever> but ldconfig is useless at compile time
<clever> nixos doesnt have a /lib and nix cant manage a /lib directory
<clever> and that cache is only used at runtime by ld.so
<clever> but nixos doesnt even have a /lib/
<clever> ldconfig generates a cache in /lib/
<clever> ldlework: and then a wrapper around the compiler
<clever> ldlework: you may at least need a setup hook, look at cmake's hook
<clever> did you dd to the root of the usb or a partition?
<clever> galaxite: how did you flash the iso to the usb?
<clever> ldlework: probably

2018-07-30

<clever> how was that an hour ago? lol
<clever> ldlework: also, i literally just explained this (oh, an hour ago), and its still visible on my screen without scrolling up
<clever> if you didnt have the old source in your store, it would download the new url, and then notice the failure
<clever> so its just using it directly, without even checking the url
<clever> you told it that the hash hasnt changed, and it has a copy of the old source
<clever> ldlework: did you change the sha256?
<clever> add name = "something"; to your override
<clever> so you will have a new version, with the old name
<clever> that override wont change the name
<clever> (oldAttrs: { ... })
<clever> ldlework: .overrideAttrs expects a function