diff --git a/hosts/monolith.nix b/hosts/monolith.nix index 2e33fd8..b217f73 100644 --- a/hosts/monolith.nix +++ b/hosts/monolith.nix @@ -40,6 +40,7 @@ in "zenpower" ]; boot.kernelParams = [ + "amdgpu.dcdebugmask=0x10" # amdgpu undervolting bug "video=DP-1:1920x1080@144" # hibernation "resume=LABEL=BTRFS_ROOT" # findmnt -o LABEL --noheadings /swap/ @@ -63,6 +64,14 @@ in rocmPackages.rocm-smi ]; + programs.corectrl = { + enable = true; + gpuOverclock = { + enable = true; + ppfeaturemask = "0xffffffff"; + }; + }; + fileSystems."/" = { device = "/dev/disk/by-label/BTRFS_ROOT"; fsType = "btrfs"; diff --git a/overlays/default.nix b/overlays/default.nix index 8d4046b..14257ba 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -6,6 +6,7 @@ rec { themes new-packages patches + variables lib_extended ]; @@ -79,6 +80,8 @@ rec { } ); + variables = (final: prev: { uservars = import ../user/variables.nix; }); + lib_extended = ( final: prev: { lib = prev.lib // rec { diff --git a/scripts/default.nix b/scripts/default.nix index 1ed6e0c..12d38d3 100644 --- a/scripts/default.nix +++ b/scripts/default.nix @@ -126,7 +126,6 @@ wl-clipboard ]; auto_connect_gamepad = [ bluez ]; - vrr-fullscreen = [ ]; } // lib.mapAttrs import_script { wdmenu = ./wdmenu.nix; diff --git a/scripts/vrr-fullscreen b/scripts/vrr-fullscreen deleted file mode 100755 index 8413923..0000000 --- a/scripts/vrr-fullscreen +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash - -# List of supported outputs for VRR -output_vrr_whitelist=( - "DP-1" - "DP-2" -) - -# Toggle VRR for fullscreened apps in prespecified displays to avoid stutters while in desktop -swaymsg -t subscribe -m '[ "window" ]' | while read window_json; do - window_event=$(echo ${window_json} | jq -r '.change') - - # Process only focus change and fullscreen toggle - if [[ $window_event = "focus" || $window_event = "fullscreen_mode" ]]; then - output_json=$(swaymsg -t get_outputs | jq -r '.[] | select(.focused == true)') - output_name=$(echo ${output_json} | jq -r '.name') - - # Use only VRR in whitelisted outputs - if [[ ${output_vrr_whitelist[*]} =~ ${output_name} ]]; then - output_vrr_status=$(echo ${output_json} | jq -r '.adaptive_sync_status') - window_fullscreen_status=$(echo ${window_json} | jq -r '.container.fullscreen_mode') - - # Only update output if nesseccary to avoid flickering - [[ $output_vrr_status = "disabled" && $window_fullscreen_status = "1" ]] && swaymsg output "${output_name}" adaptive_sync 1 - [[ $output_vrr_status = "enabled" && $window_fullscreen_status = "0" ]] && swaymsg output "${output_name}" adaptive_sync 0 - fi - fi -done diff --git a/scripts/wdmenu.nix b/scripts/wdmenu.nix index 3505781..85fb6fc 100644 --- a/scripts/wdmenu.nix +++ b/scripts/wdmenu.nix @@ -1,4 +1,12 @@ { pkgs, ... }: +let + inherit (pkgs.uservars) dmenu; + available_menus = { + bmenu = "bmenu"; + rofi = "rofi -dmenu -sort"; + }; + menu_cmd = available_menus.${dmenu}; +in pkgs.writeShellScriptBin "wdmenu" '' - exec bmenu "$@" + exec ${menu_cmd} "$@" '' diff --git a/scripts/wfile-picker.nix b/scripts/wfile-picker.nix index d8ced8a..eb68752 100644 --- a/scripts/wfile-picker.nix +++ b/scripts/wfile-picker.nix @@ -1,6 +1,6 @@ { pkgs, ... }: let - inherit (config.my) dmenu; + inherit (pkgs.uservars) dmenu; available_menus = { bmenu = "bmenu run"; rofi = "rofi -show drun -sort"; diff --git a/scripts/wlauncher.nix b/scripts/wlauncher.nix index d2c2dec..eb68752 100644 --- a/scripts/wlauncher.nix +++ b/scripts/wlauncher.nix @@ -1,4 +1,12 @@ { pkgs, ... }: +let + inherit (pkgs.uservars) dmenu; + available_menus = { + bmenu = "bmenu run"; + rofi = "rofi -show drun -sort"; + }; + menu_cmd = available_menus.${dmenu}; +in pkgs.writeShellScriptBin "wlauncher" '' - exec bmenu run "$@" + exec ${menu_cmd} "$@" '' diff --git a/settings/default.nix b/settings/default.nix deleted file mode 100644 index 2a2ca08..0000000 --- a/settings/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ lib, ... }: -{ - options = { - my = lib.mkOption { }; - }; -} diff --git a/system/boot.nix b/system/boot.nix index fa1ed8d..81d838e 100644 --- a/system/boot.nix +++ b/system/boot.nix @@ -43,7 +43,7 @@ }; plymouth = { enable = true; - theme = lib.mkIf (config.my.desktop == "sway") "red_loader"; + theme = lib.mkIf (pkgs.uservars.desktop == "sway") "red_loader"; themePackages = with pkgs; [ (adi1090x-plymouth-themes.override { selected_themes = [ "red_loader" ]; }) ]; diff --git a/system/configuration.nix b/system/configuration.nix index 6661e40..8054fa9 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -22,10 +22,9 @@ ./users.nix ./containers.nix ./network.nix - ../settings ]; - my = import ../user/variables.nix; + boot.kernelPackages = pkgs.linuxPackages_latest; zramSwap.enable = true; diff --git a/system/greetd.nix b/system/greetd.nix index b152c72..6bc6297 100644 --- a/system/greetd.nix +++ b/system/greetd.nix @@ -5,7 +5,7 @@ ... }: let - inherit (config.my) + inherit (pkgs.uservars) key accent font @@ -71,7 +71,7 @@ in enable = true; settings = { initial_session = { - command = desktop; + command = "${pkgs.sway}/bin/sway"; user = "lelgenio"; }; default_session = { diff --git a/user/alacritty.nix b/user/alacritty.nix index 91b98c0..ae2e2fb 100644 --- a/user/alacritty.nix +++ b/user/alacritty.nix @@ -5,7 +5,7 @@ ... }: let - inherit (config.my) + inherit (pkgs.uservars) key theme accent diff --git a/user/bmenu.nix b/user/bmenu.nix index 1543dcf..38c36c6 100644 --- a/user/bmenu.nix +++ b/user/bmenu.nix @@ -6,7 +6,7 @@ ... }: let - inherit (config.my) + inherit (pkgs.uservars) key theme accent diff --git a/user/firefox.nix b/user/firefox.nix index 207ebb6..4c442e3 100644 --- a/user/firefox.nix +++ b/user/firefox.nix @@ -6,7 +6,7 @@ ... }: let - inherit (config.my) desktop browser; + inherit (pkgs.uservars) desktop browser; bugfixedFirefox = pkgs.firefox-esr-unwrapped // { requireSigning = false; allowAddonSideload = true; diff --git a/user/fish/default.nix b/user/fish/default.nix index aef7fd5..07ba4c2 100644 --- a/user/fish/default.nix +++ b/user/fish/default.nix @@ -5,7 +5,15 @@ ... }: let - inherit (config.my) accent editor desktop; + inherit (pkgs.uservars) + key + theme + color + accent + font + editor + desktop + ; in { config = { diff --git a/user/fzf.nix b/user/fzf.nix index df16adb..a4113fa 100644 --- a/user/fzf.nix +++ b/user/fzf.nix @@ -6,7 +6,7 @@ ... }: let - inherit (config.my) + inherit (pkgs.uservars) key theme accent diff --git a/user/git.nix b/user/git.nix index 94532f3..f50a249 100644 --- a/user/git.nix +++ b/user/git.nix @@ -5,7 +5,7 @@ ... }: let - inherit (config.my) username mail; + inherit (pkgs.uservars) username mail; in { config = { diff --git a/user/gnome.nix b/user/gnome.nix index 53dd630..d7282dc 100644 --- a/user/gnome.nix +++ b/user/gnome.nix @@ -2,10 +2,9 @@ pkgs, lib, inputs, - config, ... }: -lib.mkIf (config.my.desktop == "gnome") { +lib.mkIf (pkgs.uservars.desktop == "gnome") { home.pointerCursor = { name = "Adwaita"; diff --git a/user/helix.nix b/user/helix.nix index b711055..292cfb0 100644 --- a/user/helix.nix +++ b/user/helix.nix @@ -1,11 +1,6 @@ -{ - pkgs, - lib, - config, - ... -}: +{ pkgs, lib, ... }: let - inherit (config.my) accent theme editor; + inherit (pkgs.uservars) accent theme editor; inherit (theme) color; in { diff --git a/user/home.nix b/user/home.nix index e482406..8453572 100644 --- a/user/home.nix +++ b/user/home.nix @@ -44,11 +44,8 @@ ./xdg-dirs.nix inputs.hyprland.homeManagerModules.default inputs.nix-index-database.hmModules.nix-index - ../settings ]; - my = import ./variables.nix; - # Home Manager needs a bit of information about you and the # paths it should manage. home.username = "lelgenio"; diff --git a/user/hyprland.nix b/user/hyprland.nix index 721e14b..e1a632b 100644 --- a/user/hyprland.nix +++ b/user/hyprland.nix @@ -5,7 +5,7 @@ ... }: { - config = lib.mkIf (config.my.desktop == "hyprland") { + config = lib.mkIf (pkgs.uservars.desktop == "hyprland") { wayland.windowManager.hyprland = { enable = false; extraConfig = '' diff --git a/user/kakoune/default.nix b/user/kakoune/default.nix index ebb17f5..091fe1b 100644 --- a/user/kakoune/default.nix +++ b/user/kakoune/default.nix @@ -5,7 +5,7 @@ ... }: let - inherit (config.my) + inherit (pkgs.uservars) key dmenu editor diff --git a/user/man.nix b/user/man.nix index cc56089..c77607e 100644 --- a/user/man.nix +++ b/user/man.nix @@ -6,7 +6,7 @@ ... }: let - inherit (config.my) + inherit (pkgs.uservars) key theme color diff --git a/user/mangohud.nix b/user/mangohud.nix index 440b750..f43564f 100644 --- a/user/mangohud.nix +++ b/user/mangohud.nix @@ -6,7 +6,7 @@ ... }: let - inherit (config.my) + inherit (pkgs.uservars) key theme color diff --git a/user/mimeapps.nix b/user/mimeapps.nix index a5ddae6..ff39ea4 100644 --- a/user/mimeapps.nix +++ b/user/mimeapps.nix @@ -6,7 +6,7 @@ ... }: let - inherit (config.my) browser; + inherit (pkgs.uservars) browser; cfg = config.xdg.defaultApplications; in { diff --git a/user/mpd.nix b/user/mpd.nix index f4cca16..8a4c155 100644 --- a/user/mpd.nix +++ b/user/mpd.nix @@ -5,7 +5,7 @@ ... }: { - config = lib.mkIf (config.my.desktop != "gnome") { + config = lib.mkIf (pkgs.uservars.desktop != "gnome") { services.mpd = { enable = true; musicDirectory = config.home.homeDirectory + "/Música"; diff --git a/user/pqiv.nix b/user/pqiv.nix index 70cf9de..10e6c3d 100644 --- a/user/pqiv.nix +++ b/user/pqiv.nix @@ -6,7 +6,7 @@ ... }: let - inherit (config.my) + inherit (pkgs.uservars) key theme color diff --git a/user/rofi.nix b/user/rofi.nix index c24a0ce..79307eb 100644 --- a/user/rofi.nix +++ b/user/rofi.nix @@ -6,7 +6,7 @@ ... }: let - inherit (config.my) + inherit (pkgs.uservars) key theme accent diff --git a/user/ssh.nix b/user/ssh.nix index 60649ba..3193876 100644 --- a/user/ssh.nix +++ b/user/ssh.nix @@ -5,7 +5,7 @@ ... }: let - inherit (config.my) username mail; + inherit (pkgs.uservars) username mail; in { config = { diff --git a/user/sway/default.nix b/user/sway/default.nix index d98b0d7..d7afafd 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -5,7 +5,7 @@ ... }: let - inherit (config.my) + inherit (pkgs.uservars) key accent font @@ -24,7 +24,7 @@ in ./swaylock.nix ./theme.nix ]; - config = lib.mkIf (config.my.desktop == "sway") { + config = lib.mkIf (pkgs.uservars.desktop == "sway") { services.mako.enable = true; services.swayidle.enable = true; services.kanshi.enable = true; @@ -69,7 +69,7 @@ in }; output = { "*" = { - adaptive_sync = "off"; + adaptive_sync = "enabled"; bg = "${theme.background} fill"; mode = "1920x1080@144.000Hz"; }; @@ -104,6 +104,7 @@ in exec ${pkgs.dbus-sway-environment}/bin/dbus-sway-environment exec swaymsg workspace 2 exec_always systemctl --user restart waybar.service + exec corectrl --minimize-systray ''; }; services.gammastep = { @@ -116,21 +117,6 @@ in indicator = true; }; - systemd.user.services.vrr-fullscreen = { - Unit = { - Description = "Enable VRR for fullscreen windows"; - PartOf = [ "graphical-session.target" ]; - After = [ "graphical-session.target" ]; - }; - Service = { - ExecStart = "${lib.getExe pkgs.vrr-fullscreen}"; - Restart = "on-failure"; - }; - Install = { - WantedBy = [ "sway-session.target" ]; - }; - }; - xdg.configFile."OpenTabletDriver/settings.json".source = ./open-tablet-driver.json; home.packages = with pkgs; [ diff --git a/user/sway/kanshi.nix b/user/sway/kanshi.nix index c0a584b..f35fd4f 100644 --- a/user/sway/kanshi.nix +++ b/user/sway/kanshi.nix @@ -5,7 +5,7 @@ ... }: let - inherit (config.my) + inherit (pkgs.uservars) key accent font diff --git a/user/sway/mako.nix b/user/sway/mako.nix index 4f43734..c8575ab 100644 --- a/user/sway/mako.nix +++ b/user/sway/mako.nix @@ -5,7 +5,7 @@ ... }: let - inherit (config.my) + inherit (pkgs.uservars) key accent font diff --git a/user/sway/sway-assigns.nix b/user/sway/sway-assigns.nix index 3822a22..5ad5473 100644 --- a/user/sway/sway-assigns.nix +++ b/user/sway/sway-assigns.nix @@ -1,7 +1,7 @@ { config, pkgs, ... }: let in -# inherit (config.my) key accent font theme; +# inherit (pkgs.uservars) key accent font theme; # inherit (theme) color; # inherit (pkgs) lib; # mod = "Mod4"; diff --git a/user/sway/sway-binds.nix b/user/sway/sway-binds.nix index 543de59..fe22594 100644 --- a/user/sway/sway-binds.nix +++ b/user/sway/sway-binds.nix @@ -1,6 +1,6 @@ { config, pkgs, ... }: let - inherit (config.my) + inherit (pkgs.uservars) key accent font diff --git a/user/sway/sway-modes.nix b/user/sway/sway-modes.nix index cc3efff..ea75ca8 100644 --- a/user/sway/sway-modes.nix +++ b/user/sway/sway-modes.nix @@ -1,6 +1,6 @@ { config, pkgs, ... }: let - inherit (config.my) + inherit (pkgs.uservars) key accent font diff --git a/user/sway/swayidle.nix b/user/sway/swayidle.nix index 2c5384f..b0bd455 100644 --- a/user/sway/swayidle.nix +++ b/user/sway/swayidle.nix @@ -5,7 +5,7 @@ ... }: let - inherit (config.my) + inherit (pkgs.uservars) key accent font diff --git a/user/sway/swaylock.nix b/user/sway/swaylock.nix index e46b5d9..eb6104e 100644 --- a/user/sway/swaylock.nix +++ b/user/sway/swaylock.nix @@ -5,7 +5,7 @@ ... }: let - inherit (config.my) + inherit (pkgs.uservars) key accent font diff --git a/user/sway/theme.nix b/user/sway/theme.nix index ca4ea76..202eaff 100644 --- a/user/sway/theme.nix +++ b/user/sway/theme.nix @@ -6,7 +6,7 @@ ... }: let - inherit (config.my) theme font desktop; + inherit (pkgs.uservars) theme font desktop; inherit (theme) color gtk_theme diff --git a/user/vdir.nix b/user/vdir.nix index 02aa2b6..80e6145 100644 --- a/user/vdir.nix +++ b/user/vdir.nix @@ -1,11 +1,6 @@ -{ - pkgs, - lib, - config, - ... -}: +{ pkgs, lib, ... }: let - inherit (config.my) nextcloud; + inherit (pkgs.uservars) nextcloud; pass_cmd = ( pkgs.writeShellScript "get_pass" '' pass "${nextcloud.pass}" | head -n1 diff --git a/user/waybar/default.nix b/user/waybar/default.nix index d2dc661..95615fa 100644 --- a/user/waybar/default.nix +++ b/user/waybar/default.nix @@ -7,7 +7,7 @@ ... }: let - inherit (config.my) + inherit (pkgs.uservars) key theme accent @@ -137,7 +137,7 @@ in { format = "{stateIcon} {title} - {artist}"; format-paused = "{stateIcon}"; - format-stopped = "{stateIcon}"; + format-stopped = ""; state-icons = { stopped = ""; paused = ""; diff --git a/user/zathura.nix b/user/zathura.nix index 70e1c23..ccb4c42 100644 --- a/user/zathura.nix +++ b/user/zathura.nix @@ -6,7 +6,7 @@ ... }: let - inherit (config.my) + inherit (pkgs.uservars) key accent font