diff --git a/Cargo.lock b/Cargo.lock index 3ba57b0..0966c19 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1318,7 +1318,7 @@ dependencies = [ ] [[package]] -name = "pxiv" +name = "fxpixiv" version = "0.1.0" dependencies = [ "json", diff --git a/Cargo.toml b/Cargo.toml index a8a3727..841fba2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "pxiv" +name = "fxpixiv" version = "0.1.0" edition = "2021" diff --git a/README.md b/README.md index 7123843..84a8348 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# pxiv +# fxpixiv The pixiv embed fixer diff --git a/default.nix b/default.nix index 2d17faf..1b6db06 100644 --- a/default.nix +++ b/default.nix @@ -1,7 +1,7 @@ { pkgs, lib, rustPlatform }: rustPlatform.buildRustPackage rec { - pname = "pxiv"; + pname = "fxpixiv"; version = "0.1.0"; src = ./.; diff --git a/pxiv.service.nix b/fxpixiv.service.nix similarity index 54% rename from pxiv.service.nix rename to fxpixiv.service.nix index d86c2bc..98270b6 100644 --- a/pxiv.service.nix +++ b/fxpixiv.service.nix @@ -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"; diff --git a/src/main.rs b/src/main.rs index 3d73bb9..dd5c71b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -95,7 +95,7 @@ async fn create_page(source: &String, html: &String) -> Result { 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" }