Add basic support for the services.config map.

This commit is contained in:
root 2025-03-04 21:30:30 -05:00
parent 44f3ab6f2f
commit 51c304307f
4 changed files with 12 additions and 6 deletions

View file

@ -12,7 +12,12 @@
"services": { "services": {
"proxy": { "enable": "true" }, "proxy": { "enable": "true" },
"ssh": { "enable": "true" }, "ssh": {
"enable": "true",
"config": {
"banner": "くコ:彡 くコ:彡 くコ:彡\n",
},
},
"navidrome": { "navidrome": {
"enable": "true", "enable": "true",
"provider": "docker", "provider": "docker",

View file

@ -27,6 +27,9 @@ type NetworkingConfig struct {
type ServiceConfig struct { type ServiceConfig struct {
Enable string Enable string
Config map[string]interface{}
ExtraConfig string
Src string Src string
Ports []string Ports []string
Volumes []string Volumes []string

View file

@ -1,6 +1,4 @@
{{if .Ports -}} {{with .Ports}}Port {{index . 0}}{{end}}
Port {{index .Ports 0}}
{{- end}}
#AddressFamily any #AddressFamily any
#ListenAddress 0.0.0.0 #ListenAddress 0.0.0.0
#ListenAddress :: #ListenAddress ::
@ -84,8 +82,7 @@ X11Forwarding no
#ChrootDirectory none #ChrootDirectory none
#VersionAddendum none #VersionAddendum none
# no default banner path {{if .Config.banner}}Banner /etc/ssh/sshd_banner{{end}}
#Banner none
# override default of no subsystems # override default of no subsystems
Subsystem sftp internal-sftp Subsystem sftp internal-sftp

View file

@ -7,5 +7,6 @@ provider: "system",
packages: [ "openssh-server" ], packages: [ "openssh-server" ],
configFiles: [ configFiles: [
"sshd.template:/etc/ssh/sshd_config", "sshd.template:/etc/ssh/sshd_config",
"banner.template:/etc/ssh/sshd_banner",
] ]
} }