nix-community / home-manager

Manage a user environment using Nix [maintainer=@rycee]
https://nix-community.github.io/home-manager/
MIT License
7.19k stars 1.85k forks source link

bug: module podman #6146

Open Nosirus opened 5 days ago

Nosirus commented 5 days ago

Are you following the right branch?

Is there an existing issue for this?

Issue description

When I try the podman module, at startup nothing starts and I find this error in the service logs.

But if I start it manually with systemctl --user start podman-epicgame.service it works

nov. 28 13:26:09 cobblepot systemd[2034]: Starting Service for container gotify... nov. 28 13:26:09 cobblepot podman[3347]: 2024-11-28 13:26:09.530256926 +0100 CET m=+0.041632954 container create d4cb699cc558de2562921803192f015201913d13e65953114150ee965207b4c9 (image=docker.io/gotify/ser> nov. 28 13:26:09 cobblepot pasta[3472]: External interface not usable nov. 28 13:26:09 cobblepot podman[3347]: 2024-11-28 13:26:09.554409169 +0100 CET m=+0.065785217 container remove d4cb699cc558de2562921803192f015201913d13e65953114150ee965207b4c9 (image=docker.io/gotify/ser> nov. 28 13:26:09 cobblepot podman-gotify[3347]: Error: setting up Pasta: pasta failed with exit code 1: nov. 28 13:26:09 cobblepot podman-gotify[3347]: External interface not usable

Maintainer CC

No response

System information

[nosirus@cobblepot:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.12.1, NixOS, 25.05 (Warbler), 25.05.20241125.4633a7c`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.24.10`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/store/frfyxcpzsdasdin76x83krbhpgkis8b0-source`
Nosirus commented 4 days ago

I found the cause, the service "podman-user-wait-network-online" could not find "sh" so I redid the service like this:

systemd.user.services.podman-user-wait-network-online = {
  Unit = { Description = "Wait for system level network-online.target as user"; };
  Service = {
    Type = "oneshot";
    ExecStart = "${pkgs.bash}/bin/sh -c 'until systemctl is-active network-online.target; do sleep 0.5; done'";
    TimeoutStartSec = "90s";
    RemainAfterExit = true;
  };
  Install = { WantedBy = [ "default.target" ]; };
};
3ulalia commented 3 days ago

This is also causing home-manager CI to fail on PR commits; see #6153 for an example

n-hass commented 4 hours ago

Fixed by #6150