<clever>
das_j: on newer versions of nix, its /build/
<clever>
das_j: yeah, builds have their own private `lo` they can listen on, so you dont have to do anything special
<clever>
das_j: they only see `lo` with the normal 127.0.0.1
<clever>
das_j: normal builds are, fixed-output are not
<clever>
Thra11: i use `runhaskell Setup.hs configure` and then `runhaskell Setup.hs repl`
<clever>
s/@/!/
<clever>
sondr3: something neat you can do that most others cant, you have a working machine to compare against, or even swap hdd's between@
<clever>
yep
<clever>
sondr3: `alsamixer -c 0`, on the capture tab,lets you select the capture source, but yeah, it could also be a wiring fault
<clever>
sondr3: and plugging something in, triggers a input event (like a keyboard or joystick(
<clever>
Event: time 1549806247.693860, type 5 (EV_SW), code 4 (SW_MICROPHONE_INSERT), value 1
<clever>
on my machine, i see 2 mic input sources
<clever>
/dev/input/event5: HDA ATI SB Rear Mic
<clever>
/dev/input/event4: HDA ATI SB Front Mic
<clever>
sondr3: run this
<clever>
nix run nixpkgs.evtest -c evtest
<clever>
sondr3: one min
<clever>
that is odd
<clever>
sondr3: and on nixos, does `lsmod | grep snd_hda_intel` list it?
<clever>
sondr3: lspci -k tells you what driver it is
<clever>
sondr3: also, see what driver arch is using, and try to modprobe it on nixos
<clever>
sondr3: check the profiles on the configuration tab, in pavucontrol
<clever>
ive found that kde has a lot of bloat, it installs a crap-ton of things when enabled
<clever>
fuzzy-id: i use xfce for all of my systems
<clever>
ew! :D
<clever>
ah
<clever>
gchristensen: how does it fail?
<clever>
dunk: nix disables all network access during the build, something must be wrong for it to want to download a file
2019-02-09
<clever>
bpye: samba is also an (ugly) solution, just map the remote disk to the windows box
<clever>
bpye: ive also made a vim.nix that includes all of my standard config and plugins, so i just `nix-build vim.nix -o vim` and `./vim/bin/vi` and it works 100% like the local one
<clever>
bpye: i always use vim, so i just run vim under ssh
<clever>
bpye: i have a central dedicated machine i always run nixops on, and ssh to that
<clever>
mobile_c: yeah
<clever>
bpye: nixops works on any linux distro, and darwin, just install nix
<clever>
and i think it may also need another {} at the end, like all callpackage based things
<clever>
the error will then tell you the right hash
<clever>
NemesisD: so i would start with super.callHackageDirect { pkg = "derive"; ver = "2.6.5"; sha256 = "0000000000000000000000000000000000000000000000000000"; };
<clever>
rodarmor: `man systemd.service` for more info on it
<clever>
rodarmor: PermissionsStartOnly makes the User= only apply to ExecStart, so pre-start runs as root
<clever>
rodarmor: but there is an extra flag to make prestart run as root instead
<clever>
rodarmor: normally, the User= you specified in your unit
<clever>
rodarmor: anything done with a derivation becomes world-readable, since all of /nix/store can be read
<clever>
rodarmor: that also lets you fully control who can read the secret, by just using chmod and chown correctly
<clever>
rodarmor: you could have a preStart script on its systemd unit, that will generate the random token, if it doesnt exist yet
<clever>
infinisil: oh, nice, thats perfect
<clever>
NemesisD: only goes up to 2.6.4 on my nixpkgs, what about yours?
<clever>
NemesisD: nix-build '<nixpkgs>' -A all-cabal-hashes -o all-cabal-hashes.tar.gz && tar -tvf all-cabal-hashes.tar.gz | grep derive
<clever>
NemesisD: so you must run cabal2nix on it manually, and load the result with callPackage
<clever>
NemesisD: 2.6.5 isnt in the all-cabal-hashes.tar.gz file
<clever>
rodarmor: but if it needs to be constant for the life of the machine, just ask the user to fill it in on the config, or things will randomly "break"
<clever>
rodarmor: you could use something like pkgs.runCommand, and just hexdump /dev/random
<clever>
mobile_c: try doing that
<clever>
mobile_c: did you try copying the squashfs to the main fs, like i said?
<clever>
NemesisD: also, (./deps/gogol + "core") is identical to ./deps/gogolcore, you need a / inside the string
<clever>
NemesisD: when you use + to combine a path and a string, the new value is also a path
<clever>
in general, i try to keep it as a path type as long as possible, so just (./deps + "/gogol/core")
<clever>
but those outer quotes are just to force it to copy, for demo purposes
<clever>
if that | was a +
<clever>
"${./deps | "/gogol/core"}" will copy just core
<clever>
"${./deps}/gogol/core" will copy all of deps
<clever>
unquoted paths are a special type, and it will copy the smallest subtree it can, when you treat it as a string
<clever>
./deps + "/gogol/core"
<clever>
including the outer quotes
<clever>
NemesisD: open up `nix repl` and then try to evaluate: "${./deps/gogol/core}"
<clever>
ah, but the bot has too many safeties
<clever>
> "${ ./. }"
<clever>
quoting paths disables all of the magic that makes them work
<clever>
and then the path just doesnt exist at build time
<clever>
so nix didnt copy the path into the sandbox
<clever>
i think the problem, is that you gave it a string with no context
<clever>
paths like that, are relative to the file the path is within
<clever>
sicklorkin: adjust your configuration.nix so it expects /nix to be at the new place, and nixos-rebuild boot, so it doesnt break after you move it
<clever>
sicklorkin: after that, its just a matter of pre-doing `nixos-rebuild boot` with new cfg that expects /nix to have been moved, then rebooting, and moving it
<clever>
sicklorkin: basically, you just add ./rescue-boot.nix to your imports section, nixos-rebuild (and pray you have ~300mb free on /boot/), and then you can run the installer from grub at any time
<clever>
i used that to move my /nix from / to its own dataset, on zfs
<clever>
this allows me to boot into a secondary OS, that lives entirely in /boot/
<clever>
mobile_c: you must add boot.allow_shell to the kernel cmdline
<clever>
copy it out of the iso
<clever>
mobile_c: as i said, you must copy nix-store.squashfs to your usb stick
<clever>
mobile_c: not a path
<clever>
mobile_c: it must be a linux device, like /dev/sda1
<clever>
dmj`: the version your pinning to might be too new
<clever>
dmj`: it can, `nixops create -I nixpkgs=...` or `nixops modify -I nixpkgs=...`
<clever>
mobile_c: no, the fs that is directly on the usb stick itself
<clever>
mobile_c: the fs on the usb stick
<clever>
mobile_c: the file i linked earlier generates one
<clever>
mobile_c: the nixos initrd doesnt understand that, so you need to copy the squashfs out of the iso, and then give it the label of your real fs
<clever>
mobile_c: it would be the uuid or label of the filesystem on the usb stick
<clever>
dmj`: not that i'm aware of
<clever>
dmj`: thats what the tests on hydra prevent
<clever>
yeah
<clever>
mobile_c: /dev/root is a symlink, based on the root= param passed to the kernel
<clever>
dmj`: 18.09 was forked off a version of master, on 2018-09, and then has had fixes cherry-picked into it to make it more stable
<clever>
mobile_c: maybe, but i suspect it to fail, because the initrd is expecting to find the squashfs on an iso9660 FS
<clever>
the squashfs gets mounted to /nix/store/ by the initrd scripts
<clever>
it has to start with /nix/store/
<clever>
mobile_c: do you not have a spare USB stick you can put the original nixos ISO on, as the only thing?
<clever>
not that i know of
<clever>
mobile_c: the nix script will insert the right path as it builds the file
<clever>
Edes: you can see the 3 options being defined in qemu.nix
<clever>
Edes: as a module, and enable qemu-user.aarch64 = true;, or whichever arch you want
<clever>
Edes: then, after booting the rpi again from that, you can just run `/nix/store/foo/bin/switch-to-configuration switch`, on the storepath it created
<clever>
Edes: this will act on the FS mounted to /mnt/img/, update the system profile, to the result of building configuration.nix, for aarch64-linux (you may want to change it to armv6 or v7, depending on your OS
<clever>
2019-01-31 15:45:04< clever> NIX_REMOTE=local?root=/mnt/img/ nix-env --profile /mnt/img/nix/var/nix/profiles/system --set -f '<nixpkgs/nixos>' -A system -I nixos-config=/mnt/img/etc/nixos/configuration.nix --option system aarch64-linux
<clever>
finding it...
<clever>
you need a special command to build it for arm
<clever>
then....
<clever>
Edes: that will magically allow you to run arm binaries on an x86 kernel, without having to emulate an entire arm system
<clever>
Edes: git clone this, then add /path/to/nixos-configs/qemu.nix to your imports list on an x86 nixos host