| 16 Mar 2024 |
fricklerhandwerk | 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 | Otherwise looks reasonable. I'd factor and name a few things differently, but that comes with experience working on growing code bases. | 15:48:57 |
Pablo Escodebar | Everyone: 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 |
| NixOS Moderation Botchanged room power levels. | 00:29:50 |
| 21 Mar 2024 |
Pablo Escodebar | fricklerhandwerk: thanks for the inputs. They started some discussions which made me learn and understand some conventions better. | 15:49:26 |
Pablo Escodebar | Also, 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 |
Pablo Escodebar | Will definitely share the approach in all the SoCraTes Unconferences I go to ☺️ | 15:51:37 |
| NixOS Moderation Botchanged room power levels. | 18:02:47 |
ners | @room we're on for 11. April!
https://www.meetup.com/nix-zurich/events/299934110/ | 18:03:17 |
ners | * @room we're on for 11. April at Rivero!
https://www.meetup.com/nix-zurich/events/299934110/ | 18:04:29 |
| 22 Mar 2024 |
| Santos joined the room. | 08:09:58 |
| 25 Mar 2024 |
Pablo 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 |
Marc Jakobi | nix flake init "github:mrcjkb/flakes#nix-unit"
| 14:53:39 |
Marc Jakobi | Has one succeeding and one failing test for an add function | 14:53:57 |
Marc Jakobi | * nix flake init -t "github:mrcjkb/flakes#nix-unit"
| 14:54:08 |
Pablo Escodebar | Thanks Marc Jakobi! I appreciate it a lot! | 15:33:27 |
| 26 Mar 2024 |
Marc 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 |
Marc Jakobi | 🤔I think I can use buildFSHEnvBubblewrap in the installPhase and initialise the license there. | 14:06:16 |
Marc Jakobi | That seems to work 🤦 | 14:22:09 |
ners | Please 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 |
Marc Jakobi | Will do, once I'm done. I might still have some quirks to iron out. | 14:51:50 |
Marc Jakobi | Out of curiosity, what is your friend packaging? | 14:52:03 |
Marc 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 | Is anyone from Rivero in this room here? | 12:35:55 |
ners | Yeah, Dominic Egger | 15:33:21 |
Marc Jakobi | Well, 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 | 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 |
Dominic Egger | i don't think we have an esperanto speaker. you'd have to ask my boss what that is about tbh | 18:05:42 |
| 30 Mar 2024 |
Pablo 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 |
Marc 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 |