<clever>
whyuk: you could also try the tar tooling instead
<clever>
whyuk: and storeContents can just be a list containing config.system.build.toplevel
<clever>
whyuk: line 18 will generate a directory containing info about a list of store paths, 22 will generate the db.sqlite backup, and 25 will read the list of paths the backup describes
<clever>
whyuk: lines 18 and 22 of make-squashfs.nix
<clever>
if you nix-build this file, you get a dir with a kernel, initrd, and a partial grub config file
<clever>
whyuk: the entire rootfs.squash is held within the initrd, so you dont need any special logic to find it
<clever>
whyuk: this uses the netboot images nixos already contains
<clever>
codygman__: then you can just reinstall home-manager from scratch
<clever>
codygman__: if the only root is your nix-env profile, then you can use `--delete --force` and it will just blow away the entire nix-env profile
<clever>
codygman__: is there only one generation of nix-env's profile?
<clever>
ah
<clever>
adisbladis: which thing? ive linked a lot of iohk things, heh
<clever>
cab404[m]: irc doesnt support pinned messages
<clever>
Fare: 2020-05-01 17:31:35 < adisbladis> I got inspired and hacked up http://ix.io/2knm
<clever>
codygman__: `nix-store -q --roots`
<clever>
Fare: the expr adisbladis linked above i believe
<clever>
codygman__: you need to delete that home-manager path, using the same `nix-store --delete`
<clever>
codygman__: that cmd fails, because /nix/store/rjfvyfc4k8rw5kyjcc6lxg2vs1jr5c90-home-manager-20.03 is also corrupt
<clever>
codygman__: for env-manifest.nix, all you can do is a rollback against whatever profile its in
<clever>
codygman__: next time you eval the expr that created it, nix will restore the file
<clever>
codygman__: drv files cant be repaired, all you can do is delete them with `nix-store --delete`, dont use the force flag
<clever>
adisbladis: do you know much about the cross-compile stuff in nixpkgs?
<clever>
adisbladis: then the devs went and rewrote it using 6 seperate docker containers and a docker compose :P
<clever>
i went a little nuts with it, lol
<clever>
adisbladis: so with this image, you get nginx, oauth2_proxy, grafana, prometheus, and several iohk products
<clever>
adisbladis: also, this runs nixos services, under runit
<clever>
but i prefered to have a pure nix build remain intact
<clever>
adisbladis: for reasons, this had to support building from a DockerFile as well
<clever>
dont use force
<clever>
Fare: run `nix-store --delete` on each one you can find in /nix/store/
<clever>
Fare: you have to include nix in the list if you want nix in the docker image
<clever>
that should show everything that gets included into the docker image, sorted by size
<clever>
Fare: then run `du -hc --max=0 $(nix-store -qR result) | sort -h` on the result of building that writeText
<clever>
Fare: use pkgs.writeText to create a file that contains every storepath you told nix to put into the docker image (you can just "${toString [ the list ]}")
<clever>
colemickens: you can also just `-I nixpkgs=/tmp/nixpkgs-pr` instead
<clever>
morgrimm: can you pastebin the full error and the nix files you are using?
<clever>
niso: correct
<clever>
fresheyeball: /var/spool/nginx/logs/
<clever>
niso: the error is further up
<clever>
niso: Could not resolve SDK product version for 'macosx'.
<clever>
turlando: systemd can sandbox services automatically for you
<clever>
and this is the code for cabal-merger (turns many cabal files into one) and also cabal-to-snack (creates a nix file that snack can use)
<clever>
asbachb: or perhaps its already broken...
<clever>
asbachb: did you add libcap_progs to buildInputs ?
<clever>
libcap_progs.dev 3,297 r /nix/store/fczfcxq7kab59ki9ijfknd0cix472j43-libcap-2.25-dev/include/sys/capability.h
<clever>
$ nix-locate capability.h
<clever>
eoli3n_: nope, things are pre-built by hydra.nixos.org, and only that can upload to cache.nixos.org
<clever>
jakobrs: ive found both single and multiuser tend to not put nix in PATH for non-interactive ssh
<clever>
jakobrs: ah, dont think so, your better off fixing the .bashrc on the remote box
<clever>
jakobrs: set which path?
<clever>
jakobrs: ive not found any proper documentation, so i just searched my irc logs for every single use of it, gathered them into one gist (linked above), and then began figuring out what they do
<clever>
and then that causes the remote nix to prefix all things with /mnt/
<clever>
jakobrs: this will tell the remote nix (after the ssh) to open the store of `local?root=/mnt`
<clever>
i didnt know how namespacing worked when i wrote that
<clever>
they can also be combined, if you lack access to that wonky dir, on the build machine
<clever>
jakobrs: NIX_STORE, NIX_LOG_DIR, NIX_CONF_DIR, NIX_STATE_DIR is if you want it to actually run from that wonky dir, without any chroot
<clever>
jakobrs: NIX_REMOTE=local?root= is if you want to relocate the /nix/store, but you plan to chroot later, and the paths should still think its at /nix/store
<clever>
jakobrs: chroot/namespacing would be much simpler
<clever>
jakobrs: so you can then copy /home/clever/rootfs/home/example/nix to /home/example/nix of a remote box, and the resulting nix binary will just work
<clever>
jakobrs: and then the override to nix within the -E, makes the 1st half permanent within the copy of nix its building
<clever>
jakobrs: NIX_REMOTE=local?root=/home/clever/rootfs then prepends that to the paths, so the store ACTUALLY winds up at /home/clever/rootfs/home/example/nix, and the internal strings expect it to be at /home/example/nix
<clever>
jakobrs: NIX_STORE, NIX_LOG_DIR, NIX_CONF_DIR, NIX_STATE_DIR all work together, to put the store at /home/example/nix
<clever>
so if you tried doing `NIX_SSHOPTS="sudo" nix-copy-closure` it can potentially break
<clever>
adisbladis: yeah, potentially adds -S foo and -v after the $NIX_SSHOPTS
<clever>
adisbladis: $NIX_SSHOPTS lets you inject custom arguments into the ssh cmd that nix uses to reach a remote machine...
<clever>
adisbladis: checking the src...
<clever>
adisbladis: what about using privilegeEscalationCommand with the copy-closure too?
<clever>
adisbladis: `nix show-config` would show the result of parsing all cfg files, though it also parses the ones root wont read
<clever>
you can use `nix-store --query --roots` to figure out why something cant be deleted
<clever>
but dont use --delete --force
<clever>
foineoi: unpackPhase copies the source to ., patchPhase must then modify the copy in .
2020-04-30
<clever>
ah
<clever>
jlv: what does `nix-channel --list` show, for both your user, and root?
<clever>
jlv: i think one is for the channel called nixos, the other is the alias that lets <nixpkgs> map to nixos
<clever>
romildo: i also dont see it in there
<clever>
romildo: i'm a bit surprised that scim isnt already in nixpkgs
<clever>
niso: yeah, that sounds like a good area
<clever>
jlv: but you may want to batch several --add into a single atomic update
<clever>
jlv: nix-env and nix search operate on ~/.nix-defexpr/
<clever>
jlv: --update then syncs that into your channels profile, which is symlinked under ~/.nix-defexpr/
<clever>
jlv: --add and --remove simply update a plaintext file at ~/.nix-channels
<clever>
jlv: did you run `nix-channel --update` after removing the channels?
<clever>
niso: there is also the script and preStart keys, which can take multiple lines, generate a script with a #!, and then point ExecStart and PreStart to the generated file
<clever>
niso: if you set the startAt on a service, then nixos generates a timer for you
<clever>
niso: its usually simpler to use systemd timers instead
<clever>
xelxebar: was helping somebody else with rpath issues, x and z are right netx to eachother
<clever>
streams*
<clever>
niso: vlan 34 dhcp gives an ip somewhere in 10.0.0.0/8, and multicast subscriptions give RTP sreams with tv service
<clever>
niso: dhcp on vlan 35 gives my a public ip, and binds the mac of whatever did it to the connection, so no other mac can get a lease until things expire or are released
<clever>
niso: and then the mis-configured isp router, connects to that, and double-nat's its way out, lol
<clever>
niso: so i then run my own pppoe server, on vlan 35, pointing the wrong way (towards the internet, being ignored)
<clever>
niso: but i have then discovered, half the STB features need internet
<clever>
hr[m]: you want builtins.toFile "coc-settings.json" (builtins.toJSON (import ./coc.nix))
<clever>
hr[m]: you didnt tell nix to import that nix file, so all it did was serialize the string (a path to coc.nix)
<clever>
niso: i then use a dumb switch, to put 2 routers on 1 modem, the nixos router handles vlan 35, the isp router handles vlan 34 (tv service)
<clever>
niso: so ive intentionally mis-configured the isp router to use pppoe, which breaks its attempts to use dhcp on vlan 35
<clever>
niso: i dont know what the isp router is doing to make the iptv setup work, but the isp router is also not reliable for internet usage
<clever>
niso: my setup is very wonky
<clever>
jumper149: strings in nix also have context, which says which store paths they depend on
<clever>
jumper149: if you try to treat a path as a string, nix will automatically copy it into /nix/store
<clever>
niso: nope, i just ran nixos on a seperate x86 machine
<clever>
jumper149: paths are a special type in nix, always absolute
<clever>
niso: there are no login details, you just 802.1q vlan tag, and dhcp your way to the internet
<clever>
cole-h: let x = import ./.; in something with x.buildInputs and x.nativeBuildInputs
<clever>
cole-h: then you can just (import ./.).buildInputs
<clever>
niso: i suspect its a memory leak in the http server
<clever>
cole-h: try to eval things from default.nix in nix repl, can you find the buildInputs you wanted?
<clever>
cole-h: typically, if there is no funny wrapping going on
<clever>
cole-h: nix-shell would give you the derivation that does the build, not actually build it
<clever>
cole-h: and perhaps apply overrides to what it imported
<clever>
cole-h: shell.nix should just `import ./default.nix`
<clever>
niso: my ISP router will lock up hard (zero packets pass) if you poll an http page, and it crashes like clockwork, 29.5 days of uptime i believe