diff --git a/home/cli.nix b/home/cli.nix index 20322a2..b1c99a7 100644 --- a/home/cli.nix +++ b/home/cli.nix @@ -39,13 +39,6 @@ dataLocation = "${config.home.homeDirectory}/.local/share/task"; colorTheme = "light-256"; config.editor = "hx"; - config.taskd = { - server = "henri-saudubray.fr:53589"; - certificate = "/home/hms/.task/keys/public.cert"; - key = "/home/hms/.task/keys/private.key"; - ca = "/home/hms/.task/keys/ca.cert"; - credentials = "personal/hms/2f8f33f0-a0b3-4f61-aba7-4d2b8c9cfbc7"; - }; }; programs.jujutsu = { diff --git a/hosts/mystra/default.nix b/hosts/mystra/default.nix index 81b2742..4a33466 100644 --- a/hosts/mystra/default.nix +++ b/hosts/mystra/default.nix @@ -4,18 +4,24 @@ ./hardware-configuration.nix ./disk-config.nix ../../nixos/server.nix - ./nginx.nix - ./taskd.nix - ./forgejo.nix ]; - networking.firewall.allowedTCPPorts = [ - 80 # HTTP (nginx) - 443 # HTTPS (nginx) - 53589 # Taskserver - ]; + services.nginx = { + enable = true; + virtualHosts."henri-saudubray.fr" = { + enableACME = true; + forceSSL = true; + root = "/home/hms/www"; + }; + }; + + networking.firewall.allowedTCPPorts = [ 80 443 ]; + + security.acme = { + acceptTerms = true; + defaults.email = "henri.saudubray@proton.me"; + }; networking.hostName = "mystra"; - networking.fqdn = "henri-saudubray.fr"; system.stateVersion = "25.11"; } diff --git a/hosts/mystra/forgejo.nix b/hosts/mystra/forgejo.nix deleted file mode 100644 index 4ee0f52..0000000 --- a/hosts/mystra/forgejo.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ lib, config, ... }: -let - cfg = config.services.forgejo; - srv = cfg.settings.server; -in -{ - services.nginx.virtualHosts."git.henri-saudubray.fr" = { - forceSSL = true; - enableACME = true; - extraConfig = '' - client_max_body_size 512M; - ''; - locations."/".proxyPass = "http://localhost:${toString srv.HTTP_PORT}"; - }; - - services.forgejo = { - enable = true; - database.type = "postgres"; - lfs.enable = true; - settings = { - server = { - DOMAIN = "git.henri-saudubray.fr"; - ROOT_URL = "https://${srv.DOMAIN}/"; - HTTP_PORT = 3000; - SSH_PORT = lib.head config.services.openssh.ports; - }; - - service.DISABLE_REGISTRATION = true; - }; - }; -} diff --git a/hosts/mystra/nginx.nix b/hosts/mystra/nginx.nix deleted file mode 100644 index 8042052..0000000 --- a/hosts/mystra/nginx.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ ... }: -{ - services.nginx = { - enable = true; - virtualHosts."henri-saudubray.fr" = { - enableACME = true; - forceSSL = true; - root = "/var/www/html"; - }; - }; - - security.acme = { - acceptTerms = true; - defaults.email = "henri.saudubray@proton.me"; - }; -} diff --git a/hosts/mystra/taskd.nix b/hosts/mystra/taskd.nix deleted file mode 100644 index cbd7594..0000000 --- a/hosts/mystra/taskd.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ ... }: -{ - # # NOTE: - # After server installation, you must synchronize the clients with - # taskd. To do so, export the user config as follows (on server): - # ```bash - # nixos-taskserver user export personal hms > hms_config.sh - # ``` - # and copy it to the client machine. Run it (on client): - # ```bash - # sh hms_config.sh - # ``` - # and initialize synchronization (on client): - # ```bash - # task sync init - # ``` - # See [this link](https://wiki.kunzelma.de/taskwarrior) for more. - # - # # TODO: find a better way than the mess above. - - services.taskserver = { - enable = true; - fqdn = "henri-saudubray.fr"; - listenHost = "::"; - organisations.personal.users = [ "hms" ]; - }; -}