update nvidia driver, install ghostty and other things

This commit is contained in:
Ulic-youthlic 2024-12-28 18:56:04 +08:00
parent 9a525dadfc
commit 19ef41633b
11 changed files with 319 additions and 166 deletions

View file

@ -4,66 +4,53 @@
{
pkgs,
lib,
config,
inputs,
...
}:
{
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
hardware.graphics = {
enable = true;
};
services.xserver.videoDrivers = [
"nvidia"
];
services.asusd = {
enable = true;
};
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = false;
open = false;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.beta;
prime = {
sync.enable = true;
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
};
networking.hostName = "Tytonidae"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# 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;
};
# Enable networking
networking.networkmanager.enable = true;
networking = {
hostName = "Tytonidae";
networkmanager.enable = false;
useNetworkd = true;
useDHCP = false;
};
systemd.network = {
enable = true;
wait-online.enable = false;
networks = {
"eno2" = {
matchConfig.Name = "eno2";
networkConfig = {
DHCP = "yes";
IPv6AcceptRA = true;
};
};
};
};
# Set your time zone.
time.timeZone = "Asia/Shanghai";
# Select internationalisation properties.
i18n.defaultLocale = "zh_CN.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "zh_CN.UTF-8";
LC_IDENTIFICATION = "zh_CN.UTF-8";
@ -179,12 +166,9 @@
description = "david";
extraGroups = [
"networkmanager"
"libvirtd"
"wheel"
];
# packages = with pkgs; [
# kdePackages.kate
# # thunderbird
# ];
};
# Install firefox.
@ -194,12 +178,11 @@
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
wget
git
vim
inputs.helix.packages."${pkgs.system}".default
helix
nixd
nixfmt-rfc-style
noto-fonts-cjk-sans
@ -217,14 +200,11 @@
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions