-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add writable option to services.ttyd #268504
Conversation
addresses breaking change in ttyd 1.7.4, where the web terminal is now readonly by default, by providing a new option "writable"
I think this should default to true as we run For reference default behavior was changed in ttyd in tsl0922/ttyd@f8efcdd |
We could make it writable true for stateVersion 23.05 and earlier but I'd be against purposefully being insecure and out of line with the upstream project for users who have no existing usages to regress/break |
06kellyjac I don't think this is a secure/insecure thing. Without writeable the service that the service provides makes no sense. nixpkgs/nixos/modules/services/web-servers/ttyd.nix Lines 185 to 194 in 47a0bce
|
The |
How about making it an error if it's not set, with an explanatory message about this situation |
type = types.bool; | ||
default = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type = types.bool; | |
default = false; | |
type = types.nullOr types.bool; | |
default = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and this in the config below
diff --git a/nixos/modules/services/web-servers/ttyd.nix b/nixos/modules/services/web-servers/ttyd.nix
index 3b1d87ccb483..2b652f367efb 100644
--- a/nixos/modules/services/web-servers/ttyd.nix
+++ b/nixos/modules/services/web-servers/ttyd.nix
@@ -165,6 +165,8 @@ in
[ { assertion = cfg.enableSSL
-> cfg.certFile != null && cfg.keyFile != null && cfg.caFile != null;
message = "SSL is enabled for ttyd, but no certFile, keyFile or caFile has been specified."; }
+ { assertion = cfg.writeable != null;
+ message = "services.ttyd.writeable must be set"; }
{ assertion = ! (cfg.interface != null && cfg.socket != null);
message = "Cannot set both interface and socket for ttyd."; }
{ assertion = (cfg.username != null) == (cfg.passwordFile != null);
i continue the effort in #285314 |
addresses breaking change in ttyd 1.7.4, where the web terminal is now readonly by default, by providing a new option "writable"
see issue #268501