talon: switch community to submodule
This commit is contained in:
parent
d0d10112c3
commit
712a66f7f6
2 changed files with 42 additions and 33 deletions
|
@ -3,7 +3,10 @@
|
||||||
#
|
#
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
programs.ccache.enable = true;
|
programs.ccache = {
|
||||||
|
enable = true;
|
||||||
|
cacheDir = "/nix/var/cache/ccache";
|
||||||
|
};
|
||||||
nix.settings.extra-sandbox-paths = [ config.programs.ccache.cacheDir ];
|
nix.settings.extra-sandbox-paths = [ config.programs.ccache.cacheDir ];
|
||||||
|
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
|
@ -14,6 +17,11 @@
|
||||||
export CCACHE_DIR="${config.programs.ccache.cacheDir}"
|
export CCACHE_DIR="${config.programs.ccache.cacheDir}"
|
||||||
export CCACHE_UMASK=007
|
export CCACHE_UMASK=007
|
||||||
|
|
||||||
|
ls -lah /tmp
|
||||||
|
ls -lah /nix
|
||||||
|
ls -lah /nix/var
|
||||||
|
ls -lah /nix/var/cache
|
||||||
|
|
||||||
if [ ! -d "$CCACHE_DIR" ]; then
|
if [ ! -d "$CCACHE_DIR" ]; then
|
||||||
echo "====="
|
echo "====="
|
||||||
echo "Directory '$CCACHE_DIR' does not exist"
|
echo "Directory '$CCACHE_DIR' does not exist"
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
deprekages.humanfx
|
deprekages.humanfx
|
||||||
|
|
||||||
# NVIDIA tools.
|
# NVIDIA tools.
|
||||||
pkgs.nvitop
|
pkgs.nvitop
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -50,11 +50,11 @@
|
||||||
# Intel+NVIDIA / prime setup.
|
# Intel+NVIDIA / prime setup.
|
||||||
#
|
#
|
||||||
|
|
||||||
services.xserver.videoDrivers = ["nvidia"];
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
|
||||||
# Set up the NVIDIA half of the GPU setup.
|
# Set up the NVIDIA half of the GPU setup.
|
||||||
# These are used only in the "enabled" configuration.
|
# These are used only in the "enabled" configuration.
|
||||||
system.nixos.tags = ["Intel"];
|
system.nixos.tags = [ "Intel" ];
|
||||||
hardware.nvidia = {
|
hardware.nvidia = {
|
||||||
modesetting.enable = true;
|
modesetting.enable = true;
|
||||||
|
|
||||||
|
@ -64,39 +64,51 @@
|
||||||
# Enable the nvidia-settings command.
|
# Enable the nvidia-settings command.
|
||||||
nvidiaSettings = true;
|
nvidiaSettings = true;
|
||||||
|
|
||||||
# Offloading setup: use GPU when asked for by command, and not otherwise.
|
# Offloading setup: use GPU when asked for by command, and not otherwise.
|
||||||
prime = {
|
prime = {
|
||||||
sync.enable = true;
|
sync.enable = true;
|
||||||
|
|
||||||
# Specify how to find our GPUs.
|
# Specify how to find our GPUs.
|
||||||
intelBusId = "PCI:0:2:0";
|
intelBusId = "PCI:0:2:0";
|
||||||
nvidiaBusId = "PCI:1:0:0";
|
nvidiaBusId = "PCI:1:0:0";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Disable the NVIDIA GPU unless we explicitly request it.
|
# Disable the NVIDIA GPU unless we explicitly request it.
|
||||||
hardware.nvidiaOptimus.disable = true;
|
hardware.nvidiaOptimus.disable = true;
|
||||||
|
|
||||||
# Provide a configuration that uses the full GPU power of the system.
|
# Provide a configuration that uses the full GPU power of the system.
|
||||||
specialisation.optimus.configuration = {
|
specialisation.optimus.configuration = {
|
||||||
system.nixos.tags = lib.mkForce ["NVIDIA"];
|
system.nixos.tags = lib.mkForce [ "NVIDIA" ];
|
||||||
|
|
||||||
# Don't disable optimus on this config.
|
# Don't disable optimus on this config.
|
||||||
hardware.nvidiaOptimus.disable = lib.mkForce false;
|
hardware.nvidiaOptimus.disable = lib.mkForce false;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Provide memtest86, since that's nice.
|
# Provide memtest86, since that's nice.
|
||||||
boot.loader.systemd-boot.memtest86.enable = true;
|
boot.loader.systemd-boot.memtest86.enable = true;
|
||||||
|
|
||||||
#
|
#
|
||||||
# Hardware config.
|
# Hardware config.
|
||||||
#
|
#
|
||||||
|
|
||||||
# Use the latest kernel, until the Dell stuff makes it into
|
# Use the latest kernel, and our patches, until the Dell+Alienware stuff makes it into
|
||||||
# more mainline kernels.~
|
# more mainline kernels. We'll include ccache so we can iterate sanely.
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
|
# Support the Dell Privacy Driver.
|
||||||
|
boot.kernelPatches = [
|
||||||
|
{
|
||||||
|
name = "enable-dell-privacy";
|
||||||
|
patch = ./00-support-dell-smbios.patch;
|
||||||
|
|
||||||
|
extraStructuredConfig = with lib.kernel; {
|
||||||
|
DELL_WMI_PRIVACY = yes;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [
|
boot.initrd.availableKernelModules = [
|
||||||
"xhci_pci"
|
"xhci_pci"
|
||||||
"thunderbolt"
|
"thunderbolt"
|
||||||
|
@ -115,17 +127,6 @@
|
||||||
];
|
];
|
||||||
boot.extraModulePackages = [ config.boot.kernelPackages.acpi_call ];
|
boot.extraModulePackages = [ config.boot.kernelPackages.acpi_call ];
|
||||||
|
|
||||||
# Support the Dell Privacy Driver.
|
|
||||||
boot.kernelPatches = [ {
|
|
||||||
name = "enable-dell-privacy";
|
|
||||||
patch = ./00-support-dell-smbios.patch;
|
|
||||||
|
|
||||||
extraStructuredConfig = with lib.kernel; {
|
|
||||||
DELL_WMI_PRIVACY = yes;
|
|
||||||
};
|
|
||||||
|
|
||||||
} ];
|
|
||||||
|
|
||||||
# Support thunderbolt.
|
# Support thunderbolt.
|
||||||
services.hardware.bolt.enable = true;
|
services.hardware.bolt.enable = true;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue