feat: simplify flake.nix

This commit is contained in:
Ryan Yin
2023-07-26 20:07:42 +08:00
parent eebbb9f5e6
commit 204cb03922
70 changed files with 1183 additions and 1165 deletions
+11 -12
View File
@@ -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?
}