Nix Flakes | 885 Members | |
| 179 Servers |
| Sender | Message | Time |
|---|---|---|
| 10 Jul 2023 | ||
| ah, just looking at https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake.html#flake-references looks like github and sourcehut supported, but i guess i could use the | 15:57:36 | |
| is there a good way to use flakes with the pijul VCS? I'd love to try out pijul because it seems like it improves upon git in a lot of ways, but the lack of flake support is the main reason why I've held off for now | 16:22:19 | |
In reply to @petrichor:envs.net fwiw, it was as simple as:
| 18:50:38 | |
i tried github:<user>/<repo>?host=<host> but it tried to use /api/v3/… which isn't supported by gitea | 18:51:41 | |
but seems like it should be fairly straightforward to implement a gitea: scheme | 18:52:24 | |
| 21:07:07 | ||
| 21:43:41 | ||
I use git+ssh://<host>/user/repo for gitea | 23:33:25 | |
| 11 Jul 2023 | ||
In reply to @2xsaiko:tchncs.deno but someone was working on it | 00:15:44 | |
| https://github.com/NixOS/nixpkgs/pull/240808 is the first step | 00:15:55 | |
| oh cool! (though, having flake compat would require completely different implementation in nix itself from what I understand, right?) | 00:21:05 | |
| yeah | 00:38:57 | |
| it was more "Nix isn't going to add a fetcher for something Nixpkgs doesn't even support" | 00:39:05 | |
In reply to @2xsaiko:tchncs.deThanks! I was actually able to find help on the nixos forum. It turned out I needed to use NIX_LDFLAGS to make ld give the program the things it needed. | 00:49:01 | |
| 16:07:17 | ||
| 20:43:38 | ||
| 12 Jul 2023 | ||
is there an idiomatic way to produce a path relative to the root of the flake repo? i want to replace imports = [ ../../common/users.nix ] with something like imports = [ ${self}/nixos/common/users.nix ] | 11:57:33 | |
Not tested, but shouldn't self.outPath work there? | 11:58:02 | |
i've tried a bunch of variations on /${self.outPath}/nixos/common/users.nix - it complains that "a string that refers to a store path cannot be appended to a path" | 12:17:54 | |
beect: both ${self} and ${self.outPath} work for me, are you sure your self is the one you get passed to your flake outputs function? | 12:57:37 | |
i.e. { outputs = { self }: { myPath = "${self}"; }; } => nix eval .#myPath => "/nix/store/..." | 12:58:37 | |
| oh | 12:59:42 | |
it should be imports = [ "${self}/nixos/common/users.nix" ], with the quotes | 13:00:04 | |
or (self + /nixos/common/users.nix) | 13:01:27 | |
In reply to @crtified:crtified.meeven just "${self}" would work because of string interpolation | 13:07:28 | |
| another design choice is to expose these common modules are nixosModules flake outputs | 13:08:08 | |
| ah yup, using a string instead of a path works. thanks. it's a little ugly, thanks for the pointer to nixosModules. | 13:22:20 | |
| 13 Jul 2023 | ||
| 08:27:42 | ||
| anyone know their way around managing secrets in nix flakes(outside nixos)? i tried using a output with pkgs.runcommand running agenix to decrypt them in sequence before generating the proper output (a generated file, which needs them), but i hit the wall that i cant access the users private keys like ~/.ssh/id_rsa since that doesnt seem to be possible impureley im trying to have encrypted secrets in the repo and have the flake decrypt them using the users private keys and generate a config file which uses the decrpyted secrets contents | 14:44:41 | |
| * anyone know their way around managing secrets in nix flakes(outside nixos)? i tried using a output with pkgs.runcommand running agenix to decrypt them in sequence before generating the proper output (a generated file, which needs them), but i hit the wall that i cant access the users private keys like ~/.ssh/id_rsa since that doesnt seem to be possible impureley im trying to have encrypted secrets in the repo and have the flake decrypt them using the users private keys and generate a config file which uses the decrpyted secrets contents(and in future have them accessible by any sub flake/potential flake built nixos configurations) | 14:46:01 | |