2019-07-04

<clever> gyroninja___: can you give more information about the errors your getting?
<clever> ,cache gyroninja___
<clever> iqubic: `man nix-collect-garbage`
<clever> yes
<clever> iqubic: then read it
<clever> iqubic: did you read the man page?
<clever> so if you delete the ESP (or loose the disk), your motherboard is basically bricked :P
<clever> ive even heard of cases where you cant delete an efi var entry, if the ESP it mentions doesnt exist
<clever> "it boots windows, ship it"
<clever> some even ignore the efi vars, and only boot the windows efi file
<clever> and many firmware lack a menu, and only support a single os, lol
<clever> and you must boot via efi, to configure it to boot via efi!!
<clever> but, when you move a disk to a new machine, the motherboard wont know about it, so its already a fail :P
<clever> in theory (with a usable firmware), you can use efibootmgr entirely, and manage every OS in the firmware cfg
<clever> efibootmgr deals with efi vars that point to .efi files on the ESP
<clever> os-prober detects other OS's and adds them to the grub config
<clever> thats not what os-prober does
<clever> iqubic: and check its man page
<clever> [root@system76:~]# efibootmgr -v
<clever> for that, you need efibootmgr
<clever> just find the windows specific files and delete them
<clever> but you dont need a livecd
<clever> yeah, if it gives an error like that, youll need to reboot
<clever> which will expand the vdev within sda2 to occupy the new space you gave it
<clever> and the final step, is `zpool online -e latitude-tank /dev/sda2`
<clever> you can resize the partition while its in-use i believe
<clever> dont need a live environment
<clever> `n`
<clever> thats just step one, which will move the entire system from the end of the disk to the start
<clever> and then `zpool detach latitude-tank /dev/sda5` to un-mirror it, making sda2 the only part of the pool
<clever> watch `zpool status` to see when its done
<clever> thats what attach will do
<clever> that will create a mirror, and automatically copy all data from sda5 to sda2
<clever> zpool attach latitude-tank /dev/sda5 /dev/sda2
<clever> and then, ....
<clever> after its gone, you can create a new sda2, that takes up all of the space that you can
<clever> now or later?
<clever> and sda5 is in the way of using the whole disk up properly
<clever> sda6 is at the end of the disk, it cant be resized to be bigger
<clever> yeah, that looks right
<clever> probably
<clever> iqubic: youll want to use `fdisk /dev/sda` then
<clever> iqubic: zfs is confusing gparted, and it thinks the entire disk is zfs
<clever> and another 7gig if you drop the snapshots from april and may
<clever> iqubic: you can get 2gig back by doing `zfs destroy -v latitude-tank/home@zfs-auto-snap_monthly-2019-03-01-15h03`
<clever> iqubic: what does `zfs list -t snapshot -r -o name,used,refer,written latitude-tank/home` output?
<clever> iqubic: you have 32gig worth of snapshots for /home
<clever> iqubic: journalctl --vacuum-size=1024
<clever> iqubic: can you pastebin the output of this?
<clever> zfs list -t filesystem -o name,used,referenced,logicalused,logicalreferenced,written,usedbysnapshots,usedbydataset,refcompressratio,compressratio,compression,dedup
<clever> iqubic: you may need to GC more, enough to be able to install things, or delete some snapshots
<clever> iqubic: you may need to destroy at least one snapshot first to allow that to run
<clever> iqubic: nix-collect-garbage --max-freed 1024
<clever> iqubic: and what happens when you GC?
<clever> iqubic: run gparted
<clever> i think its the other way around
<clever> sda3 is 120gig, sda4 is 470mb
<clever> you can mount 5 (which is ntfs), so you can also mount 3&4 as well (they are also ntfs)
<clever> mount /dev/sda4 -o ro /mnt/
<clever> iqubic: have you tried just mounting them and looking inside them?
<clever> assuming you have copied all files you want to keep off of them
<clever> nervengift: add single to the kernel params?
<clever> 3, 4, and 5 are all windows things
<clever> (as root)
<clever> iqubic: blkid /dev/sd*
<clever> nervengift: firefox and chrome both do that
<clever> nervengift: generally, the package should accept an env var pointing to a dir of plugins, and then you use buildEnv to merge all the plugins together, and then make a shell script wrapper around the original binary, to set that env var
<clever> Henson: nix-store -q --references /run/current-system/sw/
<clever> systemd-udev-settle.service came from the systemd package directly, so it cant be modified with systemd.services.foo
<clever> Henson: that doesnt make any sense, you want the $out of what?
<clever> Henson: buildEnv is just a perl script, that creates symlinks in $out
<clever> Henson: all derivations have a $out
<clever> hyper_ch: check the man page
<clever> send | recv them to another box
<clever> hyper_ch: i believe the options on a dataset can carry over when you send
<clever> hyper_ch: nice
<clever> and he needed the snapshot to recover the file
<clever> hyper_ch: i think half the problem, is that configuration.nix failed to save due to a lack of space
<clever> so it will take a few minutes to actually get the 2gig back
<clever> and behind the scenes, zfs has to GC the entire pool
<clever> naspool freeing 2.17G -
<clever> [root@nas:/nas/iohk]# zpool get freeing
<clever> and a % will let you delete every snapshot between a and b, inclusive
<clever> will reclaim 2.40G
<clever> [root@nas:/nas/iohk]# zfs destroy -v naspool/root@zfs-auto-snap_hourly-2019-07-03-17h00%zfs-auto-snap_hourly-2019-07-04-15h00
<clever> the written and refer columns are a hint as to which ranges you want to get rid of
<clever> due to refcounts, some blocks may be used by multiple snapshots, and used wont count those
<clever> used is how much you get back from deleting a single snapshot
<clever> this then shows every snapshot on it
<clever> [root@nas:/nas/iohk]# zfs list -t snapshot -r -o name,used,refer,written naspool/root
<clever> in this case, i have 16gig worth of snapshots on naspool/root
<clever> naspool/root 308G 291G 357G 330G 21.8M 16.9G 291G 1.32x 1.36x lz4 on
<clever> NAME USED REFER LUSED LREFER WRITTEN USEDSNAP USEDDS REFRATIO RATIO COMPRESS DEDUP
<clever> this will list every filesystem, and how much its using with snapshots
<clever> zfs list -t filesystem -o name,used,referenced,logicalused,logicalreferenced,written,usedbysnapshots,usedbydataset,refcompressratio,compressratio,compression,dedup
<clever> each option is the number of backups to keep at that level
<clever> Henson: you may need root
<clever> Henson: even more fun, you can use mkdir in the snapshot dir, to create snapshots
<clever> each filesystem has its own snapshots and its own .zfs
<clever> iqubic: then you want /home/iqubic/.zfs/
<clever> iqubic: is /home/iqubic its own dataset in zfs?
<clever> Henson: the .zfs directory is weird, is exists, but isnt visible in any directory listing
<clever> and it will auto-mount it (read only) for you
<clever> but if path/to/dataset is mounted at /path, you can also just look in /path/.zfs/snapshot/snapshot
<clever> yeah
<clever> mount -t zfs path/to/dataset@snapshot /mnt/
<clever> Henson: no need to clone a snapshot to look at it
<clever> mkaito: zfs snapshots are taken every 15mins automatically, so you dont have to obsessively make commits
<clever> iqubic: yes
<clever> iqubic: you can just poke around in /.zfs/snapshot/ and find your old configuration.nix
<clever> iqubic: all snapshots are auto-mounted under /.zfs/snapshot/
<clever> iqubic: oops, just /.zfs/snapshot/
<clever> iqubic: ls -l /.zfs/snapshots/
<clever> iqubic: is the root fs dataset snapshots?
<clever> iqubic: what filesystem is the snapshot made from?
<clever> jD91mZM2: why are you trying to generate paths from strings?
<clever> jD91mZM2: / + "/foo"
<clever> and requireFile just gives an errror explaining how to load it manually
<clever> Netsu: yes
<clever> Netsu: the name of the derivation has to match the name of the thing your adding as well
<clever> Netsu: then you need hashMode = "recursive"; on the requireFile call
<clever> Netsu: what did you set hashMode to when calling requireFile, and is the target a file or directory?
<clever> Netsu: let me double-check something...
<clever> Netsu: the whole point of requireFile is to throw an error, that explains how to add the file with nix-prefetch-url or nix-store --add-fixed
<clever> Netsu: yeah, --flat is file only, fetchurl is also limited to files
<clever> ambro718: yes
<clever> ambro718: and when nixos boots, it will automatically reuse the passphrase on each device
<clever> ambro718: when you create the luks volumes, just give both the same passphrase
<clever> Henson: ^^
<clever> > lib.concatMapStringsSep "\n" (n: "str is ${n}") [ "a" "b" "c" ]
<clever> > lib.concatStringsSep "\n" [ "a" "b" "c" ]
<clever> Netsu: did you try nix-hash --flat ?
<clever> hyper_ch: there is a types.nullOr types.path
<clever> fresheyeball: how is it not working?
<clever> fresheyeball: git bisect --reset
<clever> fresheyeball: then repeat testing and running good/bad after each test
<clever> fresheyeball: checkout the good rev, and run `git bisect good`, then checkout the bad rev, and run `git bisect bad`
<clever> bisect nixpkgs to find out where
<clever> then a default must have changed somewhere
<clever> only the entry under services.postgresql can properly start it on nixos
<clever> fresheyeball: then postgresql wont be running properly
<clever> fresheyeball: services.posgresql.enable = true;
<clever> fresheyeball: bisect time!

2019-07-03

<clever> fresheyeball: is postgresql actually running?
<clever> stites: disabledModules, but its probably better to find out why its finding dups
<clever> switchy: maybe the #zfsonlinux channel knows more?
<clever> switchy: i generally go shared, not much benefit to static
<clever> fresheyeball: you may need to set an env var to control where the server is
<clever> zacts: you could just flag macos as unsupported and let somebody else do it later
<clever> fresheyeball: are you running the client or daemon?
<clever> grub only of course
<clever> stites: and configure it to boot without using efi vars
<clever> stites: if you mount the EF02 to /boot/ and use boot.loader.grub.efiInstallAsRemovable then it will treat the disk like a usb stick
<clever> stites: go back to grub!
<clever> stites: then efi will never work
<clever> stites: blkid /dev/sdc1
<clever> stites: what FS is /boot/ ?
<clever> stites: if you dont boot via efi, then you cant configure efi
<clever> stites: double-check the whole path on your end, and see if it looks right
<clever> stites: and there are signs of grub within the file, on my end
<clever> [nix-shell:~]# strings /boot/EFI/BOOT/BOOTX64.EFI | grep -i grub | head
<clever> grub_mod_fini
<clever> grub_mod_init
<clever> Welcome to GRUB!
<clever> [root@system76:~]# nix-shell -p
<clever> and then that path witnin the partition (which is mounted to /boot) exists
<clever> -rwxr-xr-x 1 root root 119K Oct 29 2017 /boot/EFI/BOOT/BOOTX64.EFI
<clever> and this partition has that uuid
<clever> [root@system76:~]# blkid /dev/nvme0n1p1
<clever> /dev/nvme0n1p1: UUID="7DBC-2698" TYPE="vfat" PARTUUID="27c99b08-455d-4dfe-a44f-6150cbc09ef8"
<clever> in my case, its looking for a partition with a given uuid, and then a .efi file on that
<clever> Boot0004* UEFI OS HD(1,GPT,27c99b08-455d-4dfe-a44f-6150cbc09ef8,0x800,0x100000)/File(\EFI\BOOT\BOOTX64.EFI)..BO
<clever> stites: can you pastebin `efibootmgr -v`'s output?
<clever> stites: one min
<clever> boot.loader.grub.enable vs boot.loader.systemd-boot.enable
<clever> stites: just set the right enable flags in configuration.nix
<clever> stites: nope
<clever> stites: while systemd-boot is just a dumb (efi only) bootloader
<clever> stites: grub is practically an entire os, with a wide range of features and a fairly rich config language and interactive menu and repl
<clever> stites: i prefer grub, more familiar with it and it has more features
<clever> philipp[m]: yep
<clever> philipp[m]: staging gets merged into master, and releases are cut from master every 6 months
<clever> Henson: import (runCommand "unpacked" {} ''unpackFile ${./foo.tar.gz} ; mv -vi $sourceRoot $out'') {} maybe?
<clever> Henson: and you need to import a default.nix within it?
<clever> Henson: why does it need to be fetchTarball?
<clever> Henson: what about importedPackages = import (fetchTarball { url = ./package.file.tar.gz; }) {}
<clever> Henson: paths already do that, src = ./path/to/thing;
<clever> tokudan: you want lib.optionalString
<clever> tokudan: mkIf returns a special attrset, that the module system will dynamically ignore
<clever> tokudan: oh, yeah, mkIf doesnt work like that
<clever> tokudan: try deleting line 19 and see what happens, then try 15, 13, and 7, one at a time
<clever> growpotkin: if /var/lib/myservice/mydb.sqlite doesnt exist, copy it from ${./mydb.sqlite}
<clever> growpotkin: i would just use the prestart on a systemd service for that
<clever> growpotkin: what is the main purpose for those files? and do they have to be synced between things?
<clever> stites: that sounds like a bios problem
<clever> stites: what is stopping you from selecting it?
<clever> and if /boot isnt mounted, it cant update /boot at all
<clever> stites: if `nixos-rebuild boot` is failing, it wont update /boot to remove it
<clever> there is likely a duplicate device node in /dev/ causing it to get confused
<clever> stites: is `boot.zfs.devNodes = "/dev";` set in your config?
<clever> stites: and if you remove the `-d /dev/` what happens?
<clever> stites: and if you try to import the pool the same way poolImport does, what happens?
<clever> stites: and if you run `zpool import` what does it say?
<clever> stites: and what is the definition of poolReady and poolImport?
<clever> stites: the problem is in systemd, so the initrd debug flags wont help much
<clever> stites: read the /etc/systemd/system/zfs-import-tank.service file
<clever> stites: thats well into stage 2, its not a problem within the initrd
<clever> stites: how did you get to that shell? is zfs the root device?
<clever> stites: are you booted into the initrd?
<clever> stites: because init should be a file
<clever> stites: while booted into the initrd
<clever> stites: ls -l /init
<clever> Henson: ln -sv ${<nixpkgs>} $out/foo
<clever> Henson: nix-instantiate --find-file nixpkgs
<clever> stites: `boot.trace` will also make it print everything as it does it
<clever> stites: then read /init to see what its trying to do
<clever> stites: if you add boot.shell_on_fail, it will allow you to get a shell inside the initrd to debug things
<clever> stites: read the stage1 script in the initrd and see how its trying to import the pool
<clever> /issue
<clever> laalf: thats why i opened the bug
<clever> laalf: it should just work automatically
<clever> turion: that gets ~7 of the deps, and you can just keep following the example for each one that fails
<clever> turion: oops, nix-build -A node-editor
<clever> laalf: thats the simplest option
<clever> turion: https://gist.github.com/3ff0c3d4053c4c6dc913c087618ed646 and `[clever@amd-nixos:~/apps/luna-studio]$ nix`
<clever> laalf: i dont think the fix is in nix master or nixos-unstable yet
<clever> switch wont work in recovery mode
<clever> stites: you probably want `nixos-rebuild boot`
<clever> stites: why is dbus not running?
<clever> turion: almost done
<clever> called without required argument 'luna-lexer',
<clever> ../common/api-definition ?
<clever> called without required argument 'luna-api-definition',
<clever> cocreature: callCabal2nix doesnt care about that and still works
<clever> turion: which cabal file is the main thing you want to build?
<clever> turion: link?
<clever> turion: is the source open?
<clever> turion: have you tried haskell.packages.ghcjs.ghcWithPackages and just skip stack?
<clever> requireFile would want the --flat hash
<clever> Netsu: nix-hash
<clever> requireFile saves cpu time, by telling nix the hash ahead of time
<clever> nix must know the hash of the directory to compute $out
<clever> even if its another drv you depend on
<clever> any time you do src = ./something;, it must hash the entire directory on every eval
<clever> devalot: it sounds like he needs the 2gig files at build time, so removing them wont work
<clever> Netsu: pkgs.requireFile may work
<clever> Netsu: what is making the current directory be over 256mb?
<clever> exarkun: how did you include it in your shell.nix?
<clever> s/main/may/
<clever> and nixpkgs expects an overlay to take 2 args
<clever> Henson: an overlay is a function that takes a set and returns a 2nd function, that takes a 2nd set
<clever> Henson: nixpkgs is a function that takes a set, that main contain overlays and config
<clever> GiGa: was pointing to https://nixos.org/nixos/options.html#microcode
<clever> GiGa: ^^
<clever> typetetris: yeah, you dont need the profile.d thing on nixos
<clever> typetetris: thats your problem
<clever> typetetris: is /run/wrappers/bin in $PATH?
<clever> typetetris: what does `type sudo` report?
<clever> growpotkin: you probably want runCommand
<clever> GlennS: nscd should obey the ttl in the dns records, so that would be upstream config
<clever> allenj12: yes
<clever> allenj12: does `iwconfig` show the card?
<clever> allenj12: sudo doesnt affect >, try `sudo -i`
<clever> -e Exit immediately if a command exits with a non-zero status.
<clever> pie__: All of the single-character shell options documented in the description of the set builtin command can be used as options when the shell is invoked. In addition, bash interprets the following options when it is invoked:
<clever> oldandwise: but you can just implement it! lol
<clever> > builtins.foldl' (s: _: s * 2) 1 (lib.range 1 3)
<clever> oldandwise: odd, i cant find that anywhere...
<clever> > builtins.foldl' (a: b: a+b) 1 [ 2 3 ]
<clever> > builtins.foldl'
<clever> allenj12: wpa_passphrase netname password >> /etc/wpa_supplicant.conf, and restart the daemon
<clever> allenj12: i manage /etc/wpa_supplicant.conf without nix, to keep passwords out of /nix/store/

2019-07-02

<clever> codedmart: strings are already of the right type for that, builtins.readFile is all you need
<clever> i'm not sure what i did to break dpms, but i need to use that to turn the screens back off when its night
<clever> karetsu: there is also `xset dpms force off`
<clever> i dont remember exactly what i did, but my desktop never goes into powersave now
<clever> karetsu: i notice chrome spewing this every time i (un)pause
<clever> [6893:7229:0702/075307.211310:ERROR:power_save_blocker_x11.cc(330)] No response to Inhibit() request!
<clever> checking the stdout of firefox may help
<clever> some programs try to use dbus to talk to xscreensaver, to negotiate things, and fail if its missing
<clever> `xset dpms` is the raw command to adjust it within xorg
<clever> karetsu: ive found that simply installing xscreensaver radically changes the behaviour in that region, and also gives you options to control it
<clever> m1cr0man: and also updata name= to have the new version, so you dont get confused when 4.0 contains a 3.0 src
<clever> m1cr0man: you probably want qemu.overrideAttrs (old: { src = something; })
<clever> Netsu: yeah, that cleans up all kinds of junk, like .git
<clever> Netsu: when doing src = ./.; it will always have the .git
<clever> nothing is the answer!
<clever> ack
<clever> 17 my @args = split " ", $cmd;
<clever> arianvp: what is perl doing to do with these quotes... https://gist.github.com/cleverca22/27743f4d5efcba4d078ca49547bdb534
<clever> arianvp: and oauth2_proxy is failing in weird ways again
<clever> invalid value "'168h0m0s'" for flag -cookie-expire: parse error
<clever> arianvp: i can also see that working nicely in a load-balancer situation