diff --git a/configurations/nixos/pureintent/default.nix b/configurations/nixos/pureintent/default.nix index 6b309d5..c706d6d 100644 --- a/configurations/nixos/pureintent/default.nix +++ b/configurations/nixos/pureintent/default.nix @@ -23,10 +23,10 @@ in "${homeMod}/all/buildMachines" "${homeMod}/all/buildMachines/sincereintent.nix" { - services.gotty = { + services.ttyd = { enable = true; port = 9999; - command = "${lib.getExe config.programs.tmux.package} new-session -A -s gotty"; + command = "${lib.getExe config.programs.tmux.package} new-session -A -s ttyd"; write = true; }; } diff --git a/modules/home/all/gotty.nix b/modules/home/all/ttyd.nix similarity index 65% rename from modules/home/all/gotty.nix rename to modules/home/all/ttyd.nix index e136020..f63308f 100644 --- a/modules/home/all/gotty.nix +++ b/modules/home/all/ttyd.nix @@ -5,16 +5,16 @@ with lib; let - cfg = config.services.gotty; + cfg = config.services.ttyd; in { - options.services.gotty = { - enable = mkEnableOption "GoTTY web terminal service"; + options.services.ttyd = { + enable = mkEnableOption "ttyd web terminal service"; port = mkOption { type = types.int; default = 8080; - description = "Port number for GoTTY to listen on"; + description = "Port number for ttyd to listen on"; }; command = mkOption { @@ -31,17 +31,17 @@ in }; config = mkIf cfg.enable { - home.packages = [ pkgs.gotty ]; + home.packages = [ pkgs.ttyd ]; - systemd.user.services.gotty = { + systemd.user.services.ttyd = { Unit = { - Description = "GoTTY web terminal service"; + Description = "ttyd web terminal service"; After = [ "network.target" ]; }; Service = { Type = "simple"; - ExecStart = "${pkgs.gotty}/bin/gotty -p ${toString cfg.port}${optionalString cfg.write " -w"} ${cfg.command}"; + ExecStart = "${pkgs.ttyd}/bin/ttyd -p ${toString cfg.port}${optionalString cfg.write " -W"} ${cfg.command}"; Restart = "always"; RestartSec = 5; }; diff --git a/modules/home/default.nix b/modules/home/default.nix index 77dd22d..3004b28 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -12,6 +12,6 @@ # ./all/zellij.nix ./all/just.nix # ./all/juspay.nix - ./all/gotty.nix + ./all/ttyd.nix ]; }