Nix Flakes | 904 Members | |
| 184 Servers |
| Sender | Message | Time |
|---|---|---|
| 24 Oct 2023 | ||
If nix flake show --json would print the URL (analogously to nix flake show), then nix flake show --json FLAKE | jq -r 'keys[0]' would be the utility that resolves a flake to its precise URL. | 21:11:15 | |
* If nix flake show --json would print the URL (analogously to nix flake show), then nix flake show --json FLAKE | jq -r 'keys' would be the utility that resolves a flake to its precise URL. | 21:11:43 | |
* If nix flake show --json would print the URL (analogously to nix flake show), then nix flake show --json FLAKE | jq -r 'keys' would be the utility that resolves a flake to its precise URL. And then we would have to deal with the #hello part separately... | 21:12:14 | |
| 25 Oct 2023 | ||
| 00:12:36 | ||
| 26 Oct 2023 | ||
| What is the flakes way of going about installing packages from different I have been seeing stuff like this everywhere, but no equivalent method for flakes that doesn't break reproducibility:
or
I was thinking about making an overlay using Is there a "best practices" way of going about this? | 02:32:50 | |
In reply to @lehmanator:gnulinux.clubyou can include it as another input to your flake, like nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; | 07:24:59 | |
In reply to @petrichor:envs.net Right, but how should I make its packages accessible by the system / home-manager? I know I can do something like:
| 19:12:25 | |
In reply to @petrichor:envs.net* Right, but how should I make its packages accessible by the system / home-manager? I know I can do something like:
| 19:12:32 | |
In reply to @petrichor:envs.net* Right, but how should I make its packages accessible by the system / home-manager? I know I can do something like:
but I remember seeing one of the big maintainers saying that using a lot of overlays is discouraged and often causes slow builds, and suggested a better practice (which unfortunately I dont remember) for overriding / adding packages, but that was for one-off packages and not an entire instance of | 19:18:01 | |
| This was specifically when using flakes, as using the channels mechanism breaks reproducibility. | 19:21:22 | |
| 27 Oct 2023 | ||
| 01:24:13 | ||
| 30 Oct 2023 | ||
In reply to @lehmanator:gnulinux.clubwhen you do outputs = { self, ... }@inputs: ...; in your flake.nix, pass inputs to specialArgs, then you can use the flake inputs and outputs (via self) in your nixos modules. maybe home manager has something like specialArgs too | 04:13:21 | |
In reply to @lehmanator:gnulinux.club* when you do for example: https://or.computer.surgery/charles/servy-fleet/-/blob/3eae347d2cce33d1fed7371346b9d8b2aced891b/config/matrix-conduit/default.nix#L17 | 04:14:46 | |
| 14:16:51 | ||
| 31 Oct 2023 | ||
| Hey everyone. Flake novice here. I used a flake to create a reproducible development shell for one of my python applications. So far, so good. Then I wanted to integrate my application into my configuration.nix and run it as a recurring service via systemd. To this end, (after browsing github for inspiration), in my nix config repo I created a pkgs/app/default.nix, which points to the github repo of my application, and a modules/app/default.nix, which defines settings and applies those appropriately. My configuration.nix imports the app's module and enables it. Although it took me a while cause I'm new to Nix, I got that setup working after a while. Now I'd like to turn the second part (module, pkg definitions) into a flake, and have some questions about that. Because there's so many open questions, I'll just post them in the order that makes sense to me. Any help/pointers would be greatly appreciated:
| 08:28:51 | |
| the main difference between having a flake in the same repo vs a separate one is that if it's in the same repo, the whole repository ends up in the closure—which is fine most of the time, but sometimes you e.g. want to filter something out, because it isn't necessary for your builds | 08:53:53 | |
| I'd say that when possible, it makes sense to have the flake in the same repo | 08:54:09 | |
| I wouldn't want to have a devshell in a repository separate from the app—but I don't know if there is a general practice | 08:54:53 | |
| for what it's worth, my encounters with flakes so far are mostly in repos that package themselves, in the same repo | 08:55:20 | |
I don't entirely get the last point. pkgs.callPackage ./pkgs/app/default.nix {} will probably do what you want for packages, import ./modules/app/default.nix will do that for modules | 08:56:36 | |
as in, outputs.nixosModules.app = import ./modules/app/default.nix; | 08:57:07 | |
| thanks mewp. can I bother you to share one or two of those repos with flakes that package themselves in the same repo? that would really help a lot. | 09:12:52 | |
| https://gitlab.com/eobuwie-foss/imaginator/ ← that's one of mine | 09:14:07 | |
| most of my other repos are unfortunately private, but I'll try to find a public example | 09:14:51 | |
| oh, right, https://github.com/helix-editor/helix | 09:15:43 | |
| but also see https://github.com/NixOS/flake-registry/blob/master/flake-registry.json | 09:15:50 | |
| I'll try to figure out a theme from those that I can apply to my problem. thanks, mewp! | 09:18:29 | |
| don't hesitate to ask more | 09:18:44 | |
| 14:29:10 | ||
| 1 Nov 2023 | ||
| 14:06:45 | ||