Compare commits

..
4 Commits
Author SHA1 Message Date
syedm 411127f2a2 Include newtab/default.nix in main nix file. 2026-10-19 12:04:46 +01:00
syedm 230507dd82 Add newtab to ddns service. 2026-10-19 11:57:53 +01:00
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
4 changed files with 42 additions and 2 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
+4
View File
@@ -8,6 +8,7 @@
../../modules/gitea
../../modules/msjd
../../modules/infinsweeper
../../modules/newtab
];
networking.hostName = "syedm";
@@ -53,6 +54,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
'';
+1 -1
View File
@@ -17,7 +17,7 @@ IP_V6=$(@curl@/bin/curl -6 -s 'https://api6.ipify.org')
log "Detected IPv4: ${IP_V4:-none}"
log "Detected IPv6: ${IP_V6:-none}"
arr=("" "git." "www." "acs." "infinsweeper.")
arr=("" "git." "www." "acs." "infinsweeper." "newtab.")
if [[ -n "$IP_V4" ]]; then
old_ip_v4=$([[ -f "$cache_v4" ]] && cat "$cache_v4" || echo "")
+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"
];
};
};
}