!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

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

Load older messages


SenderMessageTime
6 May 2023
@mberndt:matrix.org@mberndt:matrix.orgOK cool, so I don't need to worry about that19:00:57
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgyea empty lines are ignored for indentation purposes, but the first line is assumed to be indentation zero19:00:58
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgor something like that19:01:15
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgit's spelled out in the nix manual somewhere19:01:20
@mberndt:matrix.org@mberndt:matrix.orgwell presumably the least-indented line is going to be the one with zero indentation19:02:48
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgthat's probably correct :P19:03:00
7 May 2023
@uep:matrix.org@uep:matrix.orgit is https://nixos.org/manual/nix/stable/language/values.html#type-string05:18:30
@uep:matrix.org@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@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@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@uep:matrix.org it will be under services.* most likely 09:54:41
@mberndt:matrix.org@mberndt:matrix.orgWhoa09:54:47
@mberndt:matrix.org@mberndt:matrix.org I actually just added a systemctl start stratisd command, but even that doesn't work 09:55:07
@mberndt:matrix.org@mberndt:matrix.org
machine # [    7.637952] systemd[1]: Started Stratis daemon.
(finished: must succeed: systemctl start stratisd, in 0.42 seconds)
machine: must succeed: stratis pool create my-pool /dev/vda
machine # [    7.655736] systemd[1]: Finished Permit User Sessions.
machine # [    7.682901] systemd[1]: Started Getty on tty1.
machine # [    7.684328] systemd[1]: Reached target Login Prompts.
machine # [    7.743384] dhcpcd[649]: eth0: soliciting an IPv6 router
machine # Execution failed:
machine # It appears that there is no stratisd process running.
machine # 
09:55:15
@uep:matrix.org@uep:matrix.org convention is that pkgs.* just installs the thing, and can be used on non-nixOS; then there's a nixos module that does the OS configuration (systemd services and whatever else) 09:55:28
@mberndt:matrix.org@mberndt:matrix.orgOh, I see. I'm going to try that09:56:04
@uep:matrix.org@uep:matrix.org(enabling the service will pull in the pkg install as a dependency, of course)09:56:54
@mberndt:matrix.org@mberndt:matrix.orgRedacted or Malformed Event10:00:30
@mberndt:matrix.org@mberndt:matrix.orgYup, that works!10:02:42
@mberndt:matrix.org@mberndt:matrix.orgThanks!10:02:59
@mberndt:matrix.org@mberndt:matrix.org OK, now I wanted to debug my test interactively, so I put machine.shell_interact() in the script. But it just seems to ignore that command… 10:28:11
@mberndt:matrix.org@mberndt:matrix.org

It prints this:

machine: Terminal is ready (there is no initial prompt):
2023/05/07 10:24:47 socat[35] E tcgetattr(0, 0x5555555f9ac0): Inappropriate ioctl for device
(finished: subtest: Create the NixOS configuration, in 1.14 seconds)
10:29:39
@mberndt:matrix.org@mberndt:matrix.orgOh well, I'll do without it10:35:25
@mberndt:matrix.org@mberndt:matrix.org

Now I'm getting an error during nixos-install:

machine # copying path '/nix/store/bhhb91angi23wsr42apz1in1n9b9ilg3-glibc-2.37-8-dev' to 'local'...
machine # warning: error: unable to download 'https://ftpmirror.gnu.org/bash/bash-5.2-patches/bash52-002': Couldn't resolve host name (6); retrying in 2149 ms
machine # error: unable to download 'https://ftpmirror.gnu.org/autoconf/autoconf-2.71.tar.xz': Couldn't resolve host name (6)
machine # error: filesystem error: cannot rename: Invalid cross-device link [/mnt/nix/store/c99ihlhb2lh875spzsl6rnc4058grxvn-autoconf-2.71.tar.xz.drv.chroot/nix/store/g3pzpdicszf700d5xffyk939jzxa4r2k-autoconf-2.71.tar.xz] [/nix/store/g3pzpdicszf700d5xffyk939jzxa4r2k-autoconf-2.71.tar.xz]
machine: output: 
Test "Perform the installation" failed with error: "command `nixos-install < /dev/null >&2` failed (exit code 1)"
cleanup
kill machine (pid 5)
machine # qemu-kvm: terminating on signal 15 from pid 4 (/nix/store/6jx4nc20v3cfphlbypqid30q41i5vh5x-python3-3.10.11/bin/python3.10)
(finished: cleanup, in 0.12 seconds)

It appears completely unrelated to what I'm doing 🤷‍♂️

10:48:14
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deIt kind of feels like this is a bit off-topic for a room about an initrd10:53:43
@mberndt:matrix.org@mberndt:matrix.orgWell it's a test for stratis support in the initrd. So there is a connection there10:56:47
@mberndt:matrix.org@mberndt:matrix.orgBut I guess you're right, I'm going to ask in the other channel10:57:08
@mberndt:matrix.org@mberndt:matrix.orgI got that test working now. https://github.com/NixOS/nixpkgs/pull/229767 Yay!17:28:06
8 May 2023
@mberndt:matrix.org@mberndt:matrix.org Thanks for the review ElvishJerricco 15:38:46
@mberndt:matrix.org@mberndt:matrix.orgI'm going to address these points in the near future15:43:01

Show newer messages


Back to Room ListRoom Version: 6