{ config, pkgs, lib, inputs, ... }: { boot = { loader = { systemd-boot.enable = true; efi.canTouchEfiVariables = true; systemd-boot.configurationLimit = 10; timeout = 0; }; consoleLogLevel = 3; extraModulePackages = [ config.boot.kernelPackages.kvmfr ]; kernelParams = [ "quiet" "rd.udev.log_level=3" "rd.systemd.show_status=auto" "kvmfr.static_size_mb=256" ]; initrd = { verbose = false; kernelModules = [ "vfio" "vfio_pci" "vfio_iommu_type1" "kvmfr" ]; }; kernelModules = [ "ntsync" ]; plymouth = { enable = true; theme = "bgrt"; }; }; fonts = { fontconfig = { enable = true; subpixel.rgba = "none"; hinting.style = "slight"; }; }; services = { # Allow kvmfr module to be used by QEMU/KVM. udev.packages = [ (pkgs.writeTextFile { name = "kvmfr"; text = '' SUBSYSTEM=="kvmfr", GROUP="kvm", MODE="0660", TAG+="uaccess" ''; destination = "/etc/udev/rules.d/70-kvmfr.rules"; }) ]; flatpak = { packages = [ { appId = "com.github.dynobo.normcap"; origin = "flathub"; } { appId = "com.usebottles.bottles"; origin = "flathub"; } { appId = "io.github.ungoogled_software.ungoogled_chromium"; origin = "flathub"; } { appId = "org.gtk.Gtk3theme.Breeze"; origin = "flathub"; } { appId = "io.mpv.Mpv"; origin = "flathub"; } ]; }; # Configures snapshots for home subvolume. # Requires /home/.snapshots subvolume to function. snapper = { snapshotInterval = "hourly"; cleanupInterval = "1d"; configs = { home = { SUBVOLUME = "/home"; TIMELINE_CREATE = true; TIMELINE_CLEANUP = true; TIMELINE_LIMIT_HOURLY = "10"; TIMELINE_LIMIT_DAILY = "7"; TIMELINE_LIMIT_WEEKLY = "2"; TIMELINE_LIMIT_MONTHLY = "0"; TIMELINE_LIMIT_YEARLY = "0"; BACKGROUND_COMPARISON = "yes"; NUMBER_CLEANUP = "no"; NUMBER_MIN_AGE = "1800"; NUMBER_LIMIT = "50"; NUMBER_LIMIT_IMPORTANT = "10"; EMPTY_PRE_POST_CLEANUP = "yes"; EMPTY_PRE_POST_MIN_AGE = "1800"; }; }; }; # Enable KMSCON DRM TTY. kmscon = { enable = true; config = { hwAccel = true; term = "xterm-256color"; font-name = "Hack Nerd Font Mono"; }; }; # Configure pipewire. Disables 32Bit ALSA since it causes build errors # and is largely vestigial. pipewire = { enable = true; pulse.enable = true; alsa.enable = true; alsa.support32Bit = lib.mkForce false; }; openssh.enable = true; affinity-thumbnailer.enable = true; # Enables m(ulticast)DNS (a.k.a. Bonjour) support. avahi = { enable = true; nssmdns4 = true; openFirewall = true; }; }; networking = { wireless.enable = true; networkmanager.enable = true; networkmanager.plugins = with pkgs; [ networkmanager-openvpn ]; firewall = { trustedInterfaces = [ "virbr0" "br0" ]; allowedTCPPortRanges = [ { from = 1714; to = 1764; } # KDE Connect ]; allowedUDPPortRanges = [ { from = 1714; to = 1764; } # KDE Connect ]; allowedTCPPorts = [ 22 ]; }; }; time.timeZone = "America/New_York"; i18n = { defaultLocale = "en_US.UTF-8"; extraLocales = [ "ja_JP.UTF-8/UTF-8" ]; extraLocaleSettings = { LC_ADDRESS = "en_US.UTF-8"; LC_IDENTIFICATION = "en_US.UTF-8"; LC_MEASUREMENT = "en_US.UTF-8"; LC_MONETARY = "en_US.UTF-8"; LC_NAME = "en_US.UTF-8"; LC_NUMERIC = "en_US.UTF-8"; LC_PAPER = "en_US.UTF-8"; LC_TELEPHONE = "en_US.UTF-8"; LC_TIME = "en_US.UTF-8"; }; }; security.rtkit.enable = true; programs = { gnupg.agent = { enable = true; pinentryPackage = pkgs.pinentry-qt; }; nix-ld = { enable = true; libraries = with pkgs; [ stdenv.cc.cc.lib openssl zlib icu curl libxcrypt-legacy gcc pkg-config busybox libdrm mesa libxkbcommon fontconfig libglvnd freetype libxcb libx11 libice libsm libxcursor libxrandr libxft skia dotnet-sdk dotnet-runtime dotnet-runtime_8 dotnet-runtime_10 ]; }; bash = { enable = true; interactiveShellInit = '' eval "$(jump shell)" bind -x '"\eOQ": clear;fastfetch' ''; }; starship = { enable = true; settings = { character = { success_symbol = "[λ](bold green)"; error_symbol = "[λ](bold red)"; }; }; }; virt-manager.enable = true; ssh.startAgent = true; firefox.enable = true; thunderbird.enable = true; appimage = { enable = true; binfmt = true; }; neovim = { enable = true; defaultEditor = true; vimAlias = true; configure = { customRC = '' set nocompatible set backspace=indent,eol,start set tabstop=2 set shiftwidth=2 set expandtab ''; packages.myPlugins = with pkgs.vimPlugins; { start = [ vim-lastplace vim-nix ]; opt = [ ]; }; }; }; }; virtualisation = { docker.enable = true; spiceUSBRedirection.enable = true; libvirtd = { enable = true; qemu = { package = pkgs.qemu_kvm; runAsRoot = true; swtpm.enable = true; verbatimConfig = '' namespaces = [] cgroup_device_acl = [ "/dev/null", "/dev/full", "/dev/zero", "/dev/random", "/dev/urandom", "/dev/ptmx", "/dev/kvm", "/dev/kqemu", "/dev/rtc","/dev/hpet", "/dev/vfio/vfio", "/dev/kvmfr0" ] ''; }; }; }; users.users.frank = { isNormalUser = true; description = "Frank LoTurco"; extraGroups = [ "networkmanager" "wheel" "moonshine" "libvirtd" "input" "video" "docker" "uinput" ]; }; nixpkgs = { config.allowUnfree = true; # Fix msitools compiling and failing it's test-suite. overlays = [ (final: prev: { msitools = prev.msitools.overrideAttrs (old: { doCheck = false; }); }) inputs.affinity-nix.overlays.default ]; }; nix = { gc = { automatic = true; dates = "weekly"; options = "--delete-older-than 30d"; }; optimise = { automatic = true; dates = "weekly"; }; settings = { experimental-features = [ "nix-command" "flakes" ]; use-xdg-base-directories = true; }; }; environment = { systemPackages = with pkgs; [ wget dnsmasq guestfs-tools unrar p7zip btrfs-assistant nil bash-language-server nerd-fonts.hack jump weather kdePackages.kfind desktop-file-utils openjdk openjdk17 openjdk25 tmux zathura hunspell hunspellDicts.en_US hyphenDicts.en_US affinity-v3 libreoffice-qt qimgv fastfetch vorta distrobox devenv ripgrep inputs.appimage-manager.packages.${pkgs.stdenv.hostPlatform.system}.default inputs.gloomberb.packages.${pkgs.stdenv.hostPlatform.system}.default inputs.pi.packages.${pkgs.stdenv.hostPlatform.system}.default (python3.withPackages ( python-pkgs: with python-pkgs; [ requests pandas ] )) (callPackage ../../packages/virtiofsd-looking-glass/package.nix { }) (callPackage ../../packages/heidisql/package.nix { }) (callPackage ../../packages/looking-glass-client/package.nix { }) ]; shellAliases = import ../../features/aliases.nix { inherit pkgs; }; sessionVariables = import ../../features/xdg.nix { inherit pkgs; }; }; system.stateVersion = "26.05"; }