Compare commits

..
2 Commits
Author SHA1 Message Date
syedm a9e9f789dc Add newtab service to server. 2026-10-19 11:54:19 +01:00
syedm 63a297a694 Minor fix. 2026-10-19 11:51:47 +01:00
3 changed files with 40 additions and 1 deletions
+1 -1
View File
@@ -36,6 +36,6 @@ case "$sel" in
exec systemctl --system suspend
;;
*Lock*)
~/dotfiles/scripts/lock.sh &
exec ~/dotfiles/scripts/lock.sh &
;;
esac
+3
View File
@@ -53,6 +53,9 @@
virtualHosts."infinsweeper.syedm.dev".extraConfig = ''
reverse_proxy localhost:5161
'';
virtualHosts."newtab.syedm.dev".extraConfig = ''
reverse_proxy localhost:5162
'';
virtualHosts."acs.syedm.dev".extraConfig = ''
reverse_proxy localhost:3709
'';
+36
View File
@@ -0,0 +1,36 @@
{ config, pkgs, ... }:
let
newtab = "${config.users.users."me".home}/main/newtab";
ruby = pkgs.ruby.withPackages (
p: with p; [
rackup
puma
sinatra
]
);
in
{
systemd.services.newtab = {
description = "Newtab";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
StateDirectory = "newtab";
WorkingDirectory = newtab;
ExecStart = "${ruby}/bin/ruby ${newtab}/main.rb";
User = "me";
Restart = "always";
RestartSec = 3;
Environment = [
"ENV=prod"
"RACK_ENV=production"
"PORT=5162"
];
};
};
}