!tCyGickeVqkHsYjWnh:nixos.org

NixOS Networking

857 Members
Declaratively manage your switching, routing, wireless, tunneling and more. | Don't rely on `networking.*` use systemd-networkd and NetworkManager instead. | Set `SYSTEMD_LOG_LEVEL=debug` to debug networking issues with networkd | No bad nft puns, please. | Room recommendations: #sysops:nixos.org245 Servers

Load older messages


SenderMessageTime
29 Jul 2025
@emilazy:matrix.orgemilyI think that probably putting a program in a separate output doesn't incur repeated ongoing maintenance costs in most cases17:48:46
@emilazy:matrix.orgemily same way that make-initrd-ng itself doesn't much 17:48:53
@emilazy:matrix.orgemilypeople do closure size minimization work for other reasons, so it's not like it would be burden solely for initrd17:49:18
@elvishjerricco:matrix.orgElvishJerricco Well if you want to give it a try, it shouldn't be too hard to swap makeInitrdNG for makeInitrd and start slashing away 17:50:32
@elvishjerricco:matrix.orgElvishJerricco(oof, a stock systemd initrd is 21M. not great, but acceptable)17:52:20
@emilazy:matrix.orgemilyyeah I might18:04:03
@emilazy:matrix.orgemilyeven just looking at the diff of the closure would probably make it obvious where to start18:04:16
@emilazy:matrix.orgemily (I thought makeInitrd screws up the store paths or something though) 18:05:04
@elvishjerricco:matrix.orgElvishJerricco no, makeInitrd just does plain ole closures 18:05:41
@elvishjerricco:matrix.orgElvishJerricco it's the extraUtils derivation that does the screwing with binaries so the closure is small 18:05:58
@emilazy:matrix.orgemilyah18:07:49
@marcel:envs.netMarcel

Is this a crime?

storePaths =
            let
              closure = pkgs.closureInfo { rootPaths = [ initrdCfg.package ]; };
              closurePaths = lib.filter (path: path != "") (lib.splitString "\n" (builtins.readFile "${closure}/store-paths")) ;
            in
            closurePaths ++
            [
              config.environment.etc."ifstate/config.initrd.yml".source
            ];

now i only have to work on reducing the closure size.

19:57:37
@marcel:envs.netMarcel *

Is this a crime?

storePaths =
  let
    closure = pkgs.closureInfo { rootPaths = [ initrdCfg.package ]; };
    closurePaths = lib.filter (path: path != "") (lib.splitString "\n" (builtins.readFile "${closure}/store-paths")) ;
  in
  closurePaths ++
  [
    config.environment.etc."ifstate/config.initrd.yml".source
  ];

now i only have to work on reducing the closure size.

19:58:08
@emilazy:matrix.orgemilyIFD19:58:51
@emilazy:matrix.orgemilyso criminal we have a name and a flag for the specific type of crime :)19:59:17
@emilazy:matrix.orgemilyit would break on Hydra19:59:19
@marcel:envs.netMarcelahh ok19:59:56
@marcel:envs.netMarcelat least my vm test works now ;D20:00:47
@elvishjerricco:matrix.orgElvishJerricco

Marcel: yea if you want to do closureinfo stuff to get full closures into systemd initrd I was thinking of something like this:

{
  boot.initrd.systemd.storePaths = [
    (runCommand "x"
      {
        info = closureInfo { rootPaths = [ hello ]; };
      }
      ''
        mkdir $out
        cat "$info"/store-paths | while read path; do
          ln -s "$path" "$out/$(basename "$path")"
        done
      ''
    )
  ];
}
20:03:53
@elvishjerricco:matrix.orgElvishJerricco *

Marcel: yea if you want to do closureinfo stuff to get full closures into systemd initrd I was thinking of something like this:

{
  boot.initrd.systemd.storePaths = [
    (runCommand "x"
      {
        info = closureInfo { rootPaths = [ hello ]; };
      }
      ''
        mkdir $out
        cat "$info"/store-paths | while read path; do
          ln -s "$path" "$out/$(basename "$path")"
        done
      ''
    )
  ];
}
20:03:57
@elvishjerricco:matrix.orgElvishJerricco but it'd probably be better to just have a make-initrd-ng feature for this 20:04:21
@elvishjerricco:matrix.orgElvishJerricco something like storePaths = [ { source = hello; closure = true; } ]; 20:04:47
@emilazy:matrix.orgemily if I clear my backlog for today I'm going to diff the closure of make-initrd{,-ng} 20:04:56
@emilazy:matrix.orgemilyand my rampage will begin :P20:05:02
@marcel:envs.netMarcelno pressure - when ifstate releases i will just create an PR without initrd support and keep that initrd stuff localy untill we've figured something out20:08:17
@marcel:envs.netMarcel
In reply to @elvishjerricco:matrix.org

Marcel: yea if you want to do closureinfo stuff to get full closures into systemd initrd I was thinking of something like this:

{
  boot.initrd.systemd.storePaths = [
    (runCommand "x"
      {
        info = closureInfo { rootPaths = [ hello ]; };
      }
      ''
        mkdir $out
        cat "$info"/store-paths | while read path; do
          ln -s "$path" "$out/$(basename "$path")"
        done
      ''
    )
  ];
}
thx
20:16:15
30 Jul 2025
@yan:we2.eeyan 💕 joined the room.01:42:17
@sandro:supersandro.deSandro 🐧re: ifstate: speaks something against static compilation?18:34:31
@marie:marie.cologneMarieit's python18:37:51
@denkn:denkn.at𝔇𝔢𝔫𝔎𝔫it should be also possible to compile python static. but you are only able to load libs written in plain python.19:03:12

Show newer messages


Back to Room ListRoom Version: 6