nixos/systemd: allow listenStreams to contain ports (#540457)

This commit is contained in:
dotlambda
2026-07-18 04:04:55 +00:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -625,7 +625,7 @@ rec {
listenStreams = mkOption {
default = [ ];
type = types.listOf types.str;
type = types.listOf (types.coercedTo types.port toString types.str);
example = [
"0.0.0.0:993"
"/run/my-socket"

View File

@@ -132,7 +132,7 @@ in
description = "socket for fast remote file copy program daemon";
conflicts = [ "rsync.service" ];
listenStreams = [ (toString cfg.port) ];
listenStreams = [ cfg.port ];
socketConfig.Accept = true;
wantedBy = [ "sockets.target" ];