From 3f5ad1a3df305d2f9b63521f86f909757535f495 Mon Sep 17 00:00:00 2001 From: mtgmonkey Date: Thu, 19 Jun 2025 06:27:03 -0400 Subject: [PATCH] change from Andromeda/blog to Andromeda/best-blog --- flake.lock | 90 +++++++++++++++++++++++++++++++++++++++++------ flake.nix | 31 ++++++++-------- services/blog.nix | 19 +++------- 3 files changed, 98 insertions(+), 42 deletions(-) diff --git a/flake.lock b/flake.lock index 48c6c6f..ca72b28 100644 --- a/flake.lock +++ b/flake.lock @@ -1,8 +1,27 @@ { "nodes": { + "best-blog": { + "inputs": { + "nixpkgs": "nixpkgs", + "rust-http-server": "rust-http-server" + }, + "locked": { + "lastModified": 1750328206, + "narHash": "sha256-qRr6Vrwk/SWNSPx4jAvs5e41tteUWIE+Kqz77Wi0kJ4=", + "ref": "refs/heads/master", + "rev": "5b4e18fd21f174a2c9afa0f8be897cb60a14154d", + "revCount": 5, + "type": "git", + "url": "https://git.mtgmonkey.net/Andromeda/best-blog.git" + }, + "original": { + "type": "git", + "url": "https://git.mtgmonkey.net/Andromeda/best-blog.git" + } + }, "elmskell-blog": { "inputs": { - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_3" }, "locked": { "lastModified": 1749494299, @@ -38,7 +57,7 @@ }, "jank-client": { "inputs": { - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1749606892, @@ -56,7 +75,7 @@ }, "math-project": { "inputs": { - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_5" }, "locked": { "lastModified": 1750258769, @@ -73,6 +92,36 @@ } }, "nixpkgs": { + "locked": { + "lastModified": 1750134718, + "narHash": "sha256-v263g4GbxXv87hMXMCpjkIxd/viIF7p3JpJrwgKdNiI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9e83b64f727c88a7711a2c463a7b16eedb69a84c", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1749794982, + "narHash": "sha256-Kh9K4taXbVuaLC0IL+9HcfvxsSUx8dPB5s5weJcc9pc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ee930f9755f58096ac6e8ca94a1887e0534e2d81", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1749143949, "narHash": "sha256-QuUtALJpVrPnPeozlUG/y+oIMSLdptHxb3GK6cpSVhA=", @@ -87,7 +136,7 @@ "type": "indirect" } }, - "nixpkgs_2": { + "nixpkgs_4": { "locked": { "lastModified": 1749285348, "narHash": "sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU=", @@ -102,7 +151,7 @@ "type": "indirect" } }, - "nixpkgs_3": { + "nixpkgs_5": { "locked": { "lastModified": 1748889542, "narHash": "sha256-Hb4iMhIbjX45GcrgOp3b8xnyli+ysRPqAgZ/LZgyT5k=", @@ -117,7 +166,7 @@ "type": "indirect" } }, - "nixpkgs_4": { + "nixpkgs_6": { "locked": { "lastModified": 1750134718, "narHash": "sha256-v263g4GbxXv87hMXMCpjkIxd/viIF7p3JpJrwgKdNiI=", @@ -132,7 +181,7 @@ "type": "indirect" } }, - "nixpkgs_5": { + "nixpkgs_7": { "locked": { "lastModified": 1714253743, "narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=", @@ -148,7 +197,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_8": { "locked": { "lastModified": 1746141548, "narHash": "sha256-IgBWhX7A2oJmZFIrpRuMnw5RAufVnfvOgHWgIdds+hc=", @@ -166,7 +215,7 @@ }, "noshell": { "inputs": { - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_7" }, "locked": { "lastModified": 1717396029, @@ -184,18 +233,37 @@ }, "root": { "inputs": { + "best-blog": "best-blog", "elmskell-blog": "elmskell-blog", "jank-client": "jank-client", "math-project": "math-project", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_6", "noshell": "noshell", "spacebar-server": "spacebar-server" } }, + "rust-http-server": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1750103311, + "narHash": "sha256-aefZc/S5xu26OeNjUXA9whnAK9D7lWejqrqQ2xfPw+U=", + "ref": "refs/heads/master", + "rev": "02acb04f650b494de1dfb78474bf7e397e0f2995", + "revCount": 1, + "type": "git", + "url": "https://git.mtgmonkey.net/Andromeda/rust-http-server.git" + }, + "original": { + "type": "git", + "url": "https://git.mtgmonkey.net/Andromeda/rust-http-server.git" + } + }, "spacebar-server": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_8" }, "locked": { "lastModified": 1748414795, diff --git a/flake.nix b/flake.nix index 60fa3ad..b7fdb4b 100755 --- a/flake.nix +++ b/flake.nix @@ -8,16 +8,17 @@ elmskell-blog.url = "git+https://git.mtgmonkey.net/Andromeda/blog.git"; jank-client.url = "git+https://git.mtgmonkey.net/Andromeda/jank-client-fork.git"; math-project.url = "git+https://git.mtgmonkey.net/Andromeda/math-project.git"; + best-blog.url = "git+https://git.mtgmonkey.net/Andromeda/best-blog.git"; }; outputs = { self, nixpkgs, noshell, - elmskell-blog, spacebar-server, jank-client, math-project, + best-blog, ... }: let system = "x86_64-linux"; @@ -27,32 +28,30 @@ specialArgs = { inherit self; inherit system; - inherit elmskell-blog; inherit spacebar-server; inherit math-project; + inherit best-blog; ssh-pub-keys = import ./ssh-pub-keys.nix; }; modules = [ - ./services/ferron.nix + ./configuration.nix - ./services/elmskell.nix ./services/blog.nix - - jank-client.nixosModules.x86_64-linux.default - ./services/spacebar.nix - # ./services/rgit.nix + ./services/elmskell.nix + ./services/ferron.nix ./services/gitea.nix - + #./services/rgit.nix + ./services/math-project.nix + ./services/spacebar.nix ./services/translate.nix - noshell.nixosModules.default - {programs.noshell.enable = true;} - + jank-client.nixosModules.x86_64-linux.default math-project.nixosModules.x86_64-linux.default - {services.math-project.enable = true;} - ./services/math-project.nix - - ./configuration.nix + noshell.nixosModules.default + { + programs.noshell.enable = true; + services.math-project.enable = true; + } ]; }; }; diff --git a/services/blog.nix b/services/blog.nix index aa85420..1628eda 100755 --- a/services/blog.nix +++ b/services/blog.nix @@ -1,5 +1,5 @@ { - elmskell-blog, + best-blog, lib, pkgs, ... @@ -18,13 +18,6 @@ } ]; }; - ferron-conf-nix = { - global = { - port = 8181; - secure = false; - wwwroot = "${elmskell-blog.packages.x86_64-linux.default}/wwwroot"; - }; - }; in { services.anubis = { instances.blog = { @@ -36,7 +29,7 @@ in { METRICS_BIND = "[::1]:9182"; METRICS_BIND_NETWORK = "tcp"; POLICY_FNAME = "/etc/anubis/blog.botPolicies.yaml"; - TARGET = "http://localhost:8181"; + TARGET = "http://localhost:9345"; }; }; }; @@ -44,10 +37,10 @@ in { source = (pkgs.formats.yaml {}).generate "" botPolicies-nix; mode = "644"; }; - systemd.services.blog-ferron = { + systemd.services.blog = { serviceConfig = { Type = "simple"; - ExecStart = "${lib.getExe pkgs.ferron} --config=/etc/blog.ferron.yaml"; + ExecStart = "${lib.getExe best-blog.packages.x86_64-linux.default}"; RemainAfterExit = true; Restart = "always"; RestartMaxDelaySec = "1m"; @@ -56,8 +49,4 @@ in { }; wantedBy = ["multi-user.target"]; }; - environment.etc."blog.ferron.yaml" = { - source = (pkgs.formats.yaml {}).generate "" ferron-conf-nix; - mode = "644"; - }; }