mirror of
https://codeberg.org/muon/home.git
synced 2026-03-09 03:53:11 +00:00
Add dotfiles
This commit is contained in:
commit
39fe550b3e
45 changed files with 4363 additions and 0 deletions
10
modules/unfree/default.nix
Normal file
10
modules/unfree/default.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./nvidia.nix
|
||||
./flatpak.nix
|
||||
];
|
||||
}
|
||||
12
modules/unfree/flatpak.nix
Normal file
12
modules/unfree/flatpak.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
# Don't like flatpak, even though it's free
|
||||
# Only used to contain unfree packages
|
||||
xdg.portal.enable = true;
|
||||
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
services.flatpak.enable = true;
|
||||
}
|
||||
71
modules/unfree/nvidia.nix
Normal file
71
modules/unfree/nvidia.nix
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
# Unfree </3
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfreePredicate = pkg:
|
||||
builtins.elem (lib.getName pkg) [
|
||||
"nvidia-x11"
|
||||
"nvidia-settings"
|
||||
"steam"
|
||||
"steam-original"
|
||||
"steam-run"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
# environment.variables = {
|
||||
# GBM_BACKEND = "nvidia-drm";
|
||||
# LIBVA_DRIVER_NAME = "nvidia";
|
||||
# __GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||
# };
|
||||
|
||||
services.picom = {
|
||||
enable = true;
|
||||
vSync = true;
|
||||
settings = {
|
||||
"unredir-if-possible" = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.steam.enable = true;
|
||||
|
||||
hardware = {
|
||||
opengl = {
|
||||
# this fixes the "glXChooseVisual failed" bug, context: https://github.com/NixOS/nixpkgs/issues/47932
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
|
||||
# optionally enable 32bit pulseaudio support if pulseaudio is enabled
|
||||
pulseaudio.support32Bit = config.hardware.pulseaudio.enable;
|
||||
|
||||
nvidia = {
|
||||
open = false;
|
||||
modesetting.enable = true;
|
||||
nvidiaSettings = true;
|
||||
forceFullCompositionPipeline = true;
|
||||
|
||||
# powerManagement.enable = true;
|
||||
# prime = {
|
||||
# reverseSync.enable = true;
|
||||
# # offload = {
|
||||
# # enable = true;
|
||||
# # enableOffloadCmd = true;
|
||||
# # };
|
||||
|
||||
# intelBusId = "PCI:0:2:0";
|
||||
# nvidiaBusId = "PCI:1:0:0";
|
||||
# };
|
||||
};
|
||||
|
||||
opengl.extraPackages = with pkgs; [nvidia-vaapi-driver];
|
||||
};
|
||||
}
|
||||
20
modules/unfree/prime.nix
Normal file
20
modules/unfree/prime.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
hardware.nvidia = {
|
||||
powerManagement.enable = true;
|
||||
prime = {
|
||||
reverseSync.enable = true;
|
||||
# offload = {
|
||||
# enable = true;
|
||||
# enableOffloadCmd = true;
|
||||
# };
|
||||
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue