updates; add forgejo

This commit is contained in:
Stefan Kempinger 2025-11-02 20:31:54 +01:00
parent 7d42965a0a
commit e591a7a60c
3 changed files with 96 additions and 22 deletions

View file

@ -2,7 +2,13 @@
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, specialArgs, ... }:
{
config,
lib,
pkgs,
specialArgs,
...
}:
{
imports = [
@ -18,7 +24,10 @@
# Bootloader and kernel
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelParams = [ "vga=791" "nomodeset" ];
boot.kernelParams = [
"vga=791"
"nomodeset"
];
boot.kernel.sysctl = {
"net.ipv4.ip_forward" = 1;
# "net.bridge.bridge-nf-call-iptables" = 1;
@ -36,14 +45,22 @@
# Networking
networking.hostName = "nixos-server";
networking.useDHCP = false;
networking.interfaces.eth0.ipv4.addresses = [{
address = "192.168.69.69";
prefixLength = 24;
}];
networking.interfaces.eth0.ipv4.addresses = [
{
address = "192.168.69.69";
prefixLength = 24;
}
];
networking.defaultGateway = "192.168.69.1";
networking.nameservers = [ "1.1.1.1" ];
networking.firewall.enable = true;
networking.firewall.allowedTCPPorts = [ 22 80 443 9000 ];
networking.firewall.allowedTCPPorts = [
22
80
443
3000
9000
];
# Users
users.users.root = {
@ -86,7 +103,10 @@
];
# Nix settings
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nix.gc = {
automatic = true;
dates = "weekly";
@ -112,8 +132,6 @@
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.configurationRevision = lib.mkIf (specialArgs.inputs.self ? rev) specialArgs.inputs.self.rev;
system.stateVersion = "25.05"; # Did you read the comment?
}