| 26 Oct 2025 |
| @acidbong:envs.net joined the room. | 07:14:09 |
@acidbong:envs.net | moin. i'm trying to expose my NixOS' config.i18n.glibcLocales (for the sake of being built and cached by CI) in a flake-parts way, but there's a catch
here's what I define:
{lib,self,...}: {
perSystem = {system, ...}: {
packages = {
glibcLocales-bong = lib.mkIf (
self.nixosConfigurations.bong.config.nixpkgs.hostPlatform.system == system
) self.nixosConfigurations.bong.config.i18n.glibcLocales;
};
};
}
I expect it to generate this
{
packages = {
aarch64-linux = {
...
dwm = ...;
hacksaw = ...;
...
};
x86_64-linux = {
...
dwm = ...;
glibcLocales-bong = ...;
hacksaw = ...;
...
};
};
}
but it does not: instead, when running nix flake show --all-systems, it still tries to evaluate it on a wrong system
$ nix flake show --all-systems
...
└───packages
├───aarch64-linux
│ ├───desktop-scripts: package 'desktop-scripts'
│ ├───dwm: package 'dwm-6.5'
error: The option `perSystem.aarch64-linux.packages.glibcLocales-bong' was accessed but has no value defined. Try setting the option.
before submitting to flake.parts, I wanna make sure whether they misimplement this or i misunderstood Nixpkgs modules and lib.types.attrsOf in particular | 07:16:41 |
@acidbong:envs.net | turns out, a higher-level mkIf was the way, I did misunderstood [lazyA,a]ttrsOf | 09:05:53 |
| Sir_Morton joined the room. | 15:33:28 |
| 27 Oct 2025 |
| @acidbong:envs.net left the room. | 09:20:03 |
| genadij.udarov joined the room. | 16:39:02 |
| 28 Oct 2025 |
| @rasmus:fricloud.dk left the room. | 14:35:36 |
| 1 Nov 2025 |
| Gaétan Lepage changed their profile picture. | 22:53:18 |
| Gaétan Lepage changed their profile picture. | 22:54:17 |
| 3 Nov 2025 |
| @kttns0ut:matrix.org joined the room. | 10:14:37 |
| 4 Nov 2025 |
| ncfavier changed their profile picture. | 23:54:56 |
| 5 Nov 2025 |
| Laguito joined the room. | 05:58:22 |
| 7 Nov 2025 |
| cosmicexcursionist joined the room. | 16:59:47 |
| @awwpotato:envs.net changed their display name from awwpotato (she/her) to -> @da157:catgirl.cloud. | 18:30:30 |
| @awwpotato:envs.net left the room. | 18:40:48 |
| Mahmoud joined the room. | 19:01:48 |
| @emma:rory.gay left the room. | 22:40:21 |
| 8 Nov 2025 |
| cosmicexcursionist set a profile picture. | 01:00:07 |
| 9 Nov 2025 |
| @thedragon44:matrix.org left the room. | 14:15:37 |
| draed joined the room. | 15:28:01 |
| 10 Nov 2025 |
| @ieda:matrix.org left the room. | 13:34:02 |
| 11 Nov 2025 |
Rene | Hello. I have a flake that has an app that talks to a MySQL database. If I do nix develop and run the tests manually, it can connect to the database. If I do nix build (which includes running the tests), all the tests fail with an error that it can't connect to the database. What's the right way to write the flake so it finds the database? | 21:03:46 |
Jeff | nix build runs in a sandbox so you can't connect to external resources. You'll need to set up a database inside the build to run the tests against. | 22:40:06 |
| @ma27:nicht-so.sexy left the room. | 22:44:07 |
| 12 Nov 2025 |
| death916 joined the room. | 10:00:22 |
| Inayet changed their display name from inayet to Inayet. | 12:38:07 |
| 13 Nov 2025 |
| Michal Koutenský joined the room. | 17:41:16 |
| 15 Nov 2025 |
| mcsida joined the room. | 23:00:14 |
| 16 Nov 2025 |
| ephel joined the room. | 11:04:18 |
| @kttns0ut:matrix.org left the room. | 19:25:29 |