2020-08-12
23:22
<
clever >
80 def get_ssh_flags(self, *args, **kwargs):
23:21
<
clever >
moet: yeah, that all looks correct
23:12
<
clever >
i suspect your misreading the state db
23:12
<
clever >
moet: yeah, looks like nixops doesnt believe there is a priv key tied to the machine
23:11
<
clever >
moet: can you pastebin the records from ResourceAttrs that tie a priv key to the machine? (and obviously censor the key)
23:10
<
clever >
lunik1: windd, windiskimager, and others
23:10
<
clever >
the iso already works on usb
23:10
<
clever >
lunik1: unetbootin breaks the nixos iso, just dd it directly to the usb
23:09
<
clever >
check `ps aux | grep ssh` while its asking for a pw?
23:09
<
clever >
moet: which backend is the machine managed by?
23:09
<
clever >
moet: does it say what args ssh got ran with?
23:04
<
clever >
if the nixops state doesnt have a key assigned to that machine, it wont do that
23:04
<
clever >
normally, nixops will use `-i` to change the path to the private key, to one in /tmp/
23:04
<
clever >
that would explain things better then
23:04
<
clever >
moet: the ssh agent will leak in when using nixops
23:01
<
clever >
moet: nixops doesnt try to escape any args, so if you `nixops ssh host -v`, it will wind up passing that -v to ssh, and ssh will spew its logs
2020-08-11
19:39
<
clever >
bqv: not sure then
19:38
<
clever >
bqv: is the nix-store and nix-daemon on the remote end, the same version?
19:37
<
clever >
write(6, "\33[31;1merror:\33[0m\33[34;1m --- Error --- nix-store\33[0m\n\33[31;1merror:\33[0m\33[34;1m --- Error --- nix-daemon\33[0m\ninvalid operation \33[33;1m1408\33[0m\n", 141) = 141
19:31
<
clever >
bqv: and this error is happening near the end, but got truncated, `strace -s 200 -ff -o logfiles ...` will not truncate it
19:31
<
clever >
write(6, "\33[31;1merror:\33[0m\33[34;1m --- Err"..., 141) = 141
19:30
<
clever >
and yep, as expected, that ran `ssh host -x -a 'nix-store --serve --write'`
19:29
<
clever >
its not loading at all
19:28
<
clever >
bqv: and now ipfs is acting up
19:24
<
clever >
bqv: its the write side of a pair (4 is read) and the child proc 1540671 should be reading it, so we need 1540671's log
19:24
<
clever >
vfork() = 1540671
19:24
<
clever >
pipe2([4, 5], O_CLOEXEC) = 0
19:24
<
clever >
bqv: it sent data to fd 5, but the pipe was dead, so we need to go backwards, where was 5 made...
19:23
<
clever >
write(5, "\t\0\0\0\0\0\0\0C\0\0\0\0\0\0\0/nix/store/dyfl9"..., 10160) = -1 EPIPE (Broken pipe)
19:20
<
clever >
bbigras: iputils looks like the one nixos uses mainly
19:19
<
clever >
,locate bin ping
19:18
<
clever >
bqv: try doing `strace -ff -o logfiles nix-copy-closure --to user@host` and then pastebin the main log
19:17
<
clever >
not sure whats wrong then
19:17
<
clever >
and it didnt print anything else?
19:15
<
clever >
bqv: if you `ssh user@remote nix-store --version`, what exactly does it return?
19:13
<
clever >
bqv: can you reproduce it with normal nix-copy-closure?
19:13
<
clever >
bqv: anything funky with the .bashrc on the remote end?
19:12
<
clever >
bqv: what are you even running, how was it built?
19:08
<
clever >
Raito_Bezarius: go ahead
16:08
<
clever >
flythief: you can use `--option` to override any nix.conf entry temporarily
15:40
<
clever >
so prestart ran as root, and sudo can drop privs without being setuid root
15:39
<
clever >
yeah, that too
15:39
<
clever >
are you running as root or another user?
15:39
<
clever >
buffet: what User= is systemd running things as?
15:38
<
clever >
buffet: only the sudo in /run/wrappers can work for elevating perms,
2020-08-10
21:29
<
clever >
energizer: yeah
21:21
<
clever >
not sure whats breaking it now, try a garbage collect, to just blow away most things?
21:21
<
clever >
thats a different musl
21:20
<
clever >
energizer: anything funny about musl in /etc/nix/nix.conf or `nix show-config` ?
21:17
<
clever >
energizer: something is wrong with your $PATH
21:17
<
clever >
energizer: it should be pointing to the one in ~/.nix-profile
21:17
<
clever >
energizer: what about `which nix-channel` ?
21:15
<
clever >
for similar reasons to using `nix-env -r` earlier
21:15
<
clever >
energizer: you may need to wipe the channels profile also, `rm /nix/var/nix/profiles/per-user/clever/channels*`
21:10
<
clever >
you can re-install everything else you had in nix-env as normal, probably starting with reinstalling home-manager
21:10
<
clever >
now the nix binary is a valid thing in the store, and its less likely to brick itself
21:09
<
clever >
energizer: try `nix-env -r -i /nix/store/5rpv7k2a9w4ipgvwsramblhvkfp385sb-nix-2.3.7`
21:08
<
clever >
energizer: try doing nix-env -i /nix/store/5rpv7k2a9w4ipgvwsramblhvkfp385sb-nix-2.3.7
21:08
<
clever >
> "${nix}"
21:07
<
clever >
what does `which nix-env` return?
21:07
<
clever >
youll want to run nix-env -i, on the path to a nix binary, that doesnt match your current nix binary
21:06
<
clever >
ahh, that makes it a bit simpler to recover
21:06
<
clever >
energizer: is this nixos or another distro?
21:06
<
clever >
energizer: and the only way to recover from that is to run nixos-install from an install media
21:05
<
clever >
energizer: if you try to download that nix binary, it will delete itself first, and cause major problems
21:05
<
clever >
energizer: yep, but now nix will consider every single path in /nix/store to be invalid, including the nix binary itself
20:57
<
clever >
energizer: re-creating the deps would be difficult, and recreating the hash can cause problems if something is corrupted
20:57
<
clever >
energizer: db.sqlite contains a list of every entity in /nix/store/ and the hash of that entity, and what the deps of each one are
20:51
<
clever >
energizer: not easily
20:49
<
clever >
energizer: with that file gone, your entire /nix/ is basically toast, re-run nixos-install to build it from config again
20:24
<
clever >
nbathum: nixos-install is just a shell script to run `nixos-rebuild build` under a chroot
20:24
<
clever >
nbathum: oops, typo!
20:24
<
clever >
nbathum: nixos-rebuild is just a shell script to run `nixos-rebuild build` under a chroot
20:23
<
clever >
aveltras: that one
20:23
<
clever >
,locate bin gsettings
19:51
<
clever >
,tofu nature
19:49
<
clever >
nature: and use nix-prefetch-url --unpack
19:48
<
clever >
nature: what URL did you run it against?
19:47
<
clever >
nature: depends on what URL you point it to
19:46
<
clever >
nature: read the output, is it html or a tar?
18:23
<
clever >
pikajude: that would also work
18:22
<
clever >
pikajude: it will only re-upload (and fix the missing files) if a mass rebuild causes it to rebuild things
18:21
<
clever >
pikajude: hydra uploads to cache.nixos.org as builds finish
18:20
<
clever >
take the hash from $out, and stick it in the url you gave before
18:20
<
clever >
pikajude: grab an older nixpkgs rev, and eval a random package
18:19
<
clever >
see if the headers differ for older store paths
18:19
<
clever >
yeah, that does seem weird
18:17
<
clever >
its a relatively new compressing algo
18:16
<
clever >
pikajude: bingo, its brotli compressed json
18:16
<
clever >
{"version":1,"root":{"type":"regular","size":579972,"narOffset":96}}
18:16
<
clever >
[nix-shell:~]$ brotli -d < 7rvaglzhlx2q2dlnqi71nhj9z6n2jnay.ls
18:16
<
clever >
pikajude: the cache has been using this for compression of some stuff
18:09
<
clever >
pikajude: which url?
15:36
<
clever >
the only other place i use it, is `with pkgs; [ a b c ];`
15:31
<
clever >
> let a = 1; b = {a=2;}; in with b; a
15:12
<
clever >
makefu: i think raw postgres access would be "best"
15:09
<
clever >
makefu: hydra can return json in the body
14:03
<
clever >
maralorn: i have a PR to nix, to log all IFD drv files to stderr, and plans to make it more usable in an automated manner
10:03
<
clever >
lunik1: `nix-store --verify --check-contents`
09:27
<
clever >
{ column = 3; file = "/nix/store/6q0j9q6pkl6fxll32dr988jnbnvb6ji2-nixos-20.09pre237606.b50ef9afa11/nixos/pkgs/build-support/docker/default.nix"; line = 439; }
09:27
<
clever >
nix-repl> builtins.unsafeGetAttrPos "buildLayeredImage" dockerTools
09:27
<
clever >
potong: its in there
2020-08-07
18:56
<
clever >
jlv: nix cant download the tar, it instead tells you to open a url in your browser and dl, and you must accept the license to DL
18:55
<
clever >
jlv: oraclejdk and pkgs.requireFile
17:05
<
clever >
bqv: you can only see that detail leak out, if you builtins.trace in the right area, and look at the order of the traces
17:04
<
clever >
bqv: but behind the scenes, the keys are sorted by the order a key was first seen, globally
17:04
<
clever >
bqv: all pure functions return the keys sorted by the string
12:21
<
clever >
sounds like you need to redo things to be pure!
12:21
<
clever >
generate the script at build time, using bash?
12:20
<
clever >
can it not accept relative paths?
12:19
<
clever >
you want to modify your script to just use $NIX_BUILD_TOP instead of hard-coding the dir
12:18
<
clever >
simonpe^^: the env var only exists at build time, so builtins.getEnv cant read it
12:17
<
clever >
simonpe^^: $NIX_BUILD_TOP will be the build dir
08:19
<
clever >
typetetris: what does `date` return?
2020-08-06
21:11
<
clever >
dminuoso: is that the file you wanted?
21:11
<
clever >
[root@amd-nixos:~]# ls -ltrh result-dev/lib/modules/5.4.46/source/include/uapi/linux/ethtool.h
21:11
<
clever >
[root@amd-nixos:~]# nix-build '<nixpkgs>' -A linux.dev
21:09
<
clever >
run nix-build on the attr, and look with ls
21:09
<
clever >
dminuoso: but linuxHeaders has it in include, under <linux/ethtool.h>
21:09
<
clever >
dminuoso: the .dev of linux itself, has it in source, not include, so the stdenv wont find it automatically
21:08
<
clever >
linux.dev 68,911 x /nix/store/rrn7f5zmxv16wj5vbi9696f1apfj96lp-linux-4.9.23-dev/lib/modules/4.9.23/source/include/uapi/linux/ethtool.h
21:08
<
clever >
linuxHeaders.out 54,478 r /nix/store/ffr9zi9sdh1gw5gzmg5rnkkv9bkyz0nm-linux-headers-4.4.10/include/linux/ethtool.h
21:08
<
clever >
,locate include/uapi/linux/ethtool.h
21:07
<
clever >
dminuoso: which header file do you need?
20:24
<
clever >
julianobs: patchPhase might work, to just sed the cabal file directly
20:24
<
clever >
julianobs: you need to pick a ghc that has the right base by default, or override the src to change the cabal file
20:24
<
clever >
julianobs: base is one of the boot packages, its version cant be changed easily
20:23
<
clever >
julianobs: doJailBreak cant recurse into if statements
20:23
<
clever >
julianobs: yep, i see the problem, the base version constraints are inside an if statement
20:20
<
clever >
julianobs: oops, ^
20:20
<
clever >
dminuoso: can you also add the microlens.cabal file? youll find it in /nix/store/ff8calfbfzm5i2pinviwhgfrwx9svd7m-microlens-0.4.10.tar.gz
20:19
<
clever >
dminuoso: ah
20:17
<
clever >
julianobs: can you also add the full error message to the gist?
20:16
<
clever >
dminuoso: linuxPackages.kernel.dev maybe, but what is haskell going to then do with the headers?
20:13
<
clever >
dminuoso: what do you need the headers for?
16:11
<
clever >
asheshambasta: try to always use hself for callCabal2nix, does that help?
16:08
<
clever >
asheshambasta: can you pastebin the overlay?
15:33
<
clever >
bqv: if nix cant write to something under /nix/, it will try to use the unix socket
15:32
<
clever >
bqv: /nix/var/nix/daemon-socket/socket
2020-08-05
17:37
<
clever >
moet: use / to search, then scroll up and follow the line
17:29
<
clever >
moet: and there is also `nix why-depends`
17:28
<
clever >
moet: you can also run it on any output, or a result symlink
17:27
<
clever >
moet: point it at a .drv file
17:26
<
clever >
moet: nix-store -q --tree
17:20
<
clever >
X11 just works, without any special config at all
17:20
<
clever >
thats what i'm using on my laptop
17:20
<
clever >
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 630 (rev 04)
17:19
<
clever >
matthewcroughan: any time kernel stuff is changing, you need to reboot for it to take effect
17:17
<
clever >
matthewcroughan: its in pciutils
17:16
<
clever >
,locate bin lspci
17:15
<
clever >
matthewcroughan: single or dual-gpu?
17:15
<
clever >
matthewcroughan: try another card?
17:13
<
clever >
cole-h: an override to enable a certain driver for a weird gpu
17:08
<
clever >
depends on if the dependencies have changed or not
17:08
<
clever >
so it will always build that part
17:08
<
clever >
i think you also have an override against the mesa version, to force it to use certain drivers
17:08
<
clever >
matthewcroughan: looks like normal ./configure output
17:05
<
clever >
and i could only fix the 2d accel, by turning 3d accel off! lol
17:05
<
clever >
matthewcroughan: my amd card had horid 2d accel for months (like, i could watch `ls -l` redraw in realtime)
17:05
<
clever >
matthewcroughan: it depends on which card your using, and other factors
16:58
<
clever >
jasom: guess it needs some setuid then, or setcap
16:56
<
clever >
matthewcroughan: and if you try a version newer then that? (lower in the list)
16:41
<
clever >
matthewcroughan: 2019, still too old
16:37
<
clever >
you went too far back :P
16:37
<
clever >
you can also `git show` the hash
16:37
<
clever >
matthewcroughan: yes
16:36
<
clever >
matthewcroughan: `git log` will tell you
16:35
<
clever >
matthewcroughan: run `git show` on a revision, and youll see the commit date
16:34
<
clever >
matthewcroughan: unix epoch, seconds since jan 1st 1970
16:34
<
clever >
matthewcroughan: if you use overrides to mix versions together, it will silently not use cachix, because cachix doesnt have what you requested
16:33
<
clever >
matthewcroughan: you can change mesa with an override, but damn near everything depends on mesa, so you would have to rebuild 80% of your software
16:32
<
clever >
matthewcroughan: the same way you used -I nixpkgs=/path/to/clone, but checkout an older revision
16:32
<
clever >
you have special access, because you can touch the drive
16:32
<
clever >
so you dont even need cdrom
16:31
<
clever >
jasom: it might be the fact that i signed in from a physical terminal (display-manager), so it knows i have physical access to the tray
16:31
<
clever >
jasom: there is something special on it, giving me rw, despite the owner/group saying i shouldnt
16:31
<
clever >
user:clever:rw-
16:31
<
clever >
[root@amd-nixos:~]# getfacl /dev/sr0
16:29
<
clever >
jasom: i can see the same + on my dvd drive
16:29
<
clever >
matthewcroughan: probably
16:29
<
clever >
brw-rw----+ 1 root cdrom 11, 0 Aug 5 06:32 /dev/sr0
16:29
<
clever >
jasom: lsattr?
16:28
<
clever >
what did that + mean, what does `stat /dev/sr0` say about it?
16:27
<
clever >
yep, the reboot did the trick there
16:27
<
clever >
jasom: if you run `id`, what groups are you in?
16:14
<
clever >
nix-repl> toString ~/.
16:14
<
clever >
"/home/clever"
16:14
<
clever >
but if you treat it as a string, such as "${./.}" or pass it to a derivation, it will copy
16:13
<
clever >
for extra fun, `toString ./.` wont copy, it will return an absolute path
16:12
<
clever >
but only when cast into a string, its still a path, so you could + "/../bar" to change your mind about which dir you want
16:12
<
clever >
./. + "/foo" will copy only the foo subdir, rather then all of .
16:12
<
clever >
once cast into a string, yeah
16:11
<
clever >
"${./.}" will also force a copy
16:11
<
clever >
string + path will cast the path into a string (triggering the copy), and then append the path of the copy
16:11
<
clever >
path + string returns a new path, not yet copied to the store
16:11
<
clever >
it copied ./. into the nix store
16:10
<
clever >
numkem: it prefixed the path with foo, and now the path is invalid
16:10
<
clever >
"foo/nix/store/2l8rw29aqs2j1pzgcrapg0992phz0vx9-Documents"
16:10
<
clever >
nix-repl> "foo" + ./.
16:08
<
clever >
try that in `nix repl`
16:08
<
clever >
> "foo" + ./.
16:08
<
clever >
numkem: path + string always returns a path, but string + path will just turn into a mess
16:07
<
clever >
numkem: which is almost never what you want
16:07
<
clever >
numkem: `let var = "foo"; in ./prefix + "${var}"` turns inti `./prefixfoo`
16:06
<
clever >
numkem: ./prefix + "/${var}/suffix.txt"
08:45
<
clever >
its in the nix source, but gets ran by something in nixpkgs/nixos]
08:44
<
clever >
simonpe^^: thats basically how ~/.nix-defexpr/channels_root gets there
08:44
<
clever >
simonpe^^: use something in the global bashrc to mess with ~/.nix-defexpr/
08:36
<
clever >
github always generates a dir like that, named after the repo
08:35
<
clever >
simonpe^^: it should just unpack the tar to a dir, but it may require that the tar contain a subdir, like foo/everythingelse
08:04
<
clever >
then you need to figure out what went wrong there
08:03
<
clever >
simonpe^^: and if you `cat /nix/store/lp0ivjq6spxys79a3dp727vpyma11n8m-source/default.nix`, its the expected content?
08:01
<
clever >
try callPackages instead of callPackage?
08:00
<
clever >
are you censoring the files?
08:00
<
clever >
somethings not right then
07:59
<
clever >
simonpe^^: if you eval `x` again, is it the same output?
07:59
<
clever >
simonpe^^: then your default.nix is returning one package, not a set
07:58
<
clever >
simonpe^^: `x = import ~/.nix-defexpr/unmanaged/rco` then `x` ?
07:57
<
clever >
simonpe^^: i would expect that to all work, if you do `nix repl ~/.nix-defexpr/unmanaged/rco` and then try to eval `uuu`, what do you get?
07:53
<
clever >
simonpe^^: can you pastebin that default.nix?
07:53
<
clever >
simonpe^^: why are you using callPackage? does the tar default.nix return a set or a package?
07:50
<
clever >
simonpe^^: what are the contents for rco/default.nix?
07:26
<
clever >
idontgetoutmuch[: you want just `nix-build -I nixpkgs=~/nixpkgs`
07:26
<
clever >
-p is only valid on nix-shell
07:26
<
clever >
idontgetoutmuch[: nix-build and -p arent valid together
07:22
<
clever >
simonpe^^: and then it will just fetch it dynamically, every time it evals
07:22
<
clever >
simonpe^^: you could just do: import (builtins.fetchTarball "https://...../archive?format=tar.gz")
07:21
<
clever >
idontgetoutmuch[: does your derivation name name = "shell"; ?
07:21
<
clever >
but if you edit ~/.nix-defexpr/ yourself, it takes effect immediate
07:21
<
clever >
and `nix-channel --update` is what modifies ~/.nix-defexpr/channels_root/nixpkgs
07:21
<
clever >
nix-env just reads ~/.nix-defexpr/ every time you run it
07:20
<
clever >
the `test` part of the dir is basically ignored, but lets you namespace things some, root manages channels_root, you manage channels, test is ignored by nix-channel (unmanaged)
07:19
<
clever >
simonpe^^: but as in my example, the foo/default.nix doesnt have to actually be nixpkgs/default.nix, it can be an expr, that imports it, via any means you have
07:19
<
clever >
simonpe^^: nix-env will recursively search ~/.nix-defexpr/ until it either finds a foo.nix or a foo/default.nix, then create a foo in a special set, nix-env -iA foo.hello then refers to that set
07:18
<
clever >
[clever@amd-nixos:~]$ cat ~/.nix-defexpr/test/foo/default.nix
07:18
<
clever >
import /home/clever/apps/nixpkgs
07:18
<
clever >
simonpe^^: one sec
07:16
<
clever >
not much you can do, other then host a nixexprs.tar.gz on plain http(s) elsewhere
07:12
<
clever >
simonpe^^: &dummyField=anything.tar.gz
06:55
<
clever >
matthewcroughan: the path to a git clone of nixpkgs
06:54
<
clever >
matthewcroughan: nixos-rebuild switch -I nixpkgs=/path/to/nixpkgs/repo/on/master/branch
06:53
<
clever >
idontgetoutmuch[: you probably just want `installPhase = ''.....`
06:42
<
clever >
last i heard, wayland can only do window capture, not monitor capture
06:42
<
clever >
and monitor capture in chromium
06:42
<
clever >
i also rely on too many X11 only apps, like obs-studio
06:41
<
clever >
ive not tried wayland out yet, and ive heard that its still heavily experimental
06:40
<
clever >
why do you want to use wayland?
06:39
<
clever >
but if you dont want hw decode, dont do anything
06:39
<
clever >
to extraPackages
06:38
<
clever >
matthewcroughan: if you want hw accelerated video decode, add something extra
06:25
<
clever >
ive built chromium before, it takes 12 hours
06:24
<
clever >
2020-08-05 03:20:03 < clever> the ; only occurs when you have a key = value; pair
06:23
<
clever >
the entire file boils down to { config, pkgs, ... }: { key=value; pairs=value; }
06:22
<
clever >
and thats just a value, so it doesnt have a ;
06:22
<
clever >
if you fix the indenting, its much more obvious that 6 and 67 are a pair
06:21
<
clever >
the intending is also wrong, making it more confusing to read
06:21
<
clever >
and there was another } that was there to begin with, that should have been left alone
06:20
<
clever >
thats the }; you should have removed
06:20
<
clever >
2020-08-05 03:12:17 < clever> the }; that is at the same indent level
06:20
<
clever >
the }; is part of the config = {
06:20
<
clever >
but 7-67 is just a value
06:20
<
clever >
the ; only occurs when you have a key = value; pair
06:19
<
clever >
67's } matches up to 7's { and that {} pair shouldnt have a ;
06:19
<
clever >
matthewcroughan: line 67 should just be a }
06:18
<
clever >
matthewcroughan: and also edit the name, so it ends in .nix, then github will syntax highlight
06:17
<
clever >
line 67 is missing from the gist, cant say whats wrong
06:16
<
clever >
matthewcroughan: yeah, that looks right
06:14
<
clever >
and its indented by one level
06:14
<
clever >
the config = { is in the chromium example
06:13
<
clever >
as the config = {
06:13
<
clever >
you dont have a config = { so you dont have to remove it
06:12
<
clever >
the }; that is at the same indent level
06:11
<
clever >
matthewcroughan: remove the config={ and matching };
06:10
<
clever >
matthewcroughan: if both options and config are missing, it will automatically wrap your entire module with config = { ... }; for you
06:10
<
clever >
matthewcroughan: all nixos modules have 3 top level keys, options, config, and imports
06:08
<
clever >
hardware-configuration.nix usually shouldnt be edited
06:04
<
clever >
oops, gist normally shows those
06:01
<
clever >
it has to deal with authentication, gist doesnt allow anon uploads