Compare commits

..
2 Commits
6 changed files with 81 additions and 8 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

+3 -4
View File
@@ -29,7 +29,7 @@ with lib.hm.gvariant;
};
"org/gnome/desktop/wm/preferences" = {
button-layout = "appmenu:minimize,close";
button-layout = "appmenu:maximize,minimize,close";
};
"org/gnome/shell/extensions/app-hider" = {
@@ -49,11 +49,10 @@ with lib.hm.gvariant;
"org/gnome/desktop/background" = {
picture-options = "zoom";
picture-uri = "file://" + ./subtra.jpg;
picture-uri-dark = "file://" + ./subtra.jpg;
picture-uri = "file://" + ./WhiteHair.jpg;
picture-uri-dark = "file://" + ./WhiteHair.jpg;
};
"org/gnome/shell/extensions/dash-to-panel" = {
prefs-opened = false;
+1
View File
@@ -19,6 +19,7 @@
home.shell.neovim.enable = true;
# Code editor
home.env.nix.enable = true;
home.ide.zed.enable = true;
# Markdown Editor
+2
View File
@@ -22,10 +22,12 @@ in
papers
celluloid
resources
gnome-system-monitor
]
++ [
# Gnome files explorer
nautilus
refine
];
};
+18 -2
View File
@@ -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;
};
}
+55
View File
@@ -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";
};
};
};
};
}