nixos-config/hosts/vulpecula/configuration.nix

115 lines
2.8 KiB
Nix
Raw Normal View History

2024-10-03 12:40:37 +02:00
{ config, lib, ... }: let
sshKeys = import ../../crypto/ssh-keys.nix;
in {
2024-09-29 19:41:01 +02:00
imports = [
./hardware-configuration.nix
2024-10-03 11:47:42 +02:00
../../common/base.nix
2024-09-29 19:41:01 +02:00
2024-09-05 20:49:12 +02:00
];
2024-10-03 12:21:57 +02:00
networking = {
hostName = "vulpecula";
firewall = {
allowedTCPPorts = [
# 8080 # ?
80
443
22
# 8008 # ssb
# 12345 # tildefriends
# 13378 # audiobookshelf
];
allowedUDPPorts = [
# 8080 # ?
];
};
};
2024-10-03 12:12:35 +02:00
boot = {
2024-10-03 12:14:24 +02:00
loader.systemd-boot.enable = lib.mkForce false;
2024-10-03 12:12:35 +02:00
# efi.canTouchEfiVariables = true;
initrd = {
2024-10-03 12:15:02 +02:00
enable = lib.mkForce true;
2024-10-03 12:14:24 +02:00
systemd.enable = lib.mkForce false;
2024-10-03 12:12:35 +02:00
};
};
boot.loader.grub.device = "/dev/sda";
2024-10-03 11:43:27 +02:00
2024-10-03 12:39:52 +02:00
users.users.tasia = {
isNormalUser = true;
description = "Tasia";
extraGroups = ["networkmanager" "wheel" "dialout"];
initialPassword = "correcthorsebatterystaple";
openssh.authorizedKeys.keys = [
sshKeys.tasia.yaseen
];
};
2024-10-03 13:11:58 +02:00
services.nginx = {
enable = true;
virtualHosts."vulpecula.zone" = {
addSSL = true;
enableACME = true;
root = "/www";
};
virtualHosts."git.vulpecula.zone" = {
addSSL = true;
enableACME = true;
2024-10-03 13:23:12 +02:00
locations."/".proxyPass = "http://localhost:62101";
# ${toString config.services.forgejo.settings.server.HTTP_PORT}
2024-10-03 13:11:58 +02:00
};
2024-10-03 12:49:42 +02:00
};
2024-10-03 13:05:05 +02:00
security.acme = {
acceptTerms = true;
defaults.email = "tasiaiso@proton.me";
};
2024-10-03 13:11:58 +02:00
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 = false;
# 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;
};
2024-09-29 19:41:01 +02:00
boot.tmp.cleanOnBoot = true;
zramSwap.enable = true;
networking.domain = "";
services.openssh.enable = true;
2024-10-03 12:39:52 +02:00
# users.users.root.openssh.authorizedKeys.keys = [''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILLyDLtqUhEQwIsPx0XgQ9OJb2+XxL+2ra4goNJEgwf0 tasia@yaseen'' ];
2024-09-05 20:49:12 +02:00
system.stateVersion = "24.05";
}