Compare commits
4
Commits
c044d1606e
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
411127f2a2
|
||
|
|
230507dd82
|
||
|
|
a9e9f789dc
|
||
|
|
63a297a694
|
@@ -36,6 +36,6 @@ case "$sel" in
|
|||||||
exec systemctl --system suspend
|
exec systemctl --system suspend
|
||||||
;;
|
;;
|
||||||
*Lock*)
|
*Lock*)
|
||||||
~/dotfiles/scripts/lock.sh &
|
exec ~/dotfiles/scripts/lock.sh &
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
../../modules/gitea
|
../../modules/gitea
|
||||||
../../modules/msjd
|
../../modules/msjd
|
||||||
../../modules/infinsweeper
|
../../modules/infinsweeper
|
||||||
|
../../modules/newtab
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "syedm";
|
networking.hostName = "syedm";
|
||||||
@@ -53,6 +54,9 @@
|
|||||||
virtualHosts."infinsweeper.syedm.dev".extraConfig = ''
|
virtualHosts."infinsweeper.syedm.dev".extraConfig = ''
|
||||||
reverse_proxy localhost:5161
|
reverse_proxy localhost:5161
|
||||||
'';
|
'';
|
||||||
|
virtualHosts."newtab.syedm.dev".extraConfig = ''
|
||||||
|
reverse_proxy localhost:5162
|
||||||
|
'';
|
||||||
virtualHosts."acs.syedm.dev".extraConfig = ''
|
virtualHosts."acs.syedm.dev".extraConfig = ''
|
||||||
reverse_proxy localhost:3709
|
reverse_proxy localhost:3709
|
||||||
'';
|
'';
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ IP_V6=$(@curl@/bin/curl -6 -s 'https://api6.ipify.org')
|
|||||||
log "Detected IPv4: ${IP_V4:-none}"
|
log "Detected IPv4: ${IP_V4:-none}"
|
||||||
log "Detected IPv6: ${IP_V6:-none}"
|
log "Detected IPv6: ${IP_V6:-none}"
|
||||||
|
|
||||||
arr=("" "git." "www." "acs." "infinsweeper.")
|
arr=("" "git." "www." "acs." "infinsweeper." "newtab.")
|
||||||
|
|
||||||
if [[ -n "$IP_V4" ]]; then
|
if [[ -n "$IP_V4" ]]; then
|
||||||
old_ip_v4=$([[ -f "$cache_v4" ]] && cat "$cache_v4" || echo "")
|
old_ip_v4=$([[ -f "$cache_v4" ]] && cat "$cache_v4" || echo "")
|
||||||
|
|||||||
@@ -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"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user