2019-01-07

<clever> gchristensen: i typically use `nix-store -r /nix/store/foo --add-root result --indirect`
<clever> trevthedev: what happens if you `nix-build '<nixpkgs>' -A unity3d` ?
<clever> same
<clever> infinisil: the changes do involve cross-compile
<clever> make-derivation: don’t add host suffix if there is no c compiler
<clever> a56fe056ece1d7c0b384a08467408ded507573c7 is the first bad commit
<clever> Bisecting: 1907 revisions left to test after this (roughly 11 steps)
<clever> infinisil: yep, reproduces
<clever> yeah, thats also a good question
<clever> Taneb: this builds hello.exe, when it isnt failing with infinite recursion
<clever> > pkgsCross.mingwW64.hello
<clever> Taneb: yes
<clever> Dedalo: plain xfce with focus follows mouse
<clever> using multiple types can save you from having to escape, when the mix works right
<clever> though nix treats ''' as '' ', rather then ' ''
<clever> > ''bashvar='--foo="bar baz"' ''
<clever> > ''bashvar='--foo="bar baz"'''
<clever> >> ''bashvar='--foo="bar baz"'''
<clever> you can also mix all 3 types of quotes
<clever> ,escape" dmj`
<clever> that name looks familiar...
<clever> https://github.com/NixOS/nixops/pull/665 recursively does it
<clever> this mutates the NIX_PATH for a single file being imported
<clever> nixops also has a recursive one
<clever> but my example isnt recursive
<clever> and i have an example in one of my gists
<clever> i know it used scopedImport
<clever> gchristensen: was it the one you wrote?
<clever> so every image has a unique passphrase, and only the gpg pubkey and passphrase ciphertext are in the store
<clever> the name should mostly match the original, just to make things simpler to debug
<clever> lassulus: also add a `name = "something.deb";` to the fetchurl
<clever> iqubic: depends on how you use it, how many tabs you have open, and what sites your visiting
<clever> help when programs need more then 8gig of ram
<clever> it wont make the cpu any faster
<clever> your welcome
<clever> the help explains everything
<clever> what is the very last thing in the expert mode help?
<clever> expert mode changes the command set, so `n` does something different
<clever> n change partition name
<clever> check the help again, and youll find this command:
<clever> if you check the help in fdisk (`m`) then youll see an `x` option to go into expert mode
<clever> if the priority is the same, it will split writes 50/50 between the 2 devices
<clever> 33 #{ device = "/dev/disk/by-partlabel/swap2"; priority = 10; }
<clever> some of my older swap devices
<clever> 32 #{ device = "/dev/disk/by-partlabel/swap1"; priority = 10; }
<clever> "larger" numbers (-1 is larger then -2) are higher priority
<clever> so it prefers the 1st device you enable, and uses them in order of swapon
<clever> the default priorities are negative, going further negative with every call to swapon
<clever> or free -m
<clever> cat /proc/swaps
<clever> but swapon will fail if it hasnt been formatted
<clever> nixos-rebuild just runs swapon
<clever> you also have to run mkswap on it, to format it as a swap partition
<clever> yeah
<clever> priority only matters if you have more then 1 swap
<clever> thats how mine is setup
<clever> 30 swapDevices = [
<clever> 31 { device = "/dev/nvme0n1p3"; priority = 10; }
<clever> like the old one you removed
<clever> add it back under swapDevices
<clever> iqubic: you want linux swap, use `t` to change the type
<clever> ottidmes: yeah, something about zfs not properly handling the new kernel seeing the "uncleanly shutdown" fs, before the old kernel has its state restored
<clever> 2019-01-06 21:51:30 < clever> so it should be as simple as `fdisk /dev/sda` and then `n` and hitting enter at nearly everything
<clever> if the rootfs isnt encrypted, not much
<clever> correct
<clever> gchristensen: but zfs also doesnt support hibernation, so ive got no need to make it work
<clever> gchristensen: i dont believe it supports hibernation
<clever> the randomEncryption flag doesnt ask for a password on bootup, and just uses a new (and random) encryption key every time
<clever> swapDevices.*.randomEncryption solves the need for you to enter the swap password at bootup
<clever> and then persist for days, or even years
<clever> iqubic: encryption keys and passwords can potentially leak into swap
<clever> it comes out to 8192mb of gap between the end of sda5, and the start of sda6
<clever> and then just do some math
<clever> 8192.00048828125
<clever> > 16777217 * 512 / 1024 / 1024
<clever> iqubic: take the start sector of sda6, and the end sector of sda5
<clever> iqubic: its clearly visible in the gparted output
<clever> ah, then its not the problem, but running it on sda5 is just going to be worse
<clever> iqubic: just run gparted, with zero arguments
<clever> so it will only show the contents of a single partition
<clever> that told it to open a single partition, not the device
<clever> iqubic: thats your problem
<clever> GPT
<clever> siraben: 2019-01-06 21:42:54 < iqubic> fdisk: http://dpaste.com/1PZ4SY6
<clever> so it should be as simple as `fdisk /dev/sda` and then `n` and hitting enter at nearly everything
<clever> iqubic: checking the math, i can see an 8gig gap between sda5 and sda6, which fits what you said
<clever> not sure, would need to check into the gparted source to know more
<clever> try just `fdisk /dev/sda` and then `n` to make a new partition, it should default to the free space
<clever> i'm guessing gparted is just being weird
<clever> the automatic snapshots can make it slower
<clever> thats fairly normal
<clever> the zpool history should give more clues
<clever> iqubic: and `zpool history | head`
<clever> iqubic: what does `fdisk -l /dev/sda` report?
<clever> try a different drive in the dropdown in the top-right
<clever> iqubic: there is no trace of ntfs on that drive
<clever> iqubic: can you screenshot gparted?
<clever> ncdu can only show filesystem stuff, zvols and unpartitioned wont be seen
<clever> iqubic: ndcu wont show unpartitioned space, for that, you want gparted
<clever> ottidmes: cant remember exactly why i added that
<clever> "When I come back I'll be needing some help getting a swap partition created."
<clever> after you shrink the ntfs
<clever> dont see any problem there
<clever> windows should be able to shrink it just fine
<clever> iqubic: just run gparted on linux end
<clever> iqubic: depends heavily on how you use the machine and how much you go over 8gig
<clever> zvols behave fairly differently
<clever> zfs doesnt really have partitions
<clever> iqubic: for an ssd, it doesnt really matter where on the disk a partition is
<clever> zfnmxt: swap files dont work on zfs, and swap files usually have worse performance
<clever> iqubic: the free space will always be at the end of whatever partition your shrinking
<clever> iqubic: `free -g`
<clever> iqubic: ive got 32gig of ram, 64gig of swap, and regularly have over 1000 tabs open
<clever> iqubic: depends on how much ram you have and how obsessesed with tabs you are, lol
<clever> or override the default, so it never tries to use /var/empty (which it thinks is /usr)
<clever> duairc: yeah
<clever> zfnmxt: ssdm uses an absolute path to xorg.conf, in the ssdm config file
<clever> iqubic: that also works
<clever> duairc: the cmake files are probably trying to mess with /usr then
<clever> and this will list every snapshot on amd/home
<clever> zfs list -t snapshot -r -o name,used,refer,written amd/home ; df -h /
<clever> this will list every zvol and filesystem, and the `USEDSNAP` tells you how much the snapshots within it are eating
<clever> zfs list -t volume,filesystem -o name,used,referenced,logicalused,logicalreferenced,written,usedbysnapshots,usedbydataset,refcompressratio,compressratio,compression
<clever> that helps with bulk deleting of snapshots
<clever> of note, `zfs destroy pool/dataset@snap1%snap10` will delete all snapshots between snap1 and snap10, inclusive
<clever> yeah, snapshots on swap are not a good idea
<clever> lol
<clever> iqubic: also, if you disable the swap in the nixos config, nixos will swapoff automatically when you switch
<clever> iqubic: latitude-tank/swap is only understood by zfs, the block device is at a different but similar path
<clever> iqubic: cat /proc/swaps
<clever> or nixos will get upset when its missing next time you boot
<clever> but youll also want to remove it from the nixos config and rebuild/switch
<clever> yeah
<clever> and swap isnt mounted, you want swapoff
<clever> oh, and `zfs list -t volume` i think
<clever> `zfs list`
<clever> iqubic: you want to destroy just the zvol, not the whole pool
<clever> same as any other block device
<clever> yeah
<clever> iqubic: zfs destroy poolname/volumename
<clever> duairc: zfs doesnt support hibernation

2019-01-06

<clever> you can either use a throw-away profile in /tmp/ or a portable profile on a usb stick
<clever> for chromium, its `chromium --user-data-dir=/path/to/profile`
<clever> because if i load the real profile, it resumes 200 tabs, which then redirects to 200 copies of the login page
<clever> i use that trick when on hotels with captive portals
<clever> you can also run `firefox -profile /mnt/profile3/` to use non-standard profile paths
<clever> even if its running from a non-standard profile
<clever> and it will just open the current profile dir in a file browser
<clever> you can also go into help->trouble shooting info->open profile directory
<clever> detran: and in firefox?
<clever> detran: what is in ~/.mozilla/ ?
<clever> ,locate f90
<clever> Izorkin: not seeing anything obvious yet
<clever> WilliamHamilton[: something likely has changed in recent nixpkgs versions, to make it complain about the null it previously ignored
<clever> Izorkin: not sure then
<clever> WilliamHamilton[: so there is no point in ever listing containers in ghcWithPackages
<clever> WilliamHamilton[: thats what i was expecting, containers is a boot package, so its in ghc itself
<clever> WilliamHamilton[: but if you eval containers itself, what do you get?
<clever> WilliamHamilton[: and if you eval haskellPackages.containers, inside `nix repl '<nixpkgs>'` what does it say?
<clever> Izorkin: mostly, just the boot. area
<clever> Izorkin: can you gist your nixos config?
<clever> WilliamHamilton[: what error does it give?
<clever> Izorkin: when changing kernel related stuff, you must reboot to make it take effect
<clever> and you have no control over which programs got swapped out
<clever> any program that was swapped out will not survive
<clever> but hot unplug is not possible with swap
<clever> jomik: search nixpkgs for dpkg, to find examples
<clever> so its best to just patch it to use the absolute $out/etc/ to read the config at runtime
<clever> duairc: when installed with nix-env it will wind up in ~/.nix-profile/etc/
<clever> it will use a new luks key every time it boots
<clever> `swapDevices.*.randomEncryption` if you want some more security
<clever> i always put my swap on a real partition
<clever> which causes swap to activate
<clever> and if your low on ram, that causes swap to activate
<clever> iqubic: writing to a zvol requires allocating ram

2019-01-04

<clever> ,locate libatk-bridge-2.0.so.0

2019-01-03

<clever> schopp0r: what you want to do, is zero out a few digits of the hash, to force a re-fetch
<clever> schopp0r: if the sha256 is the same, nix assumes the output is identical, and wont even do the fetch
<clever> schopp0r: nix-store -l ./result
<clever> schopp0r: b: nix will detect if any inputs have changed, and rebuild it when they have changed, why do you want to force a rebuild?
<clever> schopp0r: a: nix-build always puts the results in /nix/store/ and result is just a symlink to that

2019-01-02

<clever> wedens: i just tab complete inside nix repl '<nixpkgs>'
<clever> the exact path depends on the version of python at play
<clever> > python.sitePackages
<clever> yep, python uses it to hold the site-packages suffix
<clever> ambro718: meta.passthru
<clever> siraben: system76 kudu
<clever> but fn+f1 entirely disables the touchpad, at a hardware level
<clever> yeah
<clever> the option just doesnt work
<clever> siraben: xfce
<clever> siraben: i have the reverse problem, i cant disable the touchpad, and the lightest touch clicks in randm places
<clever> if the paths are in another file, its best to have it be a nix file, and to use import
<clever> will make a valid path
<clever> so --arg configfile ./config-file.txt
<clever> paths are nix code
<clever> --argstr forces it to be a string, but --arg parses as nix code
<clever> ambro718: --argstr is to blame, use --arg
<clever> ambro718: can you gist your nix expression?
<clever> relative paths also work, so ./file.txt
<clever> ambro718: just dont quote the path
<clever> romanofski: not sure, it may involve rebuilding ghc
<clever> romanofski: cabal is baked into the ghc package, so you can compile Setup.hs
<clever> romanofski: yeah

2019-01-01

<clever> rnhmjoj: it would probably be better to handle it like nix.conf
<clever> zenhoth: what happens if you use nix-shell --pure ?
<clever> zenhoth: i see random in `ghc-pkg list`

2018-12-31

<clever> the corruption likely triggered an automatic rollback, which repaired it perfectly
<clever> yet it undid itself!
<clever> the git app thought the data was commited to disk
<clever> after a forced reboot, the commit ceased to exist locally, yet it still existed remotely!
<clever> second, one day, it failed, immediatelly after a `git commit && git push`
<clever> first, my SSD's have a firmware bug, that results in the drive going unresponsive randomly during writes
<clever> once, it even did a minor rollback
<clever> ive done dozens of improper shutdowns, and it has survived fine
<clever> infinisil: only time ive ever had corruption with zfs, was when i messed with zfs on a usb stick, and qcow2 copy-on-write overlays
<clever> Myrl-saki:
<clever> Myrl-saki: a simple `env -i /run/current-system/sw/bin/locale` outside nix confirms that, with zero env vars, it claims posix all-around
<clever> Myrl-saki: its possible that locale is lying, and neither var is set, and thats what it does when none are set
<clever> Myrl-saki: check what `env` outputs as well
<clever> siraben: nix-env -f . -iA something
<clever> siraben: nixpkgs supports automatic cross-compiling of most things
<clever> .overrideAttrs doesnt work when the stdenv has been skipped entirely
<clever> Myrl-saki: just edit bare-env.nix
<clever> siraben: when cross-compiling, nativeBuildInputs is for the host, and buildInputs is for the target
<clever> just put the locale command inside it
<clever> its already a shell script
<clever> buildInputs wont work however, so you need to use the absolute path
<clever> just modify it to run locale
<clever> also, those might even be defaults by the locale binary, and `env` will list nothing set
<clever> last time i ran it, no locale related var is set
<clever> bare-env.nix omits the entire stdenv, so env vars wont be set by anything
<clever> Myrl-saki: a: what does `env` output in runcommand?, b: what about a naked derivation?
<clever> siraben: that creates a branch, with the name in question, pointing to whatever your current HEAD was
<clever> siraben: i suspect its because you ran `git branch feature/fractal` by accident
<clever> Myrl-saki: not really, and nixpkgs has a function to make a tar for you
<clever> what was the output when you ran `git checkout feature/fractal` ?
<clever> 2018-12-31 05:23:56 < clever> siraben: what does `git status` and `git log` say? and use a pastebin
<clever> that is still not the commit we want
<clever> siraben: what does `git rev-parse HEAD` return now?
<clever> wedens: ah, that can also work
<clever> oh, `git checkout feature/fractal`
<clever> 2018-12-31 05:21:42 < siraben> git branch feature/fractal
<clever> then checkout the right branch, and nix-build it
<clever> it will add the right remote for you, if you clone https://github.com/dtzwill/nixpkgs/
<clever> siraben: what does `git status` and `git log` say? and use a pastebin
<clever> siraben: your not on the right branch
<clever> siraben: that does not match the commit in the PR
<clever> siraben: what does `git rev-parse HEAD` return?
<clever> wedens: you have to pass <nixpkgs> as an arg, or just /path/to/repo directly
<clever> wedens: that just changes where to find <nixpkgs> but you still didnt specify what file to load, so it opens default.nix in the current dir
<clever> `git checkout branchname`
<clever> siraben: what branch are your on?
<clever> but no filename was given, so it just opens default.nix in the current dir
<clever> the -I just says where to look for <things>
<clever> that -I wont do what you think
<clever> siraben: what commands did you try?
<clever> it can also be easier to edit a clone, rather then write an overlay, for some packages
<clever> wedens: i clone the upstream nixpkgs, then add multiple remotes to it
<clever> yeah, thats the simplest way to get the branch
<clever> siraben: the branch is at the top of the PR
<clever> siraben: if you clone the right branch of nixpkgs (from the pr author), you can just `nix-build -A fractal` and it should build
<clever> `nix repl '<nixpkgs>'` then just `lib.<tab><tab>`
<clever> wedens: nix repl has tab completion
<clever> and if the hash changes, it has to rebuild
<clever> it will hash the input file on every nix eval
<clever> yeah
<clever> ah, and you may need `runCommand "name" { buildInputs = [ makeWrapper ]; } ...`
<clever> saves having to copy them to $out/bin/ first
<clever> the one with 2 names lets you keep the input as a seperate prog
<clever> the other accepts 1 file, renames it to .input_wrapped, then reuses the old name, to run the renamed one
<clever> wedens: one accepts 2 files, an input and output, and the output runs the input
<clever> wedens: there are 2 versions it, makewrapper, and wrapprogram
<clever> wedens: that will generate a bash script, that prefixes PATH, then runs input
<clever> wedens: roughly
<clever> wedens: something along the lines of runCommand "name" {} '' mkdir -pv $out/bin/ ; makewrapper ${./input} $out/bin/output --prefix PATH : ${hello}/bin''
<clever> wedens: the other option is wrapProgram
<clever> though the script will become /nix/store/hash-script, without a bin dir
<clever> it will replace @hello@ with /nix/store/hash-hello/
<clever> pkgs.substituteAll { inherit hello; } ./script
<clever> wedens: might want to use substiteall on them then
<clever> wedens: you may not even need a derivation, what do you want to do with the script afterwards?
<clever> `
<clever> `id` also works, and shows more info then `groups
<clever> sudoedit will copy the file to /tmp, run the configured editor, as non-root, then copy it back when the editor exits
<clever> Dedalo: export EDITOR=gedit ; sudoedit /etc/nix/configuration.nix
<clever> siraben: you would need to modify the emulator to add them
<clever> which floods the channel and makes it unusable :P
<clever> siraben: my main exposure to matrix, is when the servers fail, and 200 people mass-quit in irc
<clever> so the rom can test itself, and then return a status code
<clever> siraben: maybe add a custom IO port, so you can write to a given addr in the emu, and it then immediately exits with the value you wrote?