From 9f61ec8200365405cf4053e233a741b9e13d6ddd Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Mon, 10 Aug 2026 22:02:49 -0400 Subject: [PATCH] add: add estinien configuration --- modules/machine/estinien/configuration.nix | 104 ++++++++++++++++++ modules/machine/estinien/default.nix | 6 + .../estinien/hardware-configuration.nix | 0 3 files changed, 110 insertions(+) create mode 100644 modules/machine/estinien/configuration.nix create mode 100644 modules/machine/estinien/default.nix create mode 100644 modules/machine/estinien/hardware-configuration.nix diff --git a/modules/machine/estinien/configuration.nix b/modules/machine/estinien/configuration.nix new file mode 100644 index 0000000..25c03ee --- /dev/null +++ b/modules/machine/estinien/configuration.nix @@ -0,0 +1,104 @@ +{ + pkgs, + userName, + nur, + ... +}: let + nurPkgs = import "${nur.outPath}/pkgs" { + inherit pkgs; + hildibrand = nur.inputs.hildibrand.packages.${pkgs.stdenv.hostPlatform.system}.default; + }; +in { + imports = [ + ../../pwrMgmt + ../../networking/core.nix + ]; + + # Enable flakes for NixOS + nix.settings.experimental-features = ["nix-command" "flakes"]; + + # Custom kernel/boot stuff + boot.kernelPackages = pkgs.linuxPackages_latest; + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # Set your timezone + time.timeZone = "America/Detroit"; + + # Enable OpenSSH + services.openssh.enable = true; + + # Enable keyring + services.gnome.gnome-keyring.enable = true; + + # Enable GnuPG + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + + # Enable SUID wrappers (some programs need them) + programs.mtr.enable = true; + + # Enable Polkit + security.polkit.enable = true; + + # Power management (see ../../pwrMgmt/default.nix) + pwrMgmt = { + enable = true; + cpuFreqGovernor = "performance"; + powertop.enable = false; + }; + + network = { + firewall = { + enable = true; + }; + networkManager.enable = true; + }; + + environment.systemPackages = [ + nurPkgs.hildibrand + ]; + + systemd.services.vintagestory-server = { + description = "Vintage Story Server"; + wantedBy = [ "multi-user.target" ]; + after = [ "network.target" ]; + serviceConfig = { + Type = "simple"; + User = userName; + WorkingDirectory = "/home/${userName}"; + ExecStart = "${nurPkgs.hildibrand}/bin/hildibrand"; + Restart = "on-failure"; + RestartSec = "5s"; + }; + }; + + # Add username to groups "wheel" and "video" - more may be added here later + users = { + groups.hazel = {}; + users = { + ${userName} = { + extraGroups = [ "wheel" "network" ]; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFV9eSc9L+aJLoKoexq2f/jb5rpyZnhuGiyhS8YQAbaS wyatt@wyattjmiller.com" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO4WKvKnnYpTbzZHFEslOKyfiiMqWxhW3AfX6E7ACmYU wyatt@wyattjmiller.com" + ]; + }; + }; + }; + + services.fail2ban = { + enable = true; + package = pkgs.fail2ban; + maxretry = 5; + bantime = "3h"; + bantime-increment = { + enable = true; + rndtime = "10m"; + }; + }; + + system.stateVersion = "24.11"; +} diff --git a/modules/machine/estinien/default.nix b/modules/machine/estinien/default.nix new file mode 100644 index 0000000..3c4d411 --- /dev/null +++ b/modules/machine/estinien/default.nix @@ -0,0 +1,6 @@ +{ ... }: { + imports = [ + ./configuration.nix + ./hardware-configuration.nix + ]; +} diff --git a/modules/machine/estinien/hardware-configuration.nix b/modules/machine/estinien/hardware-configuration.nix new file mode 100644 index 0000000..e69de29