{ config, pkgs, devenv, ... }: { # enable flakes globally nix.settings.experimental-features = [ "nix-command" "flakes" ]; # Set your time zone. time.timeZone = "Asia/Shanghai"; # Select internationalisation properties. i18n.defaultLocale = "en_US.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"; }; # all fonts are linked to /nix/var/nix/profiles/system/sw/share/X11/fonts fonts = { # use fonts specified by user rather than default ones enableDefaultFonts = false; fontDir.enable = true; fonts = with pkgs; [ # icon fonts material-design-icons font-awesome # 思源系列字体是 Adobe 主导的。其中汉字部分被称为「思源黑体」和「思源宋体」,是由 Adobe + Google 共同开发的 source-sans # 无衬线字体,不含汉字。字族名叫 Source Sans 3 和 Source Sans Pro,以及带字重的变体,加上 Source Sans 3 VF source-han-sans # 思源黑体 # nerdfonts (nerdfonts.override { fonts = [ "FiraCode" "JetBrainsMono" "Iosevka" ];}) ]; # user defined fonts # the reason there's Noto Color Emoji everywhere is to override DejaVu's # B&W emojis that would sometimes show instead of some Color emojis fontconfig.defaultFonts = { sansSerif = [ "Noto Sans" "Noto Color Emoji" ]; monospace = [ "JetBrainsMono Nerd Font" "Noto Color Emoji" ]; emoji = [ "Noto Color Emoji" ]; }; }; # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ]; # Or disable the firewall altogether. networking.firewall.enable = false; # Enable the OpenSSH daemon. services.openssh = { enable = true; settings = { X11Forwarding = true; PermitRootLogin = "no"; # disable root login PasswordAuthentication = false; # disable password login }; openFirewall = true; }; # Allow unfree packages nixpkgs.config.allowUnfree = true; # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. wget curl aria2 git # used by nix flakes git-lfs # used by huggingface models ]; # replace default editor with neovim environment.variables.EDITOR = "nvim"; # for power management services.power-profiles-daemon = { enable = true; }; services.upower.enable = true; }