!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

897 Members
182 Servers

Load older messages


SenderMessageTime
23 Nov 2023
@flyx:klacker.euflyxwould it transfer my entire repository every time I change something and build, or does it do some caching? the repo is >1GB so this would be an important property16:50:12
@tomberek:matrix.orgtomberekRemote builders would only transfer what is in the drv closure; the build closure. Now this can easily and often does include the source repo if you ever do something like "src= ./. ;" You can do another trick which is to have your runners reference your build via a git-based flakes, thus caching your repo if that is what you want, again need to be careful with ref/rev/allRefs and auth. 17:02:43
@flyx:klacker.euflyxreferencing the git wouldn't be what I want, I can do that already with CI. I specifically want to build my local dirty state. thats for the infos, I'll evaluate if I can work around having everything in the drv closure17:09:46
@tomberek:matrix.orgtomberekOkay. Another trick is to depend on a subdirectory. It means another local copy, but less is transferred as a drv dependency. 17:22:33
@ThorHop:matrix.org@ThorHop:matrix.org changed their display name from hopland (flaky frank) to hopland (evil entrepeneur).17:31:03
@ThorHop:matrix.org@ThorHop:matrix.org changed their display name from hopland (evil entrepeneur) to hopland (nixpkgs-rolling when).18:25:43
24 Nov 2023
@alper-celik:matrix.org@alper-celik:matrix.org left the room.14:43:23
@jassu:kumma.juttu.asiaJassuko
In reply to @tomberek:matrix.org
The remote build system is powerful, but doing this and breaking out of the sandbox in a safe way will take some care. But yes, this can be done; I used this as a quick data transformation engine orchestrated by Hydra, you just gotta be careful and ensure you end up with the properties you want.
Would you happen to have that hydra setup’s flake / nix somewhere public? I have wanted to try something similar, but I’m still too much of a Nix n00b to figure out anything but very basics on my own.  
22:45:13
@tomberek:matrix.orgtomberekSadly no, that was proprietary for a geospatial data processor. But the basics concept was to turn on the "sandbox = relaxed" option and then certain derivations specializing in the out-of-bounds access would have "__noChroot".23:30:09
25 Nov 2023
@edgar.vincent:matrix.orgedgar.vincent joined the room.00:27:29
27 Nov 2023
@ThorHop:matrix.org@ThorHop:matrix.org changed their display name from hopland (nixpkgs-rolling when) to hopland (valorent vicky).14:30:44
28 Nov 2023
@fsagbuya:matrix.orgfsagbuya joined the room.05:38:56
29 Nov 2023
@benjamin:computer.surgeryolivia changed their display name from benjamin ⚡️ to test 🏳️‍⚧️.22:22:55
@benjamin:computer.surgeryolivia changed their display name from test 🏳️‍⚧️ to benjamin.22:23:23
@benjamin:computer.surgeryolivia changed their display name from benjamin to test 🏴‍☠️.22:24:31
@benjamin:computer.surgeryolivia changed their display name from test 🏴‍☠️ to test 👩‍👦.22:27:55
@benjamin:computer.surgeryolivia changed their display name from test 👩‍👦 to benjamin.22:28:27
1 Dec 2023
@moritz.hedtke:matrix.orgmoritz.hedtke set their display name to Moritz Hedtke.11:08:18
2 Dec 2023
@mao_tse-tung:matrix.orgmao_tse-tung joined the room.03:43:40
@presto8:matrix.orgpresto8 joined the room.21:07:34
@presto8:matrix.orgpresto8I have a flakes-based configuration and upgraded from nixos-23.05 to nixos-23.11. Which caused gnupg to upgrade from 2.4.0 to 2.4.1. Unfortunately gnupg 2.4.1 is not compatible with my install of emacs 29.1 for some reason. What is the recommended flakes-based method to pin a specific package, such as gnupg, to a specific version? I guess I could set up a 23.05 input, overlay that into pkgs, and then set programs.gnupg.package = 23-05-pkgs.gnupg, but wondering if there is a more direct way? 21:11:22
@presto8:matrix.orgpresto8Update, the overlay method worked out perfectly. 21:42:54
3 Dec 2023
@zoechi:matrix.orgzoechi joined the room.09:46:37
@ThorHop:matrix.org@ThorHop:matrix.org changed their display name from hopland (valorent vicky) to hopland (meticulous montesquieu).14:09:06
@antifuchs:asf.computer@antifuchs:asf.computer
In reply to @flyx:klacker.eu
can I use Nix Flakes purely as a solution for remote compiling? like, my (otherwise Nix-less) project requires me to build it on a remote machine and I have some hacky rsync-up---compile---rsync-down script which I want to replace with something more sensible, and Nix provides remote building capabilities. so if I write an impure Flake that just calls the system compiler and doesn’t use any Nix features, would this be a feasible solution for remote compiling?
one thing I do is to use nix copy instead of that rsync step; I wrote a script that automates the copy & build steps, writing the build result store address, which you can then nix copy back. It's basically your setup, but using more nix-builtin methods
15:31:49
@antifuchs:asf.computer@antifuchs:asf.computer
    runBuildOnLinux = pkgs.writeShellApplication {
      name = "run-build-on-linux";
      runtimeInputs = [pkgs.jq];
      text = ''
        target="$1"; shift
        copy_result_back="''${2:-true}"
        flake=$(nix flake metadata --json | jq -r .path)
        if [ "$(uname -s)" = "Linux" ]; then
            # nothing to do, we're on linux already
            exec nix build --json --no-link "$@" -L "$flake#$target" | jq -r '.[0].outputs.out'
            exit 0
        fi

        remote_machine="''${REMOTE_MACHINE:-gloria.home}"
        nix copy --to "ssh-ng://$remote_machine" "$flake"
        out="$(ssh "$remote_machine" nix build --json --no-link -L "$@" "$flake#$target" | jq -r '.[0].outputs.out')"
        if [ "$copy_result_back" = "true" ]; then
            nix copy --no-check-sigs --from "ssh-ng://$remote_machine" "$out"
        fi
        echo "$out"
      '';
    };

is that script

15:31:58
@antifuchs:asf.computer@antifuchs:asf.computer
In reply to @flyx:klacker.eu
can I use Nix Flakes purely as a solution for remote compiling? like, my (otherwise Nix-less) project requires me to build it on a remote machine and I have some hacky rsync-up---compile---rsync-down script which I want to replace with something more sensible, and Nix provides remote building capabilities. so if I write an impure Flake that just calls the system compiler and doesn’t use any Nix features, would this be a feasible solution for remote compiling?
* one thing I do is to use nix copy instead of that rsync step; I wrote a script that automates the copy & build steps, writing the build result store address, which it optionally nix copy'd back. It's basically your setup, but using more nix-builtin methods
15:32:44
@sporesirius:matrix.orgSporesirius joined the room.22:33:36
4 Dec 2023
@patka_123:matrix.org@patka_123:matrix.org joined the room.11:23:33
5 Dec 2023
@federicodschonborn:matrix.org@federicodschonborn:matrix.org changed their profile picture.00:39:05

Show newer messages


Back to Room ListRoom Version: 6