!dGrjXvKnCwVLevgmzo:matrix.org

Stockholm NixOS meetup group

48 Members
Monthly meetups in Stockholm, Sweden around Nix releated topics(nixos.org)12 Servers

Load older messages


SenderMessageTime
15 Jun 2025
@alayham:ayloul.com@alayham:ayloul.com joined the room.03:15:07
@alayham:ayloul.com@alayham:ayloul.com > I’m game to register a repair shop/collective to assist others in Gothenburg if anyone’s game?
dish1892 I am. I tried to list myself but got rejected. https://invent.kde.org/websites/endof10-org/-/merge_requests/295
03:27:57
@alayham:ayloul.com@alayham:ayloul.com 03:30:46
@alayham:ayloul.com@alayham:ayloul.com set a profile picture.10:15:17
@alayham:ayloul.com@alayham:ayloul.com changed their display name from alayham to Al Saleh.10:23:42
@markuskowa:matrix.orgmarkuskowadish1892: alayham: aren't your posts a bit off-topic here? This is the Stockholm NixOS channel.12:24:48
@alayham:ayloul.com@alayham:ayloul.comsorry, leaving12:25:49
@alayham:ayloul.com@alayham:ayloul.com left the room.12:25:55
23 Jun 2025
@julienmalka:matrix.orgJulien joined the room.07:23:13
2 Jul 2025
@lillecarl:matrix.orgLilleCarl (Salsa9)I found a tool that I decided to try yesterday and regret I didn't try earlier. It's called optnix, it's essentially a terminal version of search.nixos.org for options.16:31:54
@lillecarl:matrix.orgLilleCarl (Salsa9)https://asciinema.org/a/cEbCAqfEwt0pOAPBDBVLLLj5b Here's a quick asciinema so you can check it out without installing, and they publish as a simple flake, just nixpkgs as a dependency which is nice. It's really useful when you're developing your own modules since it evaluates your own instance of your options rather than a predefined one. So it makes building option hierarchies and actually using them a lot easier, I bet a lot of you use either search.nixos.org or mynixos.org a bit and this is pretty similar :)16:38:42
@markuskowa:matrix.orgmarkuskowaThat's cool! What's the URL for the flake?16:54:31
@lillecarl:matrix.orgLilleCarl (Salsa9)https://github.com/water-sucks/optnix Haha sry i forgot to link the most essential thing! πŸ˜„19:14:28
@lillecarl:matrix.orgLilleCarl (Salsa9)* https://github.com/water-sucks/optnix Haha sry i forgot to link the most essential thing! πŸ˜„ Love that username19:14:40
11 Jul 2025
@sodiboo:gaysex.cloudsodiboo joined the room.07:11:17
25 Jul 2025
@aevl:matrix.orgAnders joined the room.14:56:19
@aevl:matrix.orgAndersHi all! Just wondering if there are any companies in Stockholm using the Nix ecosystem? (Would be interested in working at such a company!)14:58:58
3 Aug 2025
@lillecarl:matrix.orgLilleCarl (Salsa9)

I learned how to do a really cursed thing today: edit /nix/store paths

sudo unshare --mount bash -c 'mount -your /nix to /nix'

My goal wasn't to edit storepaths but to hardlink to the store, which requires being on the same mount point (which /nix/store isn't because it's RO bind-mounted over itself)

21:15:57
@lillecarl:matrix.orgLilleCarl (Salsa9) *

I learned how to do a really cursed thing today: edit /nix/store paths

sudo unshare --mount bash -c 'mount -your /nix to /nix && touch /nix/store/something-cursed'

My goal wasn't to edit storepaths but to hardlink to the store, which requires being on the same mount point (which /nix/store isn't because it's RO bind-mounted over itself)

21:16:28
@lillecarl:matrix.orgLilleCarl (Salsa9) *

I learned how to do a really cursed thing today: edit /nix/store paths

sudo unshare --mount bash -c 'mount -your /nix to /nix && touch /nix/store/something-cursed'

My goal wasn't to edit storepaths but to hardlink to the store, which requires being on the same mount point (which /nix/store isn't because it's RO bind-mounted over itself)

unshare --mount creates your own mount namespace (ish) where you get a clone of what is already, but you can mount over things without disrupting any other processes.

21:17:59
4 Aug 2025
@markuskowa:matrix.orgmarkuskowaI hope everyone had a great summer. Let's start up the new meetup season on Wednesday the 27th at the Nordic light hotel. Give it a thumbs up if you are planning to join.20:13:26
8 Aug 2025
@0x4a6f:nixos.dev0x4A6F joined the room.07:07:10
11 Aug 2025
@alxplus:matrix.orgalxplusπŸ‘18:28:49
12 Aug 2025
@ahbk:matrix.orgI use NixOS btw
In reply to @lillecarl:matrix.org
https://github.com/water-sucks/optnix Haha sry i forgot to link the most essential thing! πŸ˜„

I was going to try this and saw that the maintainer (water-sucks) has integrated this tool along with other neat stuff in a unified nixos-cli. Its beta though and I got a strange error about mailserver.fqdn not being set, but apart from that it went fine and optnix is indeed very nice to use. Thanks for the tips πŸ€—

https://github.com/nix-community/nixos-cli

06:55:19
13 Aug 2025
@309avklarat:matrix.org@309avklarat:matrix.org left the room.21:36:06
23 Aug 2025
@lillecarl:matrix.orgLilleCarl (Salsa9)

If you're tracking a branch of some kind of repo and don't really care about purity, trust the supply chain and just want to get the latest stuff you can use "fetchTree" in impure evaluation to fetch the the hottest shit out there. By default it uses a 1 hour cache to not fetch every time.

      testFetchTree = builtins.fetchTree {
        type = "github";
        repo = "nixpkgs";
        owner = "NixOS";
        ref = "master";
      };

My understanding from reading github comments and whatnot is that it's using the same paths as flakes use for it's inputs.

https://asciinema.org/a/QW02t4oWnM8zBI8JSov4VysmF

14:17:26
@lillecarl:matrix.orgLilleCarl (Salsa9)For home/personal use --impure should be the default IMO. You can use builtins.getEnv to read environment variables and you can read files anywhere on the filesystem, not just the sacred repo. (Non-flake users don't have this problem since everything is --impure by default :))14:34:16
@lillecarl:matrix.orgLilleCarl (Salsa9)

I AI'd if --impure can be enabled by default and just now stumbled on a feature I hadn't heard about before! The option allow-unsafe-native-code-during-evaluation gives you a new builtin function called builtins.exec which can be used like this:

nix-repl> :p builtins.fromJSON (builtins.exec [ ./test.fish ])
{
  active = true;
  age = 25;
  name = "test-user";
  tags = [
    "developer"
    "nix"
    "json"
  ];
}
# test.fish
#! /usr/bin/env fish

echo "''"
echo '
{
  "name": "test-user",
  "age": 25,
  "active": true,
  "tags": ["developer", "nix", "json"]
}'
echo "''"

(It parses output as a Nix expression so i had to wrap the json in '' '' so it's treated as a string by Nix)

I'm definitely gonna dive deeper into usecases for this, as everything Nix it'll stall evaluation so don't do extremely slow things :)

14:49:37
@markuskowa:matrix.orgmarkuskowa
In reply to @lillecarl:matrix.org
For home/personal use --impure should be the default IMO. You can use builtins.getEnv to read environment variables and you can read files anywhere on the filesystem, not just the sacred repo.
(Non-flake users don't have this problem since everything is --impure by default :))
In the pre-flake world (where most of my code lives), impure is the default. I use it to provide license keys, cpu optimization flags via env or configuration files.
15:29:34
24 Aug 2025
@lillecarl:matrix.orgLilleCarl (Salsa9) This is the way, I use flake-compat(lix) πŸ˜„ 22:55:56

Show newer messages


Back to Room ListRoom Version: 10