2018-09-05
16:06
<
clever >
dhess: already done that, in my 3rd pxe example
16:06
<
clever >
dhess: this creates a qemu VM that has nvme drives
16:06
<
clever >
dhess: and then there is testing nvme under justdoit, i cant be wiping my laptop hourly :P
16:05
<
clever >
dhess: and PXE is legacy boot, but NVME is uefi only, so i had to mess with the removable flag to get the machine to boot
16:05
<
clever >
so i have to conditionally insert a p everywhere
16:04
<
clever >
dhess: the problem, is that justdoit assumes ${drive}1 is partition 1, but nvme uses ${drive}p1
16:04
<
clever >
dhess: but nvme and uefi had other things to say about those plans, lol
16:03
<
clever >
dhess: my original use-case for netboot_server.nix, was to netboot my new laptop, from the old laptop, and install nixos with a simple `justdoit` at the shell and be done instantly
16:02
<
clever >
this one is a complete router, with dhcp, bind, tftp, nginx, and netboot
16:01
<
clever >
ah, that one isnt as complete
16:01
<
clever >
ah, netboot_server.nix ?
16:01
<
clever >
dhess: which one? i have 2 or 3 pxe configs, lol
16:01
<
clever >
dhess: nice
15:59
<
clever >
and if you `journalctl -f -u hydra-check-space.service`, you will see when disk space has gotten low, and it stopped things
15:59
<
clever >
so if you want to delete things, you need to maybe reduce the keep number, `systemctl start hydra-update-gc-roots.service`, wait for it to finish, then nix-collect-garbage
15:58
<
clever >
which then allows nix-collect-garbage to GC the actual builds
15:58
<
clever >
hydra-update-gc-roots.service is responsible for GC'ing the GC roots
15:57
<
clever >
but, the evaluator creates the roots at eval time, and hydra only cleans up roots once a day
15:57
<
clever >
this jobset is setup to keep the entire closure for the last 5 evals GC rooted
15:56
<
clever >
srk: first, is the keep number on each jobset
15:56
<
clever >
srk: but hydra is lazy about updating its gc roots
15:55
<
clever >
dhess: mainline
15:55
<
clever >
nothing exists to start them again, so you have to manually do that with systemctl
15:55
<
clever >
and if it goes under 1gig, the evaluator is also stopped
15:54
<
clever >
when the nix store goes under 2gig free, the queue-runner will automatically be stopped
15:41
<
clever >
half of my job is managing this hydra
15:41
<
clever >
i'm on the devops team
15:39
<
clever >
dhess: check the PR that introduced those changes
14:40
<
clever >
device(s) is only for legacy boot
14:39
<
clever >
tobiasBora: when using efi, device should be "nodev"
14:29
<
clever >
and then either create the pool on it, or use lvm to splut the luks up
14:28
<
clever >
yeah, the encryption has to be done at the block-device level, with luks
14:28
<
clever >
tobiasBora: native zfs encryption isnt considered production ready
14:27
<
clever >
tobiasBora: yeah
14:27
<
clever >
i use luks on my laptop
14:26
<
clever >
and it will dynamically adjust itself based on how much is used
14:26
<
clever >
by default, the max is 50% of your ram
14:18
<
clever >
Denommus: thats how i was last doing it
13:42
<
clever >
philippD: nix-shell -p 'haskellPackages.ghcWithPackages (ps: [ ps.lens ])'
13:42
<
clever >
philippD: you must call ghcWithPackages
13:27
<
clever >
tobiasBora: what device is the PV on?, is there any luks at play?
13:20
<
clever >
Baughn: bind mounts, you can re-mount a subdir of any fs as read-only
13:19
<
clever >
Baughn: nix will just put full storepaths relative to the rootfs dataset, when things are on the same FS
13:18
<
clever >
Baughn: symlinks would still fail
13:18
<
clever >
and then grub has to deal with the giant directory that is /nix/store, which can break grub
13:17
<
clever >
of note, if /boot and /nix/store are on the same zfs dataset, nix wont copy the kernels to /boot
13:15
<
clever >
tobiasBora: or you can use ext4 for /boot (or even use the /boot dir on the / partition), and put the vfat on /boot/EFI, which requires boot.loader.efi.efiSysMountPoint = "/boot/EFI";
13:14
<
clever >
tobiasBora: you can either put the EFI system partition (the vfat) at /boot
13:10
<
clever >
tobiasBora: and also: boot.loader.grub.efiSupport = true; boot.loader.grub.device = "nodev";
13:08
<
clever >
tobiasBora: systemd-boot
12:55
<
clever >
tobiasBora: try switching to grub?
12:23
<
clever >
tobiasBora: and if you do nixos-install now?
12:20
<
clever >
tobiasBora: i dont see a boot volume mounted to /mnt/boot/
12:06
<
clever >
tobiasBora: what does `mount` output?
12:04
<
clever >
tobiasBora: what is preventing you from installing it on either?
11:40
<
clever >
tobiasBora: one option i sometimes do, just format a partition on the USB, and do normal nixos-install against it, and treat it like a normal dual-boot setup
10:54
<
clever >
rather then using self.callPackage ({ writeScriptBin }: ... ) {};
10:53
<
clever >
tilpner: i think line 14 is cheating more, it just outright does pkgs.writeScriptBin
10:52
<
clever >
tilpner: that only gets lib functions, but not pkgs
10:46
<
clever >
and callPackage still falls back to nixpkgs
10:46
<
clever >
only the things within the original packages function (and the overlays added) are in the final result, but no nixpkgs
10:45
<
clever >
and line 50 uses overrideScope to inject overlays
10:45
<
clever >
48 auto-creates a self.callPackage, that will search self first, then pkgs
10:45
<
clever >
line 48 then makes a new scope around that
10:45
<
clever >
line 3 defines a `packages = self: { ... }` function, and it must refer to its own members via self
10:44
<
clever >
srhb: have you seen newScope and makeExtensible?
10:02
<
clever >
lets head over to #nixos-chat
10:01
<
clever >
infinisil: previously, a&b from my example above, are just the same Value,
*checks*
10:01
<
clever >
infinisil: also, i can see this potentially harming memory usage
09:58
<
clever >
essentially, `let foo = { ... }; a = foo; b = foo;` results in `a != b`
09:58
<
clever >
and now the 2 different ways to access the same set, are not equal to eachother
09:58
<
clever >
oh, and they wont have the same __path anyways!
09:58
<
clever >
are you mutating both targetPlatform and hostPlatform the same way?
09:57
<
clever >
206 has moved to 237
09:56
<
clever >
206 is the nearest
09:55
<
clever >
infinisil: no assertion there
09:53
<
clever >
> "${hello}"
09:52
<
clever >
> hello.outPath
09:52
<
clever >
and every single derivation
09:52
<
clever >
so even your strings can have paths :P
09:51
<
clever >
this is a set, but nix treats it as a string!
09:51
<
clever >
> "${ { outPath = "foo"; } }"
09:51
<
clever >
> "${ { outPath = "foo" } }"
09:51
<
clever >
it can also be done on strings, let me see
09:50
<
clever >
so you could do `let foo = x: x*5; in x.__path;`
09:50
<
clever >
this would let you turn a function into a "set" that still behaves like a function
09:50
<
clever >
infinisil: have you seen the functor thing?
09:49
<
clever >
infinisil: ah, so you just map over every attr, and // a __path to every key
09:46
<
clever >
infinisil: how is __path done?
06:19
<
clever >
elvishjerricco: try copying result/bin/run-nixos-vm, then add a `set -x` to the start
06:18
<
clever >
it will add the , in if the var is set
06:18
<
clever >
oh wait, i just looked closer at the bash
06:18
<
clever >
elvishjerricco: the , is missing from your var
06:16
<
clever >
elvishjerricco: if you read the generated at result/bin/run-nixos-vm, what does ti do with the var?
06:14
<
clever >
it lets you overwrite the -net flags, and it can accidentally remove support for QEMU_NET_OPTS
06:13
<
clever >
oops, without the '
06:13
<
clever >
elvishjerricco: was networkingOptions in the configuration.nix file?
06:04
<
clever >
ah, then you could maybe try the s3 api
06:03
<
clever >
colemickens: one option is to add an azure backend, nix copy already supports s3://
05:59
<
clever >
so they dont try to load the same overlay again
05:59
<
clever >
joehh: at least use import <nixpkgs> { config = {}; overlays = []; } for the inner ones
05:58
<
clever >
joehh: your inner nixpkgs fetch is trying to load the overlay
2018-09-04
15:35
<
clever >
kiloreux: it would be faster to have a single central place, that imports 2 or 3 nixpkgs, then does unstable.callPackage vs pkgs.callPackage
02:37
<
clever >
once it starts copying deps, yeah
02:34
<
clever >
it needs a URL
02:32
<
clever >
techieAgnostic: you want builtins.fetchTarball not fetchFromGitHub
02:03
<
clever >
try only chrome
02:03
<
clever >
did you reboot the entire machine or only chrome?
02:02
<
clever >
rain1: is the mic listed on the input devices tab?
01:58
<
clever >
rain1: you must fully restart chrome to restore capture
01:58
<
clever >
rain1: chromium entirely looses the ability to capture audio if you restart the pulseaudio daemon
01:58
<
clever >
i remember there being something more specific, but dont see it
01:38
<
clever >
tnks: i think the defaults have changed recently
01:29
<
clever >
some people abuse lib.isNixShell to automatically return .env, and nix-build being ran under nix-shell will falsely register as nix-shell, causing nix-build to break
01:29
<
clever >
i try to avoid nesting them
01:29
<
clever >
doesnt really matter that much
01:26
<
clever >
its a bit tricky to inject things into the haskell packages
01:21
<
clever >
so you cant pass it with callPackage
01:21
<
clever >
it doesnt accept imagemagick
01:21
<
clever >
{ mkDerivation, base, filepath, hakyll, hakyll-favicon, stdenv }:
01:08
<
clever >
techieAgnostic: can you gist your files?
2018-09-03
21:17
<
clever >
for example, `nixos-enter --root /mnt`
21:17
<
clever >
v0|d: you want nixos-enter
20:52
<
clever >
elvishjerricco: Sep 03 17:50:04 system76 tcsd[31570]: TCSD TCS ERROR: TCS GetCapability failed with result = 0x1e
20:44
<
clever >
elvishjerricco: looks like the tcsd service installs something, but not tpm-tools
20:38
<
clever >
elvishjerricco: any fun commands i can run to query mine?
20:36
<
clever >
elvishjerricco: interesting, i have a TPM visible on my laptop
20:36
<
clever >
crw------- 1 root root 10, 224 Aug 23 15:37 /dev/tpm0
19:57
<
clever >
i had the exact same problem
19:56
<
clever >
try V instead of v
19:56
<
clever >
Neo--: how are you checking to see if you have virtualbox?
19:55
<
clever >
Neo--: the only thing you need to do is set virtualisation.virtualbox.host.enable = true and then nixos-rebuild switch
18:42
<
clever >
Myrl-saki: what about -v ?
07:57
<
clever >
lorilan: just run `ulimit -s newlimit`
07:56
<
clever >
not sure what else to check then without seeing the nix code
07:53
<
clever >
lorilan: next thing to check is to see if there is any repeating pattern, and if it is actually infinite recursion
07:53
<
clever >
lorilan: stats might be at the bottom, but probably not
07:51
<
clever >
try adding -vvvvv
07:51
<
clever >
errors probably hide it
07:48
<
clever >
lorilan: `ulimit -a` shows all limits
07:48
<
clever >
lorilan: what about adding NIX_SHOW_STATS=1 to things?
07:46
<
clever >
yeah, it feels like that part of the time cmd is just broken
07:44
<
clever >
that feels abnormally low, but what does it report for your expressions?
07:44
<
clever >
Average stack size (kbytes): 0
07:44
<
clever >
[clever@amd-nixos:~/hie-slow-start]$ command time -v nix-instantiate default.nix -A hie
07:43
<
clever >
lorilan: default is 8mb for me
07:43
<
clever >
lorilan: i believe ulimit controls the stack size
07:42
<
clever >
lorilan: can you gist the files involved?
07:41
<
clever >
lorilan: did the problem recently start when you changed something?
07:40
<
clever >
infinisil: result: aeson amqp text stm containers strict github http-conduit:323 Mon Sep 3 04:40:03 ADT 2018
07:39
<
clever >
lorilan: does --show-trace show any details?
07:38
<
clever >
write a custom client that runs hie and gives it a simple cmd?
07:37
<
clever >
does it happen if you just run hie directly, without emacs?
07:36
<
clever >
its also using 428mb of ram
07:35
<
clever >
hie --lsp -d -l /tmp/hie.log
07:35
<
clever >
i see the hie process consuming 93% cpu
07:34
<
clever >
sleep raised to 30
07:33
<
clever >
and it quit
07:33
<
clever >
infinisil: emacs is open once more
07:31
<
clever >
oh, i should gc that copy of 17.09, lol
07:31
<
clever >
lrwxrwxrwx 1 root root 84 Jul 21 17:38 system-419-link -> /nix/store/kgkjqgpajqyswas2ygyd2fpr70knsf6d-nixos-system-amd-nixos-17.09.git.9e1d8b7
07:30
<
clever >
only to discover, amazon.ca doesnt let you filter drives by size...
07:30
<
clever >
this is why i was looking for some 4tb drives on amazon
07:30
<
clever >
by alternating between the laptop and desktop :P
07:29
<
clever >
auto-gc strikes again
07:28
<
clever >
its downloading more deps
07:27
<
clever >
result: aeson:31 Mon Sep 3 04:27:17 ADT 2018
07:24
<
clever >
result: aeson:30 Mon Sep 3 04:24:02 ADT 2018
07:24
<
clever >
oh, main turned green, and it exited
07:24
<
clever >
sleep was increased to 10, emacs is open, its not closing on its own
07:23
<
clever >
still 0 for aeson
07:22
<
clever >
result: aeson:0 Mon Sep 3 04:22:50 ADT 2018
07:22
<
clever >
hie found: 566 Mon Sep 3 04:22:49 ADT 2018
07:22
<
clever >
and that then broke everything
07:22
<
clever >
and then it failed to rebuild cabal-helper
07:22
<
clever >
i think you murderized emacs before it could finish building cabal-helper
07:21
<
clever >
infinisil: i now get the red thingy
07:21
<
clever >
infinisil: file 4 in the gist, after a minute, the path turned into an 8mb elf file
07:20
<
clever >
after blowing the dir away, it remade the same 0 byte file
07:19
<
clever >
[clever@amd-nixos:~/hie-slow-start]$ rm -rf ~/.cache/cabal-helper/
07:19
<
clever >
its a 0 byte non-executable file
07:19
<
clever >
-rw-r--r-- 1 clever users 0 Sep 3 04:11 /home/clever/.cache/cabal-helper/cabal-helper0.8.1.0-Cabal2.2.0.1
07:18
<
clever >
infinisil: gist updated
07:18
<
clever >
i see an error this time
07:17
<
clever >
i had bumped the sleep up to 45, but i can do that too
07:14
<
clever >
something flashed red in the status bar momentarily, but it vanished and wont recreate
07:14
<
clever >
infinisil: nope
07:11
<
clever >
infinisil: i also added $(date) to both echo's
07:11
<
clever >
result: aeson:0 Mon Sep 3 04:11:26 ADT 2018
07:11
<
clever >
hie found: 3013 Mon Sep 3 04:11:18 ADT 2018
07:10
<
clever >
yeah, about 4-ish
07:08
<
clever >
infinisil: this log contains the emacs error
07:08
<
clever >
nix-store -l /nix/store/jxflbmrsnvfflhq6xxykk7rjgmcqn8fc-emacs-lsp-haskell-20180131.459
07:08
<
clever >
i believe the emacs error was inside a nix-build
07:07
<
clever >
much shorter output, and no emacs error
07:04
<
clever >
so my $HOME cant have any effect
07:04
<
clever >
infinisil: oh, i think that warning was inside a nix-build
07:01
<
clever >
try changing $HOME to another dir in the script
07:01
<
clever >
i have a ~/.emacs.d/
07:00
<
clever >
i didnt measure it
06:59
<
clever >
infinisil: i saw an emacs!
06:56
<
clever >
infinisil: GC are the nix files
06:56
<
clever >
error: getting status of '/nix/store/0carxx7bfxrs68jbzc9mqj8vr7g0bcng-source/pkgs/top-level/haskell-packages.nix': No such file or directory
06:49
<
clever >
its running, but another gc ran
06:44
<
clever >
for best performance, the gap between 3&6 should be large enough to not trigger often
06:44
<
clever >
and then waste time deleting and redownloading things
06:44
<
clever >
and if IFD tries to build anything under 3gig, it will gc things it needs later in the eval
06:43
<
clever >
infinisil: if the store gets below 3gig free, it will auto-gc, aiming to get 6gig free
06:42
<
clever >
add ` --add-root hie --indirect`
06:42
<
clever >
infinisil: the nix-shell started a GC, and thats going to eat hie, lol
06:42
<
clever >
waiting for the big garbage collector lock...
06:42
<
clever >
running auto-GC to free 3398696960 bytes
06:41
<
clever >
run is running
06:40
<
clever >
oh, i just noticed, your already using cachix to host it, lol
06:39
<
clever >
though your previous method saves time by reusing anything the user has in /nix/store, and cache.nixos.org helps out
06:39
<
clever >
after they unpack, change --to into --from, to cpy it back out into /nix/store/
06:39
<
clever >
then tar example up and ship it to somebody
06:39
<
clever >
nix copy --to local?root=/home/clever/example /nix/store/fwjqsdg2xljh78qg67pypnxarsq0r72m-haskell-ide-engine-0.2.2.0
06:38
<
clever >
nix copy can also be used then
06:38
<
clever >
so its for a bug, not production use
06:34
<
clever >
file a PR to nixpkgs and get hydra to build it?
06:33
<
clever >
infinisil: you can also just use a nixos module to append
06:33
<
clever >
infinisil: i think cachix automates most of that fun for you
06:30
<
clever >
maybe --option vs --option-append
06:30
<
clever >
we need monads in our config overrides :P
06:29
<
clever >
but the keys still have to be handled seperately i think...
06:29
<
clever >
yeah, substituters and extra-substituters get added together by nix
06:28
<
clever >
oh wait no, but trusted-public-keys un-trusted the nixos keys
06:28
<
clever >
though i suspect you had to build your own ghc
06:28
<
clever >
then i get what i can from upstream
06:27
<
clever >
these paths will be fetched (145.79 MiB download, 1940.35 MiB unpacked):
06:27
<
clever >
[root@amd-nixos:~]# nix-store -r /nix/store/fwjqsdg2xljh78qg67pypnxarsq0r72m-haskell-ide-engine-0.2.2.0 --option substituters
https://infinisil.cachix.org --option trusted-public-keys infinisil.cachix.org-1:AL3v/0xIYDyK+DCafL02HoeoHjprJiHE97ZVK3m8jdg=
06:26
<
clever >
trusted-substituters has no effect on actual downloads
06:24
<
clever >
infinisil: if you are root (or a trusted user), you can use the proper fields with --option, the names match up with nix.conf
05:53
<
clever >
once you understand what is unique to a machine and what is common, you can split things up like this and adopt the machines into nixops
05:52
<
clever >
but all of the common things has been put into eeepc.nix and core.nix
05:51
<
clever >
and they need a unique IP on the VPN
05:51
<
clever >
each netboot has a unique partition layout, because of the haphazard ways i was installing things back then
05:51
<
clever >
you will need to properly keep that unique, when defining each machine in nixops
05:50
<
clever >
the configuration.nix on the remote machine will just be ignored entirely
05:50
<
clever >
colemickens: as long as you can reproduce the filesystem and boot config locally (just copy in over), nixops can adopt anything it can ssh into
05:48
<
clever >
have you looked into nixops?
05:46
<
clever >
after the first boot, it will read your user-data, change the channels and config, and run nixos-rebuild switch
05:46
<
clever >
yeah, thats in the amazon-init.service within systemd
05:45
<
clever >
a custom channel you control the updating of would effectively be pinned
05:45
<
clever >
which could deal with what you want
05:45
<
clever >
and optionally change your channels