Alejandra'd the configs
This commit is contained in:
parent
45ec1b2bdc
commit
cd0d39bdeb
2 changed files with 66 additions and 57 deletions
|
|
@ -152,12 +152,12 @@ in {
|
||||||
# Forgejo configuration
|
# Forgejo configuration
|
||||||
services.forgejo = {
|
services.forgejo = {
|
||||||
enable = true;
|
enable = true;
|
||||||
database = {
|
database = {
|
||||||
type = "postgres";
|
type = "postgres";
|
||||||
host = "10.1.1.251"; # IP of your database server
|
host = "10.1.1.251"; # IP of your database server
|
||||||
name = "forgejo";
|
name = "forgejo";
|
||||||
user = "forgejo";
|
user = "forgejo";
|
||||||
passwordFile = "/home/forgejoprg/password.txt"; # Store password in a separate file for security
|
passwordFile = "/home/forgejoprg/password.txt"; # Store password in a separate file for security
|
||||||
};
|
};
|
||||||
lfs.enable = true;
|
lfs.enable = true;
|
||||||
|
|
||||||
|
|
@ -190,15 +190,15 @@ in {
|
||||||
boot.loader.systemd-boot.enable = lib.mkForce false;
|
boot.loader.systemd-boot.enable = lib.mkForce false;
|
||||||
boot.loader.grub = {
|
boot.loader.grub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
device = "/dev/vda"; # Install GRUB to the disk
|
device = "/dev/vda"; # Install GRUB to the disk
|
||||||
efiSupport = false; # Disable UEFI
|
efiSupport = false; # Disable UEFI
|
||||||
};
|
};
|
||||||
boot.initrd.availableKernelModules = ["virtio_pci" "virtio_scsi" "ahci" "sd_mod" "virtio_blk"];
|
boot.initrd.availableKernelModules = ["virtio_pci" "virtio_scsi" "ahci" "sd_mod" "virtio_blk"];
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/vda1";
|
device = "/dev/vda1";
|
||||||
fsType = "ext4"; # Use "btrfs" or "xfs" if you formatted it differently
|
fsType = "ext4"; # Use "btrfs" or "xfs" if you formatted it differently
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -364,7 +364,7 @@ fileSystems."/" = {
|
||||||
|
|
||||||
# Use this clean static network configuration instead:
|
# Use this clean static network configuration instead:
|
||||||
networking.useDHCP = false;
|
networking.useDHCP = false;
|
||||||
networking.networkmanager.enable = false; # Disable NetworkManager
|
networking.networkmanager.enable = false; # Disable NetworkManager
|
||||||
|
|
||||||
networking.interfaces.ens18 = {
|
networking.interfaces.ens18 = {
|
||||||
ipv4.addresses = [
|
ipv4.addresses = [
|
||||||
|
|
@ -382,7 +382,7 @@ fileSystems."/" = {
|
||||||
|
|
||||||
# Explicitly set DNS
|
# Explicitly set DNS
|
||||||
networking.nameservers = ["10.1.1.2"];
|
networking.nameservers = ["10.1.1.2"];
|
||||||
|
|
||||||
# THE FOLLOWING CODE BLOCK IS FOR COPYING TO OTHER CONFIGURATIONS, NOT FOR THIS FILE
|
# THE FOLLOWING CODE BLOCK IS FOR COPYING TO OTHER CONFIGURATIONS, NOT FOR THIS FILE
|
||||||
nix.distributedBuilds = true;
|
nix.distributedBuilds = true;
|
||||||
nix.buildMachines = [
|
nix.buildMachines = [
|
||||||
|
|
|
||||||
|
|
@ -30,9 +30,9 @@ in {
|
||||||
];
|
];
|
||||||
|
|
||||||
# Bootloader - The given default one by NixOS is not to be trusted....
|
# Bootloader - The given default one by NixOS is not to be trusted....
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.grub.enable = true;
|
||||||
boot.loader.grub.version = 2;
|
boot.loader.grub.version = 2;
|
||||||
boot.loader.grub.device = "/dev/sda";
|
boot.loader.grub.device = "/dev/sda";
|
||||||
|
|
||||||
networking.hostName = "nixos-traefik"; # Define your hostname.
|
networking.hostName = "nixos-traefik"; # Define your hostname.
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
|
@ -59,11 +59,8 @@ in {
|
||||||
LC_TIME = "en_AU.UTF-8";
|
LC_TIME = "en_AU.UTF-8";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# Enable Tailscale for secure remote access
|
# Enable Tailscale for secure remote access
|
||||||
services.tailscale.enable = true;
|
services.tailscale.enable = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Enable Seatd for Wayland sessions (needed for sway/seat management)
|
# Enable Seatd for Wayland sessions (needed for sway/seat management)
|
||||||
services.seatd = {
|
services.seatd = {
|
||||||
|
|
@ -117,7 +114,6 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# SSH Agent authentication
|
# SSH Agent authentication
|
||||||
security.pam.sshAgentAuth.enable = true;
|
security.pam.sshAgentAuth.enable = true;
|
||||||
|
|
||||||
|
|
@ -128,11 +124,10 @@ in {
|
||||||
allowReboot = false;
|
allowReboot = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# Enable Traefik service
|
# Enable Traefik service
|
||||||
services.traefik = {
|
services.traefik = {
|
||||||
enable = true;
|
enable = true;
|
||||||
group = "acme"; # Add traefik to acme group so it can read certificates
|
group = "acme"; # Add traefik to acme group so it can read certificates
|
||||||
|
|
||||||
staticConfigOptions = {
|
staticConfigOptions = {
|
||||||
entryPoints = {
|
entryPoints = {
|
||||||
|
|
@ -186,24 +181,24 @@ in {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
# HTTP Routers
|
# HTTP Routers
|
||||||
http.routers = {
|
http.routers = {
|
||||||
forgejo = {
|
forgejo = {
|
||||||
rule = "Host(`git.prg-radio.org`)";
|
rule = "Host(`git.prg-radio.org`)";
|
||||||
service = "forgejo";
|
service = "forgejo";
|
||||||
entryPoints = ["websecure"];
|
entryPoints = ["websecure"];
|
||||||
tls = {};
|
tls = {};
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# HTTP Services
|
# HTTP Services
|
||||||
http.services = {
|
http.services = {
|
||||||
forgejo.loadBalancer = {
|
forgejo.loadBalancer = {
|
||||||
servers = [
|
servers = [
|
||||||
{ url = "http://10.1.1.4:3000"; }
|
{url = "http://10.1.1.4:3000";}
|
||||||
];
|
];
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -213,21 +208,20 @@ in {
|
||||||
defaults.email = "dtu.prg@gmail.com";
|
defaults.email = "dtu.prg@gmail.com";
|
||||||
certs."prg-radio.org" = {
|
certs."prg-radio.org" = {
|
||||||
domain = "*.prg-radio.org";
|
domain = "*.prg-radio.org";
|
||||||
group = "acme"; # Use acme group
|
group = "acme"; # Use acme group
|
||||||
dnsProvider = "cloudflare";
|
dnsProvider = "cloudflare";
|
||||||
environmentFile = "/home/traefikprg/cloudflare/cloudflare.env";
|
environmentFile = "/home/traefikprg/cloudflare/cloudflare.env";
|
||||||
# Reload traefik when certificate is renewed
|
# Reload traefik when certificate is renewed
|
||||||
reloadServices = [ "traefik.service" ];
|
reloadServices = ["traefik.service"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Ensure traefik service waits for ACME certificates
|
# Ensure traefik service waits for ACME certificates
|
||||||
systemd.services.traefik = {
|
systemd.services.traefik = {
|
||||||
after = [ "acme-finished-prg-radio.org.target" ];
|
after = ["acme-finished-prg-radio.org.target"];
|
||||||
wants = [ "acme-finished-prg-radio.org.target" ];
|
wants = ["acme-finished-prg-radio.org.target"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# Add extra system packages from example.nix (appended to existing list)
|
# Add extra system packages from example.nix (appended to existing list)
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
wget
|
wget
|
||||||
|
|
@ -292,7 +286,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
# Home Manager user configuration for traefikprg (from example.nix)
|
# Home Manager user configuration for traefikprg (from example.nix)
|
||||||
home-manager.users.traefikprg = { pkgs, ... }: {
|
home-manager.users.traefikprg = {pkgs, ...}: {
|
||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.atool
|
pkgs.atool
|
||||||
pkgs.httpie
|
pkgs.httpie
|
||||||
|
|
@ -318,13 +312,28 @@ in {
|
||||||
settings = {
|
settings = {
|
||||||
window = {
|
window = {
|
||||||
opacity = 1.0;
|
opacity = 1.0;
|
||||||
padding = { x = 10; y = 10; };
|
padding = {
|
||||||
|
x = 10;
|
||||||
|
y = 10;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
font = {
|
font = {
|
||||||
normal = { family = "Maple Mono NF"; style = "Regular"; };
|
normal = {
|
||||||
bold = { family = "Maple Mono NF"; style = "Bold"; };
|
family = "Maple Mono NF";
|
||||||
italic = { family = "Maple Mono NF"; style = "Italic"; };
|
style = "Regular";
|
||||||
bold_italic = { family = "Maple Mono NF"; style = "Bold Italic"; };
|
};
|
||||||
|
bold = {
|
||||||
|
family = "Maple Mono NF";
|
||||||
|
style = "Bold";
|
||||||
|
};
|
||||||
|
italic = {
|
||||||
|
family = "Maple Mono NF";
|
||||||
|
style = "Italic";
|
||||||
|
};
|
||||||
|
bold_italic = {
|
||||||
|
family = "Maple Mono NF";
|
||||||
|
style = "Bold Italic";
|
||||||
|
};
|
||||||
size = 14.0;
|
size = 14.0;
|
||||||
};
|
};
|
||||||
colors = {
|
colors = {
|
||||||
|
|
@ -346,7 +355,7 @@ in {
|
||||||
logo_size = "small";
|
logo_size = "small";
|
||||||
pride_month_disable = false;
|
pride_month_disable = false;
|
||||||
pride_month_shown = [];
|
pride_month_shown = [];
|
||||||
color_align = { mode = "horizontal"; };
|
color_align = {mode = "horizontal";};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -366,11 +375,11 @@ in {
|
||||||
nameserver 10.1.1.2
|
nameserver 10.1.1.2
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
networking.firewall.allowedTCPPorts = [80 443];
|
||||||
networking.firewall.allowedUDPPorts = [ 80 443 ];
|
networking.firewall.allowedUDPPorts = [80 443];
|
||||||
# Or disable the firewall altogether.
|
# Or disable the firewall altogether.
|
||||||
# networking.firewall.enable = false;
|
# networking.firewall.enable = false;
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
|
|
@ -379,4 +388,4 @@ in {
|
||||||
# Before changing this value read the documentation for this option
|
# Before changing this value read the documentation for this option
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
system.stateVersion = "25.11"; # Did you read the comment?
|
system.stateVersion = "25.11"; # Did you read the comment?
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue