Compare commits
No commits in common. "b91982601fcb18fc4d8913089ea0d03797815527" and "53b88094328d0062db49c4d64a6c0b92f8f135ae" have entirely different histories.
b91982601f
...
53b8809432
3 changed files with 0 additions and 60 deletions
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
debug = true;
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
{ config, ... }:
|
||||
let
|
||||
cfg = config.flake;
|
||||
in
|
||||
{
|
||||
allowedUnfreePackages = [
|
||||
"nvidia-x11"
|
||||
"nvidia-settings"
|
||||
];
|
||||
flake.modules.nixos.default =
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
hostName,
|
||||
...
|
||||
}:
|
||||
let
|
||||
gpu = cfg.manifest.hosts.nixos.${hostName}.machine.gpu or "";
|
||||
in
|
||||
if gpu == "nvidia" then
|
||||
{
|
||||
hardware = {
|
||||
graphics.enable = true;
|
||||
graphics.extraPackages = [ pkgs.nvidia-vaapi-driver ];
|
||||
nvidia.open = true;
|
||||
nvidia.package = config.boot.kernelPackages.nvidiaPackages.latest;
|
||||
};
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
environment.variables = {
|
||||
LIBVA_DRIVER_NAME = "nvidia";
|
||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||
NVD_BACKEND = "direct";
|
||||
};
|
||||
nix.settings.substituters = [ "https://cuda-maintainers.cachix.org" ];
|
||||
nix.settings.trusted-public-keys = [
|
||||
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
|
||||
];
|
||||
}
|
||||
else
|
||||
{ };
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
{ lib, config, ... }:
|
||||
let
|
||||
inherit (builtins) elem;
|
||||
inherit (lib) mkOption getName;
|
||||
inherit (lib.types) listOf str;
|
||||
predicate = pkg: elem (getName pkg) config.allowedUnfreePackages;
|
||||
in
|
||||
{
|
||||
options.allowedUnfreePackages = mkOption {
|
||||
type = listOf str;
|
||||
default = [ ];
|
||||
};
|
||||
config.flake.modules.nixos.default = {
|
||||
nixpkgs.config.allowUnfreePredicate = predicate;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue