# Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). { config, lib, pkgs, blocklist-hosts, username, name, hostname, timezone, locale, wm, theme, ... }: with lib; let nixos-wsl = import ./nixos-wsl; in { imports = [ nixos-wsl.nixosModules.wsl ../../system/hardware/kernel.nix # Kernel config ../../system/hardware/systemd.nix # systemd config ../../system/hardware/time.nix # Network time sync ../../system/hardware/opengl.nix ../../system/hardware/printing.nix ../../system/hardware/bluetooth.nix ../../system/security/doas.nix ../../system/security/gpg.nix ../../system/security/blocklist.nix ../../system/security/firewall.nix ../../system/security/firejail.nix ../../system/style/stylix.nix ]; wsl = { enable = true; automountPath = "/mnt"; defaultUser = username; startMenuLaunchers = true; # Enable native Docker support # docker-native.enable = true; # Enable integration with Docker Desktop (needs to be installed) # docker-desktop.enable = true; }; # Fix nix path nix.nixPath = [ "nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos" "nixos-config=$HOME/dotfiles/system/configuration.nix" "/nix/var/nix/profiles/per-user/root/channels" ]; # Experimental features nix.settings.experimental-features = [ "nix-command" "flakes" ]; # Ensure nix flakes are enabled nix.package = pkgs.nixFlakes; nix.extraOptions = '' experimental-features = nix-command flakes ''; # I'm sorry Stallman-taichou nixpkgs.config.allowUnfree = true; # Kernel modules boot.kernelModules = [ "i2c-dev" "i2c-piix4" "cpufreq_powersave" ]; # Networking networking.hostName = hostname; # Define your hostname. # Timezone and locale time.timeZone = timezone; # time zone i18n.defaultLocale = locale; i18n.extraLocaleSettings = { LC_ADDRESS = locale; LC_IDENTIFICATION = locale; LC_MEASUREMENT = locale; LC_MONETARY = locale; LC_NAME = locale; LC_NUMERIC = locale; LC_PAPER = locale; LC_TELEPHONE = locale; LC_TIME = locale; }; # User account users.users.${username} = { isNormalUser = true; description = name; extraGroups = [ "networkmanager" "wheel" ]; packages = with pkgs; []; uid = 1000; }; # System packages environment.systemPackages = with pkgs; [ vim wget zsh git home-manager ]; # I use zsh btw environment.shells = with pkgs; [ zsh ]; users.defaultUserShell = pkgs.zsh; programs.zsh.enable = true; xdg.portal = { enable = true; extraPortals = [ pkgs.xdg-desktop-portal pkgs.xdg-desktop-portal-gtk ]; }; # It is ok to leave this unchanged for compatibility purposes system.stateVersion = "22.05"; }