add workout-sync
This commit is contained in:
23
flake.lock
generated
23
flake.lock
generated
@@ -577,7 +577,8 @@
|
|||||||
"nixpkgs": "nixpkgs_5",
|
"nixpkgs": "nixpkgs_5",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
"vimpeccable": "vimpeccable",
|
"vimpeccable": "vimpeccable",
|
||||||
"windline-nvim": "windline-nvim"
|
"windline-nvim": "windline-nvim",
|
||||||
|
"workout-sync": "workout-sync"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlay": {
|
"rust-overlay": {
|
||||||
@@ -677,6 +678,26 @@
|
|||||||
"repo": "windline.nvim",
|
"repo": "windline.nvim",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"workout-sync": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1738967762,
|
||||||
|
"narHash": "sha256-TwYDSUqKEKJsI6qoGJ7PkiQEUYMTRvvxmPHyimOr5SQ=",
|
||||||
|
"owner": "~repomaa",
|
||||||
|
"repo": "workout-sync",
|
||||||
|
"rev": "f53dbab01db367309be8058e77e263f1b092e36a",
|
||||||
|
"type": "sourcehut"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "~repomaa",
|
||||||
|
"repo": "workout-sync",
|
||||||
|
"type": "sourcehut"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|||||||
@@ -42,6 +42,10 @@
|
|||||||
url = "github:repomaa/ketchup";
|
url = "github:repomaa/ketchup";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
workout-sync = {
|
||||||
|
url = "sourcehut:~repomaa/workout-sync";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
ksoloti-pr.url = "github:repomaa/nixpkgs/pkg/ksoloti";
|
ksoloti-pr.url = "github:repomaa/nixpkgs/pkg/ksoloti";
|
||||||
};
|
};
|
||||||
outputs = { nixpkgs, ... }@inputs:
|
outputs = { nixpkgs, ... }@inputs:
|
||||||
|
|||||||
@@ -34,5 +34,6 @@
|
|||||||
./workout-tracker.nix
|
./workout-tracker.nix
|
||||||
./gotosocial.nix
|
./gotosocial.nix
|
||||||
./bin.nix
|
./bin.nix
|
||||||
|
./workout-sync.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
26
hosts/freun.dev/services/workout-sync.nix
Normal file
26
hosts/freun.dev/services/workout-sync.nix
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{ pkgs, inputs, config, ... }:
|
||||||
|
let
|
||||||
|
fqdn = "ws.freun.dev";
|
||||||
|
port = 3344;
|
||||||
|
workout-sync = inputs.workout-sync.packages.${pkgs.system}.default;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
systemd.services.workout-sync = {
|
||||||
|
enable = true;
|
||||||
|
description = "Workout sync service";
|
||||||
|
environment = {
|
||||||
|
PORT = toString port;
|
||||||
|
WORKOUT_TRACKER_URL = "http://localhost:${toString config.services.workout-tracker.port}";
|
||||||
|
};
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = "${workout-sync}/bin/workout-sync";
|
||||||
|
Restart = "always";
|
||||||
|
DynamicUser = true;
|
||||||
|
EnvironmentFile = "/var/secrets/workout-sync.env";
|
||||||
|
};
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
confinement.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
modules.webserver.vHosts.${fqdn}.locations."/".proxyPort = port;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user