Skip to content

Base Settings

Most stacks will rely on some central settings. An example would be the base location where containers should create bind mounts for persistent data.

Example

nix
{config, ...}: {
    hostIP4Address = "192.168.178.2";
    hostUid = 1000;
    storageBaseDir = "${config.home.homeDirectory}/stacks";
    externalStorageBaseDir = "/mnt/hdd";
}

Options

nps.defaultGid

GID of the user that will be used by default for containers if they allow GID configuration. When running rootless containers, GID 0 gets mapped to the host users GID.

Type
plaintext
signed integer
Default
nix
0
Declaration

nps.defaultTz

Default timezone for containers. Will be passed to all containers as TZ environment variable.

Type
plaintext
null or string
Default
nix
"Etc/UTC"
Declaration

nps.defaultUid

UID of the user that will be used by default for containers if they allow UID configuration. When running rootless containers, UID 0 gets mapped to the host users UID.

Type
plaintext
signed integer
Default
nix
0
Declaration

nps.enableSocket

Whether to enable the Podman socket for user services. Note that the socket is required for the services like Traefik or Homepage to run successfully, since they access the Podman API.

If this is disabled and you use these services, you will need to manually enable the socket.

Type
plaintext
boolean
Default
nix
true
Declaration

nps.externalStorageBaseDir

Base location that will be used for larger data such as downloads or media files. Could be an external disk.

Type
plaintext
absolute path
Declaration

nps.hostIP4Address

The IPv4 address which will be used in case explicit bindings are required.

Type
plaintext
string
Declaration

nps.hostUid

UID of the host user running the containers. Will be used to infer the Podman socket location (XDG_RUNTIME_DIR).

Type
plaintext
signed integer
Default
nix
1000
Declaration

nps.mediaStorageBaseDir

Base location for larger media files. This is where containers like Jellyfin or Immich will store their media files.

Type
plaintext
absolute path
Default
nix
"${config.nps.externalStorageBaseDir}/media"
Declaration

nps.package

The podman package to use.

Type
plaintext
package
Default
nix
pkgs.podman
Declaration

nps.socketLocation

The location of the Podman socket for user services. Will be passed to containers that communicate with the Podman API, such as Traefik, Homepage or Beszel.

Type
plaintext
absolute path
Default
nix
"/run/user/${toString config.nps.hostUid}/podman/podman.sock"
Declaration

nps.storageBaseDir

Base directory for Podman storage. This is where each stack will create its bind mounts for persistent data. For example, setting this to /home/foo/stacks would result in Adguard creating its bind mount at /home/foo/stacks/adguard.

Type
plaintext
absolute path
Default
nix
"${config.home.homeDirectory}/stacks"
Declaration