6 May 2023 |
@elvishjerricco:matrix.org | that just means re-parenthesizing a big portion of the file | 16:36:51 |
@elvishjerricco:matrix.org | which is kinda gross imo | 16:36:56 |
@elvishjerricco:matrix.org | doesn't really matter though | 16:36:59 |
@mberndt:matrix.org | Or // optionalAttrs systemdStage1 { stratisRoot = …; } | 16:37:11 |
@mberndt:matrix.org | Why re-parenthesizing? | 16:37:40 |
@elvishjerricco:matrix.org | oh, I guess there's no function being applied to the attrset so no parens necessary | 16:38:32 |
Arian | Omg it's so nice that systemd-analyze shows stage-1 delays now | 17:23:27 |
Arian | With systemd initrd | 17:23:32 |
@elvishjerricco:matrix.org | that has been very nice yea | 17:23:50 |
Arian | My NixOS VM boots in 4.8 seconds now | 17:24:08 |
Arian | Which is very very nice | 17:24:12 |
@elvishjerricco:matrix.org | i just wish systemd-analyze could do stuff like critical-chain for the initrd | 17:25:26 |
Arian | Yeh it only seems to carry over device units | 18:00:55 |
@mberndt:matrix.org | OK, I have another question | 18:57:20 |
@mberndt:matrix.org | This is indented with 6 spaces:
https://github.com/NixOS/nixpkgs/blob/2b8f1156a80abc2fc5842f34bd38f197b0935c1b/nixos/tests/installer.nix#LL118C7-L118C7 | 18:58:24 |
@mberndt:matrix.org | So clearly that variable needs to expand into a block of statements that are also indented with 6 spaces, right? Because it's Python, so you have to get the indentation right | 18:59:27 |
K900 | No | 19:00:07 |
K900 | Nix strips indentation from multi-line strings | 19:00:17 |
@mberndt:matrix.org | Oh | 19:00:27 |
@mberndt:matrix.org | OK cool, so I don't need to worry about that | 19:00:57 |
@elvishjerricco:matrix.org | yea empty lines are ignored for indentation purposes, but the first line is assumed to be indentation zero | 19:00:58 |
@elvishjerricco:matrix.org | or something like that | 19:01:15 |
@elvishjerricco:matrix.org | it's spelled out in the nix manual somewhere | 19:01:20 |
@mberndt:matrix.org | well presumably the least-indented line is going to be the one with zero indentation | 19:02:48 |
@elvishjerricco:matrix.org | that's probably correct :P | 19:03:00 |
7 May 2023 |
@uep:matrix.org | it is https://nixos.org/manual/nix/stable/language/values.html#type-string | 05:18:30 |
@uep:matrix.org |
To be precise, it strips from each line a number of spaces equal to the minimal indentation of the string as a whole (disregarding the indentation of empty lines).
| 05:19:14 |
@mberndt:matrix.org | How do I enable a systemd service? I'm trying to write an additional installer test and added this:
extraInstallerConfig = {
environment.systemPackages = [ pkgs.stratis-cli ];
systemd.packages = [ pkgs.stratisd ];
};
But I'm getting an error:
machine # Execution failed:
machine # It appears that there is no stratisd process running.
| 09:51:37 |
@mberndt:matrix.org | I thought that systemd.packages = [ pkgs.stratisd ] would be enough to make sure that stratisd is running… | 09:52:37 |
@uep:matrix.org | it will be under services.* most likely | 09:54:41 |