<clever>
qknight: can you link to your service on github?
<clever>
qknight: but you need to still pass a nixos-config to it
<clever>
qknight: you can also just eval/instantiate -A config.services.nginx.foo to target any option
<clever>
qknight: and if you know what attribute the config is at, you can just build/instantiate that directly
<clever>
qknight: this would generate a perl script that runs nginx with all of the right args, based on the service config in the configuration.nix in the current dir
<clever>
qknight: nix-build '<nixpkgs/nixos>' -A config.systemd.services.nginx.runner -I nixos-config=./configuration.nix
<clever>
qknight: no real way, you need to instantiate the top-level of a nixos eval that imports the module
<clever>
looks ok to me
<clever>
gchristensen: i think each build takes 8 hours
<clever>
now the config is broken out into a smaller file, that nixpkgs can load on its own
<clever>
ToxicFrog: one handy trick, put all of your overrides into /etc/nixos/config.nix, then in configuration do nixpkgs.config = import ./config.nix;
<clever>
only nixos loads configuration.nix
<clever>
correct, nixpkgs will never load configuration.nix
<clever>
ToxicFrog: if you pass it {}, then it will load ~/.nixpkgs/config.nix automatically
<clever>
i'll google it some more
<clever>
gchristensen: do you happen to remember how to trace syscalls and such on darwin?
<clever>
gchristensen: and on the mac, it ignores /etc/bash.bashrc
<clever>
olejorgenb: ah, wasnt expecting that
<clever>
gchristensen: i also see a /etc/bash.bashrc in the source, hmmm
<clever>
ToxicFrog: pkgs.peruse.<tab><tab>
<clever>
gchristensen: yeah, this kind of thing is crazy
<clever>
gchristensen: why is bash doing this??? :O
<clever>
1090 ->>>>>>> ~/.bashrc if we are a top-level shell. */
<clever>
1089 /* If we were run by sshd or we think we were run by rshd, execute
<clever>
so, it only ever runs ~/.bashrc, and /etc/bashrc is just an addition by the distro, (via /etc/profile) ?
<clever>
gchristensen: after a glance at the bash manpage, i see no mention of /etc/bashrc!
<clever>
if i then run bash inside that, it only does ~/.bashrc
<clever>
aha, but thats only for the shell launched by sshd
<clever>
and ~/.bashrc is ignored
<clever>
gchristensen: for an interactive shell, it loads /etc/profile (which sources /etc/bashrc on this machine), then it loads ~/.profile
<clever>
odd, /etc/profile is readonly on this box, an contains references to nix
<clever>
but keep in mind, those echo's can break scp, so undo them when your done
<clever>
i find it helps to spray every profile and bashrc with an echo
<clever>
the shell skips some files when doing non-interactive
<clever>
grahamc: ah, so its not just my setup
<clever>
gchristensen: does your new darwin thing put nix into PATH early enough for "ssh darwin nix-store --version" to work?
<clever>
gchristensen: does your new darwin thing put nix into PATH early enough for "ssh darwin nix-store --version" to work?
<clever>
srhb: so the result of runCommand will wind up in the store (with world-readable keys), and you then need to use nix to insert that storepath somewhere
<clever>
srhb: if sandboxing is on (it should always be on), there is no way for runCommand to access /var/
<clever>
and if you add something to systemPackages that has a $out/etc/xdg/autostart, the same thing will work
<clever>
ixxie: one-shot systemd unit?
<clever>
and then everything else is up to u-boot
<clever>
and typically, you put a combined SPL + u-boot at that offset of the block device
<clever>
basicaly, it will either boot over usb, or it will execute a block at a hard-coded offset on the sd/mmc/nand/spi flash
<clever>
sphalerite[m]: i have thought of that for remote nixos machines
<clever>
TimePath: is this an allwinner cpu your on?
<clever>
i believe android does it by having a thin bootloader before the real one, that can reflash over usb, and must never change (i think its a rom in the cpu die)
<clever>
ah, but you would need a 3rd partition for syslinux and that config
<clever>
but how will the system know which boot to use?
<clever>
LnL: filterSources refuses to accept a storepath as an input
<clever>
LnL: the problem me and taktoa[m] where trying to solve, is to take an unpacked .tar.gz, and then copy every single .c and .h out of it, into seperate storepaths, content addressed
<clever>
LnL: yeah
<clever>
do you have some example code or input and what you want done?
<clever>
sphalerite[m]: the problem i was having then, is that i needed to force a file in the store to be re-copied to the store, as a content-addressed entry (fixed output)
<clever>
sphalerite[m]: i dont think there is any way to read a binary string, i was thinking of a new primop to fix the problem there
<clever>
yeah, and thats not really user friendly
<clever>
and because of bash, you cant just nix-build -A "foo.bar" or -A foo."bar.baz"
<clever>
sphalerite[m]: i ran into a problem a few days ago, builtins.readFile cant read a binary
<clever>
sphalerite[m]: there is also a lib.optionalAttr that handles the if for you
<clever>
{ "foo.bar" = "baz"; }
<clever>
key names can also contain a .
<clever>
LnL: i think i saw that in the source somewhere, it allows you to omit things conditionaly
<clever>
olejorgenb: id expect PKG_CONFIG_PATH to be blank by default
2017-07-14
<clever>
fetchurl: yeah, factorio uses a pretty weird and unique fetching system
<clever>
nh2: using nix-store --delete, you should be able to remove the failed build, and then try it again
<clever>
nh2: and the build "passed" even with a fatal error
<clever>
nh2: ah, so it sounds like one of the machines had already "built" a copy of that file, and it didnt have to copy it over from the good machine
<clever>
nh2: what about the output of "nix-store -l /nix/store/<foo>"
<clever>
nh2: what happens if you run nix-store --query --hash on that path, on both machines?
<clever>
fetchurl: its in the changelogs for nix
<clever>
works on nixos-unstable
<clever>
[clever@amd-nixos:~]$ nix-prefetch-url '<nixpkgs>' -A hello.src
<clever>
with the new nix-prefetch-url -A, it will rename the output after the download is finished, so it always lands in a path matching its hash, even if the hash isnt what nix was expecting
<clever>
and nix will enforce the data matching that hash
<clever>
with normal fixed-output downloads in nix, you tell nix what the hash of $out will be ahead of time, and nix computes $out based on that hash, and ignores all build inputs
<clever>
oops
<clever>
so when you run the nix, it wont do a 2nd download
<clever>
joepie91: that will download it, and then rename its entry in the store, to match the real hash
<clever>
fetchurl: there is also a new thing, nix-prefetch-url '<nixpkgs>' -A hello.src i think it was
<clever>
ah
<clever>
then let nix-build fail
<clever>
so its invalid, and wont match up with the old file
<clever>
i usualy just increment a random number in the hash
<clever>
LnL: that one always messed with my tab-complete, and my mention filter only triggers if my name is at the very start of a line
<clever>
ison111: and you must also add systemd.service.httpd.wantedBy = lib.mkForce [];
<clever>
ison111: yeah, that enable must be set to true
<clever>
you must set enable = true; and add the line i gave above
<clever>
so there is nothing to start
<clever>
ison111: if you set enabled = false;, then nixos wont even create the service
<clever>
if you remove enable, then the systemd service wont even be created
<clever>
and add the line i gave above
<clever>
keep the existing config, including the enable line
<clever>
ison111: to undo that, you would need to do systemd.service.httpd.wantedBy = lib.mkForce [];
<clever>
ison111: and the code behind services.http.enable sets wantedBy for you