my nix configs for my servers and desktop
1# hosts/valefar/configuration.nix (or default.nix)
2{ config, lib, pkgs, modulesPath, inputs, ... }:
3
4{
5 imports = [
6 # Host-specific hardware
7 ./hardware.nix
8 ./secrets.nix
9
10 # Common modules shared across hosts
11 ../../common/system.nix
12 ../../common/users.nix
13 ../../common/services.nix
14
15
16 # Common secrets
17 ../../host-secrets.nix
18 ];
19
20 system.stateVersion = "24.11";
21 modules.garage.enable = true;
22
23 # pin host platform & microcode
24 nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
25 hardware.cpu.intel.updateMicrocode = lib.mkDefault
26 config.hardware.enableRedistributableFirmware;
27
28 boot.loader.grub.enable = true;
29 boot.loader.grub.device = "/dev/vda";
30
31 networking.hostName = "buer";
32 networking.hostId = "1418d29e";
33 networking.firewall.enable = false;
34 networking.useDHCP = false;
35 systemd.network.enable = true;
36 systemd.network.networks."10-wan" = {
37 matchConfig.Name = "ens3";
38 address = [
39 "103.251.165.107/24"
40 "2a04:52c0:0135:48d1::2/48"
41 ];
42 gateway = [
43 "103.251.165.1"
44 "2a04:52c0:0135::1"
45 ];
46 dns = [
47 "2a01:6340:1:20:4::10"
48 "2a04:52c0:130:2a5c::10"
49 "185.31.172.240"
50 "5.255.125.240"
51 ];
52 };
53
54 #boot.supportedFilesystems = [ "zfs" ];
55 #boot.kernelModules = [ "nct6775" "coretemp" ];
56
57 #services.zfs.autoScrub.enable = true;
58 #services.zfs.trim.enable = true;
59
60 environment.systemPackages = with pkgs; [
61 #lm_sensors
62 #code-server
63 inputs.agenix.packages.x86_64-linux.default
64 ];
65
66 virtualisation.docker = {
67 enable = true;
68 enableOnBoot = true;
69 package = pkgs.docker.override {
70 buildGoModule = pkgs.buildGo123Module;
71 };
72 };
73}