!DBFhtjpqmJNENpLDOv:nixos.org

NixOS systemd

617 Members
NixOS ❤️ systemd171 Servers

Load older messages


SenderMessageTime
21 Jan 2025
@emilazy:matrix.orgemily nix-env, I guess 18:23:59
@rootname:matrix.org@rootname:matrix.org removed their display name rootname.19:55:08
@rootname:matrix.org@rootname:matrix.org left the room.19:59:42
22 Jan 2025
@srestegosaurio:tchncs.de@srestegosaurio:tchncs.de

I have what might be a silly SysD question: does it make any sense to set the WantedBy of a socket unit to anything other than the sockets.target?

08:53:29
@srestegosaurio:tchncs.de@srestegosaurio:tchncs.de

I decided to "tidy up" my SystemD as an excuse to learn some concepts and I was wondering about this.

08:54:19
@srestegosaurio:tchncs.de@srestegosaurio:tchncs.de

I. e.: There are some services in my system which I would like to be socket activated only and that the socket is available only when "it makes sense to".

08:55:53
@k900:0upti.meK900Not really09:01:51
@arianvp:matrix.orgArianThere might be socket units you want available in early boot but apart from that no09:02:03
@arianvp:matrix.orgArianE.g. nscd we probably want to have earlier and socket activated 09:02:28
@arianvp:matrix.orgArianAs it needs to be available as soon as user resolution is available09:02:43
@arianvp:matrix.orgArianBut for 99% of the cases sockets.target is what you want09:02:59
@srestegosaurio:tchncs.de@srestegosaurio:tchncs.de

I was thinking only about user services for programs I installed. Not intending to mess with system services or otherwise critical stuff.

09:04:00
@arianvp:matrix.orgArianThen sockets.target is always what you want09:04:16
@srestegosaurio:tchncs.de@srestegosaurio:tchncs.deo709:04:23
@srestegosaurio:tchncs.de@srestegosaurio:tchncs.de

Thanks.

09:04:28
23 Jan 2025
@matthewcroughan:defenestrate.itmatthewcroughan joined the room.01:11:28
@matthewcroughan:defenestrate.itmatthewcroughanping 01:11:35
@matthewcroughan:defenestrate.itmatthewcroughan

ElvishJerricco:

       … while calling the 'derivationStrict' builtin
         at <nix/derivation-internal.nix>:34:12:
           33|
           34|   strict = derivationStrict drvAttrs;
             |            ^
           35|

       … while evaluating derivation 'image'
         whose name attribute is located at /nix/store/l9nb64iii15y0nr37qrs1cfm6rlpg6gh-source/pkgs/stdenv/generic/make-derivation.nix:375:7

       … while evaluating attribute 'definitionsDirectory' of derivation 'image'
         at /nix/store/l9nb64iii15y0nr37qrs1cfm6rlpg6gh-source/nixos/modules/image/repart-image.nix:118:27:
          117|
          118|   inherit finalPartitions definitionsDirectory;
             |                           ^
          119|

       … while evaluating the option `image.repart.partitions.root.storePaths':

       … while evaluating definitions from `/nix/store/dhrgxhkn9hy0w1wqsaq9zsm5qyyrg5ji-source/machine-specific/katla-asahi-generic/repart.nix':

       … while evaluating the option `system.build.toplevel':

       … while evaluating definitions from `/nix/store/l9nb64iii15y0nr37qrs1cfm6rlpg6gh-source/nixos/modules/system/activation/top-level.nix':

       … while evaluating the option `image.repart.partitions.store.repartConfig':

       … while evaluating definitions from `/nix/store/dhrgxhkn9hy0w1wqsaq9zsm5qyyrg5ji-source/machine-specific/katla-asahi-generic/repart.nix':

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: infinite recursion encountered
       at /nix/store/l9nb64iii15y0nr37qrs1cfm6rlpg6gh-source/lib/modules.nix:846:9:
          845|     in warnDeprecation opt //
          846|       { value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          847|         inherit (res.defsFinal') highestPrio;
01:13:47
@matthewcroughan:defenestrate.itmatthewcroughanindeed toplevel is modified by the repart module 01:13:56
@elvishjerricco:matrix.orgElvishJerriccoyea I'm messing with it, trying to find the recursion01:13:59
@elvishjerricco:matrix.orgElvishJerriccowtf now nix won't show me the trace again01:20:42
@elvishjerricco:matrix.orgElvishJerricco oh. That's weird. I get the trace with nix build but not nix eval 01:21:11
@matthewcroughan:defenestrate.itmatthewcroughanOkay it appears that erofs exists 01:21:24
@matthewcroughan:defenestrate.itmatthewcroughanso I can avoid squashfs and use erofs instead, and avoid copyblocks01:21:31
@matthewcroughan:defenestrate.itmatthewcroughan
...
    image.repart = {
      name = "image";
      partitions = {
        "store" = {
          storePaths = [ config.system.build.toplevel ];
          stripNixStorePrefix = true;
          repartConfig = {
            Type = "linux-generic";
            Label = "nix-store";
            Format = "erofs";
            Minimize = "guess";
          };
        };
        "esp" = {
          contents = {
            "/EFI/BOOT/BOOT${lib.toUpper efiArch}.EFI".source =
              "${pkgs.systemd}/lib/systemd/boot/efi/systemd-boot${efiArch}.efi";

            "/EFI/Linux/${config.system.boot.loader.ukiFile}".source =
              "${config.system.build.uki}/${config.system.boot.loader.ukiFile}";
          };
          repartConfig = {
            Type = "esp";
            Format = "vfat";
            SizeMinBytes = "96M";
          };
        };
      };
    };
...
01:21:50
@elvishjerricco:matrix.orgElvishJerriccowhy would that avoid copyblocks and how on earth is that a solution to the problem?01:21:51
@elvishjerricco:matrix.orgElvishJerriccohuh, ok then01:22:06
@matthewcroughan:defenestrate.itmatthewcroughanbecause it's a nix store partition that now exists, and it's read-only, which is nice 01:22:09
@elvishjerricco:matrix.orgElvishJerriccostill01:22:09
@matthewcroughan:defenestrate.itmatthewcroughanand I can still copy-to-ram this partition with the same label 01:22:22

Show newer messages


Back to Room ListRoom Version: 6