| 21 Jan 2025 |
emily | nix-env, I guess | 18:23:59 |
| @rootname:matrix.org removed their display name rootname. | 19:55:08 |
| @rootname:matrix.org left the room. | 19:59:42 |
| 22 Jan 2025 |
@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 | 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 | 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 | Not really | 09:01:51 |
Arian | There might be socket units you want available in early boot but apart from that no | 09:02:03 |
Arian | E.g. nscd we probably want to have earlier and socket activated | 09:02:28 |
Arian | As it needs to be available as soon as user resolution is available | 09:02:43 |
Arian | But for 99% of the cases sockets.target is what you want | 09:02:59 |
@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 |
Arian | Then sockets.target is always what you want | 09:04:16 |
@srestegosaurio:tchncs.de | o7 | 09:04:23 |
@srestegosaurio:tchncs.de | Thanks.
| 09:04:28 |
| 23 Jan 2025 |
| matthewcroughan joined the room. | 01:11:28 |
matthewcroughan | ping | 01:11:35 |
matthewcroughan | 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 | indeed toplevel is modified by the repart module | 01:13:56 |
ElvishJerricco | yea I'm messing with it, trying to find the recursion | 01:13:59 |
ElvishJerricco | wtf now nix won't show me the trace again | 01:20:42 |
ElvishJerricco | oh. That's weird. I get the trace with nix build but not nix eval | 01:21:11 |
matthewcroughan | Okay it appears that erofs exists | 01:21:24 |
matthewcroughan | so I can avoid squashfs and use erofs instead, and avoid copyblocks | 01:21:31 |
matthewcroughan | ...
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 | why would that avoid copyblocks and how on earth is that a solution to the problem? | 01:21:51 |
ElvishJerricco | huh, ok then | 01:22:06 |
matthewcroughan | because it's a nix store partition that now exists, and it's read-only, which is nice | 01:22:09 |
ElvishJerricco | still | 01:22:09 |
matthewcroughan | and I can still copy-to-ram this partition with the same label | 01:22:22 |