add hardware stuff and switching kaladin to an RX 6700

This commit is contained in:
Chris Cochrun 2023-04-07 15:08:24 -05:00
parent b1ca96c9d7
commit 5ecb11d825
3 changed files with 31 additions and 12 deletions

View file

@ -319,6 +319,22 @@
"type": "github" "type": "github"
} }
}, },
"nixos-hardware": {
"locked": {
"lastModified": 1680070330,
"narHash": "sha256-aoT2YZCd9LEtiEULFLIF0ykKydgE72X8gw/k9/pRS5I=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "a6aa8174fa61e55bd7e62d35464d3092aefe0421",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "master",
"repo": "nixos-hardware",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1677676435, "lastModified": 1677676435,
@ -469,6 +485,7 @@
"hyprland": "hyprland", "hyprland": "hyprland",
"libre-presenter": "libre-presenter", "libre-presenter": "libre-presenter",
"nix-bitcoin": "nix-bitcoin", "nix-bitcoin": "nix-bitcoin",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_5",
"nixpkgs-stable": "nixpkgs-stable", "nixpkgs-stable": "nixpkgs-stable",
"simple-nixos-mailserver": "simple-nixos-mailserver" "simple-nixos-mailserver": "simple-nixos-mailserver"

View file

@ -4,6 +4,7 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-22.11"; nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-22.11";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
home-manager = { home-manager = {
url = "github:nix-community/home-manager/master"; url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -30,7 +31,7 @@
}; };
}; };
outputs = { nixpkgs, nixpkgs-stable, home-manager, hyprland, emacs, nix-bitcoin, libre-presenter, ... }: outputs = { nixpkgs, nixpkgs-stable, home-manager, hyprland, nixos-hardware, emacs, nix-bitcoin, libre-presenter, ... }:
let let
system = "x86_64-linux"; system = "x86_64-linux";
username = "chris"; username = "chris";
@ -102,6 +103,7 @@
./system/kaladin/configuration.nix ./system/kaladin/configuration.nix
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
hyprland.nixosModules.default hyprland.nixosModules.default
nixos-hardware.nixosModules.common-gpu-amd
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;

View file

@ -17,7 +17,7 @@
networking.interfaces.wlp7s0.useDHCP = true; networking.interfaces.wlp7s0.useDHCP = true;
# NVIDIA # NVIDIA
services.xserver.videoDrivers = [ "nvidia" ]; # services.xserver.videoDrivers = [ "nvidia" ];
hardware = { hardware = {
opengl = { opengl = {
enable = true; enable = true;
@ -26,18 +26,18 @@
libvdpau-va-gl libvdpau-va-gl
]; ];
}; };
nvidia = { # nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.beta; # package = config.boot.kernelPackages.nvidiaPackages.beta;
modesetting.enable = true; # modesetting.enable = true;
powerManagement.enable = true; # powerManagement.enable = true;
}; # };
}; };
services.xserver.screenSection = '' # services.xserver.screenSection = ''
Option "metamodes" "nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On}" # Option "metamodes" "nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On}"
Option "AllowIndirectGLXProtocol" "off" # Option "AllowIndirectGLXProtocol" "off"
Option "TripleBuffer" "on" # Option "TripleBuffer" "on"
''; # '';
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.chris = { users.users.chris = {