Update to 24.11
This commit is contained in:
parent
79310cc53a
commit
81baaf8391
17 changed files with 94 additions and 80 deletions
|
@ -9,6 +9,7 @@
|
|||
];
|
||||
files = [
|
||||
"/etc/machine-id"
|
||||
"/root/.gitconfig"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [ unstable.impala ];
|
||||
systemPackages = with pkgs; [ impala ];
|
||||
persistence."/persist".directories = [ "/var/lib/iwd/" ];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports = [ ./nvidia ];
|
||||
imports = [
|
||||
./nvidia
|
||||
./nouveau
|
||||
];
|
||||
|
||||
hardware.opengl = {
|
||||
hardware.graphics = {
|
||||
enable = config.system.desktop.enable;
|
||||
driSupport32Bit = true;
|
||||
enable32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
vulkan-loader
|
||||
vulkan-validation-layers
|
||||
|
|
15
modules/system/devices/video/nouveau/default.nix
Normal file
15
modules/system/devices/video/nouveau/default.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
{
|
||||
options.system.video.nouveau = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable the open-source Nouveau driver";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.system.video.nouveau.enable {
|
||||
services.xserver.videoDrivers = [ "nouveau" ];
|
||||
boot.kernelParams = [ "nouveau.config=NvGspRm=1" ];
|
||||
};
|
||||
}
|
|
@ -1,30 +1,14 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
{
|
||||
options.system.video = {
|
||||
nvidia = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable the proprietary Nvidia stack";
|
||||
};
|
||||
};
|
||||
nouveau = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable the open-source Nouveau driver";
|
||||
};
|
||||
options.system.video.nvidia = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable the proprietary Nvidia stack";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
# Conditionally set video drivers based on the options
|
||||
services.xserver.videoDrivers =
|
||||
if config.system.video.nvidia.enable then [ "nvidia" ]
|
||||
else if config.system.video.nouveau.enable then [ "nouveau" ]
|
||||
else [];
|
||||
|
||||
# Configure Nvidia settings if Nvidia is enabled
|
||||
config = lib.mkIf config.system.video.nvidia.enable {
|
||||
hardware = {
|
||||
nvidia = lib.mkIf config.system.video.nvidia.enable {
|
||||
modesetting.enable = true;
|
||||
|
@ -32,7 +16,10 @@
|
|||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
open = false;
|
||||
};
|
||||
opengl.extraPackages = with pkgs; [ nvidia-vaapi-driver ];
|
||||
graphics.extraPackages = with pkgs; [ nvidia-vaapi-driver ];
|
||||
};
|
||||
|
||||
boot.kernelParams = [ "nvidia_drm.fbdev=1" ];
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
./dconf
|
||||
./gaming
|
||||
./git
|
||||
./nh
|
||||
./qt
|
||||
./security
|
||||
./shells
|
||||
|
|
8
modules/system/programs/nh/default.nix
Normal file
8
modules/system/programs/nh/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
clean.enable = true;
|
||||
flake = "/etc/nixos";
|
||||
};
|
||||
}
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
programs.sway = {
|
||||
enable = config.system.desktop.enable;
|
||||
package = pkgs.unstable.sway;
|
||||
extraPackages = with pkgs; [ swaylock ];
|
||||
};
|
||||
|
||||
|
|
|
@ -8,11 +8,6 @@
|
|||
];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 1w";
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue