Switching to flakes and adding home-manager

This commit is contained in:
Lyes Saadi 2024-04-24 20:55:22 +02:00
parent 32e9c2b93c
commit 97d648948f
No known key found for this signature in database
GPG key ID: 17418538BAA17767
9 changed files with 124 additions and 26 deletions

View file

@ -1,11 +1,31 @@
{ config, ... }:
{
imports =
[
<nixos-hardware/lenovo/thinkpad/x1-extreme/gen4>
];
# Optimisation
# nixpkgs.hostPlatform = {
# gcc.arch = "tigerlake";
# gcc.tune = "tigerlake";
# system = "x86_64-linux";
# };
nix.settings.system-features = [ "gccarch-tigerlake" "nixos-test" "benchmark" "big-parallel" "kvm" ];
# Increasing the limit of files to help with compilation
security.pam.loginLimits = [{
domain = "*";
type = "soft";
item = "nofile";
value = "8192";
}];
# Disabling failing test
# nixpkgs.overlays = [ (final: prev: {
# orc = prev.orc.overrideAttrs (_: { doCheck = false; });
# }) ];
# NVidia
services.xserver.videoDrivers = [ "nvidia" ];
hardware.opengl = {
@ -28,4 +48,7 @@
# Optionally, you may need to select the appropriate driver version for your specific GPU
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
}
# For containers
virtualisation.containers.cdi.dynamic.nvidia.enable = true;
}