!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

84 Members
systemd in NixOs's stage 1, replacing the current bash tooling https://github.com/NixOS/nixpkgs/projects/5127 Servers

Load older messages


SenderMessageTime
24 Apr 2023
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Nope! I think we should just remove BUILD_ID from initrd-release though to fix it 21:48:36
@lily:lily.flowers@lily:lily.flowersSame21:48:45
@mlyx:matrix.org@mlyx:matrix.orgimage.png
Download image.png
21:53:52
@mlyx:matrix.org@mlyx:matrix.orgHow can I disable crypto stuff21:54:21
@aktaboot:tchncs.de@aktaboot:tchncs.deoverrides I guess21:55:10
@lily:lily.flowers@lily:lily.flowers
In reply to @elvishjerricco:matrix.org
tpm stuff is currently included when luks is included at all
I think it's actually included regardless, since it checks for systemd being built with cryptsetup support at all rather than checking for luks
21:55:18
@lily:lily.flowers@lily:lily.flowers(and systemdStage1 is build with cryptsetup support)21:55:29
@lily:lily.flowers@lily:lily.flowers
In reply to @mlyx:matrix.org
How can I disable crypto stuff
boot.initrd.systemd.package = pkgs.systemdStage1.override { withCryptsetup = false; }; I think should do it
21:56:42
@elvishjerricco:matrix.org@elvishjerricco:matrix.org
In reply to @elvishjerricco:matrix.org

If I build these initrds:

let
  pkgs = import ./. {};
  initrd = module: (pkgs.nixos {
    imports = [module];
    fileSystems."/".device = "dummy";
  }).config.system.build.initialRamdisk;
in {
  simple = initrd {};
  network = initrd {
    boot.initrd.network.enable = true;
    boot.initrd.network.ssh.enable = true;
  };
  systemd-simple = initrd {
    boot.initrd.systemd.enable = true;
  };
  systemd-network = initrd {
    boot.initrd.systemd.enable = true;
    boot.initrd.network.enable = true;
    boot.initrd.network.ssh.enable = true;
  };
}

I get these size:

  • simple: 12M
  • network: 13M
  • systemd-simple: 15M
  • systemd-network: 17M
Lily Foster: Hm but the systemd-simple case in this code does get 2M bigger when I add boot.initrd.luks.devices.foo.device = "/dummy";
22:00:12
@aktaboot:tchncs.de@aktaboot:tchncs.demaybe we should have different override options for fido2 and tpm2 ?22:01:31
@lily:lily.flowers@lily:lily.flowersThat's because systemd-cryptsetup does not get added unless luks has devices22:01:31
@lily:lily.flowers@lily:lily.flowers * That's probably because systemd-cryptsetup does not get added unless luks has devices22:01:35
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgah22:01:38
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgok so we need to make the condition in which tpm stuff is added smarter22:01:50
@elvishjerricco:matrix.org@elvishjerricco:matrix.org holy cow if I set boot.initrd.systemd.package = pkgs.systemdStage1 { withCryptsetup = false; }, it goes from 15M to 8.9M 22:02:18
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgwhich is way smaller than the dumbest scripted initrd we can generate22:02:50
@lily:lily.flowers@lily:lily.flowers Should we add another pkgs.systemdStage1Cryptsetup or do something from the module's side? 22:04:02
@aktaboot:tchncs.de@aktaboot:tchncs.dewhere does the withCruptsetup come from ?22:04:13
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgI think at this point we need a feature matrix system22:04:15
@lily:lily.flowers@lily:lily.flowers(since obviously adding more combinations, like systemdStage1NetworkCryptsetup would be kinda dumb)22:04:19
@lily:lily.flowers@lily:lily.flowers
In reply to @elvishjerricco:matrix.org
I think at this point we need a feature matrix system
Yeah that was my thought
22:04:25
@elvishjerricco:matrix.org@elvishjerricco:matrix.org aktaboot: it's from where systemdStage1 is defined in all-packages.nix 22:04:42
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Lily Foster: Yea I think we should turn the with* things into nix options and then cache the most common configurations 22:05:00
@elvishjerricco:matrix.org@elvishjerricco:matrix.org * Lily Foster: Yea I think we should turn some of the with* things into nix options and then cache the most common configurations 22:05:18
@lily:lily.flowers@lily:lily.flowersYeah, I'll agree to that22:05:59
@elvishjerricco:matrix.org@elvishjerricco:matrix.org or... hm... Actually, just using pkgs.systemd is barely bigger than the current systemdStage1. So maybe we have a minimal and we have a full 22:06:11
@elvishjerricco:matrix.org@elvishjerricco:matrix.organd leave it at that22:06:14
@lily:lily.flowers@lily:lily.flowers How barely? I'd be okay with just replacing systemdStage1 and systemdStage1Network with just systemd if the size difference is minimal (like within a megabyte or so) 22:07:22
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgIt is within a megabyte22:07:34
@lily:lily.flowers@lily:lily.flowersYeah, no reason to keep the separation then I guess22:07:53

Show newer messages


Back to Room ListRoom Version: 6