Files
nixos-config/modules/system.nix
2023-11-21 00:39:36 -04:00

131 lines
3.5 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ config, pkgs, ... }:
{
# 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";
};
# Enable CUPS to print documents.
services.printing.enable = true;
fonts = {
fonts = with pkgs; [
# icon fonts
material-design-icons
# normal fonts
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
# nerdfonts
(nerdfonts.override { fonts = [ "FiraCode" "JetBrainsMono" ]; })
];
# use fonts specified by user rather than default ones
enableDefaultFonts = false;
# 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 = {
serif = [ "Noto Serif" "Noto Color Emoji" ];
sansSerif = [ "Noto Sans" "Noto Color Emoji" ];
monospace = [ "JetBrainsMono Nerd Font" "Noto Color Emoji" ];
emoji = [ "Noto Color Emoji" ];
};
};
programs.dconf.enable = true;
# 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; [
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget
curl
git
sysstat
lm_sensors # for `sensors` command
# minimal screen capture tool, used by i3 blur lock to take a screenshot
# print screen key is also bound to this tool in i3 config
scrot
neofetch
xfce.thunar # xfce4's file manager
nnn # terminal file manager
];
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
services.power-profiles-daemon = {
enable = true;
};
security.polkit.enable = true;
services = {
dbus.packages = [ pkgs.gcr ];
geoclue2.enable = true;
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;
};
udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
};
# Define a user account. Don't forget to set a password with passwd.
users.users.panotaka = {
isNormalUser = true;
description = "panotaka";
extraGroups = [ "networkmanager" "wheel" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJx3Sk20pLL1b2PPKZey2oTyioODrErq83xG78YpFBoj admin@ryan-MBP"
];
};
}