From 772f9e8a0dc99c9f9e944060ba8c89395ac0c0d4 Mon Sep 17 00:00:00 2001 From: Varris Date: Sun, 13 Aug 2023 21:24:57 +0200 Subject: [PATCH] update --- configuration.nix | 28 ++++++++------ flake.nix | 21 +++++++++-- hardware-configuration.nix | 9 ++--- overlay.nix | 12 ++++-- user/configs/neovim/config/lua/remaps.lua | 2 +- user/configs/neovim/default.nix | 2 + user/configs/wayland/foot/default.nix | 2 +- user/configs/wayland/hyprland/default.nix | 45 +++++++++++------------ user/configs/wayland/waybar/default.nix | 6 --- user/home.nix | 18 ++++++--- 10 files changed, 84 insertions(+), 61 deletions(-) diff --git a/configuration.nix b/configuration.nix index e4b853d..7874d89 100755 --- a/configuration.nix +++ b/configuration.nix @@ -68,8 +68,6 @@ keyMap = "us-acentos"; }; - # chaotic.mesa-git.enable = true; - hardware.opengl = { enable = true; extraPackages = [ pkgs.libvdpau-va-gl ]; @@ -97,13 +95,6 @@ rtkit.enable = true; sudo.enable = false; - pam.loginLimits = [{ - domain = "*"; - type = "soft"; - item = "nofile"; - value = "262144"; - }]; - doas = { enable = true; extraRules = [{ @@ -116,13 +107,14 @@ users.users.manuel = { isNormalUser = true; - extraGroups = [ "audio" "games" "input" "scanner" "lp" "users" "video" "vboxusers" "wheel" "networkmanager" ]; + extraGroups = [ "audio" "games" "input" "lp" "networkmanager" "scanner" "users" "vboxusers" "video" "wheel" ]; shell = pkgs.fish; }; environment = { systemPackages = with pkgs; [ bc + cached-nix-shell compsize distrobox fd @@ -189,7 +181,6 @@ pulse.enable = true; }; - locate = { enable = true; locate = pkgs.plocate; @@ -202,6 +193,16 @@ enable = true; interval = "weekly"; }; + + greetd = { + enable = true; + settings = { + default_session = { + command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland"; + user = "greeter"; + }; + }; + }; }; virtualisation = { @@ -234,14 +235,17 @@ experimental-features = nix-command flakes warn-dirty = false ''; + registry = lib.mapAttrs (_: value: { flake = value; }) inputs; nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry; + gc = { persistent = true; automatic = true; dates = "weekly"; options = "--delete-older-than 7d"; }; + settings = { auto-optimise-store = true; @@ -258,6 +262,6 @@ }; }; - system.stateVersion = "22.05"; + system.stateVersion = "23.05"; } diff --git a/flake.nix b/flake.nix index da0aa0f..6aad745 100755 --- a/flake.nix +++ b/flake.nix @@ -16,8 +16,20 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - hyprland-contrib.url = "github:hyprwm/contrib"; - hyprpicker.url = "github:hyprwm/hyprpicker"; + hyprland-contrib = { + url = "github:hyprwm/contrib"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + hyprpicker = { + url = "github:hyprwm/hyprpicker"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + aitrack = { + url = "github:AIRLegend/aitrack"; + flake = false; + }; gruvbox-kvantum = { url = "github:thefallnn/Gruvbox-Kvantum"; @@ -54,10 +66,11 @@ flake = false; }; - xorg-git = { - url = "gitlab:xorg/xserver?host=gitlab.freedesktop.org"; + nvim-hmts = { + url = "github:calops/hmts.nvim"; flake = false; }; + }; outputs = { self, nixpkgs, home-manager, ... }@inputs: diff --git a/hardware-configuration.nix b/hardware-configuration.nix index a6a328e..c512600 100755 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -12,13 +12,12 @@ boot.initrd.availableKernelModules = [ "amdgpu" "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; + boot.extraModulePackages = []; fileSystems."/" = { - device = "/dev/disk/by-uuid/33112a66-7f9a-482c-b14c-91490f2212c2"; - fsType = "btrfs"; - options = [ "subvol=@nixos" "compress=zstd" ]; + device = "/dev/disk/by-uuid/2949cfe9-f064-47b4-9621-3941b8ea1a42"; + fsType = "xfs"; }; fileSystems."/mnt/hdd" = @@ -35,7 +34,7 @@ fileSystems."/boot/efi" = { - device = "/dev/disk/by-uuid/D56E-61DC"; + device = "/dev/disk/by-uuid/2128-03CA"; fsType = "vfat"; }; diff --git a/overlay.nix b/overlay.nix index 8aa459b..9be8486 100755 --- a/overlay.nix +++ b/overlay.nix @@ -2,13 +2,11 @@ { default = final: prev: { - arrpc = inputs.arrpc.packages.${prev.system}.arrpc; - eww = prev.eww.override { withWayland = true; }; - gruvbox-plus-icon-pack = prev.callPackage ./pkgs/gruvbox-plus-icon-pack { }; + gruvbox-plus-icon-pack = final.callPackage ./pkgs/gruvbox-plus-icon-pack { }; ncmpcpp = prev.ncmpcpp.override { visualizerSupport = true; @@ -30,6 +28,8 @@ steam = prev.steam.override { extraPkgs = prev: [ + prev.libkrb5 + prev.keyutils prev.gnome.zenity prev.xdg-user-dirs ]; @@ -50,5 +50,11 @@ "-Dcava=disabled" ]; }); + + nvim-hmts = prev.vimUtils.buildVimPluginFrom2Nix { + pname = "nvim-hmts"; + version = "1"; + src = inputs.nvim-hmts; + }; }; } diff --git a/user/configs/neovim/config/lua/remaps.lua b/user/configs/neovim/config/lua/remaps.lua index 853ce93..c76e8c2 100755 --- a/user/configs/neovim/config/lua/remaps.lua +++ b/user/configs/neovim/config/lua/remaps.lua @@ -12,7 +12,7 @@ map( "n", "fp", telescope_builtin.git_files, { desc = "Find Files map( "n", "fc", function() telescope_builtin.git_files({ cwd = "~/.dotfiles"}) end, { desc = "Edit Dotfiles" }) -map( "n", "", "NeoTreeFocusToggle", { desc = "Open NeoTree" }) +map( "n", "", "Neotree toggle", { desc = "Open NeoTree" }) map( {"n", "x"}, "ga", ":EasyAlign", { desc = "Align text" }) -- resizing splits diff --git a/user/configs/neovim/default.nix b/user/configs/neovim/default.nix index 25392cc..66f61f0 100755 --- a/user/configs/neovim/default.nix +++ b/user/configs/neovim/default.nix @@ -55,6 +55,8 @@ stylua nodePackages.vscode-css-languageserver-bin zls + ] ++ [ + pkgs.nvim-hmts ]; }; diff --git a/user/configs/wayland/foot/default.nix b/user/configs/wayland/foot/default.nix index dbce598..bdbede2 100755 --- a/user/configs/wayland/foot/default.nix +++ b/user/configs/wayland/foot/default.nix @@ -4,7 +4,7 @@ enable = true; settings = { main = { - font = "JetBrainsMono Nerd Font:pixelsize=12"; + font = "JetBrainsMono Nerd Font:pixelsize=14"; pad = "16x16 center"; underline-offset = "4px"; }; diff --git a/user/configs/wayland/hyprland/default.nix b/user/configs/wayland/hyprland/default.nix index 9addc28..4dfa902 100755 --- a/user/configs/wayland/hyprland/default.nix +++ b/user/configs/wayland/hyprland/default.nix @@ -1,11 +1,11 @@ { config, pkgs, inputs, ... }: let - wobsock = "/tmp/wob-vol.fifo"; + leftMonitor = "DP-2"; + rightMonitor = "DP-1"; modKey = "SUPER"; - leftMonitor = "DP-2"; - rightMonitor = "DP-1"; + wobsock = "/tmp/wob-vol.fifo"; wob-voldaemon = pkgs.writeShellScriptBin "wob-volumeindicator.sh" '' if pgrep "wob"; then @@ -21,17 +21,7 @@ let echo "wob: started" ''; - xwaylandSetPrimary = pkgs.writeShellScriptBin "xwayland-setprimary.sh" '' - while true; do - DSP=$(${pkgs.xorg.xrandr}/bin/xrandr | awk '/2560x1440/ {print $1}' | head -n 1) - if [[ ! -z DSP ]]; then - ${pkgs.xorg.xrandr}/bin/xrandr --output "$DSP" --primary - fi - sleep 10 - done - ''; - - killprocess = pkgs.writeShellScriptBin "killprocess.sh" ''hypr + killprocess = pkgs.writeShellScriptBin "killprocess.sh" '' ps -x -o pid=,comm= | column -t -o " " | ${pkgs.rofi-wayland}/bin/rofi -dmenu -p "kill process: " | awk '{print $1}' | uniq | xargs -r kill -9 ''; @@ -101,6 +91,8 @@ in } misc { + disable_hyprland_logo = true + disable_splash_rendering = true vfr = true vrr = 2 # enable_swallow = true @@ -109,10 +101,13 @@ in decoration { rounding = 10 - blur = yes - blur_size = 3 - blur_passes = 2 - blur_new_optimizations = on + + blur { + enabled = yes + size = 3 + passes = 2 + new_optimizations = on + } drop_shadow = yes shadow_range = 8 @@ -133,13 +128,15 @@ in exec-once = ${pkgs.openrgb}/bin/openrgb --startminimized --profile autorun.orp exec-once = ${pkgs.blueman}/bin/blueman-applet exec-once = ${pkgs.networkmanagerapplet}/bin/nm-applet --indicator - # exec-once = ${xwaylandSetPrimary}/bin/xwayland-setprimary.sh - exec-once = ${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1 - exec-once = ${pkgs.swww}/bin/swww-daemon - exec-once = $pkgs.arrpc}/bin/arRPC + # exec-once = ${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1 + exec-once = ${pkgs.mullvad-vpn}/bin/mullvad-gui + exec-once = ${pkgs.ydotool}/bin/ydotoold + exec = ${pkgs.xorg.xrandr}/bin/xrandr --output ${rightMonitor} --primary exec = ${wob-voldaemon}/bin/wob-volumeindicator.sh; exec = pkill waybar; ${pkgs.waybar_hyprland}/bin/waybar + exec = pkill swww; ${pkgs.swww}/bin/swww init && ${pkgs.swww}/bin/swww img $(cat ~/.cache/swww/wallpaper.txt) + #Set cursor exec = ${pkgs.hyprland}/bin/hyprctl setcursor "${config.gtk.cursorTheme.name}" ${builtins.toString config.gtk.cursorTheme.size} &> /dev/null @@ -198,6 +195,8 @@ in layerrule = blur, waybar layerrule = blur, notifications + layerrule = blur, gtk-layer-shell + windowrulev2 = fullscreen, class:^(hl2_linux)$ windowrulev2 = float, class:^(org.kde.dolphin)$ @@ -214,7 +213,7 @@ in [Desktop Action setSWWWWallpaper] Name=Set Image as Wallpaper - Exec=swww img "%f" + Exec=swww img "%f" && echo "%f" > ~/.cache/swww/wallpaper.txt ''; home.packages = [ pkgs.wl-clipboard pkgs.wl-clipboard-x11 pkgs.hyprpicker pkgs.swww pkgs.hyprprop ]; diff --git a/user/configs/wayland/waybar/default.nix b/user/configs/wayland/waybar/default.nix index 9b13440..1840cf6 100755 --- a/user/configs/wayland/waybar/default.nix +++ b/user/configs/wayland/waybar/default.nix @@ -40,12 +40,6 @@ in "custom/blank" ]; - "sway/mode" = { format = " {}"; }; - "sway/window" = { - icon = false; - icon-size = 16; - }; - "wlr/workspaces" = { on-click = "activate"; on-scroll-up = "hyprctl dispatch workspace e+1"; diff --git a/user/home.nix b/user/home.nix index db87a1f..1012e9c 100755 --- a/user/home.nix +++ b/user/home.nix @@ -1,4 +1,4 @@ -{ pkgs, inputs, ... }: +{ config, pkgs, inputs, ... }: { imports = [ ./configs/beets @@ -22,16 +22,19 @@ home.packages = with pkgs; [ appimage-run bc + bottles bottom calcurse eww + gamescope_git gimp - gnome.file-roller gnome.gnome-boxes gnome.gvfs gnome.seahorse + gnome.gnome-settings-daemon gnome.simple-scan heroic + libsForQt5.ark libsForQt5.dolphin libsForQt5.dolphin-plugins lutris @@ -43,10 +46,12 @@ obs-studio openmw pavucontrol + playerctl protontricks qbittorrent qt5ct sc-im + samba signal-desktop sshfs steam-run @@ -57,13 +62,14 @@ vimv vulkan-tools vulkan-validation-layers - webcord + discord wineWowPackages.stagingFull xdg-utils ]; home.sessionVariables = { EDITOR = "nvim"; + GTK_THEME = "${builtins.toString config.gtk.theme.name}"; MESA_DISK_CACHE_SINGLE_FILE = "1"; NIXOS_OZONE_WL = "1"; NIXPKGS_ALLOW_UNFREE = "1"; @@ -104,8 +110,8 @@ gtk = { enable = true; theme = { - package = pkgs.gruvbox-dark-gtk; - name = "gruvbox-dark"; + package = pkgs.gruvbox-gtk-theme; + name = "Gruvbox-Dark-B"; }; font = { @@ -165,6 +171,6 @@ download = "/mnt/hdd/Downloads"; }; - home.stateVersion = "22.05"; + home.stateVersion = "23.05"; }