From d2e782d7fecdcb060423afd32845c051625a5091 Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Sat, 14 Sep 2024 18:43:15 -0500 Subject: [PATCH] enable soft-serve server on shadowfax --- nixos/hosts/shadowfax/config/soft-serve.nix | 46 +++++++++++++++++++++ nixos/hosts/shadowfax/default.nix | 15 +++++-- 2 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 nixos/hosts/shadowfax/config/soft-serve.nix diff --git a/nixos/hosts/shadowfax/config/soft-serve.nix b/nixos/hosts/shadowfax/config/soft-serve.nix new file mode 100644 index 0000000..a096ed9 --- /dev/null +++ b/nixos/hosts/shadowfax/config/soft-serve.nix @@ -0,0 +1,46 @@ +{ ... }: +{ + name = "Soft Serve"; + log = { + format = "text"; + time_format = "2006-01-02 15:04:05"; + }; + ssh = { + listen_addr = ":23231"; + public_url = "ssh://10.1.1.61:23231"; + key_path = "ssh/soft_serve_host_ed25519"; + client_key_path = "ssh/soft_serve_client_ed25519"; + max_timeout = 0; + idle_timeout = 600; + }; + git = { + listen_addr = ":9418"; + public_url = "git://10.1.1.61"; + max_timeout = 0; + idle_timeout = 3; + max_connections = 32; + }; + http = { + listen_addr = ":23232"; + tls_key_path = null; + tls_cert_path = null; + public_url = "http://10.1.1.61:23232"; + }; + stats = { + listen_addr = "10.1.1.61:23233"; + }; + db = { + driver = "sqlite"; + data_source = "soft-serve.db?_pragma=busy_timeout(5000)&_pragma=foreign_keys(1)"; + }; + lfs = { + enabled = true; + ssh_enabled = false; + }; + jobs = { + mirror_pull = "@every 10m"; + }; + initial_admin_keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILcLI5qN69BuoLp8p7nTYKoLdsBNmZB31OerZ63Car1g jahanson@telchar" + ]; +} diff --git a/nixos/hosts/shadowfax/default.nix b/nixos/hosts/shadowfax/default.nix index 001a487..ccc3194 100644 --- a/nixos/hosts/shadowfax/default.nix +++ b/nixos/hosts/shadowfax/default.nix @@ -38,9 +38,18 @@ in # VSCode Compatibility Settings nix-ld.enable = true; }; - # VSCode Compatibility Settings - services.vscode-server = { - enable = true; + + services = { + # Soft Serve + soft-serve = { + enable = true; + settings = import ./config/soft-serve.nix { }; + }; + + # VSCode Compatibility Settings + vscode-server = { + enable = true; + }; }; # Home Manager