mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2025-06-21 12:32:51 +02:00
Streamlining variables for hardware drivers
This commit is contained in:
parent
d88288c66e
commit
c1179e4a9b
@ -1,6 +1,6 @@
|
|||||||
{ pkgs, config, lib, deviceProfile, ... }:
|
{ pkgs, config, lib, gpuType, ... }:
|
||||||
|
|
||||||
lib.mkIf ("${deviceProfile}" == "amd-desktop") {
|
lib.mkIf ("${gpuType}" == "amd") {
|
||||||
# OpenGL
|
# OpenGL
|
||||||
hardware.opengl = {
|
hardware.opengl = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
{ pkgs, config, lib, deviceProfile, ... }:
|
|
||||||
|
|
||||||
lib.mkIf ("${deviceProfile}" == "amd-desktop") {
|
|
||||||
# Steam Configuration
|
|
||||||
programs.steam = {
|
|
||||||
enable = true;
|
|
||||||
remotePlay.openFirewall = true;
|
|
||||||
dedicatedServer.openFirewall = true;
|
|
||||||
};
|
|
||||||
}
|
|
@ -3,12 +3,11 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./amd-opengl.nix
|
./amd-opengl.nix
|
||||||
./amd-steam.nix
|
./steam.nix
|
||||||
./autorun.nix
|
./autorun.nix
|
||||||
./boot.nix
|
./boot.nix
|
||||||
./displaymanager.nix
|
./displaymanager.nix
|
||||||
./intel-opengl.nix
|
./intel-opengl.nix
|
||||||
./intel-steam.nix
|
|
||||||
./packages.nix
|
./packages.nix
|
||||||
./polkit.nix
|
./polkit.nix
|
||||||
./services.nix
|
./services.nix
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
{ pkgs, config, lib, deviceProfile, ... }:
|
|
||||||
|
|
||||||
lib.mkIf ("${deviceProfile}" == "intel-laptop") {
|
|
||||||
# Steam Configuration
|
|
||||||
programs.steam = {
|
|
||||||
enable = true;
|
|
||||||
remotePlay.openFirewall = true;
|
|
||||||
dedicatedServer.openFirewall = true;
|
|
||||||
package = pkgs.steam.override {
|
|
||||||
withPrimus = true;
|
|
||||||
extraPkgs = pkgs: [ pkgs.bumblebee pkgs.glxinfo ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
16
config/system/steam.nix
Normal file
16
config/system/steam.nix
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{ pkgs, config, lib, cpuType, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# Steam Configuration
|
||||||
|
programs.steam = {
|
||||||
|
enable = true;
|
||||||
|
remotePlay.openFirewall = true;
|
||||||
|
dedicatedServer.openFirewall = true;
|
||||||
|
package = lib.mkIf ("${cpuType}" == "intel") {
|
||||||
|
pkgs.steam.override {
|
||||||
|
withPrimus = true;
|
||||||
|
extraPkgs = pkgs: [ pkgs.bumblebee pkgs.glxinfo ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
11
flake.nix
11
flake.nix
@ -31,9 +31,10 @@
|
|||||||
wallpaperGit = "https://gitlab.com/Zaney/my-wallpapers.git";
|
wallpaperGit = "https://gitlab.com/Zaney/my-wallpapers.git";
|
||||||
wallpaperDir = "/home/${username}/Pictures/Wallpapers";
|
wallpaperDir = "/home/${username}/Pictures/Wallpapers";
|
||||||
flakeDir = "/home/${username}/zaneyos";
|
flakeDir = "/home/${username}/zaneyos";
|
||||||
# Configuration option profile
|
# Driver selection profile
|
||||||
# default options amd-desktop, intel-laptop, vm (WIP)
|
# default options amd, intel, nvidia, vm (WIP)
|
||||||
deviceProfile = "amd-desktop";
|
cpuType = "amd";
|
||||||
|
gpuType = "amd";
|
||||||
|
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
@ -50,8 +51,8 @@
|
|||||||
inherit gitUsername; inherit theTimezone;
|
inherit gitUsername; inherit theTimezone;
|
||||||
inherit gitEmail; inherit theLocale;
|
inherit gitEmail; inherit theLocale;
|
||||||
inherit wallpaperDir; inherit wallpaperGit;
|
inherit wallpaperDir; inherit wallpaperGit;
|
||||||
inherit deviceProfile; inherit theKBDLayout;
|
inherit cpuType; inherit theKBDLayout;
|
||||||
inherit theLCVariables;
|
inherit theLCVariables; inherit gpuType;
|
||||||
};
|
};
|
||||||
modules = [ ./system.nix
|
modules = [ ./system.nix
|
||||||
home-manager.nixosModules.home-manager {
|
home-manager.nixosModules.home-manager {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user