nixos/hosts/lab/default.nix
lew 102b195d27 use dedicated podman user for rootless containers
Adds a system user 'podman' (uid 900) with subuid/subgid ranges
and linger for running OCI containers. Removes podman-specific
settings from lew user. DokuWiki switches to sdnotify=healthy
since the image has a built-in healthcheck.
2026-04-04 23:53:32 +01:00

51 lines
1.1 KiB
Nix

{ pkgs, ... }:
{
imports = [
./hardware-configuration.nix
../common
./foundry.nix
./dokuwiki.nix
./forgejo.nix
];
networking.hostName = "lab";
services.openssh = {
enable = true;
ports = [ 4200 ];
settings = {
PasswordAuthentication = false;
PermitRootLogin = "no";
};
};
networking.firewall.allowedTCPPorts = [ 80 443 4200 ];
security.sudo.wheelNeedsPassword = false;
users.users.podman = {
isSystemUser = true;
group = "podman";
home = "/var/lib/podman";
createHome = true;
uid = 900;
linger = true;
subUidRanges = [{ startUid = 100000; count = 65536; }];
subGidRanges = [{ startGid = 100000; count = 65536; }];
};
users.groups.podman = {};
virtualisation.containers.enable = true;
virtualisation.podman = {
enable = true;
defaultNetwork.settings.dns_enabled = true;
};
virtualisation.oci-containers.backend = "podman";
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
services.caddy.enable = true;
services.caddy.email = "lew@ily.rs";
system.stateVersion = "23.11";
}