diff --git a/hosts/nixos/home/partials/gnome/WhiteHair.jpg b/hosts/nixos/home/partials/gnome/WhiteHair.jpg new file mode 100644 index 0000000..da36336 Binary files /dev/null and b/hosts/nixos/home/partials/gnome/WhiteHair.jpg differ diff --git a/hosts/nixos/home/partials/gnome/dconf.nix b/hosts/nixos/home/partials/gnome/dconf.nix index d8746cc..fe2afe6 100644 --- a/hosts/nixos/home/partials/gnome/dconf.nix +++ b/hosts/nixos/home/partials/gnome/dconf.nix @@ -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; diff --git a/hosts/nixos/home/users/alistreaza.nix b/hosts/nixos/home/users/alistreaza.nix index 059d853..052e6ad 100644 --- a/hosts/nixos/home/users/alistreaza.nix +++ b/hosts/nixos/home/users/alistreaza.nix @@ -19,6 +19,7 @@ home.shell.neovim.enable = true; # Code editor + home.env.nix.enable = true; home.ide.zed.enable = true; # Markdown Editor diff --git a/modules/system/nixos/apps/gnome/apps.nix b/modules/system/nixos/apps/gnome/apps.nix index faeee69..b0c64a9 100644 --- a/modules/system/nixos/apps/gnome/apps.nix +++ b/modules/system/nixos/apps/gnome/apps.nix @@ -22,10 +22,12 @@ in papers celluloid resources + gnome-system-monitor ] ++ [ # Gnome files explorer nautilus + refine ]; }; diff --git a/modules/system/nixos/graphics/nvidia.nix b/modules/system/nixos/graphics/nvidia.nix index 42a9a48..3acd4f3 100644 --- a/modules/system/nixos/graphics/nvidia.nix +++ b/modules/system/nixos/graphics/nvidia.nix @@ -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; + }; } diff --git a/modules/system/nixos/graphics/systemd.nix b/modules/system/nixos/graphics/systemd.nix new file mode 100644 index 0000000..63e0a67 --- /dev/null +++ b/modules/system/nixos/graphics/systemd.nix @@ -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"; + }; + }; + }; + + }; +}