my nix configs for my servers and desktop
1# hosts/valefar/configuration.nix (or default.nix)
2{ config, lib, system, pkgs, modulesPath, inputs, ... }:
3
4{
5 imports = [
6 # Host-specific hardware
7 ./hardware.nix
8 ./secrets.nix
9 ./vfio.nix
10
11 # Common modules shared across hosts
12 ../../common/system.nix
13 ../../common/users.nix
14 ../../common/services.nix
15 ../../common/efi.nix
16 ../../common/bluetooth.nix
17
18 # Desktop modules
19 ../../common/desktop/core.nix
20 ../../common/desktop/sway.nix
21 ../../common/desktop/vnc.nix
22
23 # Nvidia
24 ../../common/nvidia.nix
25
26 # Common secrets
27 #../../host-secrets.nix
28 ];
29
30 system.stateVersion = "25.05";
31
32 # pin host platform & microcode
33 nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
34
35 boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
36
37 networking.hostName = "focalor";
38 networking.hostId = "84bdc587";
39
40 systemd.network = {
41 enable = true;
42 netdevs."br0" = {
43 netdevConfig = {
44 Name = "br0";
45 Kind = "bridge";
46 };
47 };
48 networks = {
49 "10-lan" = {
50 matchConfig.Name = ["enp5s0" "vm-*"];
51 networkConfig = {
52 Bridge = "br0";
53 };
54 };
55 "10-lan-bridge" = {
56 matchConfig.Name = "br0";
57 networkConfig = {
58 Address = ["10.0.0.34/24" "2601:5c2:8400:26c0:aaa1:59ff:fe94:5aba/64"];
59 Gateway = "10.0.0.1";
60 DNS = ["10.0.0.210" "1.1.1.1"];
61 IPv6AcceptRA = true;
62 };
63 linkConfig.RequiredForOnline = "routable";
64 };
65 };
66 };
67
68 programs.steam.enable = true;
69
70 /*networking = {
71 firewall.enable = false;
72 firewall.trustedInterfaces = [
73 "tailscale0"
74 ];
75 nameservers = [ "10.0.0.210" "1.1.1.1" ];
76 useDHCP = true;
77 firewall.allowedTCPPorts = [22 80 443 2456 2457 9000 9001 9002];
78 };*/
79
80 services.resolved = {
81 enable = true;
82 dnssec = "true";
83 domains = [ "~." ];
84 fallbackDns = [ "10.0.0.210" "1.0.0.1#one.one.one.one" ];
85 dnsovertls = "true";
86 };
87
88 #boot.supportedFilesystems = [ "zfs" ];
89 #boot.kernelModules = [ "nct6775" "coretemp" ];
90
91 #services.zfs.autoScrub.enable = true;
92 #services.zfs.trim.enable = true;
93
94 services.vscode-server.enable = true;
95 services.vscode-server.nodejsPackage = pkgs.nodejs_20;
96
97
98 programs.obs-studio = {
99 enable = true;
100 enableVirtualCamera = true;
101 plugins = with pkgs.obs-studio-plugins; [
102 droidcam-obs
103 ];
104 };
105
106 environment.systemPackages = with pkgs; [
107 #lm_sensors
108 #code-server
109 inputs.agenix.packages.x86_64-linux.default
110 ];
111
112 environment.sessionVariables.WLR_RENDERER = "vulkan";
113
114 virtualisation.docker = {
115 enable = true;
116 enableOnBoot = true;
117 package = pkgs.docker.override {
118 buildGoModule = pkgs.buildGo123Module;
119 };
120 };
121
122 xdg.portal = {
123 enable = true;
124 wlr.enable = true;
125 extraPortals = with pkgs; [
126 xdg-desktop-portal-gtk
127 xdg-desktop-portal-gnome
128 ];
129 };
130}