# Edit this configuration file to define what should be installed on # 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, ... }: { imports = [ # Include the results of the hardware scan... ./hardware-configuration.nix ./hwaccel.nix ./network.nix # ...and additional configurations... ./var_reg.nix ./vars.nix # System ./users.nix ./program-homemanager.nix ./ssh.nix ./program-tmux.nix # Services ./wireguard.nix ./docker.nix ./chrony.nix ./docker-device-mapper.nix ./seaweedfs-mount.nix ]; # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; # Enable IP forwarding for NAT (used in wireguard.nix) and load specific modules. boot.kernel.sysctl = { "net.ipv4.ip_forward" = 1; "net.ipv6.conf.all.forwarding" = 1; }; boot.kernelModules = [ "rbd" "nbd" ]; hardware.bluetooth.enable = true; hardware.bluetooth.settings = { General = { Experimental = true; }; }; networking.hostName = config.vars.hostname; networking.hostId = config.vars.hostid; networking = { interfaces = let primaryInterface = lib.head config.vars.interfaces; secondaryInterfaces = lib.tail config.vars.interfaces; in lib.foldr (name: acc: acc // { ${name}.useDHCP = true; }) ( { ${primaryInterface}.ipv4.addresses = [{ address = config.vars.local_ip; prefixLength = 24; }]; } ) secondaryInterfaces; }; networking.defaultGateway = { address = "192.168.178.1"; interface = lib.head config.vars.interfaces; # Sticking with the primary interface }; networking.nameservers = [ "192.168.178.10" "9.9.9.9" ]; # Set your time zone. time.timeZone = "Europe/Berlin"; # Configure network proxy if necessary # networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; # Enable the X11 windowing system. services.xserver.enable = false; # Enable CUPS to print documents. services.printing.enable = false; # Enable sound. services.pulseaudio.enable = false; # Enable touchpad support (enabled default in most desktopManager). services.libinput.enable = false; # Define a user account. Don't forget to set a password with ‘passwd’. security.sudo.wheelNeedsPassword = false; users.defaultUserShell = pkgs.zsh; # Allow unfree software and packages nixpkgs.config.allowUnfree = true; # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ wget htop ncdu git zsh zoxide fzf intel-gpu-tools ]; # Open ports in the firewall. # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ]; # Or disable the firewall altogether. networking.firewall.enable = false; # Copy the NixOS configuration file and link it from the resulting system # (/run/current-system/configuration.nix). This is useful in case you # accidentally delete configuration.nix. system.copySystemConfiguration = true; # DO NOT TOUCH!!!!!!!!!!!!!!!!!!!!!!!!!! # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . system.stateVersion = config.vars.stateVersion; # Set via host-specific vars.nix # DO NOT TOUCH!!!!!!!!!!!!!!!!!!!!!!!!!! }