diff --git a/flake.lock b/flake.lock index 01391aa..b9957d5 100644 --- a/flake.lock +++ b/flake.lock @@ -124,6 +124,25 @@ "type": "github" } }, + "ji-chan": { + "inputs": { + "nixpkgs": "nixpkgs_3", + "rust-overlay": "rust-overlay_2" + }, + "locked": { + "lastModified": 1743033002, + "narHash": "sha256-84TdCsIgDFDpgE9mXT/k0nxhTc7TgEfdfRia+hj//ow=", + "ref": "refs/heads/main", + "rev": "2e45f0205ae1d16a9b9b5b8417a262a558dc367f", + "revCount": 146, + "type": "git", + "url": "https://git.elnu.com/tegakituesday/ji-chan.git" + }, + "original": { + "type": "git", + "url": "https://git.elnu.com/tegakituesday/ji-chan.git" + } + }, "nixpkgs": { "locked": { "lastModified": 1691654369, @@ -157,6 +176,38 @@ } }, "nixpkgs_3": { + "locked": { + "lastModified": 1742669843, + "narHash": "sha256-G5n+FOXLXcRx+3hCJ6Rt6ZQyF1zqQ0DL0sWAMn2Nk0w=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1e5b653dff12029333a6546c11e108ede13052eb", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1736320768, + "narHash": "sha256-nIYdTAiKIGnFNugbomgBJR+Xv5F1ZQU+HfaBqJKroC0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4bc9c909d9ac828a039f288cf872d16d38185db8", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { "locked": { "lastModified": 1742422364, "narHash": "sha256-mNqIplmEohk5jRkqYqG19GA8MbQ/D4gQSK0Mu4LvfRQ=", @@ -172,7 +223,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_6": { "locked": { "lastModified": 1742456341, "narHash": "sha256-yvdnTnROddjHxoQqrakUQWDZSzVchczfsuuMOxg476c=", @@ -191,7 +242,7 @@ "nixvim": { "inputs": { "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_6", "nuschtosSearch": "nuschtosSearch" }, "locked": { @@ -235,7 +286,8 @@ "inputs": { "apis": "apis", "home-manager": "home-manager", - "nixpkgs": "nixpkgs_3", + "ji-chan": "ji-chan", + "nixpkgs": "nixpkgs_5", "nixvim": "nixvim" } }, @@ -258,6 +310,24 @@ "type": "github" } }, + "rust-overlay_2": { + "inputs": { + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1742870002, + "narHash": "sha256-eQnw8ufyLmrboODU8RKVNh2Mv7SACzdoFrRUV5zdNNE=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "b4c18f262dbebecb855136c1ed8047b99a9c75b6", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1681028828, diff --git a/flake.nix b/flake.nix index 800babe..62862a8 100644 --- a/flake.nix +++ b/flake.nix @@ -5,6 +5,7 @@ nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixvim.url = "github:nix-community/nixvim"; apis.url = "git+https://git.elnu.com/jichan.org/apis.git"; + ji-chan.url = "git+https://git.elnu.com/tegakituesday/ji-chan.git"; home-manager = { url = github:nix-community/home-manager; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/hosts/apps.nix b/hosts/apps.nix index d2e7ed3..845bbfe 100644 --- a/hosts/apps.nix +++ b/hosts/apps.nix @@ -10,5 +10,6 @@ trash-cli # aliased to rm in .bashrc unzip pipes + git-crypt ]; } diff --git a/hosts/default.nix b/hosts/default.nix index 7e562ae..3050f76 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -9,6 +9,7 @@ let lib = nixpkgs.lib; configImports = [ inputs.apis.nixosModules.default + inputs.ji-chan.nixosModules.default ./configuration.nix ]; hmImports = [ diff --git a/hosts/elnudrop/default.nix b/hosts/elnudrop/default.nix index bd67b40..fae9e96 100644 --- a/hosts/elnudrop/default.nix +++ b/hosts/elnudrop/default.nix @@ -15,7 +15,7 @@ ./hosts/git.elnu.com #./hosts/jichan.org - #./hosts/tegakituesday.com + ./hosts/tegakituesday.com ./hosts/atlantapaversinc.com ]; fileSystems."/mnt/data" = { device = "/dev/sda"; fsType = "ext4"; }; diff --git a/hosts/elnudrop/hosts/tegakituesday.com/.gitattributes b/hosts/elnudrop/hosts/tegakituesday.com/.gitattributes new file mode 100644 index 0000000..0f350f6 --- /dev/null +++ b/hosts/elnudrop/hosts/tegakituesday.com/.gitattributes @@ -0,0 +1 @@ +discord.key filter=git-crypt diff=git-crypt \ No newline at end of file diff --git a/hosts/elnudrop/hosts/tegakituesday.com/502/502.html b/hosts/elnudrop/hosts/tegakituesday.com/502/502.html deleted file mode 100644 index fc16162..0000000 --- a/hosts/elnudrop/hosts/tegakituesday.com/502/502.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - Tegaki Tuesday is offline - - -
- 字ちゃん -

- Tegaki Tuesday is currently offline for maintenance or due to an electrical outage. - Thank you for your patience and please check back soon. Sorry for the inconvenience! -

-

- 現在、手書きの火曜日はメンテナンスのため、または停電のためオフラインとなっております。 - しばらくお待ちください。ご迷惑をおかけして申し訳ございません! -

-

Prolonged outage? Notify me on Discord.

-
- - \ No newline at end of file diff --git a/hosts/elnudrop/hosts/tegakituesday.com/502/mascot.png b/hosts/elnudrop/hosts/tegakituesday.com/502/mascot.png deleted file mode 100644 index d0c6ca0..0000000 Binary files a/hosts/elnudrop/hosts/tegakituesday.com/502/mascot.png and /dev/null differ diff --git a/hosts/elnudrop/hosts/tegakituesday.com/default.nix b/hosts/elnudrop/hosts/tegakituesday.com/default.nix index 726af23..e5e68e6 100644 --- a/hosts/elnudrop/hosts/tegakituesday.com/default.nix +++ b/hosts/elnudrop/hosts/tegakituesday.com/default.nix @@ -1,7 +1,9 @@ { enableSSL, ... }: -with import ../../../../modules/tailscale/default.nix; let host = "tegakituesday.com"; in { + imports = [ + ./ji-chan.nix + ]; services.nginx.virtualHosts."www.${host}" = { forceSSL = enableSSL; enableACME = enableSSL; @@ -10,14 +12,8 @@ let host = "tegakituesday.com"; in { services.nginx.virtualHosts."${host}" = { forceSSL = enableSSL; enableACME = enableSSL; - extraConfig = '' - error_page 502 /502.html; - ''; locations = { - "/".proxyPass = "http://elnuhub:3335"; - "/502.html".root = "${./502}"; - "/mascot.png".root = "${./502}"; - "/missing.min.css".root = "${../shared/502}"; + "/".root = "/mnt/data/forgejo/sites/tegakituesday.com/public"; }; }; } \ No newline at end of file diff --git a/hosts/elnudrop/hosts/tegakituesday.com/discord.key b/hosts/elnudrop/hosts/tegakituesday.com/discord.key new file mode 100644 index 0000000..ec82d2c Binary files /dev/null and b/hosts/elnudrop/hosts/tegakituesday.com/discord.key differ diff --git a/hosts/elnudrop/hosts/tegakituesday.com/guilds.json b/hosts/elnudrop/hosts/tegakituesday.com/guilds.json new file mode 100644 index 0000000..130bf69 --- /dev/null +++ b/hosts/elnudrop/hosts/tegakituesday.com/guilds.json @@ -0,0 +1,28 @@ +{ + "1133469685220901016": { + "submissionChannel": "1134566066538946640", + "invite": "pxGx8AfJxC" + }, + "116379774825267202": { + "announcementRole": "836803162127335444", + "invite": "2Tf75M9", + "submissionChannel": "346809059376234497" + }, + "189571157446492161": { + "announcementRole": "800140383455019050", + "invite": "japanese", + "submissionChannel": "352299136307036160" + }, + "582147335476346880": { + "announcementRole": "839853170176032770", + "invite": "5e5je2PXeq", + "submissionChannel": "839852933377425488" + }, + "814700630958276649": { + "submissionChannel": "819038172927098910" + }, + "893457600719515719": { + "submissionChannel": "905589521264042004" + }, + "suggestionChannel": "968217486443053067" +} \ No newline at end of file diff --git a/hosts/elnudrop/hosts/tegakituesday.com/ji-chan.nix b/hosts/elnudrop/hosts/tegakituesday.com/ji-chan.nix new file mode 100644 index 0000000..c46974d --- /dev/null +++ b/hosts/elnudrop/hosts/tegakituesday.com/ji-chan.nix @@ -0,0 +1,14 @@ +{ pkgs, ... }: + +{ + services.ji-chan = { + enable = true; + user = "forgejo"; + token = builtins.readFile ./discord.key; + hugo = "/mnt/data/forgejo/sites/tegakituesday.com"; + guildData = pkgs.writeTextFile { + name = "ji-chan-guilds"; + text = builtins.readFile ./guilds.json; + }; + }; +} \ No newline at end of file