!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

896 Members
182 Servers

Load older messages


SenderMessageTime
24 Nov 2023
@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
6 Dec 2023
@glepage:matrix.orgGaétan Lepage Hi !
It seems that you can use flake-parts without clearly adding it to the inputs.
Is it somehow "contained" in nixpkgs ? I tried to grep the nixpkgs repo for flake-parts but had no result.
12:55:36
@npc_projection:matrix.orgnpc_projectionWhat makes you think you can use flake-parts without adding to inputs?13:14:37
@glepage:matrix.orgGaétan LepageI tried ^^13:15:18
@glepage:matrix.orgGaétan LepageApparently it is because it is part of the global flake registry13:15:29
@glepage:matrix.orgGaétan LepageI was not aware of its existence13:15:39
@glepage:matrix.orgGaétan Lepagehttps://github.com/NixOS/flake-registry13:16:36
7 Dec 2023
@avaq:matrix.orgAldwin

Hi! I'm finally migrating my 6 years old nixos config to Flakes! It's mostly going well but I need some help. I used to have an overlay that added nixpkgs-unstable to the nixpkgs.unstable attribute (using fetchTarball to get it). Now, I want to use a flake input instead, and I used an inline module with an overlay to have it exposed in the same place again. I'm trying to make my existing modules compatible with the Flake, so I don't have to go in and change them all.

This all seems to work, except that Nix is refusing to evaluate Unfree packages from Unstable now. It appears as though the nixpkgs.config does not apply to the unstable input the way it used to. So my question is: How do I get this second nixpkgs input to adhere to the same config as my primary one? And by "primary" I guess I mean the one used to make the lib.nixosSystem call.

09:48:32

Show newer messages


Back to Room ListRoom Version: 6