diff options
Diffstat (limited to '')
-rw-r--r-- | flake.nix | 9 | ||||
-rw-r--r-- | hosts/arrakis/hardware-configuration.nix | 9 |
2 files changed, 14 insertions, 4 deletions
@@ -23,6 +23,11 @@ nixpkgs-stable.url = "github:nixos/nixpkgs/release-24.05"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; + nvidia-patch = { + url = "github:icewind1991/nvidia-patch-nixos"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; + sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs-unstable"; @@ -30,14 +35,14 @@ }; - outputs = inputs@{ home-manager-stable, home-manager-unstable, nixos-hardware, nixpkgs-stable, nixpkgs-unstable, sops-nix, ... }: { + outputs = inputs@{ home-manager-stable, home-manager-unstable, nixos-hardware, nixpkgs-stable, nixpkgs-unstable, nvidia-patch, sops-nix, ... }: { nixosConfigurations = { arrakis = nixpkgs-unstable.lib.nixosSystem rec { system = "x86_64-linux"; - specialArgs = { + specialArgs = { inherit inputs; pkgs = import nixpkgs-unstable { inherit system; config.allowUnfree = true; diff --git a/hosts/arrakis/hardware-configuration.nix b/hosts/arrakis/hardware-configuration.nix index ed9b51e..bbf171f 100644 --- a/hosts/arrakis/hardware-configuration.nix +++ b/hosts/arrakis/hardware-configuration.nix @@ -1,8 +1,11 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: +{ config, inputs, lib, pkgs, modulesPath, ... }: +let + package = config.boot.kernelPackages.nvidiaPackages.beta; +in { imports = [ #(modulesPath + "/installer/scan/not-detected.nix") @@ -88,6 +91,8 @@ { device = "/dev/disk/by-label/swap2"; } ]; + nixpkgs.overlays = [ inputs.nvidia-patch.overlays.default ]; + hardware = { bluetooth.enable = true; graphics = { @@ -98,7 +103,7 @@ nvidia = { modesetting.enable = true; open = true; - package = config.boot.kernelPackages.nvidiaPackages.beta; + package = pkgs.nvidia-patch.patch-nvenc (pkgs.nvidia-patch.patch-fbc package); }; }; } |