im trying to setup rootless containers but everytime im rebuilding im getting an error that the service unit cant be found and i dont know if i messed up some config or if its an issue with flake-parts and/or import tree. its imported into home-manager.users.arsna = { imports = [self.homeModules.caddy];};
i tried the same caddy config with a rootfull container and it worked even though it the containers configs are rootless. anyone have any tips or solutions?
i have a podman.nix file with the following
{ inputs, ... }: {
flake.modules.nixos.podman = { pkgs, ... }: {
imports = [ inputs.quadlet-nix.nixosModules.quadlet ];
boot.kernel.sysctl = {"net.ipv4.ip_unprivileged_port_start" = 80;};
virtualisation = {
podman = {
enable = true;
autoPrune = {
enable = true;
flags = [ "--all" ];
dates = "daily";
};
extraPackages = with pkgs; [ crun ];
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
};
quadlet.enable = true;
containers = {
enable = true;
containersConf.rootless.settings = {...};
storage.rootless.settings = {
storage = {
graphroot = "/home/arsna/.local/share/containers/storage";
runroot = "/run/user/1000/containers";
...};};};};};};}
and a caddy.nix with the following
{inputs, ... }: {
flake.homeModules.caddy = {
imports = [inputs.quadlet-nix.homeManagerModules.quadlet];
virtualisation.quadlet.containers.caddy = {
autoStart = true;
unitConfig = {
Description = "caddy reverse proxy";
Wants = "podman-auto-update.timer";
};
serviceConfig = {
Restart = "always";
};
containerConfig = {
userns = "keep-id";
name = "caddy";
volumes = [ ... ];
...
};};}