!oeFELgatfbdiAEkJAY:nixos.org

Nix Zürich

112 Members
https://zurich.nix.ug/ - ZHF 25.11 on 15-16 November 202523 Servers

Load older messages


SenderMessageTime
16 Mar 2024
@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
@mrcjk:matrix.orgMarc JakobiWill do, once I'm done. I might still have some quirks to iron out.14:51:50
@mrcjk:matrix.orgMarc JakobiOut of curiosity, what is your friend packaging?14:52:03
@mrcjk:matrix.orgMarc Jakobi

This is what I have so far:

# in mkDerivation
  installPhase = ''
    cp -r ./ $out/
    ${buildFHSEnvBubblewrap {
      name = "falconctl";
      runScript = "$out/opt/CrowdStrike/falconctl";
      extraBwrapArgs = ["--bind $out/opt /opt"];
    }}/bin/falconctl -s --cid=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  '';

And then, with another wrapper:

  falcond = buildFHSEnvBubblewrap {
    name = "falcond";
    targetPkgs = pkgs: [falcon-sensor-unwrapped libnl openssl];
    runScript = "${falcon-sensor-unwrapped}/opt/CrowdStrike/falcond";
    extraBwrapArgs = [
      "--bind \"$HOME\"/.local/share/CrowdStrike/falconstore ${falcon-sensor-unwrapped}/opt/CrowdStrike/falconstore"
    ];
  };

I'm working on a nixos module where the systemd service copies the falconstore file from the -unwrapped package to the .local/share location.

14:55:45
28 Mar 2024
@das-g:matrix.orgdas-gIs anyone from Rivero in this room here?12:35:55
@ners:nixos.devners Yeah, Dominic Egger 15:33:21
@mrcjk:matrix.orgMarc JakobiWell, this ended up failing for me because the app runs in kernel space and has a whitelist of supported kernels 🙉15:40:02
@das-g:matrix.orgdas-g Who at Rivero names the company's products, Dominic Egger? Are there Esperanto speakers among you?
Kiu ĉe Rivero nomas la produktojn de la firmao? Ĉu estas Esperantistoj inter vi?
17:34:05
@graf_blutwurst:matrix.orgDominic Eggeri don't think we have an esperanto speaker. you'd have to ask my boss what that is about tbh18:05:42
30 Mar 2024
@oldaq:matrix.orgPablo Escodebar

Is there a reason why there is no powerline vim plugin?

Defining one looks almost as easy as:

pkgs.vimUtils.buildVimPlugin {
  name = “powerline”;
  src = “${pkgs.powerline}/share/vim”;
}

(Well… of course… there is some more to it, since we depend on python etc.)

But maybe there’s something which I am missing and it’s totally unnecessary to use buildVimPlugin.

What is your approach?

19:56:06
@mrcjk:matrix.orgMarc Jakobi
In reply to @oldaq:matrix.org

Is there a reason why there is no powerline vim plugin?

Defining one looks almost as easy as:

pkgs.vimUtils.buildVimPlugin {
  name = “powerline”;
  src = “${pkgs.powerline}/share/vim”;
}

(Well… of course… there is some more to it, since we depend on python etc.)

But maybe there’s something which I am missing and it’s totally unnecessary to use buildVimPlugin.

What is your approach?

Plugins that can't be generated with the updater need to be added manually (see for example vim-clap) or, if they just need something added on top of the generated nix, overridden.

As for why it hasn't been added yet. There probably just hasn't been a nix user who uses the plugin yet.

20:06:56

Show newer messages


Back to Room ListRoom Version: 10