!oeFELgatfbdiAEkJAY:nixos.org

Nix Zürich

112 Members
https://www.meetup.com/nix-zurich/ - ZHF Hackathon 25-26 May 202425 Servers

Load older messages


SenderMessageTime
8 Mar 2024
@ners:nixos.devners * @room I got confirmation for the next venue we can use for a meetup, just need to pick the date. Shall I aim for late March (3️⃣) or early April (4️⃣)?09:20:57
14 Mar 2024
@mjolnir:nixos.orgNixOS Moderation Botchanged room power levels.18:44:24
16 Mar 2024
@oldaq:matrix.orgPablo Escodebar

fricklerhandwerk: https://github.com/escodebar/life/commits/nix/

I pushed the current iteration. It was fun 🤩

15:31:24
@fricklerhandwerk:matrix.orgfricklerhandwerk I can recommend nix-unit btw, as it also allows catching exceptions. 15:37:01
@oldaq:matrix.orgPablo EscodebarI’ll clean up the repo at some point. I’ll push a branch for each programming language I implemented the game in. Previously it was just for an implementation in vue.js15:37:18
@oldaq:matrix.orgPablo EscodebarI am pretty sure there are a couple on non-idiomatic parts. Would love to get some feedback.15:38:04
@oldaq:matrix.orgPablo EscodebarAll in all, I’m very happy to have done this (at least twice). Whenever I encounter nix code I’m now capable to read it and understand what is what 🥰15:39:00
@fricklerhandwerk:matrix.orgfricklerhandwerk

I recommend to generally avoid import within files that are not at the very top level, especially of lookup paths like here: https://github.com/escodebar/life/blob/nix/life/rules.nix#L3

Use { lib }: ... - that makes your code a lot more reusable

15:42:35
@fricklerhandwerk:matrix.orgfricklerhandwerk Also, put your top-level files (like flake.nix and default.nix) at the root of the repo, otherwise its a pain to actually call them 15:43:37
@fricklerhandwerk:matrix.orgfricklerhandwerk * Also, put your top-level files (like flake.nix and default.nix) at the root of the repo, otherwise its a pain to actually call them without manually cloning your repo 15:43:45
@fricklerhandwerk:matrix.orgfricklerhandwerk There's another, yet undocumented best practice: avoid using builtins directly and take the aliases from pkgs.lib. Nix cannot be reliably versioned, but Nixpkgs maintainers put a lot of effort into making library calls cross-version compatible 15:46:56
@fricklerhandwerk:matrix.orgfricklerhandwerkOtherwise looks reasonable. I'd factor and name a few things differently, but that comes with experience working on growing code bases.15:48:57
@oldaq:matrix.orgPablo EscodebarEveryone: feel free to make pull requests with improvements and explanations of the improvements so I can further learn the language and the ecosystem 😊😘15:52:35
19 Mar 2024
@mjolnir:nixos.orgNixOS Moderation Botchanged room power levels.00:29:50
21 Mar 2024
@oldaq:matrix.orgPablo Escodebar fricklerhandwerk: thanks for the inputs. They started some discussions which made me learn and understand some conventions better. 15:49:26
@oldaq:matrix.orgPablo EscodebarAlso, the exercise was really really worth it. I am so much more confident now when reading nix code. Previously I was totally overwhelmed, now, I can interpret nix code correctly. Can recomment my approach to learning nix to every beginner 😊15:51:10
@oldaq:matrix.orgPablo EscodebarWill definitely share the approach in all the SoCraTes Unconferences I go to ☺️15:51:37
@mjolnir:nixos.orgNixOS Moderation Botchanged room power levels.18:02:47
@ners:nixos.devners@room we're on for 11. April! https://www.meetup.com/nix-zurich/events/299934110/18:03:17
@ners:nixos.devners * @room we're on for 11. April at Rivero! https://www.meetup.com/nix-zurich/events/299934110/18:04:29
22 Mar 2024
@sant0s:matrix.orgSantos joined the room.08:09:58
25 Mar 2024
@oldaq:matrix.orgPablo Escodebar

I started another iteration of implementing the game of life with nix, this time using nix-unit.

I’m kind of lost.

Can someone provide a repo with a “add” function and a simple test, so I have a structure and understand better how to work with nix-unit?

14:05:11
@mrcjk:matrix.orgMarc Jakobi
nix flake init "github:mrcjkb/flakes#nix-unit"
14:53:39
@mrcjk:matrix.orgMarc Jakobi Has one succeeding and one failing test for an add function 14:53:57
@mrcjk:matrix.orgMarc Jakobi *
nix flake init -t "github:mrcjkb/flakes#nix-unit"
14:54:08
@oldaq:matrix.orgPablo Escodebar Thanks Marc Jakobi! I appreciate it a lot! 15:33:27
26 Mar 2024
@mrcjk:matrix.orgMarc Jakobi

I'm trying to package some proprietary garbage with buildFSHEnv[Bubblewrap]. It expects to be able to create a license file in /opt/<pkg-name>.

Does anyone have some pointers that could help me figure out to get this working?

13:54:11
@mrcjk:matrix.orgMarc Jakobi 🤔I think I can use buildFSHEnvBubblewrap in the installPhase and initialise the license there. 14:06:16
@mrcjk:matrix.orgMarc JakobiThat seems to work 🤦14:22:09
@ners:nixos.devnersPlease share the thing you're packaging, a friend of mine has a similar piece of proprietary software that he'd like to package with FHS.14:51:04

Show newer messages


Back to Room ListRoom Version: 10