{ config, lib, inputs, ... }: let sshKeys = import ../../crypto/ssh-keys.nix; in { imports = [ ./hardware-configuration.nix ../../common/base.nix ]; networking = { hostName = "vulpecula"; firewall = { allowedTCPPorts = [ 80 443 # 22 ]; allowedUDPPorts = [ # 8080 # ? ]; }; }; # Disable systemd-boot, use grub instead boot = { loader.systemd-boot.enable = lib.mkForce false; initrd = { enable = lib.mkForce true; systemd.enable = lib.mkForce false; }; }; boot.loader.grub.device = "/dev/sda"; users.users.tasia = { isNormalUser = true; description = "Tasia"; extraGroups = ["networkmanager" "wheel" "dialout"]; initialPassword = "correcthorsebatterystaple"; openssh.authorizedKeys.keys = [ sshKeys.tasia.yaseen ]; }; services.nginx = { enable = true; recommendedProxySettings = true; recommendedTlsSettings = true; virtualHosts."vulpecula.zone" = { addSSL = true; enableACME = true; root = inputs.vulpecula-zone.packages.x86_64-linux.default; }; virtualHosts."tasiaiso.vulpecula.zone" = { addSSL = true; enableACME = true; root = inputs.tasiaiso-vulpecula-zone.packages.x86_64-linux.default; }; virtualHosts."git.vulpecula.zone" = { addSSL = true; enableACME = true; locations."/".proxyPass = "http://localhost:${toString config.services.forgejo.settings.server.HTTP_PORT}"; }; }; # change when ppl can make their own website security.acme = { acceptTerms = true; defaults.email = "tasiaiso@proton.me"; }; services.forgejo = { enable = true; database.type = "postgres"; # Enable support for Git Large File Storage lfs.enable = true; settings = { server = { DOMAIN = "git.vulpecula.zone"; # You need to specify this to remove the port from URLs in the web UI. ROOT_URL = "https://git.vulpecula.zone/"; HTTP_PORT = 62101; }; # You can temporarily allow registration to create an admin user. service.DISABLE_REGISTRATION = true; # Add support for actions, based on act: https://github.com/nektos/act # actions = { # ENABLED = true; # DEFAULT_ACTIONS_URL = "github"; # }; # Sending emails is completely optional # You can send a test email from the web UI at: # Profile Picture > Site Administration > Configuration > Mailer Configuration # mailer = { # ENABLED = true; # SMTP_ADDR = "mail.example.com"; # FROM = "noreply@${srv.DOMAIN}"; # USER = "noreply@${srv.DOMAIN}"; # }; }; # mailerPasswordFile = config.age.secrets.forgejo-mailer-password.path; }; # services.gitea-actions-runner = { # package = pkgs.forgejo-actions-runner; # instances.default = { # enable = true; # name = "monolith"; # url = "https://git.vulpecula.zone"; # # Obtaining the path to the runner token file may differ # tokenFile = config.age.secrets.forgejo-runner-token.path; # labels = [ # "ubuntu-latest:docker://node:16-bullseye" # "ubuntu-22.04:docker://node:16-bullseye" # "ubuntu-20.04:docker://node:16-bullseye" # "ubuntu-18.04:docker://node:16-buster" # ## optionally provide native execution on the host: # # "native:host" # ]; # }; # }; services.grafana = { enable = false; settings.server = { domain = "grafana.vulpecula.zone"; http_port = 62102; http_addr = "0.0.0.0"; }; }; services.prometheus = { enable = false; port = 62103; retentionTime = "60d"; exporters = { node = { enable = false; enabledCollectors = ["systemd"]; port = 62104; }; }; scrapeConfigs = [ { job_name = "vulpecula"; static_configs = [ { targets = ["127.0.0.1:${toString config.services.prometheus.exporters.node.port}"]; } ]; } ]; }; boot.tmp.cleanOnBoot = true; zramSwap.enable = true; networking.domain = ""; # users.users.root.openssh.authorizedKeys.keys = [''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILLyDLtqUhEQwIsPx0XgQ9OJb2+XxL+2ra4goNJEgwf0 tasia@yaseen'' ]; system.stateVersion = "24.05"; }