This commit is contained in:
Leon Liu 2024-11-18 15:18:31 +09:00
parent 9fa9bf0266
commit e4ec7da616
3 changed files with 43 additions and 41 deletions

View File

@ -56,52 +56,52 @@ in
}; };
# Enable the X11 windowing system. # Enable the X11 windowing system.
services.xserver.enable = true; # services.xserver.enable = true;
# Enable the GNOME Desktop Environment. # Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = true; # services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true; # services.xserver.desktopManager.gnome.enable = true;
# Configure keymap in X11 # Configure keymap in X11
services.xserver = { # services.xserver = {
layout = "us"; # layout = "us";
xkbVariant = ""; # xkbVariant = "";
}; # };
# Enable CUPS to print documents. # Enable CUPS to print documents.
services.printing.enable = true; # services.printing.enable = true;
# Enable sound with pipewire. # Enable sound with pipewire.
hardware.pulseaudio.enable = false; # hardware.pulseaudio.enable = false;
security.rtkit.enable = true; # security.rtkit.enable = true;
services.pipewire = { # services.pipewire = {
enable = true; # enable = true;
alsa.enable = true; # alsa.enable = true;
alsa.support32Bit = true; # alsa.support32Bit = true;
pulse.enable = true; # pulse.enable = true;
# If you want to use JACK applications, uncomment this # If you want to use JACK applications, uncomment this
#jack.enable = true; #jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default, # 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) # no need to redefine it in your config for now)
#media-session.enable = true; #media-session.enable = true;
}; # };
i18n.inputMethod = { # i18n.inputMethod = {
enabled = "fcitx5"; # enabled = "fcitx5";
fcitx5.addons = with pkgs; [ # fcitx5.addons = with pkgs; [
fcitx5-mozc # fcitx5-mozc
fcitx5-gtk # fcitx5-gtk
fcitx5-configtool # fcitx5-configtool
fcitx5-chinese-addons # fcitx5-chinese-addons
]; # ];
}; # };
programs.steam = { # programs.steam = {
enable = false; # enable = false;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play # remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server # dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
}; # };
# Enable touchpad support (enabled default in most desktopManager). # Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true; # services.xserver.libinput.enable = true;
@ -136,15 +136,15 @@ in
}; };
# Enable automatic login for the user. # Enable automatic login for the user.
services.xserver.displayManager.autoLogin.enable = true; # services.xserver.displayManager.autoLogin.enable = true;
services.xserver.displayManager.autoLogin.user = "liu"; # services.xserver.displayManager.autoLogin.user = "liu";
# Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229 # Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
systemd.services."getty@tty1".enable = false; # systemd.services."getty@tty1".enable = false;
systemd.services."autovt@tty1".enable = false; # systemd.services."autovt@tty1".enable = false;
systemd.services.NetworkManager-wait-online.enable = lib.mkForce false; # systemd.services.NetworkManager-wait-online.enable = lib.mkForce false;
systemd.services.systemd-networkd-wait-online.enable = lib.mkForce false; # systemd.services.systemd-networkd-wait-online.enable = lib.mkForce false;
systemd.services.easytier = { systemd.services.easytier = {
enable = true; enable = true;
@ -166,7 +166,7 @@ in
# Allow unfree packages # Allow unfree packages
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
# services.netclient.enable = true; # services.netclient.enable = true;
services.netbird.enable = true; # services.netbird.enable = true;
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
@ -221,7 +221,7 @@ in
# networking.firewall.allowedUDPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether. # Or disable the firewall altogether.
networking.firewall.enable = false; networking.firewall.enable = false;
services.tailscale.enable = false; # services.tailscale.enable = false;
services.adguardhome.enable = true; services.adguardhome.enable = true;
services.ollama = { services.ollama = {
enable = true; enable = true;

View File

@ -38,9 +38,9 @@
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.opengl = { hardware.graphics = {
enable = true; enable = true;
driSupport32Bit = true; enable32Bit = true;
}; };
# Load nvidia driver for Xorg and Wayland # Load nvidia driver for Xorg and Wayland

View File

@ -106,7 +106,9 @@
programs.zsh = { programs.zsh = {
enable = true; enable = true;
enableCompletion = true; enableCompletion = true;
enableAutosuggestions = true; autosuggestions = {
enable = true;
};
oh-my-zsh = { oh-my-zsh = {
enable = true; enable = true;
plugins = [ "git" "history-substring-search" ]; plugins = [ "git" "history-substring-search" ];