Compare commits

...

2 Commits

Author SHA1 Message Date
b2a1f39893 switch to two boot modes: with or without dgpu 2025-01-13 13:34:30 +01:00
bbfec6ea9a switch back to explicit sync? 2025-01-13 11:52:23 +01:00
7 changed files with 88 additions and 80 deletions

16
flake.lock generated
View File

@ -7,16 +7,16 @@
]
},
"locked": {
"lastModified": 1720042825,
"narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=",
"lastModified": 1736373539,
"narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073",
"rev": "bd65bc3cde04c16755955630b344bc9e35272c56",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-24.05",
"ref": "release-24.11",
"repo": "home-manager",
"type": "github"
}
@ -39,16 +39,16 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1725001927,
"narHash": "sha256-eV+63gK0Mp7ygCR0Oy4yIYSNcum2VQwnZamHxYTNi+M=",
"lastModified": 1736549401,
"narHash": "sha256-ibkQrMHxF/7TqAYcQE+tOnIsSEzXmMegzyBWza6uHKM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "6e99f2a27d600612004fbd2c3282d614bfee6421",
"rev": "1dab772dd4a68a7bba5d9460685547ff8e17d899",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.05",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}

View File

@ -2,10 +2,10 @@
description = "Nix config entry point";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# Home manager
home-manager.url = "github:nix-community/home-manager/release-24.05";
home-manager.url = "github:nix-community/home-manager/release-24.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# Managing flatpak apps
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.4.1";

View File

@ -10,11 +10,11 @@ with lib.hm.gvariant;
}
{
id = "tilingshell@ferrarodomenico.com";
package = pkgs.gnome.gnome-shell-extensions;
package = pkgs.gnome-shell-extensions;
}
{
id = "search-light@icedman.github.com";
package = pkgs.gnome.gnome-shell-extensions;
package = pkgs.gnome-shell-extensions;
}
{
package = pkgs.gnomeExtensions.window-gestures;

View File

@ -1,6 +1,7 @@
{pkgs, ...}:
{
home.packages = [
pkgs.rquickshare
pkgs.owncloud-client
];
}

View File

@ -17,29 +17,29 @@
environment.gnome.excludePackages = (with pkgs; [
gnome-photos
gnome-tour
gnome.geary
geary
gedit
gnome.tali
gnome.gnome-music
gnome.cheese
tali
gnome-music
cheese
epiphany
gnome.gnome-calendar
gnome.gnome-maps
gnome.simple-scan
gnome.yelp
gnome.gnome-disk-utility
gnome.gnome-notes
gnome.gnome-weather
gnome-calendar
gnome-maps
simple-scan
yelp
gnome-disk-utility
gnome-notes
gnome-weather
gnome-secrets
gnome.gnome-characters
gnome.gnome-font-viewer
gnome.gnome-system-monitor
gnome-characters
gnome-font-viewer
gnome-system-monitor
gnome-text-editor
gnome-connections
gnome.gnome-clocks
gnome-clocks
baobab
gnome.gnome-contacts
gnome.gnome-logs
gnome-contacts
gnome-logs
]);
}

View File

@ -6,59 +6,67 @@
}:
{
# Enable OpenGL
hardware.opengl = {
enable = true;
};
# Allow to use the nvidia driver in the special case
# Use in the boot menu
specialisation = {
nvidia-enabled = {
configuration = {
system.nixos.tags = [ "nvidia-enabled" ];
# Enable OpenGL
hardware.graphics = {
enable = true;
};
hardware.nvidia = {
prime = {
sync.enable = true;
# reverseSync.enable = true;
# allowExternalGpu = false;
nvidiaBusId = "PCI:1:0:0";
intelBusId = "PCI:0:2:0";
# Load nvidia driver for Xorg and Wayland
services.xserver.videoDrivers = ["nvidia"];
};
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = false;
open = false;
nvidiaSettings = false;
hardware.nvidia = {
# manually specify the driver version
package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
version = "555.58.02";
sha256_64bit = "sha256-xctt4TPRlOJ6r5S54h5W6PT6/3Zy2R4ASNFPu8TSHKM=";
sha256_aarch64 = "sha256-8hyRiGB+m2hL3c9MDA/Pon+Xl6E788MZ50WrrAGUVuY=";
openSha256 = "sha256-8hyRiGB+m2hL3c9MDA/Pon+Xl6E788MZ50WrrAGUVuY=";
settingsSha256 = "sha256-ZpuVZybW6CFN/gz9rx+UJvQ715FZnAOYfHn5jt5Z2C8=";
persistencedSha256 = "sha256-xctt4TPRlOJ6r5S54h5W6PT6/3Zy2R4ASNFPu8TSHKM=";
package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
version = "565.77"; # latest
sha256_64bit = "sha256-CnqnQsRrzzTXZpgkAtF7PbH9s7wbiTRNcM0SPByzFHw=";
sha256_aarch64 = "sha256-LSAYUnhfnK3rcuPe1dixOwAujSof19kNOfdRHE7bToE=";
openSha256 = "sha256-Fxo0t61KQDs71YA8u7arY+503wkAc1foaa51vi2Pl5I=";
settingsSha256 = "sha256-VUetj3LlOSz/LB+DDfMCN34uA4bNTTpjDrb6C6Iwukk=";
persistencedSha256 = "sha256-wnDjC099D8d9NJSp9D0CbsL+vfHXyJFYYgU3CwcqKww=";
};
};
boot.extraModprobeConfig = "";
boot.blacklistedKernelModules = [];
services.udev.extraRules = "";
services.xserver.videoDrivers = ["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;
open = false;
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = true;
};
## See https://nixos.wiki/wiki/Nvidia
hardware.nvidia.prime = {
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
## Reverse PRIME synchronization
# reverseSync.enable = true;
# # Enable if using an external GPU
# allowExternalGpu = false;
# In the global configuration, we blacklist the nouveau driver and load the nvidia driver
boot.extraModprobeConfig = lib.mkDefault ''
blacklist nouveau
options nouveau modeset=0
'';
services.udev.extraRules = lib.mkDefault ''
# Remove NVIDIA USB xHCI Host Controller devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1"
# Remove NVIDIA USB Type-C UCSI devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{power/control}="auto", ATTR{remove}="1"
# Remove NVIDIA Audio devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto", ATTR{remove}="1"
# Remove NVIDIA VGA/3D controller devices
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", ATTR{power/control}="auto", ATTR{remove}="1"
'';
boot.blacklistedKernelModules = lib.mkDefault [ "nouveau" "nvidia" "nvidia_drm" "nvidia_modeset" ];
## Alternatively enable offloading
offload = {
enable = true;
enableOffloadCmd = true;
};
};
}

View File

@ -9,9 +9,8 @@ with lib.hm.gvariant;
../modules/home-manager/gnome-shell-customization.nix
../modules/home-manager/keepassxc.nix
../modules/home-manager/obsidian.nix
../modules/home-manager/owncloud-client.nix
../modules/home-manager/thunderbird.nix
../modules/home-manager/quickshare.nix
];
## Home Manager configuration