Fix on sleep with Nvidia cards and add new wallpaper
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 1.2 MiB |
@@ -48,11 +48,10 @@ with lib.hm.gvariant;
|
||||
};
|
||||
|
||||
"org/gnome/desktop/background" = {
|
||||
picture-options = "zoom";
|
||||
picture-uri = "file://" + ./subtra.jpg;
|
||||
picture-uri-dark = "file://" + ./subtra.jpg;
|
||||
};
|
||||
|
||||
picture-options = "zoom";
|
||||
picture-uri = "file://" + ./WhiteHair.jpg;
|
||||
picture-uri-dark = "file://" + ./WhiteHair.jpg;
|
||||
};
|
||||
|
||||
"org/gnome/shell/extensions/dash-to-panel" = {
|
||||
prefs-opened = false;
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
home.shell.neovim.enable = true;
|
||||
|
||||
# Code editor
|
||||
home.env.nix.enable = true;
|
||||
home.ide.zed.enable = true;
|
||||
|
||||
# Markdown Editor
|
||||
|
||||
@@ -22,10 +22,12 @@ in
|
||||
papers
|
||||
celluloid
|
||||
resources
|
||||
gnome-system-monitor
|
||||
]
|
||||
++ [
|
||||
# Gnome files explorer
|
||||
nautilus
|
||||
refine
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{ lib, config, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.os.graphics.nvidia;
|
||||
@@ -9,16 +13,28 @@ in
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
|
||||
services.xserver.enable = true;
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
services.xserver.videoDrivers = [
|
||||
"modesetting"
|
||||
"nvidia"
|
||||
];
|
||||
|
||||
hardware.graphics.enable = true;
|
||||
|
||||
hardware.nvidia = {
|
||||
open = true;
|
||||
nvidiaSettings = false;
|
||||
modesetting.enable = true; # Wayland requirements
|
||||
powerManagement.enable = true;
|
||||
prime = {
|
||||
intelBusId = "PCI:0@0:2:0";
|
||||
nvidiaBusId = "PCI:1@0:0:0";
|
||||
};
|
||||
};
|
||||
|
||||
os.graphics.nvidia.systemd.enable = true;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.os.graphics.nvidia.systemd;
|
||||
in
|
||||
{
|
||||
options.os.graphics.nvidia.systemd = {
|
||||
enable = mkEnableOption "System nvidia service";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
systemd = {
|
||||
services.systemd-suspend.environment.SYSTEMD_SLEEP_FREEZE_USER_SESSIONS = "false"; # Uncertain if this is still required or not.
|
||||
services."gnome-suspend" = {
|
||||
description = "suspend gnome shell";
|
||||
before = [
|
||||
"systemd-suspend.service"
|
||||
"systemd-hibernate.service"
|
||||
"nvidia-suspend.service"
|
||||
"nvidia-hibernate.service"
|
||||
];
|
||||
wantedBy = [
|
||||
"systemd-suspend.service"
|
||||
"systemd-hibernate.service"
|
||||
];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${pkgs.procps}/bin/pkill -f -STOP ${pkgs.gnome-shell}/bin/gnome-shell";
|
||||
};
|
||||
};
|
||||
services."gnome-resume" = {
|
||||
description = "resume gnome shell";
|
||||
after = [
|
||||
"systemd-suspend.service"
|
||||
"systemd-hibernate.service"
|
||||
"nvidia-resume.service"
|
||||
];
|
||||
wantedBy = [
|
||||
"systemd-suspend.service"
|
||||
"systemd-hibernate.service"
|
||||
];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${pkgs.procps}/bin/pkill -f -CONT ${pkgs.gnome-shell}/bin/gnome-shell";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user