2019-01-07
23:15
<
clever >
gchristensen: i typically use `nix-store -r /nix/store/foo --add-root result --indirect`
23:15
<
clever >
trevthedev: what happens if you `nix-build '<nixpkgs>' -A unity3d` ?
18:47
<
clever >
infinisil: the changes do involve cross-compile
18:45
<
clever >
make-derivation: don’t add host suffix if there is no c compiler
18:45
<
clever >
a56fe056ece1d7c0b384a08467408ded507573c7 is the first bad commit
18:44
<
clever >
Bisecting: 1907 revisions left to test after this (roughly 11 steps)
18:43
<
clever >
infinisil: yep, reproduces
18:42
<
clever >
yeah, thats also a good question
18:25
<
clever >
Taneb: this builds hello.exe, when it isnt failing with infinite recursion
18:24
<
clever >
> pkgsCross.mingwW64.hello
18:24
<
clever >
Taneb: yes
17:46
<
clever >
Dedalo: plain xfce with focus follows mouse
17:39
<
clever >
using multiple types can save you from having to escape, when the mix works right
17:39
<
clever >
though nix treats ''' as '' ', rather then ' ''
17:39
<
clever >
> ''bashvar='--foo="bar baz"' ''
17:38
<
clever >
> ''bashvar='--foo="bar baz"'''
17:38
<
clever >
>> ''bashvar='--foo="bar baz"'''
17:38
<
clever >
you can also mix all 3 types of quotes
17:27
<
clever >
,escape" dmj`
16:36
<
clever >
that name looks familiar...
16:35
<
clever >
this mutates the NIX_PATH for a single file being imported
16:35
<
clever >
nixops also has a recursive one
16:35
<
clever >
but my example isnt recursive
16:34
<
clever >
and i have an example in one of my gists
16:34
<
clever >
i know it used scopedImport
16:31
<
clever >
gchristensen: was it the one you wrote?
13:14
<
clever >
so every image has a unique passphrase, and only the gpg pubkey and passphrase ciphertext are in the store
12:17
<
clever >
the name should mostly match the original, just to make things simpler to debug
12:17
<
clever >
lassulus: also add a `name = "something.deb";` to the fetchurl
02:51
<
clever >
iqubic: depends on how you use it, how many tabs you have open, and what sites your visiting
02:40
<
clever >
help when programs need more then 8gig of ram
02:39
<
clever >
it wont make the cpu any faster
02:37
<
clever >
your welcome
02:35
<
clever >
the help explains everything
02:34
<
clever >
what is the very last thing in the expert mode help?
02:33
<
clever >
expert mode changes the command set, so `n` does something different
02:32
<
clever >
n change partition name
02:32
<
clever >
check the help again, and youll find this command:
02:32
<
clever >
if you check the help in fdisk (`m`) then youll see an `x` option to go into expert mode
02:30
<
clever >
if the priority is the same, it will split writes 50/50 between the 2 devices
02:30
<
clever >
33 #{ device = "/dev/disk/by-partlabel/swap2"; priority = 10; }
02:30
<
clever >
some of my older swap devices
02:30
<
clever >
32 #{ device = "/dev/disk/by-partlabel/swap1"; priority = 10; }
02:30
<
clever >
"larger" numbers (-1 is larger then -2) are higher priority
02:30
<
clever >
so it prefers the 1st device you enable, and uses them in order of swapon
02:29
<
clever >
the default priorities are negative, going further negative with every call to swapon
02:26
<
clever >
or free -m
02:26
<
clever >
cat /proc/swaps
02:24
<
clever >
but swapon will fail if it hasnt been formatted
02:24
<
clever >
nixos-rebuild just runs swapon
02:22
<
clever >
you also have to run mkswap on it, to format it as a swap partition
02:20
<
clever >
priority only matters if you have more then 1 swap
02:20
<
clever >
thats how mine is setup
02:20
<
clever >
30 swapDevices = [
02:20
<
clever >
31 { device = "/dev/nvme0n1p3"; priority = 10; }
02:20
<
clever >
like the old one you removed
02:20
<
clever >
add it back under swapDevices
02:15
<
clever >
iqubic: you want linux swap, use `t` to change the type
02:12
<
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
02:11
<
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
02:07
<
clever >
if the rootfs isnt encrypted, not much
02:04
<
clever >
gchristensen: but zfs also doesnt support hibernation, so ive got no need to make it work
02:04
<
clever >
gchristensen: i dont believe it supports hibernation
02:03
<
clever >
the randomEncryption flag doesnt ask for a password on bootup, and just uses a new (and random) encryption key every time
02:02
<
clever >
swapDevices.*.randomEncryption solves the need for you to enter the swap password at bootup
02:01
<
clever >
and then persist for days, or even years
02:01
<
clever >
iqubic: encryption keys and passwords can potentially leak into swap
01:58
<
clever >
it comes out to 8192mb of gap between the end of sda5, and the start of sda6
01:58
<
clever >
and then just do some math
01:58
<
clever >
8192.00048828125
01:58
<
clever >
> 16777217 * 512 / 1024 / 1024
01:58
<
clever >
iqubic: take the start sector of sda6, and the end sector of sda5
01:57
<
clever >
iqubic: its clearly visible in the gparted output
01:53
<
clever >
ah, then its not the problem, but running it on sda5 is just going to be worse
01:52
<
clever >
iqubic: just run gparted, with zero arguments
01:52
<
clever >
so it will only show the contents of a single partition
01:52
<
clever >
that told it to open a single partition, not the device
01:52
<
clever >
iqubic: thats your problem
01:51
<
clever >
so it should be as simple as `fdisk /dev/sda` and then `n` and hitting enter at nearly everything
01:51
<
clever >
iqubic: checking the math, i can see an 8gig gap between sda5 and sda6, which fits what you said
01:49
<
clever >
not sure, would need to check into the gparted source to know more
01:48
<
clever >
try just `fdisk /dev/sda` and then `n` to make a new partition, it should default to the free space
01:47
<
clever >
i'm guessing gparted is just being weird
01:45
<
clever >
the automatic snapshots can make it slower
01:45
<
clever >
thats fairly normal
01:45
<
clever >
the zpool history should give more clues
01:41
<
clever >
iqubic: and `zpool history | head`
01:41
<
clever >
iqubic: what does `fdisk -l /dev/sda` report?
01:40
<
clever >
try a different drive in the dropdown in the top-right
01:40
<
clever >
iqubic: there is no trace of ntfs on that drive
01:39
<
clever >
iqubic: can you screenshot gparted?
01:34
<
clever >
ncdu can only show filesystem stuff, zvols and unpartitioned wont be seen
01:34
<
clever >
iqubic: ndcu wont show unpartitioned space, for that, you want gparted
01:20
<
clever >
ottidmes: cant remember exactly why i added that
01:17
<
clever >
"When I come back I'll be needing some help getting a swap partition created."
01:17
<
clever >
after you shrink the ntfs
01:17
<
clever >
dont see any problem there
01:16
<
clever >
windows should be able to shrink it just fine
01:15
<
clever >
iqubic: just run gparted on linux end
01:14
<
clever >
iqubic: depends heavily on how you use the machine and how much you go over 8gig
01:14
<
clever >
zvols behave fairly differently
01:13
<
clever >
zfs doesnt really have partitions
01:12
<
clever >
iqubic: for an ssd, it doesnt really matter where on the disk a partition is
01:12
<
clever >
zfnmxt: swap files dont work on zfs, and swap files usually have worse performance
01:11
<
clever >
iqubic: the free space will always be at the end of whatever partition your shrinking
01:11
<
clever >
iqubic: `free -g`
01:11
<
clever >
iqubic: ive got 32gig of ram, 64gig of swap, and regularly have over 1000 tabs open
01:10
<
clever >
iqubic: depends on how much ram you have and how obsessesed with tabs you are, lol
01:09
<
clever >
or override the default, so it never tries to use /var/empty (which it thinks is /usr)
01:09
<
clever >
duairc: yeah
01:09
<
clever >
zfnmxt: ssdm uses an absolute path to xorg.conf, in the ssdm config file
01:09
<
clever >
iqubic: that also works
01:09
<
clever >
duairc: the cmake files are probably trying to mess with /usr then
01:08
<
clever >
and this will list every snapshot on amd/home
01:08
<
clever >
zfs list -t snapshot -r -o name,used,refer,written amd/home ; df -h /
01:08
<
clever >
this will list every zvol and filesystem, and the `USEDSNAP` tells you how much the snapshots within it are eating
01:08
<
clever >
zfs list -t volume,filesystem -o name,used,referenced,logicalused,logicalreferenced,written,usedbysnapshots,usedbydataset,refcompressratio,compressratio,compression
01:07
<
clever >
that helps with bulk deleting of snapshots
01:07
<
clever >
of note, `zfs destroy pool/dataset@snap1%snap10` will delete all snapshots between snap1 and snap10, inclusive
01:06
<
clever >
yeah, snapshots on swap are not a good idea
01:04
<
clever >
iqubic: also, if you disable the swap in the nixos config, nixos will swapoff automatically when you switch
01:03
<
clever >
iqubic: latitude-tank/swap is only understood by zfs, the block device is at a different but similar path
01:03
<
clever >
iqubic: cat /proc/swaps
01:00
<
clever >
or nixos will get upset when its missing next time you boot
01:00
<
clever >
but youll also want to remove it from the nixos config and rebuild/switch
01:00
<
clever >
and swap isnt mounted, you want swapoff
00:58
<
clever >
oh, and `zfs list -t volume` i think
00:58
<
clever >
`zfs list`
00:58
<
clever >
iqubic: you want to destroy just the zvol, not the whole pool
00:57
<
clever >
same as any other block device
00:51
<
clever >
iqubic: zfs destroy poolname/volumename
00:50
<
clever >
duairc: zfs doesnt support hibernation
2019-01-06
22:51
<
clever >
you can either use a throw-away profile in /tmp/ or a portable profile on a usb stick
22:51
<
clever >
for chromium, its `chromium --user-data-dir=/path/to/profile`
22:50
<
clever >
because if i load the real profile, it resumes 200 tabs, which then redirects to 200 copies of the login page
22:50
<
clever >
i use that trick when on hotels with captive portals
22:50
<
clever >
you can also run `firefox -profile /mnt/profile3/` to use non-standard profile paths
22:49
<
clever >
even if its running from a non-standard profile
22:49
<
clever >
and it will just open the current profile dir in a file browser
22:49
<
clever >
you can also go into help->trouble shooting info->open profile directory
22:48
<
clever >
detran: and in firefox?
22:47
<
clever >
detran: what is in ~/.mozilla/ ?
21:23
<
clever >
,locate f90
20:36
<
clever >
Izorkin: not seeing anything obvious yet
20:31
<
clever >
WilliamHamilton[: something likely has changed in recent nixpkgs versions, to make it complain about the null it previously ignored
20:29
<
clever >
Izorkin: not sure then
20:29
<
clever >
WilliamHamilton[: so there is no point in ever listing containers in ghcWithPackages
20:29
<
clever >
WilliamHamilton[: thats what i was expecting, containers is a boot package, so its in ghc itself
20:28
<
clever >
WilliamHamilton[: but if you eval containers itself, what do you get?
20:27
<
clever >
WilliamHamilton[: and if you eval haskellPackages.containers, inside `nix repl '<nixpkgs>'` what does it say?
20:26
<
clever >
Izorkin: mostly, just the boot. area
20:25
<
clever >
Izorkin: can you gist your nixos config?
20:23
<
clever >
WilliamHamilton[: what error does it give?
20:21
<
clever >
Izorkin: when changing kernel related stuff, you must reboot to make it take effect
20:19
<
clever >
and you have no control over which programs got swapped out
20:19
<
clever >
any program that was swapped out will not survive
20:18
<
clever >
but hot unplug is not possible with swap
19:20
<
clever >
jomik: search nixpkgs for dpkg, to find examples
12:45
<
clever >
so its best to just patch it to use the absolute $out/etc/ to read the config at runtime
12:45
<
clever >
duairc: when installed with nix-env it will wind up in ~/.nix-profile/etc/
04:53
<
clever >
it will use a new luks key every time it boots
04:53
<
clever >
`swapDevices.*.randomEncryption` if you want some more security
04:52
<
clever >
i always put my swap on a real partition
04:50
<
clever >
which causes swap to activate
04:50
<
clever >
and if your low on ram, that causes swap to activate
04:50
<
clever >
iqubic: writing to a zvol requires allocating ram
2019-01-04
15:16
<
clever >
,locate libatk-bridge-2.0.so.0
2019-01-03
14:36
<
clever >
schopp0r: what you want to do, is zero out a few digits of the hash, to force a re-fetch
14:36
<
clever >
schopp0r: if the sha256 is the same, nix assumes the output is identical, and wont even do the fetch
14:34
<
clever >
schopp0r: nix-store -l ./result
14:33
<
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?
14:33
<
clever >
schopp0r: a: nix-build always puts the results in /nix/store/ and result is just a symlink to that
2019-01-02
18:04
<
clever >
wedens: i just tab complete inside nix repl '<nixpkgs>'
11:53
<
clever >
the exact path depends on the version of python at play
11:53
<
clever >
> python.sitePackages
11:53
<
clever >
yep, python uses it to hold the site-packages suffix
11:51
<
clever >
ambro718: meta.passthru
02:59
<
clever >
siraben: system76 kudu
02:55
<
clever >
but fn+f1 entirely disables the touchpad, at a hardware level
02:55
<
clever >
the option just doesnt work
02:54
<
clever >
siraben: xfce
02:49
<
clever >
siraben: i have the reverse problem, i cant disable the touchpad, and the lightest touch clicks in randm places
02:24
<
clever >
if the paths are in another file, its best to have it be a nix file, and to use import
02:22
<
clever >
will make a valid path
02:22
<
clever >
so --arg configfile ./config-file.txt
02:22
<
clever >
paths are nix code
02:21
<
clever >
--argstr forces it to be a string, but --arg parses as nix code
02:20
<
clever >
ambro718: --argstr is to blame, use --arg
02:12
<
clever >
ambro718: can you gist your nix expression?
02:11
<
clever >
relative paths also work, so ./file.txt
02:10
<
clever >
ambro718: just dont quote the path
02:08
<
clever >
romanofski: not sure, it may involve rebuilding ghc
02:07
<
clever >
romanofski: cabal is baked into the ghc package, so you can compile Setup.hs
02:06
<
clever >
romanofski: yeah
2019-01-01
17:48
<
clever >
rnhmjoj: it would probably be better to handle it like nix.conf
08:10
<
clever >
zenhoth: what happens if you use nix-shell --pure ?
08:09
<
clever >
zenhoth: i see random in `ghc-pkg list`
2018-12-31
14:30
<
clever >
the corruption likely triggered an automatic rollback, which repaired it perfectly
14:29
<
clever >
yet it undid itself!
14:29
<
clever >
the git app thought the data was commited to disk
14:29
<
clever >
after a forced reboot, the commit ceased to exist locally, yet it still existed remotely!
14:28
<
clever >
second, one day, it failed, immediatelly after a `git commit && git push`
14:28
<
clever >
first, my SSD's have a firmware bug, that results in the drive going unresponsive randomly during writes
14:27
<
clever >
once, it even did a minor rollback
14:27
<
clever >
ive done dozens of improper shutdowns, and it has survived fine
14:26
<
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
13:09
<
clever >
Myrl-saki:
13:05
<
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
13:05
<
clever >
Myrl-saki: its possible that locale is lying, and neither var is set, and thats what it does when none are set
13:04
<
clever >
Myrl-saki: check what `env` outputs as well
10:09
<
clever >
siraben: nix-env -f . -iA something
09:41
<
clever >
siraben: nixpkgs supports automatic cross-compiling of most things
09:41
<
clever >
.overrideAttrs doesnt work when the stdenv has been skipped entirely
09:41
<
clever >
Myrl-saki: just edit bare-env.nix
09:41
<
clever >
siraben: when cross-compiling, nativeBuildInputs is for the host, and buildInputs is for the target
09:40
<
clever >
just put the locale command inside it
09:40
<
clever >
its already a shell script
09:40
<
clever >
buildInputs wont work however, so you need to use the absolute path
09:40
<
clever >
just modify it to run locale
09:39
<
clever >
also, those might even be defaults by the locale binary, and `env` will list nothing set
09:39
<
clever >
last time i ran it, no locale related var is set
09:38
<
clever >
bare-env.nix omits the entire stdenv, so env vars wont be set by anything
09:38
<
clever >
Myrl-saki: a: what does `env` output in runcommand?, b: what about a naked derivation?
09:36
<
clever >
siraben: that creates a branch, with the name in question, pointing to whatever your current HEAD was
09:36
<
clever >
siraben: i suspect its because you ran `git branch feature/fractal` by accident
09:36
<
clever >
Myrl-saki: not really, and nixpkgs has a function to make a tar for you
09:34
<
clever >
what was the output when you ran `git checkout feature/fractal` ?
09:34
<
clever >
2018-12-31 05:23:56 < clever> siraben: what does `git status` and `git log` say? and use a pastebin
09:33
<
clever >
that is still not the commit we want
09:33
<
clever >
siraben: what does `git rev-parse HEAD` return now?
09:32
<
clever >
wedens: ah, that can also work
09:31
<
clever >
oh, `git checkout feature/fractal`
09:31
<
clever >
2018-12-31 05:21:42 < siraben> git branch feature/fractal
09:31
<
clever >
then checkout the right branch, and nix-build it
09:23
<
clever >
siraben: what does `git status` and `git log` say? and use a pastebin
09:23
<
clever >
siraben: your not on the right branch
09:23
<
clever >
siraben: that does not match the commit in the PR
09:22
<
clever >
siraben: what does `git rev-parse HEAD` return?
09:22
<
clever >
wedens: you have to pass <nixpkgs> as an arg, or just /path/to/repo directly
09:21
<
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
09:21
<
clever >
`git checkout branchname`
09:20
<
clever >
siraben: what branch are your on?
09:20
<
clever >
but no filename was given, so it just opens default.nix in the current dir
09:20
<
clever >
the -I just says where to look for <things>
09:20
<
clever >
that -I wont do what you think
09:19
<
clever >
siraben: what commands did you try?
09:18
<
clever >
it can also be easier to edit a clone, rather then write an overlay, for some packages
09:18
<
clever >
wedens: i clone the upstream nixpkgs, then add multiple remotes to it
09:08
<
clever >
yeah, thats the simplest way to get the branch
09:07
<
clever >
siraben: the branch is at the top of the PR
09:04
<
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
07:44
<
clever >
`nix repl '<nixpkgs>'` then just `lib.<tab><tab>`
07:44
<
clever >
wedens: nix repl has tab completion
07:41
<
clever >
and if the hash changes, it has to rebuild
07:40
<
clever >
it will hash the input file on every nix eval
07:36
<
clever >
ah, and you may need `runCommand "name" { buildInputs = [ makeWrapper ]; } ...`
07:33
<
clever >
saves having to copy them to $out/bin/ first
07:31
<
clever >
the one with 2 names lets you keep the input as a seperate prog
07:31
<
clever >
the other accepts 1 file, renames it to .input_wrapped, then reuses the old name, to run the renamed one
07:31
<
clever >
wedens: one accepts 2 files, an input and output, and the output runs the input
07:31
<
clever >
wedens: there are 2 versions it, makewrapper, and wrapprogram
07:30
<
clever >
wedens: that will generate a bash script, that prefixes PATH, then runs input
07:29
<
clever >
wedens: roughly
07:29
<
clever >
wedens: something along the lines of runCommand "name" {} '' mkdir -pv $out/bin/ ; makewrapper ${./input} $out/bin/output --prefix PATH : ${hello}/bin''
07:29
<
clever >
wedens: the other option is wrapProgram
07:23
<
clever >
though the script will become /nix/store/hash-script, without a bin dir
07:23
<
clever >
it will replace @hello@ with /nix/store/hash-hello/
07:22
<
clever >
pkgs.substituteAll { inherit hello; } ./script
07:22
<
clever >
wedens: might want to use substiteall on them then
07:20
<
clever >
wedens: you may not even need a derivation, what do you want to do with the script afterwards?
06:53
<
clever >
`id` also works, and shows more info then `groups
06:45
<
clever >
sudoedit will copy the file to /tmp, run the configured editor, as non-root, then copy it back when the editor exits
06:44
<
clever >
Dedalo: export EDITOR=gedit ; sudoedit /etc/nix/configuration.nix
05:57
<
clever >
siraben: you would need to modify the emulator to add them
05:49
<
clever >
which floods the channel and makes it unusable :P
05:49
<
clever >
siraben: my main exposure to matrix, is when the servers fail, and 200 people mass-quit in irc
05:47
<
clever >
so the rom can test itself, and then return a status code
05:47
<
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?