!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

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

Load older messages


SenderMessageTime
20 Mar 2022
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgThis is on top of your refactor branch03:10:47
@elvishjerricco:matrix.org@elvishjerricco:matrix.org

This is what I use to test it:

import ./nixos { configuration = { lib, config, pkgs, ... }: {
  imports = [./nixos/modules/virtualisation/qemu-vm.nix];
  boot.initrd.systemd = {
    enable = true;
    emergencyHashedPassword = "";
 };
  virtualisation = {
    graphics = false;
    memorySize = ;
    cores = 4;
  };
  documentation.enable = false;
  services.getty.autologinUser = "root";
}; }

Note that you currently have to format the nixos.qcow2 file manually for the qemu-vm

03:13:56
@elvishjerricco:matrix.org@elvishjerricco:matrix.org *

This is what I use to test it:

import ./nixos { configuration = { lib, config, pkgs, ... }: {
  imports = [./nixos/modules/virtualisation/qemu-vm.nix];
  boot.initrd.systemd = {
    enable = true;
    emergencyHashedPassword = "";
 };
  virtualisation = {
    graphics = false;
    memorySize = 4096;
    cores = 4;
  };
  documentation.enable = false;
  services.getty.autologinUser = "root";
}; }

Note that you currently have to format the nixos.qcow2 file manually for the qemu-vm

03:14:14
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgOnce I have the exec detection and udev stuff I want in there, I'll open a PR that I expect to be merge-worthy03:15:23
@elvishjerricco:matrix.org@elvishjerricco:matrix.org(graphics = false isn't necessary, I just prefer it)03:47:49
@elvishjerricco:matrix.org@elvishjerricco:matrix.org bobvanderlinden: I switched to your version of the dependencies program and managed to get initrd down to 9.1M, which is crazy! It does boot, but now the rescue mode doesn't work for some reason. 06:02:24
@elvishjerricco:matrix.org@elvishjerricco:matrix.org

Aw, that decreased size was entirely because I switched to only including the necessities from util-linux instead of all of it, not because of the automatic dependency finder. And the finder didn't work well enough to actually function without significant help from manual inclusions :/

After staring at it and thinking for a while, I'm starting to think automatically finding Exec* stuff just isn't a problem worth solving. I imagine if a fresh set of eyes came to this project after this problem had been solved, they'd say any solution is way too jank to be worth it. If your unit file points to a program, then just include that program in objects... Adding services to initrd should be a fairly rare thing anyway.

06:56:48
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgSooo... I'm going to do another little review an then open a PR!06:57:07
@elvishjerricco:matrix.org@elvishjerricco:matrix.orghttps://github.com/NixOS/nixpkgs/pull/164943 woot08:06:10
@arianvp:matrix.orgArianWill try it out right away!08:08:58
@arianvp:matrix.orgArian I wanted to say we probably need https://github.com/NixOS/nixpkgs/pull/121371 for the correct ordering of kmod-static-nodes and systemd-tmpfiles-setup-dev but it seems flokli merged it already! :D 08:12:08
@arianvp:matrix.orgArianso you probably have those fixed already :P08:12:14
@arianvp:matrix.orgArianyay about forgetting about PRs and other people picking them up08:13:31
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Arian: Beware it's extremely minimal (on purpose), so it's only going to boot extremely simple things 08:14:20
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgBut at least it has a good rescue shell when it fails :P08:14:34
@arianvp:matrix.orgArianthat's fine. I have a "play with initrd" machine :P08:14:47
@arianvp:matrix.orgArianAnother future work could be: Unified kernel images for the SecureBoot integration 08:15:52
@arianvp:matrix.orgArian Adds to my own list 08:15:56
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgBit out of scope I think :P08:17:00
@arianvp:matrix.orgArianyes =)08:17:04
@arianvp:matrix.orgArianfollow-up. :P08:17:13
@arianvp:matrix.orgArianAnother follow-up I'd want to do is evangelize https://systemd.io/DISCOVERABLE_PARTITIONS/ . I guess that could be part of adding repart support (as it uses it by default)08:17:38
@arianvp:matrix.orgArianit makes systemd initrd automatically discover LUKS partitions etc without cmdline or /etc/fstab hints08:17:58
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgYea I'm iffy on that. The systemd people seem to really like it, but it seems antithetical to NixOS's "declarative everything" approach08:18:26
@arianvp:matrix.orgArianyeh true08:18:40
@arianvp:matrix.orgArianmy only gripe is whether having rust in the bootstrap path is a good idea...08:22:09
@arianvp:matrix.orgArian But given we were eager to add it to nix as well I think that ship has sailed. And rust bootstrapping is in sorta-ok shape 08:22:35
@arianvp:matrix.orgArian(I think Guix people figured out bootstrapability of rust)08:22:51
@arianvp:matrix.orgArianYeh actually not gripe at all. Go Rust08:23:14
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Arian: Rust has been in the bootstrap path for quite a while now because it's needed for spidermonkey which is needed for... polkit(?) or something 08:25:16

Show newer messages


Back to Room ListRoom Version: 6