!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

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

Load older messages


SenderMessageTime
15 Nov 2022
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Maybe we could still do a refactor to that effect though. Something like system.fsPackageByName.${fsType}, and then have the modules that add to system.fsPackages do so like [config.system.fsPackageByName.${fsType}]; 19:38:15
@elvishjerricco:matrix.org@elvishjerricco:matrix.org then we just always have fsPackageByName set for any FS supported, regardless of if it's in use 19:39:01
@elvishjerricco:matrix.org@elvishjerricco:matrix.org But barring a big ole refactor like that, I think we can do it by available kernel modules. Like boot.initrd.fsPackages = map fsPackageForMod config.boot.initrd.availableKernelModules; 19:43:04
@andreas.schraegle:helsinki-systems.de@andreas.schraegle:helsinki-systems.de
In reply to @elvishjerricco:matrix.org
because, as I can see if that commit's diff, we have dosftools in system.fsPackages, which almost certainly no one needs in initrd
people with ESPs might need it
22:19:57
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Andreas Schrägle: I can't think of a scenario where initrd even needs to mount the ESP, let alone do anything you would do with dosfstools to it 22:20:34
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgdosfstools would be for like... messing with the ESP somehow22:20:56
@andreas.schraegle:helsinki-systems.de@andreas.schraegle:helsinki-systems.deI can easly think of some. They're all pretty dumb, but that doesn't mean people wouldn't build them. Anyways, it's sort of besides the point. https://github.com/NixOS/nixpkgs/pull/201266 fixed an issue an broke stage 1 systemd. So what do we do?22:21:41
@elvishjerricco:matrix.org@elvishjerricco:matrix.org I think we should probably remove fsPackages from here, and instead have an expression that maps over boot.initrd.kernelModules ++ boot.initrd.availableKernelModules to determine the fs packages to include 22:23:37
@elvishjerricco:matrix.org@elvishjerricco:matrix.org I don't think we should revert that PR (though that was my initial reaction) 22:24:51
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgI'll throw something together...22:25:18
@k900:0upti.meK900I did a bad22:25:29
@k900:0upti.meK900For now22:25:32
@elvishjerricco:matrix.org@elvishjerricco:matrix.org?22:25:36
@andreas.schraegle:helsinki-systems.de@andreas.schraegle:helsinki-systems.de hm. we could also just filter out pkgs.util-linux from system.fsPackages 😬 22:25:55
@k900:0upti.meK900 initrd.systemd.extraBin = lib.mkForce {}; 22:26:12
@elvishjerricco:matrix.org@elvishjerricco:matrix.org nah; including all fsPackages is wrong anyway, since it in theory includes stage-2-exclusive FSes 22:26:18
@andreas.schraegle:helsinki-systems.de@andreas.schraegle:helsinki-systems.de mapping over boot.initrd.kernelModules ++ boot.initrd.availableKernelModules sounds fragile, IMHO.
maybe introducing boot.initrd.fsPackages and setting it in the filesystem modules might work?
22:28:07
@k900:0upti.meK900 We can map over fileSystems and filter on requiredForBoot or whatever that flag is 22:28:35
@elvishjerricco:matrix.org@elvishjerricco:matrix.org
In reply to @andreas.schraegle:helsinki-systems.de
mapping over boot.initrd.kernelModules ++ boot.initrd.availableKernelModules sounds fragile, IMHO.
maybe introducing boot.initrd.fsPackages and setting it in the filesystem modules might work?
A boot.initrd.fsPackages option would be functionally identical to boot.initrd.systemd.initrdBin
22:28:47
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Mapping over fileSystems is better than the kernel modules I think, K900 22:29:08
@k900:0upti.meK900I'm pretty sure the kernel modules get added based on that anyway22:29:24
@k900:0upti.meK900So it's just skipping an indirection22:29:28
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgyea22:29:29
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgAnyone know where the translation fsType -> kernel module happens?22:29:42
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgCould help inform how to do this22:29:47
@k900:0upti.meK900I found it once22:29:49
@k900:0upti.meK900But I don't remember where22:29:58
@k900:0upti.meK900...or how22:30:14
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Probably something to do with boot.initrd.supportedFilesystems 22:32:26
@andreas.schraegle:helsinki-systems.de@andreas.schraegle:helsinki-systems.dethe pattern seems to be that they're all set here: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/system/boot/stage-1.nix#L748 and them the filesystem modules do use that, e.g. here: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/tasks/filesystems/xfs.nix22:34:10

Show newer messages


Back to Room ListRoom Version: 6