{ config, lib, pkgs, ... }: let inherit (import ./settings.nix) user font scheme; in { wsl = { enable = true; defaultUser = user; useWindowsDriver = true; }; users.users.${user}.extraGroups = [ "audio" "video" ]; nix = { settings = { experimental-features = [ "nix-command" "flakes" ]; trusted-users = [ user ]; }; }; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; boot.supportedFilesystems = [ "ntfs" "nfs" ]; boot.kernelParams = [ "mitigations=off" ]; nixpkgs.config.allowUnfree = true; hardware.enableRedistributableFirmware = true; networking.hostName = "wsl-dev"; networking.firewall.enable = false; services.pulseaudio.enable = true; xdg.portal = { enable = true; extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; config.common.default = "*"; }; environment.systemPackages = with pkgs; [ git htop neovim kitty pavucontrol glxinfo neofetch cmatrix ]; # @TEMP: https://github.com/nix-community/NixOS-WSL/issues/650 # Needed for Wayland. systemd.services."user-runtime-dir@" = { overrideStrategy = "asDropin"; serviceConfig.ExecStart = [ "" # unset old value "${pkgs.coreutils}/bin/true" ]; }; fonts = { fontDir.enable = true; packages = with pkgs; [ corefonts vistafonts noto-fonts noto-fonts-extra noto-fonts-cjk-sans noto-fonts-cjk-serif noto-fonts-emoji-blob-bin ubuntu_font_family ]; fontconfig = { enable = true; includeUserConf = false; antialias = true; hinting.enable = true; allowBitmaps = true; subpixel = { rgba = "rgb"; lcdfilter = "default"; }; defaultFonts = { serif = [ "Ubuntu Light" ]; sansSerif = [ "Ubuntu Light" ]; monospace = [ font.name ]; emoji = [ "Blobmoji" ]; }; }; }; environment.sessionVariables = { TERMINAL = "kitty"; }; home-manager.users.${user} = let homeDir = "${config.users.users.${user}.home}"; in { programs.bash = { enable = true; enableCompletion = false; initExtra = '' PS1="\u@\H:\w > " ''; }; programs.kitty = { enable = true; font = { name = font.name; size = font.size; }; shellIntegration = { mode = "enabled"; enableBashIntegration = true; }; extraConfig = '' shell ${pkgs.bashInteractive}/bin/bash --login update_check_interval 0 confirm_os_window_close 0 enable_audio_bell no allow_remote_control yes linux_display_server x11 initial_window_width 800 initial_window_height 600 remember_window_size yes placement_strategy top-left disable_ligatures always modify_font baseline ${font.baseline} cursor #${scheme.foreground} foreground #${scheme.foreground} background #${scheme.background} color0 #${scheme.color0} color1 #${scheme.color1} color2 #${scheme.color2} color3 #${scheme.color3} color4 #${scheme.color4} color5 #${scheme.color5} color6 #${scheme.color6} color7 #${scheme.color7} color8 #${scheme.color8} color9 #${scheme.color9} color10 #${scheme.color10} color11 #${scheme.color11} color12 #${scheme.color12} color13 #${scheme.color13} color14 #${scheme.color14} color15 #${scheme.color15} selection_foreground #${scheme.background} selection_background #${scheme.color6} mark1_foreground #${scheme.background} mark1_background #${scheme.color5} mark2_foreground #${scheme.background} mark2_background #${scheme.color6} mark3_foreground #${scheme.background} mark3_background #${scheme.color4} background_opacity 0.965 ''; }; programs.neovim = { enable = true; viAlias = true; vimAlias = true; }; home.stateVersion = "${config.system.stateVersion}"; }; system.stateVersion = "25.05"; }