dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
commit adc855b9a16899f72a1cc1149d88c2db7eb9707e parent b3e3982722ca494bd0ccbcb50356a909f9c13411 Author: V7 <maydayv7@gmail.com> Date: Wed, 11 Sep 2024 00:08:45 +0530 feat(devices): Add `valkyrie` * feat: Add `valkyrie` * feat(GNOME): Support `valkyrie` * feat: GNOME X11 Improvements + Support fractional Scaling + Also use GSConnect
Diffstat:
| A | devices/valkyrie/default.nix | | | 59 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | devices/valkyrie/drivers.nix | | | 14 | ++++++++++++++ |
| M | files/gnome/settings/default.nix | | | 1 | + |
| M | files/gnome/settings/extensions.nix | | | 48 | ++++++++++++++++++++++++++++-------------------- |
| M | modules/apps/office.nix | | | 2 | ++ |
| M | modules/gui/desktop/gnome/default.nix | | | 11 | +++++++---- |
| M | modules/hardware/boot.nix | | | 2 | +- |
| A | packages/overlays/gnome.nix | | | 26 | ++++++++++++++++++++++++++ |
8 files changed, 138 insertions(+), 25 deletions(-)
diff --git a/devices/valkyrie/default.nix b/devices/valkyrie/default.nix @@ -0,0 +1,59 @@ +{ + system = "x86_64-linux"; + name = "valkyrie"; + description = "PC - ASUS ROG Zephyrus G14"; + channel = "stable"; + + timezone = "Asia/Kolkata"; + locale = "IN"; + + kernel = "xanmod"; + kernelModules = ["nvme" "thunderbolt"]; + + imports = [./drivers.nix]; + hardware = { + boot = "secure"; + filesystem = "advanced"; + support = ["laptop" "mobile" "printer" "virtualisation"]; + modules = ["asus-zephyrus-ga402x-nvidia"]; + vm.android.enable = false; + cpu = { + cores = 8; + mode = "performance"; + }; + }; + + shell.utilities = true; + apps = { + wine.utilities = true; + list = [ + "discord" + "firefox" + "git" + "office" + "vscode" + ]; + }; + + nix = { + index = true; + tools = true; + }; + + gui = { + desktop = "gnome"; + display = "eDP-1"; + wallpaper = "Nix"; + fancy = true; + }; + + # User V7 + user = { + name = "v7"; + description = "V 7"; + groups = ["wheel" "keys"]; + uid = 1000; + shell = "zsh"; + shells = ["bash"]; + }; +} diff --git a/devices/valkyrie/drivers.nix b/devices/valkyrie/drivers.nix @@ -0,0 +1,14 @@ +{lib, ...}: { + services.fwupd.enable = true; + user.persist.directories = [".config/rog"]; + hardware.nvidia.prime = { + nvidiaBusId = lib.mkForce "PCI:1:0:0"; + amdgpuBusId = lib.mkForce "PCI:65:0:0"; + + sync.enable = false; + offload = { + enable = true; + enableOffloadCmd = true; + }; + }; +} diff --git a/files/gnome/settings/default.nix b/files/gnome/settings/default.nix @@ -131,6 +131,7 @@ in { edge-tiling = true; focus-change-on-pointer-rest = true; workspaces-only-on-primary = true; + experimental-features = ["scale-monitor-framebuffer" "x11-randr-fractional-scaling"]; }; "org/gnome/desktop/interface" = { diff --git a/files/gnome/settings/extensions.nix b/files/gnome/settings/extensions.nix @@ -1,21 +1,19 @@ { - config, sys, lib, pkgs, files, ... }: let - inherit (builtins) filter hasAttr head map; + inherit (builtins) filter hasAttr map; inherit (lib) foldr hm mapAttrs' mkForce nameValuePair recursiveUpdate; - homeDir = config.home.homeDirectory; - font = head sys.fonts.fontconfig.defaultFonts.sansSerif; # Shell Extensions - extensions = with pkgs.gnomeExtensions // hm.gvariant; [ + extensions = with pkgs.unstable.gnomeExtensions // pkgs.gnomeExtensions // hm.gvariant; [ {package = appindicator;} {package = control-monitor-brightness-and-volume-with-ddcutil;} {package = gamemode-indicator-in-system-settings;} + {package = gsconnect;} {package = guillotine;} {package = overview-hover;} {package = removable-drive-menu;} @@ -26,6 +24,11 @@ package = workspace-indicator; disable = true; } + ( + if sys.services.supergfxd.enable + then {package = gpu-supergfxctl-switch;} + else {} + ) { package = top-bar-organizer; settings = { @@ -42,7 +45,7 @@ "a11y" "aggregateMenu" "drive-menu" - "pano@elhan.io" + "clipboardIndicator" "vitalsMenu" "dwellClick" "lockkeys" @@ -82,6 +85,14 @@ }; } { + package = emoji-copy; + settings = { + active-keybind = true; + always-show = false; + paste-on-select = true; + }; + } + { package = user-avatar-in-quick-settings; name = "quick-settings-avatar"; settings = { @@ -142,21 +153,18 @@ }; } { - package = pano; + package = clipboard-indicator; settings = { - database-location = "${homeDir}/.local/share/clipboard"; - global-shortcut = ["<Super>v"]; - history-length = 250; - incognito-shortcut = ["<Ctrl><Super>v"]; - play-audio-on-copy = false; - send-notification-on-copy = false; - window-position = mkUint32 2; - item-date-font-family = font; - item-date-font-size = 11; - item-title-font-family = font; - item-title-font-size = 20; - search-bar-font-family = font; - search-bar-font-size = 14; + cache-size = 20; + clear-history = []; + disable-down-arrow = true; + history-size = 100; + keep-selected-on-clear = true; + move-item-first = true; + next-entry = []; + prev-entry = []; + private-mode-binding = ["<Ctrl><Super>v"]; + toggle-menu = ["<Super>v"]; }; } { diff --git a/modules/apps/office.nix b/modules/apps/office.nix @@ -35,6 +35,7 @@ in { # Internet google-chrome linux-wifi-hotspot + openfortivpn thunderbird whatsapp-for-linux zoom-us @@ -43,6 +44,7 @@ in { hunspell hunspellDicts.en_US-large hyphen + ventoy-full ]; # Dictionaries diff --git a/modules/gui/desktop/gnome/default.nix b/modules/gui/desktop/gnome/default.nix @@ -87,7 +87,13 @@ in { apps.list = ["firefox"]; programs = { gnupg.agent.pinentryPackage = mkForce pkgs.pinentry.gnome3; + kdeconnect = { + enable = true; + package = pkgs.gnomeExtensions.gsconnect; + }; + firefox = { + nativeMessagingHosts.gsconnect = true; policies.ExtensionSettings = { name = "gnome-shell-integration"; value = { @@ -204,7 +210,7 @@ in { # Extensions ".config/forge" - ".local/share/clipboard" + ".cache/clipboard-indicator@tudmotu.com" ]; }) @@ -216,9 +222,6 @@ in { ".mozilla/firefox/default/chrome/userChrome.css".text = ''@import "${pkgs.custom.firefox-gnome-theme}/userChrome.css";''; ".mozilla/firefox/default/chrome/userContent.css".text = ''@import "${pkgs.custom.firefox-gnome-theme}/userContent.css";''; - # Workaround for NixOS/nixpkgs/47340 - ".mozilla/native-messaging-hosts/org.gnome.chrome_gnome_shell.json".source = "${pkgs.chrome-gnome-shell}/lib/mozilla/native-messaging-hosts/org.gnome.chrome_gnome_shell.json"; - # Discord DNOME Theme ".config/BetterDiscord/data/stable/custom.css" = mkIf (exists "discord") {text = ''@import url("https://raw.githack.com/GeopJr/DNOME/dist/DNOME.css");'';}; diff --git a/modules/hardware/boot.nix b/modules/hardware/boot.nix @@ -84,7 +84,7 @@ in { }; }) - ## Secure Boot (EFI Only) ## + ## EFI Secure Boot ## (mkIf (loader == "secure") rec { boot.lanzaboote = { enable = true; diff --git a/packages/overlays/gnome.nix b/packages/overlays/gnome.nix @@ -0,0 +1,26 @@ +final: prev: { + ## GNOME Desktop Patches + gnome = prev.gnome.overrideScope (_: gprev: { + # Mutter WM X11 Improvements + # https://aur.archlinux.org/packages/mutter-x11-scaling + mutter = gprev.mutter.overrideAttrs (old: { + patches = + if old.version == "46.2" + then + ( + (old.patches or []) + ++ [ + (prev.fetchpatch { + url = "https://raw.githubusercontent.com/puxplaying/mutter-x11-scaling/7aa432d4366fdd5a2687a78848b25da4f8ab5c68/x11-Add-support-for-fractional-scaling-using-Randr.patch"; + hash = "sha256-HdBE9uiFBTqWU1fE0n0XFYObqX3R/+itCxFvsUnA554="; + }) + (prev.fetchpatch { + url = "https://raw.githubusercontent.com/puxplaying/mutter-x11-scaling/eff4767168c107ef268c7e8b32eaea41a224efb4/mutter-fix-x11-restart.patch"; + hash = "sha256-hSqmi4PEAXgLPN3t8/cKP65F9Pmhgpfxm+VzfT0upx8="; + }) + ] + ) + else throw "Update GNOME Mutter patchset to latest version"; + }); + }); +}