mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-14 00:22:39 +02:00
feat: simplify flake.nix
This commit is contained in:
+11
-12
@@ -1,11 +1,9 @@
|
||||
{ config, ... } @ args:
|
||||
|
||||
{config, ...} @ args:
|
||||
#############################################################
|
||||
#
|
||||
# Ai - my main computer, with NixOS + I5-13600KF + RTX 4090 GPU, for gaming & daily use.
|
||||
#
|
||||
#############################################################
|
||||
|
||||
{
|
||||
imports = [
|
||||
./cifs-mount.nix
|
||||
@@ -24,7 +22,7 @@
|
||||
nixpkgs.overlays = import ../../../overlays args;
|
||||
|
||||
# Enable binfmt emulation of aarch64-linux, this is required for cross compilation.
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" "riscv64-linux" ];
|
||||
boot.binfmt.emulatedSystems = ["aarch64-linux" "riscv64-linux"];
|
||||
# supported fil systems, so we can mount any removable disks with these filesystems
|
||||
boot.supportedFilesystems = [
|
||||
"ext4"
|
||||
@@ -60,10 +58,12 @@
|
||||
enableIPv6 = false; # disable ipv6
|
||||
interfaces.enp5s0 = {
|
||||
useDHCP = false;
|
||||
ipv4.addresses = [{
|
||||
address = "192.168.5.100";
|
||||
prefixLength = 24;
|
||||
}];
|
||||
ipv4.addresses = [
|
||||
{
|
||||
address = "192.168.5.100";
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
};
|
||||
defaultGateway = "192.168.5.201";
|
||||
nameservers = [
|
||||
@@ -75,17 +75,17 @@
|
||||
virtualisation.docker.storageDriver = "btrfs";
|
||||
|
||||
# for Nvidia GPU
|
||||
services.xserver.videoDrivers = [ "nvidia" ]; # will install nvidia-vaapi-driver by default
|
||||
services.xserver.videoDrivers = ["nvidia"]; # will install nvidia-vaapi-driver by default
|
||||
hardware.nvidia = {
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
};
|
||||
virtualisation.docker.enableNvidia = true; # for nvidia-docker
|
||||
virtualisation.docker.enableNvidia = true; # for nvidia-docker
|
||||
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
# if hardware.opengl.driSupport is enabled, mesa is installed and provides Vulkan for supported hardware.
|
||||
# if hardware.opengl.driSupport is enabled, mesa is installed and provides Vulkan for supported hardware.
|
||||
driSupport = true;
|
||||
# needed by nvidia-docker
|
||||
driSupport32Bit = true;
|
||||
@@ -98,5 +98,4 @@
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "22.11"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user