Add newtab service to server.

This commit is contained in:
2026-10-19 11:54:19 +01:00
parent 63a297a694
commit a9e9f789dc
2 changed files with 39 additions and 0 deletions
+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"
];
};
};
}