virtualisation, nix-index, and nvidia
This commit is contained in:
parent
455cc117b8
commit
434e6b2a9f
5 changed files with 64 additions and 8 deletions
|
@ -19,9 +19,10 @@
|
|||
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
enableNvidia = builtins.any (driver: driver == "nvidia") config.services.xserver.videoDrivers;
|
||||
};
|
||||
|
||||
virtualisation.containers.cdi.dynamic.nvidia.enable = builtins.any (driver: driver == "nvidia") config.services.xserver.videoDrivers;
|
||||
|
||||
virtualisation.vmware.host.enable = true;
|
||||
|
||||
programs.seahorse.enable = true;
|
||||
|
@ -37,8 +38,13 @@
|
|||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
firefox
|
||||
#jmtpfs
|
||||
];
|
||||
|
||||
services.gvfs.enable = true;
|
||||
|
||||
programs.adb.enable = true;
|
||||
|
||||
nix = let
|
||||
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
|
||||
in {
|
||||
|
@ -196,4 +202,53 @@
|
|||
(pkgs.nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];})
|
||||
];
|
||||
};
|
||||
|
||||
#nvidia
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
hardware.nvidia = {
|
||||
# Modesetting is required.
|
||||
modesetting.enable = true;
|
||||
|
||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||
# Enable this if you have graphical corruption issues or application crashes after waking
|
||||
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||
# of just the bare essentials.
|
||||
powerManagement.enable = false;
|
||||
|
||||
# Fine-grained power management. Turns off GPU when not in use.
|
||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||
powerManagement.finegrained = false;
|
||||
|
||||
# Use the NVidia open source kernel module (not to be confused with the
|
||||
# independent third-party "nouveau" open source driver).
|
||||
# Support is limited to the Turing and later architectures. Full list of
|
||||
# supported GPUs is at:
|
||||
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||
# Only available from driver 515.43.04+
|
||||
# Currently alpha-quality/buggy, so false is currently the recommended setting.
|
||||
open = false;
|
||||
|
||||
# Enable the Nvidia settings menu,
|
||||
# accessible via `nvidia-settings`.
|
||||
nvidiaSettings = true;
|
||||
|
||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
|
||||
prime = {
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ console_title_template = '{{if .Root}}(Admin){{end}} {{ .PWD }}'
|
|||
"{{if gt .Code 0}}red{{end}}"
|
||||
]
|
||||
background = 'transparent'
|
||||
template = '{{if eq .UserName "root" }}#{{else}}~{{end}}'
|
||||
template = '{{if eq .UserName "root" }}#{{else}}🞂{{end}}'
|
||||
|
||||
[transient_prompt]
|
||||
foreground_templates = [
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
programs.bat.enable = true;
|
||||
programs.eza.enable = true;
|
||||
programs.man.enable = true;
|
||||
programs.nix-index.enableZshIntegration = false;
|
||||
programs.nix-index.enableZshIntegration = true;
|
||||
home.packages = [
|
||||
pkgs.unstable.steam-run
|
||||
];
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
blockbench
|
||||
blender
|
||||
prismlauncher
|
||||
steam
|
||||
];
|
||||
};
|
||||
user.root = {
|
||||
|
|
|
@ -183,8 +183,8 @@ in {
|
|||
home-manager.users = lib.mkIf (config.user != null) (lib.attrsets.mapAttrs (name: userConfig: {
|
||||
imports =
|
||||
[
|
||||
inputs.nix-index-db.hmModules.nix-index
|
||||
]
|
||||
inputs.nix-index-db.hmModules.nix-index
|
||||
]
|
||||
++ (
|
||||
if name != "root"
|
||||
then [
|
||||
|
@ -303,9 +303,9 @@ in {
|
|||
};
|
||||
programs.home-manager.enable = true;
|
||||
programs.git.enable = true;
|
||||
programs.nix-index.enable = true;
|
||||
programs.nix-index.symlinkToCacheHome = true;
|
||||
programs.nix-index-database.comma.enable = true;
|
||||
programs.nix-index.enable = true;
|
||||
programs.nix-index.symlinkToCacheHome = true;
|
||||
programs.nix-index-database.comma.enable = true;
|
||||
systemd.user.startServices = "sd-switch";
|
||||
})
|
||||
config.user);
|
||||
|
|
Loading…
Reference in a new issue