# 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’). { pkgs, lib, config, inputs, ... }: { # Bootloader. boot.kernelPackages = pkgs.linuxPackages_zen; boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; # services.asusd = { # 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"; programs.virt-manager.enable = true; virtualisation = { libvirtd.enable = true; spiceUSBRedirection.enable = true; }; networking = { hostName = "Tytonidae"; networkmanager.enable = false; useNetworkd = true; useDHCP = false; wireless.iwd = { enable = true; settings = { General = { EnableNetworkConfiguration = true; }; Network = { EnableIPv6 = true; NameResolvingService = "systemd"; }; }; }; }; systemd.network = { enable = true; wait-online.enable = false; networks = { "eno2" = { matchConfig.Name = "eno2"; networkConfig = { DHCP = "yes"; IPv6AcceptRA = true; }; }; }; }; time.timeZone = "Asia/Shanghai"; i18n.defaultLocale = "zh_CN.UTF-8"; i18n.extraLocaleSettings = { LC_ADDRESS = "zh_CN.UTF-8"; LC_IDENTIFICATION = "zh_CN.UTF-8"; LC_MEASUREMENT = "zh_CN.UTF-8"; LC_MONETARY = "zh_CN.UTF-8"; LC_NAME = "zh_CN.UTF-8"; LC_NUMERIC = "zh_CN.UTF-8"; LC_PAPER = "zh_CN.UTF-8"; LC_TELEPHONE = "zh_CN.UTF-8"; LC_TIME = "zh_CN.UTF-8"; }; i18n.inputMethod = { enable = true; type = "fcitx5"; fcitx5 = { addons = with pkgs; [ libsForQt5.fcitx5-qt fcitx5-gtk fcitx5-configtool fcitx5-chinese-addons (fcitx5-rime.override { rimeDataPkgs = [ rime-data nur.repos.xddxdd.rime-ice nur.repos.xddxdd.rime-zhwiki nur.repos.xddxdd.rime-moegirl ]; }) ]; waylandFrontend = true; }; }; # Enable the X11 windowing system. # You can disable this if you're only using the Wayland session. services.xserver = { display = 0; enable = true; }; # Enable the KDE Plasma Desktop Environment. # services.displayManager.sddm.enable = true; # services.desktopManager.plasma6.enable = true; services.desktopManager.cosmic.enable = true; services.displayManager.cosmic-greeter.enable = true; programs.niri.enable = true; # Configure keymap in X11 services.xserver.xkb = { layout = "cn"; variant = ""; }; # Enable CUPS to print documents. services.printing.enable = true; services.openssh = { enable = true; settings = { PasswordAuthentication = false; KbdInteractiveAuthentication = false; X11Forwarding = true; PermitRootLogin = "no"; LogLevel = "VERBOSE"; Macs = [ "hmac-sha2-512-etm@openssh.com" "hmac-sha2-256-etm@openssh.com" "umac-128-etm@openssh.com" "hmac-sha2-512" "hmac-sha2-256" "umac-128@openssh.com" ]; Ciphers = [ "chacha20-poly1305@openssh.com" "aes256-gcm@openssh.com" "aes128-gcm@openssh.com" "aes256-ctr" "aes192-ctr" "aes128-ctr" ]; KexAlgorithms = [ "curve25519-sha256@libssh.org" "ecdh-sha2-nistp521" "ecdh-sha2-nistp384" "ecdh-sha2-nistp256" "diffie-hellman-group-exchange-sha256" ]; }; ports = [ 3022 ]; }; programs.localsend.enable = true; # Enable sound with pipewire. services.pulseaudio.enable = false; security.rtkit.enable = true; services.pipewire = { enable = true; alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; # If you want to use JACK applications, uncomment this #jack.enable = true; # use the example session manager (no others are packaged yet so this is enabled by default, # no need to redefine it in your config for now) #media-session.enable = true; }; # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true; # Define a user account. Don't forget to set a password with ‘passwd’. users.users.david = { isNormalUser = true; description = "david"; extraGroups = [ "networkmanager" "libvirtd" "wheel" ]; }; # Install firefox. programs.firefox.enable = true; # Allow unfree packages nixpkgs.config.allowUnfree = true; # List packages installed in system profile. To search, run: environment.systemPackages = with pkgs; [ nix-output-monitor wget git vim helix nixd nixfmt-rfc-style noto-fonts-cjk-sans noto-fonts-cjk-serif ]; environment.variables.EDITOR = "hx"; # 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; # }; # List services that you want to enable: # 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.nix or on https://nixos.org/nixos/options.html). nix.settings.experimental-features = [ "nix-command" "flakes" ]; system.stateVersion = "24.11"; # Did you read the comment? }