mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2025-01-23 12:48:35 +01: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
|
||||
hardware.opengl = {
|
||||
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 = [
|
||||
./amd-opengl.nix
|
||||
./amd-steam.nix
|
||||
./steam.nix
|
||||
./autorun.nix
|
||||
./boot.nix
|
||||
./displaymanager.nix
|
||||
./intel-opengl.nix
|
||||
./intel-steam.nix
|
||||
./packages.nix
|
||||
./polkit.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";
|
||||
wallpaperDir = "/home/${username}/Pictures/Wallpapers";
|
||||
flakeDir = "/home/${username}/zaneyos";
|
||||
# Configuration option profile
|
||||
# default options amd-desktop, intel-laptop, vm (WIP)
|
||||
deviceProfile = "amd-desktop";
|
||||
# Driver selection profile
|
||||
# default options amd, intel, nvidia, vm (WIP)
|
||||
cpuType = "amd";
|
||||
gpuType = "amd";
|
||||
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
@ -50,8 +51,8 @@
|
||||
inherit gitUsername; inherit theTimezone;
|
||||
inherit gitEmail; inherit theLocale;
|
||||
inherit wallpaperDir; inherit wallpaperGit;
|
||||
inherit deviceProfile; inherit theKBDLayout;
|
||||
inherit theLCVariables;
|
||||
inherit cpuType; inherit theKBDLayout;
|
||||
inherit theLCVariables; inherit gpuType;
|
||||
};
|
||||
modules = [ ./system.nix
|
||||
home-manager.nixosModules.home-manager {
|
||||
|
Loading…
Reference in New Issue
Block a user