<clever>
nix-env --profile /path --rollback, will then undo it
<clever>
both of those will set the current generation to a given storepath (creating a new generation if needed)
<clever>
nix-env --profile /path --set /nix/store/foo and nix-env -f foo.nix -A foo --set --profile /path
<clever>
nix-env --set and --rollback
<clever>
ambro718: cant find the link, but i saw somebody saying to get rid of nix-env -i/-e, but to keep nix-env itself
<clever>
ambro718: one min
<clever>
ambro718: you may be able to get similar using the outputsToInstall entry, and split outputs
<clever>
you would need to patch both the perl version to update systemPackages handling, and then patch the c++ version to fix nix-env, and the c++ one wont go public until the next nix release
<clever>
that will just replace the entire profile with the given path, no buildEnv involved
<clever>
memory usage will also be the same as a normal install
<clever>
trfl: most of the time, you can just treat the usb stick like an internal hdd, partition, format, mount to /mnt, nixos-generate-config --root /mnt, nixos-install
<clever>
which will add it to PATH, and give you the host version
<clever>
ambro718: there is also nativeBuildInputs = [ pkgconfig ];
<clever>
softinio: i think all of the optional things will be available by default, you would have to use .override to set them to null, to remove them
<clever>
changing a, didnt change c, because c depends on the old a
<clever>
> :p rec { a=1; b=2; c = a+b; } // { a = 42; }
<clever>
> rec { a=1; b=2; c = a+b; } // { a = 42; }
<clever>
ambro718: the // is just adding things to the attrset, the .outPath is based on the original arguments to builtins.derivation, which are unchanged
<clever>
ambro718: this removes the type, causing nix repl to just expose all the details
<clever>
> coreutils // { type = null; }
<clever>
> coreutils.type
<clever>
ambro718: derivations are just sets with an outPath
<clever>
avn: any attribute set with a .outPath attr, can be cast to a string
<clever>
> let x = { outPath = "foo"; } // { a=42; }; in "${x}"
<clever>
> { outPath = "foo"; } // { a=42; }
<clever>
i suspect it will even work when X isnt running (plain text mode)
<clever>
this works for adjusting my screen brightness
<clever>
tdeo: yeah, that might just work, it may not even need a reboot
<clever>
> linuxPackages.acpi_call
<clever>
aquarial: and if you `sudo modprobe acpi-call` ?
<clever>
not-os is more of an overlay then a fork, it just uses bits of nixpkgs to create a bootable image, thats not nixos
<clever>
so if you --include a lot, you need to go backwards thru profiles to piece together the full state
<clever>
sadly, if you deploy with --include, the new generation will be partial
<clever>
infinisil: within that profile, will be symlinks for each machine
<clever>
a lot of build systems need a load detecting -j
<clever>
infinisil: if you try to build 2 copies of X, with difference ghcs, then they dont have any deps in common, so building both versions at once lets it meet your -j even when they hit bottlenecks and both stall on 1 thing
2019-04-25
<clever>
stepcut_: you can test it with `ssh user@host nix-store --version`
<clever>
stepcut_: thats a common problem when ssh'ing into a remote machine
<clever>
stepcut_: if you `strace -p <pid> -f -e execve` on the pid of the queue-runner, what commands is it starting?
<clever>
stepcut_: localhost has a special case, dont rmember the exact rules
<clever>
stepcut_: does the hydra have build slaves?
<clever>
parsnip: that gets ran after creating /nix/store/hash-system-path/, and updates any indexes within it, which then lands at /run/current-system/sw/
<clever>
ambro718: systemd provides udev, and a lot of graphical stuff ties into udev to detect what gpu you have
<clever>
gchristensen: that is a deployment wide option i think, something about fast connection
<clever>
gchristensen: that also means that a copy will initially hang and not say what its copying, because the remote machine is checking the binary cache, to see what has to copy
<clever>
gchristensen: if you use --use-substitutes, the remote machine will check its own cache settings
<clever>
:D
<clever>
tofu only works if the first hash is invalid
<clever>
yeah, i set my editor to replace mode, and then replace a few digits with 0's
<clever>
lordcirth: if you leave the sha256 the same, thats claiming that the src is unchanged, so nix uses the old src
2019-04-21
<clever>
xorAxAx: the GC will never delete something that is currently in use
<clever>
having 2 channels may double the usgae
<clever>
xorAxAx: -vvvvv
<clever>
xorAxAx: you may have infinite recursion in our expr
<clever>
its a bug within nixos-rebuild
<clever>
you can safely ignore that error
<clever>
thats because it doesnt exist when nixos-rebuild is building nix, only nixos
<clever>
sindrip: its in qemu-vm.nix, which is only included when you run build-vm
<clever>
sindrip: so its missing from the normal docs
<clever>
Orbstheorem: simpler to make it a list of sets, then map ({ a, b }: a * b)
<clever>
Orbstheorem: that work?
<clever>
> builtins.foldl' (a: b: a // b) {} [ {a=1;} {b=2;} {c=3;} ]
<clever>
Orbstheorem: one min...
<clever>
> :p [ {a=1;} {b=2;} {c=3;} ]
<clever>
sindrip: `virtualisation.memorySize = 2048;` add that to the configuration.nix
<clever>
sindrip: within the guest, how does ram usage look?, `free -m`, what about cpu? `top`
<clever>
then it should be running as fast as the hardware allows
<clever>
group doesnt matter much if the last part is +rw
<clever>
while the vm is running, check `ps aux | grep qemu`, and look for a `-enable-kvm` in its args
<clever>
then it should automtically use kvm and run faster
<clever>
and if you use nix-shell, add a .env at the env
<clever>
Alling: basically all developPackage does, is run callCabal2nix for you!
<clever>
ive not used developPackage before
<clever>
you can also use overrides in the nix file to force a version for just one thing
<clever>
the ghc version will be cached, but it will likely have to rebuild eveyr single haskell package
<clever>
Alling: if you want nix to respect the version bounds, then you need something like stack2nix, and then youll have to recompile nearly all haskell packages
<clever>
Alling: nixpkgs will just provide any version of hspec, so whatever is in nixpkgs
<clever>
Ralith: i just run tzselect in a shell
<clever>
gchristensen: --delete-older-then will delete the booted profile, but booted-system itself is a root, so it cant actually GC it after deleting the generation