rename project

This commit is contained in:
theBreadCompany 2024-09-13 13:35:23 +02:00
parent 93cbd88757
commit e8eced61a5
6 changed files with 15 additions and 15 deletions

2
Cargo.lock generated
View file

@ -1318,7 +1318,7 @@ dependencies = [
]
[[package]]
name = "pxiv"
name = "fxpixiv"
version = "0.1.0"
dependencies = [
"json",

View file

@ -1,5 +1,5 @@
[package]
name = "pxiv"
name = "fxpixiv"
version = "0.1.0"
edition = "2021"

View file

@ -1,4 +1,4 @@
# pxiv
# fxpixiv
The pixiv embed fixer

View file

@ -1,7 +1,7 @@
{ pkgs, lib, rustPlatform }:
rustPlatform.buildRustPackage rec {
pname = "pxiv";
pname = "fxpixiv";
version = "0.1.0";
src = ./.;

View file

@ -1,35 +1,35 @@
# pxiv.service.nix
# fxpixiv.service.nix
{ config, pkgs, lib, ... }:
let
inherit (lib) mkOption mkIf types;
pxivApp = import ./default.nix { inherit pkgs lib; rustPlatform = pkgs.rustPlatform; };
fxpixivApp = import ./default.nix { inherit pkgs lib; rustPlatform = pkgs.rustPlatform; };
in
{
options.services.pxiv = {
options.services.fxpixiv = {
enable = mkOption {
type = types.bool;
default = false;
description = "Enable the pxiv embed helper service.";
description = "Enable the fxpixiv embed helper service.";
};
port = mkOption {
type = types.int;
default = 8000;
description = "Port on which the pxiv embed helper listens.";
description = "Port on which the fxpixiv embed helper listens.";
};
};
config = mkIf config.services.pxiv.enable {
systemd.services.pxiv = {
description = "pxiv embed helper service";
config = mkIf config.services.fxpixiv.enable {
systemd.services.fxpixiv = {
description = "fxpixiv embed helper service";
wantedBy = [ "multi-user.target" ];
# Command to start the Rocket application
serviceConfig.ExecStart = "${pxivApp}/bin/pxiv";
serviceConfig.ExecStart = "${fxpixivApp}/bin/fxpixiv";
# Set the port environment variable
serviceConfig.Environment = [ "ROCKET_PORT=${toString config.services.pxiv.port}" ];
serviceConfig.Environment = [ "ROCKET_PORT=${toString config.services.fxpixiv.port}" ];
# Restart on failure
serviceConfig.Restart = "always";

View file

@ -95,7 +95,7 @@ async fn create_page(source: &String, html: &String) -> Result<String, Status> {
meta http-equiv="Refresh" content=(format!("0; url='{}'", source));
}
body {
h1 { "pxiv.net" }
h1 { "fxpixiv.net" }
h2 { "your (not yet so) friendly pixiv embed helper" }
p { "This page will take you to the original one one pixiv - if not, "}
a href=(source) { "refresh manually" }