From d9ba3826aa7f84c3703cc2e5c7ba8abb90ef9883 Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Tue, 27 Aug 2024 17:08:53 +0800 Subject: [PATCH] tyo0/forgejo: customize --- hosts/tyo0/default.nix | 19 +++---------------- hosts/tyo0/services/forgejo.nix | 9 +++++++++ hosts/tyo0/services/redlib.nix | 7 +++++++ hosts/tyo0/services/uptime-kuma.nix | 6 ++++++ hosts/tyo0/services/wastebin.nix | 6 ++++++ 5 files changed, 31 insertions(+), 16 deletions(-) create mode 100644 hosts/tyo0/services/redlib.nix create mode 100644 hosts/tyo0/services/uptime-kuma.nix create mode 100644 hosts/tyo0/services/wastebin.nix diff --git a/hosts/tyo0/default.nix b/hosts/tyo0/default.nix index add66d1..c16908b 100644 --- a/hosts/tyo0/default.nix +++ b/hosts/tyo0/default.nix @@ -16,8 +16,11 @@ ./services/murmur.nix ./services/ntfy.nix ./services/pixivfe.nix + ./services/redlib.nix ./services/searx.nix + ./services/uptime-kuma.nix ./services/vaultwarden.nix + ./services/wastebin.nix ]; boot.loader.grub.device = lib.mkForce "/dev/nvme0n1"; @@ -105,22 +108,6 @@ }; }; - services.wastebin = { - enable = true; - settings.WASTEBIN_ADDRESS_PORT = "127.0.0.1:8200"; - }; - - services.uptime-kuma = { - enable = true; - settings.PORT = "8300"; - }; - - services.redlib = { - enable = true; - address = "127.0.0.1"; - port = 9400; - }; - ### Prevents me from bankrupt # https://fmk.im/p/shutdown-aws/ services.vnstat.enable = true; diff --git a/hosts/tyo0/services/forgejo.nix b/hosts/tyo0/services/forgejo.nix index 2558dde..1d134e2 100644 --- a/hosts/tyo0/services/forgejo.nix +++ b/hosts/tyo0/services/forgejo.nix @@ -5,6 +5,10 @@ package = pkgs.forgejo; database.type = "postgres"; settings = { + DEFAULT = { + APP_NAME = "git.ny4.dev"; + }; + server = { DOMAIN = "git.ny4.dev"; PROTOCOL = "http+unix"; @@ -15,6 +19,11 @@ service = { ALLOW_ONLY_EXTERNAL_REGISTRATION = true; }; + + repository = { + DISABLE_STARS = true; + DEFAULT_BRANCH = "master"; + }; }; }; } diff --git a/hosts/tyo0/services/redlib.nix b/hosts/tyo0/services/redlib.nix new file mode 100644 index 0000000..caf0ea8 --- /dev/null +++ b/hosts/tyo0/services/redlib.nix @@ -0,0 +1,7 @@ +{ + services.redlib = { + enable = true; + address = "127.0.0.1"; + port = 9400; + }; +} diff --git a/hosts/tyo0/services/uptime-kuma.nix b/hosts/tyo0/services/uptime-kuma.nix new file mode 100644 index 0000000..a29b5b8 --- /dev/null +++ b/hosts/tyo0/services/uptime-kuma.nix @@ -0,0 +1,6 @@ +{ + services.uptime-kuma = { + enable = true; + settings.PORT = "8300"; + }; +} diff --git a/hosts/tyo0/services/wastebin.nix b/hosts/tyo0/services/wastebin.nix new file mode 100644 index 0000000..e324d8c --- /dev/null +++ b/hosts/tyo0/services/wastebin.nix @@ -0,0 +1,6 @@ +{ + services.wastebin = { + enable = true; + settings.WASTEBIN_ADDRESS_PORT = "127.0.0.1:8200"; + }; +}