Merge remote-tracking branch 'origin/main'

This commit is contained in:
Alexander Wainwright 2026-04-11 17:02:39 +10:00
commit 2cd342ec56
15 changed files with 389 additions and 307 deletions

View file

@ -5,7 +5,7 @@ let
"analytics.figtree.dev" = "http://192.168.80.1:3300";
"figtree.dev" = "http://192.168.1.63:8080";
"files.figtree.dev" = "http://192.168.80.4:8080";
"git.figtree.dev" = "http://192.168.80.2:3000";
"git.figtree.dev" = "http://192.168.80.8:3000";
"nc.figtree.dev" = "http://192.168.1.62:11000";
"paperless.figtree.dev" = "http://192.168.1.63:8010";
"photos.figtree.dev" = "http://192.168.80.1:2283";

View file

@ -110,6 +110,7 @@
services.avahi = {
enable = true;
nssmdns4 = true; # Enables Avahi for name service lookups (e.g., in /etc/nsswitch.conf)
nssmdns6 = true; # Also resolve IPv6 mDNS addresses via NSS
publish = {
enable = true;
addresses = true; # Publish your laptop's IP addresses

View file

@ -45,6 +45,7 @@
noto-fonts-cjk-sans
noto-fonts-cjk-serif
nerd-fonts.lilex
nerd-fonts.symbols-only
fira-code
];
};
@ -57,6 +58,7 @@
# Enable networking
networking.networkmanager.enable = true;
networking.networkmanager.wifi.backend = "iwd";
# Enable CUPS to print documents.
services.printing.enable = true;

View file

@ -22,6 +22,9 @@
# START_CHARGE_THRESH_BAT0 = 40; # 40 and below it starts to charge
STOP_CHARGE_THRESH_BAT0 = 81; # 80 and above it stops charging
WIFI_PWR_ON_AC = "off";
WIFI_PWR_ON_BAT = "off";
};
};
}

View file

@ -0,0 +1,24 @@
{ config, modulesPath, pkgs, inputs, ... }:
{
imports =
[
(modulesPath + "/virtualisation/proxmox-lxc.nix")
../modules/base.nix
../modules/server.nix
./forgejo.nix
];
nix.settings = { sandbox = false; };
proxmoxLXC = {
manageNetwork = false;
privileged = true;
};
networking.hostName = "panam";
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken.
system.stateVersion = "25.05";
}

33
hosts/panam/forgejo.nix Normal file
View file

@ -0,0 +1,33 @@
{ config, pkgs, lib, ... }:
let
cfg = config.services.forgejo;
srv = cfg.settings.server;
in
{
services.forgejo = {
enable = true;
database.type = "sqlite3";
lfs.enable = true;
settings = {
server = {
DOMAIN = "git.figtree.dev";
ROOT_URL = "https://git.figtree.dev/";
SSH_DOMAIN = "panam.local";
HTTP_ADDR = "0.0.0.0";
HTTP_PORT = 3000;
};
service.DISABLE_REGISTRATION = true;
};
};
# Open the firewall for Forgejo's HTTP and SSH ports
networking.firewall.allowedTCPPorts = [ 3000 22 ];
# Ensure the user 'alex' is an admin in Forgejo if needed
# (Note: Forgejo doesn't allow 'admin' as a username)
systemd.services.forgejo.preStart = ''
# This will fail if the user already exists, hence || true
${lib.getExe cfg.package} admin user create --admin --email "code@figtree.dev" --username alex --password "changeme123" || true
'';
}