# Edit this configuration file to define what should be installed on # your system. Help is available in the configuration-knot.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). { config, pkgs, lib, ... }: let home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/release-25.11.tar.gz"; in { # Home Manager Configuration imports = [ (import "${home-manager}/nixos") ]; ## Ensure that configuration is copied after installing this NixOS image system.copySystemConfiguration = true; # Use Lix instead of Nix nixpkgs.overlays = [ (final: prev: { inherit (prev.lixPackageSets.stable) nixpkgs-review nix-eval-jobs nix-fast-build colmena ; }) ]; nix.package = pkgs.lixPackageSets.stable.lix; # Bootloader - GRUB for Proxmox # Bootloader - systemd-boot with UEFI boot.loader.grub.enable = lib.mkForce false; boot. loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = false; boot.loader.efi.efiSysMountPoint = "/boot"; # Proxmox configuration proxmox.qemuConf = { bios = "ovmf"; # Use OVMF for UEFI }; boot.initrd.availableKernelModules = ["virtio_pci" "virtio_scsi" "ahci" "sd_mod"]; networking.hostName = "nixosp"; # Define your hostname. #networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # Enable Rsymc services.rsync.enable = true; # Configure network proxy if necessary # networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; # Enable networking networking.networkmanager.enable = true; networking.useDHCP = lib.mkDefault true; # Serial console for Proxmox boot.kernelParams = ["console=tty0" "console=ttyS0,115200"]; # Enable QEMU Guest for Proxmox integration services.qemuGuest.enable = true; services.spice-vdagentd.enable = true; # Enable SSH services.openssh = { enable = true; ports = [22]; settings = { PasswordAuthentication = false; AllowUsers = null; UseDns = true; PermitRootLogin = "no"; }; }; # Set your time zone. time.timeZone = "Europe/Copenhagen"; # Select internationalisation properties. i18n.defaultLocale = "en_GB.UTF-8"; i18n.extraLocaleSettings = { LC_ADDRESS = "et_EE.UTF-8"; LC_IDENTIFICATION = "et_EE.UTF-8"; LC_MEASUREMENT = "et_EE.UTF-8"; LC_MONETARY = "et_EE.UTF-8"; LC_NAME = "et_EE.UTF-8"; LC_NUMERIC = "et_EE.UTF-8"; LC_PAPER = "et_EE.UTF-8"; LC_TELEPHONE = "et_EE.UTF-8"; LC_TIME = "et_EE.UTF-8"; }; # Configure keymap in X11 services.xserver.xkb = { layout = "us"; variant = ""; }; # Enable Seatd for Wayland sessions # IMPORTANT: Enable seatd service for River WM services.seatd = { enable = true; logLevel = "info"; }; # Enable the gnome-keyring secrets vault. # Will be exposed through DBus to programs willing to store secrets. services.gnome.gnome-keyring.enable = true; # Enable Sway window manager programs.sway = { enable = true; wrapperFeatures.gtk = true; }; services.greetd = { enable = true; settings = { default_session = { command = "${pkgs.tuigreet}/bin/tuigreet --time --cmd sway"; user = "greeter"; }; }; }; # Configure security to allow seatd access security.polkit.enable = true; # Configure GPU support hardware.graphics = { enable = true; enable32Bit = true; }; # Define a user account. Don't forget to set a password with ‘passwd’. # Copy this later to generate more custom users. users.users.nixosp = { isNormalUser = true; description = "NixOS Playground"; extraGroups = ["networkmanager" "wheel" "seat"]; packages = with pkgs; []; initialPassword = "nixos"; # Simple, change on first login }; home-manager.users.nixosp = {pkgs, ...}: { home.packages = [ pkgs.atool pkgs.httpie pkgs.alacritty # Terminal emulator pkgs.hyfetch # Add fetching packages pkgs.macchina pkgs.wayland # Wayland display server pkgs.wlroots # Wayland compositor library pkgs.maple-mono.NF # Font for better terminal appearance pkgs.wl-clipboard # Clipboard utilities for Wayland pkgs.mako # Wayland Sway Notification Daemon pkgs.btop # Resource monitor ]; # Set Alacritty as the default terminal emulator home.sessionVariables = { TERMINAL = "alacritty"; }; # Use Zsh as the default shell programs.zsh.enable = true; # Configure Alacritty as the default terminal emulator programs.alacritty = { enable = true; settings = { # Window configuration window = { opacity = 1.0; padding = { x = 10; y = 10; }; }; # Font configuration - fixes spacing isues font = { normal = { family = "Maple Mono NF"; style = "Regular"; }; bold = { family = "Maple Mono NF"; style = "Bold"; }; italic = { family = "Maple Mono NF"; style = "Italic"; }; bold_italic = { family = "Maple Mono NF"; style = "Bold Italic"; }; size = 14.0; }; # Colors (optional - using default Alacritty colors) colors = { primary = { background = "#1e1e2e"; foreground = "#cdd6f4"; }; }; }; }; # Configure Hyfetch system info fetcher programs.hyfetch = { enable = true; settings = { preset = "lesbian"; # Use lesbian flag preset mode = "rgb"; # Use RGB color mode lightness = 0.55; # Set to 55% brightness backend = "macchina"; # Use macchina as the backend logo_size = "small"; # Make small logo pride_month_disable = false; # Enable pride month mode (or true to disable) pride_month_shown = []; # List of shown pride month flags color_align = { mode = "horizontal"; }; }; }; # The state version is required and should stay at the version you # originally installed. home.stateVersion = "25.11"; }; # Allow unfree packages nixpkgs.config.allowUnfree = true; # Passwordless sudo for wheel group security.sudo.wheelNeedsPassword = false; # Hardware U2F support - Passwordless sudo with hardware key security.pam.u2f = { enable = true; settings = { authfile = "/etc/u2f_keys"; cue = true; pinverification = 0; # No PIN verification userpresence = 1; # Require user presence (touch) }; }; # SSH Agent authentication security.pam.sshAgentAuth.enable = true; # Automatic upgrades system.autoUpgrade = { enable = true; # Set to true for automatic updates dates = "daily"; allowReboot = false; }; # System packages environment.systemPackages = with pkgs; [ # Network tools wget curl dig tcpdump ethtool iptables nftables iproute2 bridge-utils netcat-gnu traceroute mtr # Add the ability to create NixOS images nixos-generators # Monitoring btop htop iotop bandwhich # Editors micro vim helix # System info fastfetch lshw pciutils usbutils # Filesystem utilities btrfs-progs e2fsprogs ntfs3g dosfstools os-prober # Development tools knot-dns ]; # Enable zram swap zramSwap = { enable = true; memoryPercent = 50; }; # Some programs need SUID wrappers, can be configured further or are # started in user sessions. # programs.mtr.enable = true; # programs.gnupg.agent = { # enable = true; # enableSSHSupport = true; # }; # Attach the system to the IPFire network: set a static IP on the Proxmox bridge (vmbr0) # Adjust `vmbr0` and the address below to your environment. networking.interfaces.vmbr0.ipv4.addresses = [ { address = "192.168.2.6"; prefixLength = 24; } # Using this IP for DNS server ]; networking.defaultGateway = "192.168.2.1"; # Make the system use your new DNS by default (optional) networking.nameservers = ["192.168.2.6"]; # Expose DNS ports to the LAN networking.firewall.allowedUDPPorts = lib.mkDefault [53]; networking.firewall.allowedTCPPorts = lib.mkDefault [53]; # Knot configuration using YAML-like settings supported by the Nix module services.knot = { enable = true; settings = { server = [ { listen = ["192.168.2.6@53"]; identity = "knot-homelab"; pid-file = "/var/run/knot.pid"; # worker-count = 2; } ]; control = [ { listen = "127.0.0.1@7520"; } ]; log = [ { target = "syslog"; any = "info"; } ]; }; }; # List services that you want to enable: # Enable the OpenSSH daemon. # services.openssh.enable = true; # Open ports in the firewall. # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ]; # Or disable the firewall altogether. # networking.firewall.enable = false; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave # this value at the release version of the first install of this system. # Before changing this value read the documentation for this option # (e.g. man configuration-knot.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "25.11"; # Did you read the comment? }