<clever>
ldlework: then you can create a machines.nix+aws.nix cluster for amazon, and machines.nix+vbox.nix to deploy the same cluster to virtualbox
<clever>
ldlework: you could also have 3 files, machines.nix defines every machine in the cluster, aws.nix sets aws options, and vbox.nix sets vbox options
<clever>
ldlework: and if 2 files define the same machine, the config is merged, the same way nixos modules merge when added to imports
<clever>
ldlework: if the files define different machines, then the cluster will have all of those machines
<clever>
you would then need to +v everybody
<clever>
#osdev tried that a few hours ago, and had the same discovery
<clever>
yeah
<clever>
kandinski: when you can, edit a copy of nixpkgs, and then file a PR to github
<clever>
android vs ios have similar problems, the flexibility to do anything, also allows people to do anything, which then breaks things, lol
<clever>
and even if you have systemd, it may work differently on some distros
<clever>
but with linux, is it init.d?, systemd?, something else?
<clever>
erickomoto: so its simpler to do service level stuff with launchctl on darwin
<clever>
erickomoto: part of it, is that darwin is a lot more predictable then the mess of every linux distro under the sun
<clever>
nix.conf can inject impure things into the sandbox
<clever>
plus nix.conf flags
<clever>
sphalerite: nix mounts a lot of things for its sandbox, so you would need some form of API (maybe a json file) detailing what you want mounted where
<clever>
and that includes no power to create another namespace
<clever>
so the uid's within the container are fake and have no real power
<clever>
the problem, is that a mount namespace by non-root, requires a user namespace
<clever>
which makes it a pain in the ass to run a nix-bundle based installer/updater, from within a nix-bundle based app
<clever>
MichaelRaskin: and nix-bundle also fails inside a container made by nix-bundle
<clever>
you need root to use namespaces, or flip a sysctl
<clever>
sphalerite: ive run into problems deploying things with nix-bundle because of that
<clever>
MichaelRaskin: debian disables those by default
<clever>
yeah
<clever>
multi-user requires somebody with root to administer it every now and then
<clever>
lol
<clever>
erickomoto: multi-user requires nix-daemon to be running as root, so it can switch to the chosen users
<clever>
erickomoto: that would be a single-user setup, so all builds are just ran as whoever started nix-build
<clever>
(also the reason you shouldnt install a random .deb file without trusting the source)
<clever>
erickomoto: it would probably only take 5 minutes to whip up a .deb that just does exactly that, lol
<clever>
ah
<clever>
erickomoto: the curl | sh script can then take it from there, and never need sudo
<clever>
erickomoto: due to how the install script works, the admin can simply `mkdir /nix ; chown $YOU /nix` and thats all he has to do
<clever>
binaryphile: just refer to it, and nix will automatically build it
<clever>
thats weird
<clever>
or fix the module
<clever>
jtojnar: which is why i never use that in modules i write
<clever>
jtojnar: the module system is usually used to generate the service files
<clever>
joepie91: you can also just stop the nscd service
<clever>
joepie91: also check /etc/resolv.conf
<clever>
gentoo is most likely
<clever>
i cant even remember what distro is on the 2 missing ones
<clever>
disasm: one of my older laptops is still missing, ive been digging thru the piles on and off for 2 months and stil havent found it, lol
<clever>
ah
<clever>
but if you just set services = { hostapd.enable = true; dhcpd4.enable = true; }; then nixos will configure it all and you dont even need bindings
<clever>
and i avoid network manager like the plague :P
<clever>
2 different ways ive configured dhcp servers, but ive not done hostapd on nixos yet
<clever>
emily: you could maybe patch nixos-rebuild and file a PR
<clever>
emily: nixos-rebuild build --fast is nearly identical, but yeah, the UI differences
<clever>
it can also help to put all of these things into github
<clever>
then ${curl}/bin/curl would have actually worked
<clever>
so you could have also done curl = pkgs.curl; and then you would have a bash $curl that has the path
<clever>
also of note, every attribute passed to mkDerivation, becomes an env var during the build
<clever>
so i prefer to always use source, its also harder to miss, a stray . can just look like a typo
<clever>
but when i was first learning linux, i sometimes got ./foo and . ./foo mixed up and it led to confusion
<clever>
source and . are identical
<clever>
ah
<clever>
so you can then export whatever=${curl} then source ${./foo.sh}
<clever>
this will copy foo.sh into /nix/store, and then substitute in its storepath
<clever>
source ${./foo.sh}
<clever>
you can also mix things in fun ways
<clever>
has to be escaped
<clever>
> '' double single ''${foo%bar} ''
<clever>
neither one allows that
<clever>
> '' double single ${foo%bar} ''
<clever>
> "doublequoted ${foo%bar} "
<clever>
yeah
<clever>
need to escape the ${
<clever>
> '' prefix ''${foo} suffix ''
<clever>
that also makes it a bit tricky sometimes to do actual shell variables
<clever>
> "an example: ${curl}/bin/curl and more"
<clever>
yep
<clever>
and if it still has an issue, just edit the gist to include the new file and i can check it again
<clever>
yeah
<clever>
you can do the same things with buildCommand, and it also be much easier
<clever>
switch over to buildCommand = '' .... ''; and just paste the entire contents of build.sh into that string
<clever>
bash is also in the buildInputs by default, so that doesnt need to be there at all
<clever>
jasom: 99% of the time, you never need to set builder, that just makes everything harder for yourself
<clever>
jasom: can you gist your nix files?
<clever>
Profpatsch: ping
<clever>
jasom: you can also do ${curl}/bin/curl
2018-08-14
<clever>
Zajcev: did you restart the container?
<clever>
Zajcev: either run it outside the container, or disable the chroot'ing
<clever>
Zajcev: vsftpd is trying to namespace itself, but containers are not allowed to create namespaces
<clever>
Dedalo: that is the location within nixpkgs
<clever>
> sway.meta.position
<clever>
Dedalo: you can check master first on github
<clever>
Dedalo: you need an override the changes the src and name attributes
<clever>
infinisil: but i can steal it as an example, and write a haskell.lib.getHaskellBuildInputs variant
<clever>
infinisil: it only searches propagatedBuildInputs and propagatedNativeBuildInputs, and even those will have holes due to the runtime nature of that system
<clever>
infinisil: the one in deprecated.nix ?
<clever>
shlevy: is there a simple function that can be combined with haskell.lib.getHaskellBuildInputs to flatten a dep tree down to a single list?
<clever>
Denommus: should be able to do that
<clever>
Denommus: should be as simple as `nixos-container root-login gitlab-runner`
<clever>
Denommus: or ssh?
<clever>
Denommus: or nixos-containers?
<clever>
Denommus: with nixops?
<clever>
q3k: nope, dont have merge powers
<clever>
samrose_: if you dont care about the extensionpack, you can just override .src and .name
<clever>
JonReed: you can also use a ''string'' for the 2nd argument, then just use normal newlines in your editor
<clever>
JonReed: ignore the bot, that will generate a bin/scriptname shell script, which when ran, will copy the snapshot of ./. (insert whatever you want there) to .
<clever>
Taneb: yeah, i have also found that the order matters
<clever>
hyper_ch2: because sometimes a drive in the array takes 40 seconds to come online, and its a very bad idea to start a degraded pool
<clever>
Taneb: i checked, and aggregate is just a normal derivation, with _hydraAggregate=true; and constituents = [ list of derivations ];, and a buildCommand that sets up some nix-support stuff when passing
<clever>
hyper_ch2: that might solve things
<clever>
hyper_ch2: have you set the missing drive as offline with `zpool offline` ?
<clever>
hyper_ch2: ah, and Baughn's safety wont allow a degraded pool to import immedietly
<clever>
hyper_ch2: after you manually import the pool, do `zpool status`, what does it say?
<clever>
hyper_ch2: are they both sata drives?
<clever>
hyper_ch2: are both halves of the ssd mirror on the same protocol?
<clever>
error: attribute 'diamond' at /home/clever/nixpkgs/pkgs/top-level/all-packages.nix:20374:3 already defined at /home/clever/nixpkgs/pkgs/top-level/all-packages.nix:8087:3
<clever>
fun
<clever>
ah
<clever>
q3k: and line 92 of the new one, i dont see any arguments being passed to makeWrapper, so it likely isnt doing anything more then ln
<clever>
q3k: line 36-49 of the old builder, instead of bin/lin64/programmer bin/lin64/pgrcmd, you can do bin/lin64/{programmer,pgrcmd,....}
<clever>
q3k: in generall, you probably want to use buildCommand, not builder, it makes things simpler
<clever>
q3k: nice, i need to get back into fpga stuff some time