my nix configs for my servers and desktop
1# hosts/buer/configuration.nix (or default.nix)
2{ config, lib, pkgs, modulesPath, inputs, ... }:
3{
4 # =============================================================================
5 # IMPORTS
6 # =============================================================================
7 imports = [
8 # Host-specific hardware
9 ./hardware.nix
10 ./secrets.nix
11
12 # Common modules shared across hosts
13 ../../common/system.nix
14 ../../common/users.nix
15 ../../common/services.nix
16
17 # Common secrets
18 ../../host-secrets.nix
19 ];
20
21 # =============================================================================
22 # SYSTEM CONFIGURATION
23 # =============================================================================
24 system.stateVersion = "24.11";
25 nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
26
27 # Intel microcode updates
28 hardware.cpu.intel.updateMicrocode = lib.mkDefault
29 config.hardware.enableRedistributableFirmware;
30
31 # =============================================================================
32 # CUSTOM MODULES
33 # =============================================================================
34 modules.garage.enable = true;
35
36 # =============================================================================
37 # BOOT CONFIGURATION
38 # =============================================================================
39 boot.loader.grub = {
40 enable = true;
41 device = "/dev/vda";
42 };
43
44 # =============================================================================
45 # NETWORKING
46 # =============================================================================
47 networking = {
48 hostName = "buer";
49 hostId = "1418d29e";
50 firewall.enable = false;
51 useDHCP = false;
52 };
53
54 # Static IP configuration via systemd-networkd
55 systemd.network = {
56 enable = true;
57 networks."10-wan" = {
58 matchConfig.Name = "ens3";
59 address = [
60 "103.251.165.107/24"
61 "2a04:52c0:0135:48d1::2/48"
62 ];
63 gateway = [
64 "103.251.165.1"
65 "2a04:52c0:0135::1"
66 ];
67 dns = [
68 "2a01:6340:1:20:4::10"
69 "2a04:52c0:130:2a5c::10"
70 "185.31.172.240"
71 "5.255.125.240"
72 ];
73 };
74 };
75
76 # =============================================================================
77 # VIRTUALIZATION
78 # =============================================================================
79 virtualisation.docker = {
80 enable = true;
81 enableOnBoot = true;
82 package = pkgs.docker.override {
83 buildGoModule = pkgs.buildGo123Module;
84 };
85 };
86
87 # =============================================================================
88 # PACKAGES
89 # =============================================================================
90 environment.systemPackages = with pkgs; [
91 inputs.agenix.packages.x86_64-linux.default
92 ];
93
94 # =============================================================================
95 # COMMENTED OUT / DISABLED
96 # =============================================================================
97 # ZFS support (not needed for this VPS)
98 # boot.supportedFilesystems = [ "zfs" ];
99 # boot.kernelModules = [ "nct6775" "coretemp" ];
100 # services.zfs.autoScrub.enable = true;
101 # services.zfs.trim.enable = true;
102
103 # Additional packages (not needed)
104 # lm_sensors
105 # code-server
106}