!DBFhtjpqmJNENpLDOv:nixos.org

NixOS systemd

574 Members
NixOS ❤️ systemd158 Servers

Load older messages


SenderMessageTime
23 Jan 2025
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgwait02:56:25
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgnevermind02:56:26
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgwait, nevermind again, that'll work :P02:56:33
@matthewcroughan:defenestrate.itmatthewcroughanThis is a clustrerfuck02:57:06
@matthewcroughan:defenestrate.itmatthewcroughan * This is a clusterfuck02:57:08
@elvishjerricco:matrix.org@elvishjerricco:matrix.org
    fileSystems."/nix/store" = {
      device = "/run/store.squashfs";
      fsType = "squashfs";
      options = [ "loop" ];
    };

    boot.initrd.systemd.services.copytoram = {
      before = [ "sysroot-nix-store.mount" ];
      after = [ "dev-disk-by\\x2dpartlabel-nix\\x2dstore.device" ];
      requires = [ "dev-disk-by\\x2dpartlabel-nix\\x2dstore.device" ];
      serviceConfig.ExecStart = "${pkgs.coreutils}/bin/dd if=/dev/disk/by-partlabel/nix-store of=/run/store.squashfs";
      serviceConfig.Type = "oneshot";
      requiredBy = [ "initrd.target" ];
    };
02:57:08
@matthewcroughan:defenestrate.itmatthewcroughanbut in the end, it does produce some nice readable code02:57:14
@matthewcroughan:defenestrate.itmatthewcroughanI can't believe how much of a clusterfuck it can be though02:57:19
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgyea, systemd initrd gets a little tricky02:57:20
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgbecause it makes everything extremely explicit02:57:37
@matthewcroughan:defenestrate.itmatthewcroughanWhen I look at stuff like this, I think it's a miracle things work so well02:57:39
@matthewcroughan:defenestrate.itmatthewcroughanBut it's even more fragile in the initrd shell scripts that came before hand02:57:59
@matthewcroughan:defenestrate.itmatthewcroughanThese images are really quite nice to build as wel02:58:34
@matthewcroughan:defenestrate.itmatthewcroughan * These images are really quite nice to build as well02:58:36
@matthewcroughan:defenestrate.itmatthewcroughan I guess you can still nixos-rebuild switch this setup, since /boot is left in tact 02:58:53
@matthewcroughan:defenestrate.itmatthewcroughanas long as you have enough ram 🤔02:58:58
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgwell, you'll need a writable store for that02:59:16
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgwhich means overlayfs shenanigans02:59:23
@matthewcroughan:defenestrate.itmatthewcroughan I was reading about systemd switch root stuff, and it has a soft switch mode 03:00:39
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgyou mean soft-reboot?03:00:55
@elvishjerricco:matrix.org@elvishjerricco:matrix.org that's complicated 03:01:00
@matthewcroughan:defenestrate.itmatthewcroughan soft-reboot yeah 03:01:05
@elvishjerricco:matrix.org@elvishjerricco:matrix.organd we should not get into it right now :P03:01:05
@matthewcroughan:defenestrate.itmatthewcroughan if you used that, you could soft-reboot into an "upgradable" state, and then perform your nixos-rebuild, and then switch back 03:01:28
@matthewcroughan:defenestrate.itmatthewcroughanhaving a rw specialisation03:01:41
@elvishjerricco:matrix.org@elvishjerricco:matrix.org like I said, it's complicated. More complicated than that 03:01:51
@matthewcroughan:defenestrate.itmatthewcroughanswitch into the rw specialisation with soft-reboot, then soft-reboot into the ro generation03:01:55
@matthewcroughan:defenestrate.itmatthewcroughan hehe okay, I will play with that on my own since it seems fun 03:02:06
@matthewcroughan:defenestrate.itmatthewcroughan
[Unit]
Description=My Surviving Service
SurviveFinalKillSignal=yes
03:02:19
@matthewcroughan:defenestrate.itmatthewcroughanso much death 03:02:20

Show newer messages


Back to Room ListRoom Version: 6