2020-05-16
17:01
<
clever >
pie_: if you put kernel config in there, it should change what its netbooting
17:01
<
clever >
pie_: the netboot module includes a nixos config in the module = { .. };
17:00
<
clever >
pie_: in what way should it be similar?
16:58
<
clever >
cant remember i had verified that with wireshark or not
16:58
<
clever >
not clear if the bios was to blame or the setup
16:58
<
clever >
pie_: i never got efi to even load ipxe
16:57
<
clever >
pie_: note that justdoit wont ask before wiping any disks
16:57
<
clever >
pie_: then it probably worked the whole way, you can either justdoit or nixos-install as normal
16:57
<
clever >
pie_: depends on what the prompt says
16:53
<
clever >
pie_: i never really got efi netboot to work right
06:15
<
clever >
yeah, nixpkgs
06:15
<
clever >
ssk: its a function that will build a docker image when you feed it some more args
06:13
<
clever >
that often happens when doing cross
06:08
<
clever >
ssk: try tab-completing it in `nix repl '<nixpkgs>'`
06:03
<
clever >
ssk: pkgs.pkgsCross.something.dockerTools.buildImage maybe?
01:14
<
clever >
xxsds: yeah
01:14
<
clever >
xxsds: try adding `--option sandbox false` ?
01:10
<
clever >
xxsds: ssh into it?
01:02
<
clever >
morgrimm: yes
01:00
<
clever >
xxsds: can you pastebin the full output? and the output of `mount` ?
01:00
<
clever >
cole-h: that is the proper way to fix things in bash, and anything else you try will just lead to problems
01:00
<
clever >
xxsds: you shouldnt use switch under enter, only nixos-rebuild boot
00:59
<
clever >
cole-h: if you dont quote it, spaces and other stuff can break things
00:59
<
clever >
cole-h: cat "$VAR"
00:58
<
clever >
cole-h: which env var, going to which cmd?
00:57
<
clever >
cole-h: why does it need to be escaped? you could quote it better maybe?
00:54
<
clever >
cole-h: something in your build is asking to turn the sandbox off, but your nix.conf wont allow it
00:49
<
clever >
,runtimeDeps lunik1
00:49
<
clever >
lunik1: it will only be in PATH at build-time, not runtime
00:48
<
clever >
lunik1: anything you put into nativeBuildInputs gets added to PATH for you
00:47
<
clever >
> { a=1; b=2; } // { b=3; c=4; }
00:47
<
clever >
palo: you can also put the writeText result into a let block, to make the code more readable
00:44
<
clever >
palo: thats how all dependencies work in nix
00:44
<
clever >
palo: nix will automatically copy it for you
00:43
<
clever >
palo: you should be able to just run `tor -f ${pkgs.writeText ...}`
00:41
<
clever >
palo: and you cant tell tor to look at another file?
00:41
<
clever >
palo: your running tor in the initrd?
00:41
<
clever >
palo: what do you need a custom file for?
00:40
<
clever >
selfsymmetric-mu: this bot will report the updates, and the URL with the history shows the current state for each channel
00:39
<
clever >
palo: your supposed to be doing just bare /path/to/secret
00:39
<
clever >
palo: pkgs.writeText will write it to /nix/store, and then its not a secret anymore
00:11
<
clever >
cole-h: can also just keep nix-env as-is
00:10
<
clever >
cole-h: isnt a fan of removing -i, or isnt a fan of keeping a neutered nix-env?
00:10
<
clever >
morgrimm: yep
00:10
<
clever >
morgrimm: so the system profile will only change if its ran as root
00:09
<
clever >
morgrimm: it can only delete generations from profiles it has permission to
00:04
<
clever >
cole-h: you could just remove the `-i/-u/-e` flags from nix-env, but keep the rest
2020-05-15
23:52
<
clever >
ah, that will do it
23:51
<
clever >
i think so
23:49
<
clever >
palo: you need to fix the Cargo.lock file
23:46
<
clever >
the wanted one
23:46
<
clever >
palo: it should be printing 2 hashes, is the 2nd one the one from your expr?
22:20
<
clever >
emily: its the only way to manage generations
22:20
<
clever >
emily: nix-env is still used behind the scenes for nixos-rebuild and nix-channel
09:53
<
clever >
and then insert an overlay at a later time
09:53
<
clever >
so you can make a set of inter-connected packages, that can callpackage eachother
09:53
<
clever >
but, it also adds a .overrideScope' function, that can take an overlay, and insert it between the return-value and the `self` given to packages
09:52
<
clever >
fps: line 52 creates a new set of packages, containing every attr that `packages: self: { ... }` returned
09:51
<
clever >
fps: if you want to get more fancy, then you can use makeScope
09:47
<
clever >
nix-build '<nixpkgs>' --arg overlays '[ (self: super: { pkg1 = self.callPackage ./pkg1 {}; pkg2 = self.callPackage ./pkg2 {}; }) ]' -A pkg2
09:47
<
clever >
and then you can start to get fancy
09:46
<
clever >
fps: with import <nixpkgs> { overlays = [ (self: super: { pkg1 = self.callPackage ./pkg1 {}; pkg2 = self.callPackage ./pkg2 {}; }) ]; }
09:46
<
clever >
fps: thats where an overlay can be simpler
09:08
<
clever >
bqv: the filesystem stuff isnt worth keeping in git, because if i loose the root disk, the rest are likely also gone, and i have to redo the filesystems anyways
09:08
<
clever >
bqv: i keep my configuration.nix thin, just filesystem stuff, and imports = [ /path/to/real/config.nix ];
09:07
<
clever >
Ashy: nix-shell -p 'foo.override { option = true; }'
09:05
<
clever >
setup-etc.pl has to iterate over /etc to see if there are old symlinks to delete and such
08:39
<
clever >
,pills tom39291
08:25
<
clever >
rnhmjoj: and its a bug that `nix-build -p` is applying shell-only logic
08:25
<
clever >
rnhmjoj: behind the scenes, nix-build and nix-shell are the same program, and it uses argv[0] to decide how it should behave
08:23
<
clever >
energizer: and id say its a but that nix-build -p is applying the same logic, its a nix-shell only flag
08:22
<
clever >
rnhmjoj: behind the scenes, `nix-shell -p foo bar` will basically just run `nix-shell -E 'with import <nixpkgs> {}; stdenv.mkDerivation { name = "name"; buildInputs = [ (foo) (bar) ]; }`
08:07
<
clever >
DamienCassou: you could try comparing the output of powertop as a start
00:22
<
clever >
c00w: you can also run `nix-store --query --roots /nix/store/a` to see what depends on a
00:20
<
clever >
c00w: if its used at build-time, its rooted by b being built
00:19
<
clever >
c00w: it should preserve anything currently in use
2020-05-14
22:52
<
clever >
Robertof: youll need to find out which module added zfs, and convince it to stop adding it
21:59
<
clever >
aiverson: `nixops scp machine --to foo.txt .`
21:56
<
clever >
that shows how to load a custom set of modules in a default.nix
21:56
<
clever >
unclechu: then youll want my module example
21:52
<
clever >
and then that loads more via imports
21:52
<
clever >
`nix repl '<nixpkgs/nixos>'` will load <nixos-config> which is usually your configuration.nix
21:52
<
clever >
except via -I nixos-config=
21:51
<
clever >
the module shouldnt be passed to nix repl
21:49
<
clever >
that looks a bit weird
21:45
<
clever >
unclechu: you have to load the module with the module tooling, something like `nix repl '<nixpkgs/nixos>'`
21:17
<
clever >
unclechu: (builtins.unsafeGetAttrPos "a" { a=1; }).file
21:17
<
clever >
unclechu: maybe using builtins.unsafeGetAttrPos
21:16
<
clever >
unclechu: so it depends a lot on what you want to do after you get that path
21:15
<
clever >
unclechu: it only gets copied to the store when you treat it as a string
21:14
<
clever >
unclechu: ./. is always the dir the file is within
21:13
<
clever >
qyliss: and lines 9-13 would be the nixos config for the disk image it boots, so you can bake in anything needed for testing
21:11
<
clever >
qyliss: if you just swap out line 22 to do rescue-kernel = /path/to/zImage; then it will use your custom kernel (but not any of the modules)
21:11
<
clever >
qyliss: this will add another entry to the grub menu, for booting a kernel+initrd pair, that runs entirely from a ramdisk
21:10
<
clever >
qyliss: does it have to run on hw, or would a vm be fine?
21:10
<
clever >
qyliss: one sec
21:09
<
clever >
qyliss: there is a section in the nixpkgs manual on building the kernel with nix-shell
08:42
<
clever >
so you must `-I nixpkgs=something`
08:42
<
clever >
nix-shell -p always loads <nixpkgs>
06:58
<
clever >
aiverson: `sudo -u foo bash`
06:56
<
clever >
aiverson: if you `sudo -u <foo> -i` to that user, and then try to `ls -l` the key, what happens?
03:32
<
clever >
jasom: yep
03:21
<
clever >
jasom: you can just add custom modules to the imports list
03:20
<
clever >
jasom: only a module can do that, overlays cant
00:39
<
clever >
energizer: does that network card exist?
00:39
<
clever >
energizer: probably running, the others look like they depend on it
00:34
<
clever >
no idea why
00:34
<
clever >
energizer: ah, ive seen that before too, systemd is asking for a pw somewhere, for some reason
00:32
<
clever >
energizer: what does `ps -eH x` say its doing for most of the slow time of switch?
00:31
<
clever >
energizer: then its not the nix eval
00:29
<
clever >
energizer: what about `nixos-rebuild dry-run` ?
00:25
<
clever >
you can still staticly link some libs, while dynamicly linking others
00:24
<
clever >
kvda: osx doesnt allow static, ever
2020-05-13
23:51
<
clever >
kvda: and get all deps from pkgsStatic instead of pkgs
23:50
<
clever >
kvda: the shell file must use pkgsStatic.stdenv instead of the normal stdenv
23:49
<
clever >
kvda: youll want to build your stuff from pkgsStatic.stdenv
23:49
<
clever >
Gaelan: yeah
23:43
<
clever >
kvda: this will build all packages staticly with musl
23:42
<
clever >
> pkgsStatic.sqlite
22:49
<
clever >
morgrimm: home-manager can only manage $HOME
22:48
<
clever >
morgrimm: home-manager cant touch /run
22:42
<
clever >
morgrimm: and you only get drivers in /run if you set hardware.opengl.enable = true;
22:41
<
clever >
morgrimm: how did you install mesa?
22:25
<
clever >
Edes: then you want pkgs.substituteAll and @foo@ in the file
22:15
<
clever >
Edes: if you make that file a nix expr, you can just run `import` on it directly
22:03
<
clever >
heh, didnt even notice it
22:00
<
clever >
and we know what to check next time it goes wrong
21:57
<
clever >
DigitalKiwi: check the etc in /run/booted-system/
21:56
<
clever >
it should have been like that on boot
21:56
<
clever >
not sure then, maybe a bug?
21:55
<
clever >
DigitalKiwi: you can also just chmod 666
21:55
<
clever >
DigitalKiwi: has this file changed on your machine?
21:55
<
clever >
]$ grep MODE /etc/udev/rules.d/90-zfs.rules
21:55
<
clever >
KERNEL=="zfs", MODE="0666", OPTIONS+="static_node=zfs"
21:54
<
clever >
DigitalKiwi: if you chmod it, can you list again?
21:54
<
clever >
DigitalKiwi: that would be the problem then
21:53
<
clever >
DigitalKiwi: do the permissions on /dev/zfs look diff to you?
21:52
<
clever >
DigitalKiwi: which is just open for anybody
21:52
<
clever >
crw-rw-rw- 1 root root 10, 249 Apr 14 11:44 /dev/zfs
21:52
<
clever >
DigitalKiwi: strace says its touching this
21:52
<
clever >
openat(AT_FDCWD, "/dev/zfs", O_RDWR) = 5
21:52
<
clever >
DigitalKiwi: `zfs list` works without root here, and i havent updated for a few months
21:35
<
clever >
you need that if you cant get bridging to work
21:34
<
clever >
pikajude: probably
21:30
<
clever >
then set the router's dns server, in the dhcp server config
21:30
<
clever >
> pkgs.bind.meta.description
21:30
<
clever >
> pkgs.bind
21:29
<
clever >
i tend to use bind for that
21:29
<
clever >
ah, so no dns for the guest
21:29
<
clever >
what did that part do again?
21:28
<
clever >
pikajude: it should, since the guest has to download things to build
21:07
<
clever >
pikajude: it would probably be simpler to just use the nat code nixos/iohk use, you already have an example of how to configure everything
21:06
<
clever >
pikajude: there is a special bit in the first byte, that marks an addr as a broadcast one, which you shouldnt use
21:06
<
clever >
pikajude: thats probably fine, as long as its unique
21:05
<
clever >
pikajude: what mac did you last try?
21:05
<
clever >
acowley: -I foo=/foo -I bar=/bar
21:04
<
clever >
acowley: -I cant take a : seperated list, you need multiple -I's
21:02
<
clever >
pikajude: no, the mac's need to all be unique
21:02
<
clever >
pikajude: the guest inside the vm should have a unique mac, and the eth card must support mac spoofing i believe
21:02
<
clever >
pikajude: ah, i can see how you could misread the msg
21:01
<
clever >
pikajude: yep, thats what i said to do earlier
20:52
<
clever >
selfsymmetric-mu: i think you can do /archive/pull/42/head.tar.gz, but ive not tried that
20:50
<
clever >
selfsymmetric-mu: just push to github, done!
20:49
<
clever >
selfsymmetric-mu: github creates a tarball automatically, for every commit in the repo
20:36
<
clever >
pikajude: tap0 doesnt need an ip assigned
20:30
<
clever >
it should be happening automatically
20:30
<
clever >
pikajude: and only send it to the right places, like a normal switch
20:30
<
clever >
pikajude: it will keep track of what mac addr is on each slave if
20:29
<
clever >
pikajude: so the eth interface should just be ignored entirely
20:28
<
clever >
pikajude: any packets you try to send out the bridge, get sent out all slave IF's (the tap and eth)
20:20
<
clever >
pikajude: looks normal, and then on enp8s0 what does it show? if you leave both br0 and enp8s0 tcpdump'ing at the same time
20:17
<
clever >
pikajude: can you pastebin the output of `ip link`, `ip addr` and the tcpdump logs for br0?
20:17
<
clever >
pikajude: it should say that in `ip link`
20:17
<
clever >
pikajude: is eth0 part of br0?
20:14
<
clever >
pikajude: you can run tcpdump on several interfaces at once, because it may have just stopped
20:13
<
clever >
pikajude: does the packet make it thru all 4 interfaces?
20:13
<
clever >
pikajude: its less about if its failing, and more about how far the packet is getting
20:12
<
clever >
pikajude: "port 58 or port 68"
20:11
<
clever >
pikajude: add a port filter to the tcpdump
20:09
<
clever >
pikajude: then move the tcpdump to br0, are the packets getting there? then eth0?
20:09
<
clever >
pikajude: on the host, do `tcpdump -i tap0 -p -n` and see if you can detect the guest dhcp packets as it tries to get an ip
20:07
<
clever >
pikajude: use tcpdump and ping to see how far along the packets are getting
20:07
<
clever >
pikajude: the bridge will forward the guest traffic out eth0, and the local dhcp server will answer
20:07
<
clever >
pikajude: the guest inside the vm has the other side of the tap device, and gets an ip with dhcp as normal
20:06
<
clever >
pikajude: linux will then treat all of them like a single interface
20:06
<
clever >
pikajude: only br0 should get an ip, the slaves of br0 never get cofnigured
19:34
<
clever >
pikajude: thats if you point a single nix-build to several drvs
19:33
<
clever >
Gaelan: depending on the order they finish in, your result may be pointing to the "wrong" thing
19:33
<
clever >
Gaelan: nope, but when each one finishes, it will overwrite the result symlink
19:28
<
clever >
configure br0 like you used to configure eth0
19:27
<
clever >
pikajude: you must then move all of your network config to br0, not eth0
19:27
<
clever >
pikajude: then packets can just flow between the 2 like a regular switch
19:27
<
clever >
pikajude: create a bridge that both eth0 and tap0 are members of
19:27
<
clever >
pikajude: one min
19:27
<
clever >
pikajude: but if you use bridging instead, the tap interface will link to the lan, and use the lan's dhcp
19:26
<
clever >
pikajude: if you use nat, then the tap interface is isolated from the world, and needs its own dhcp server
19:26
<
clever >
pikajude: depends on if you use nat or bridge
19:25
<
clever >
pikajude: the iohk stuff is based on the nixos one, but can run several macs on a single host
19:25
<
clever >
pikajude: the nixos config runs a single mac vm from a zvol
19:23
<
clever >
pikajude: getting links...
19:23
<
clever >
pikajude: already done
19:22
<
clever >
> "file://" + "/home/clever/foo"
19:22
<
clever >
Gaelan: file:///home
19:16
<
clever >
omnipotententity: preConfigure = "set -x"
19:08
<
clever >
between lines 20 and 21
19:07
<
clever >
you want to add nixpkgs.config.allowUnfree to the container then
19:07
<
clever >
T0pH4t: i also dont see any unfree software in there to cause an error
19:06
<
clever >
T0pH4t: are you sure its actually using that config file? that typo should have given a totally different error
19:05
<
clever >
T0pH4t: you have the nixpkgs. missing on line 3
19:05
<
clever >
T0pH4t: its nixpkgs.config.allowUnfree
19:00
<
clever >
T0pH4t: can you pastebin the configuration.nix?
18:59
<
clever >
T0pH4t: are you doing `import <nixpkgs> {}` at any point?
18:29
<
clever >
camsbury: read the grub.conf file it generates before you reboot?
18:28
<
clever >
camsbury: does it actually fail the switch?
18:26
<
clever >
camsbury: its likely a warning, its just blindly searching anything that could be a block device, to find any other os
04:46
<
clever >
assuming the user parsing happens in another uid
04:46
<
clever >
sounds like it may be using IPC within itself, to pass the pw from the user proc to its auth proc?
04:45
<
clever >
it does have several dovecot related users, but its not clear which one the auth gets ran as
04:44
<
clever >
you would need to enable dovecot and pam, and see what its doing internally
04:44
<
clever >
not clear from that config
04:44
<
clever >
and the defaults populate it
04:43
<
clever >
vika_nezrimaya: but setting anything at all in .dovecot2, causes the config to get made
04:43
<
clever >
vika_nezrimaya: i'm not sure how it works, but dovecot isnt setting any pam options
04:41
<
clever >
vika_nezrimaya: and i see pam stuff in dovecot, another email prog
04:41
<
clever >
/home/clever/apps/nixpkgs/nixos/modules/services/mail/dovecot.nix: security.pam.services.dovecot2 = mkIf cfg.enablePAM {};
04:40
<
clever >
vika_nezrimaya: thats how you authorize more things in nixos
04:39
<
clever >
vika_nezrimaya: and that setuid helper will use /etc/pam.d/ to enforce what its parent proc can actually ask of it
04:39
<
clever >
vika_nezrimaya: i think the pam library can run a setuid helper, to handle pw validation
04:24
<
clever >
cole-h: lorri is mostly just a cache for direnv, and deals with async building
03:50
<
clever >
mitchellh: i only ever compile things in nix-shell, but some people use direnv to automate entering the shell
03:49
<
clever >
mitchellh: most compilers wont work if installed with nix-env, only nix-shell and nix-build can make a compiler work
03:41
<
clever >
colemickens: there is also `nix copy --to s3://bucket` for backends nix itself supports
03:38
<
clever >
colemickens: you can use `nix copy --to file:///path` to make a dir of .narinfo and .nar.xz files, then just upload it to any static http server
03:19
<
clever >
keithy[m]: have you seen nix-serve ?
02:56
<
clever >
unclechu: nothing in /nix/store can be a secret from other users
02:56
<
clever >
unclechu: nix doesnt allow uid or gid in /nix/store/, everything must be root:root
02:54
<
clever >
unclechu: i dont think there is anything for that, why do you need ACL's?
02:44
<
clever >
unclechu: the only permission bit you can set is +x/-x, you have no choice over any other bit
02:44
<
clever >
unclechu: you cant put setuid or acl stuff in /nix/store/
02:43
<
clever >
unclechu: which permissions are you trying to add?
02:39
<
clever >
> vmTools.buildRPM
02:15
<
clever >
mitchellh: you can tab-complete lib. in `nix repl '<nixpkgs>'`
02:15
<
clever >
> :p lib.makeBinPath [ hello busybox ]
02:14
<
clever >
mitchellh: line 98, lib.makeBinPath
02:02
<
clever >
mitchellh: if your using single-user nix, then anything nix builds can freely delete things in /nix/store and corrrupt paths
02:00
<
clever >
mitchellh: run `nix-store --verify --check-contents`
01:40
<
clever >
dmj`: Catalina says otherwise
01:39
<
clever >
dmj`: but if your using a single-user nix, poorly written derivations can still break /nix/store/
01:17
<
clever >
mitchellh: run `nix-store --verify --check-contents`
00:12
<
clever >
dmj`: haskell isnt as terrible as js :P
2020-05-12
22:51
<
clever >
pjt_014: you also didnt pass the system param to anything, so it does nothing
22:50
<
clever >
pjt_014: you want something = pkgs.recutils.override { ... };
22:50
<
clever >
pjt_014: that is creating an attribute called recutils.override, not calling recutils.override
22:26
<
clever >
so the `ps aux` looks cleaner
22:26
<
clever >
jumper149: i think it will run httpd with the absolute path, but set argv[0] to plain "httpd"
22:26
<
clever >
jumper149: its a systemd flag
22:24
<
clever >
,locate bin cbindgen
21:13
<
clever >
Jonathan54: you may need libredirect
18:13
<
clever >
infinisil: i worked around it with raw nsenter
18:13
<
clever >
infinisil: and the build i was trying to resume, was using absolute paths to $NIX_BUILD_TOP
18:12
<
clever >
infinisil: i wasnt able to get the chroot part of cntr to work right
18:08
<
clever >
Woutifier: and you can run nix-shell on the drv file, to get the deps into your env
17:04
<
clever >
evelyn: nix eval nixpkgs.lib.version
17:03
<
clever >
floscr: thats part of it
17:02
<
clever >
floscr: config.something.colors.black;
16:53
<
clever >
immae: how is a different librt causing problems?
16:48
<
clever >
different arches have renamed it some
16:48
<
clever >
and ldd says it found an ld.so
16:47
<
clever >
and can even mislead you more, when the ld.so hasnt been patchelf'd
16:47
<
clever >
which technically uses the wrong ld.so for the debug, giving different results
16:47
<
clever >
ldd is then a shell script, to run `LD_TRACE_LOADED_OBJECTS=1 /path/to/ld.so ${yourbinary}`
16:46
<
clever >
but if LD_TRACE_LOADED_OBJECTS=1 has been set, ld.so will print debug, and never run your main()
16:46
<
clever >
immae: that ld.so will then recursively load the libs
16:46
<
clever >
immae: when a program is ran normally, the ELF header says which ld.so to start with, and what the needed libs are and the RPATH
16:45
<
clever >
immae: try just running the program directly, with this env var set
16:44
<
clever >
$ LD_TRACE_LOADED_OBJECTS=1 ls linux-vdso.so.1 (0x00007ffedf7b3000) librt.so.1 => /nix/store/qb6k4hp7gk331x9fydw0w7qj4dv09bwz-glibc-2.27/lib/librt.so.1 (0x00007ffb1a450000)