commit 07d4f917bd2fb7f25ad0d137a2f8ff3c04c9da5c Author: gpskwlkr Date: Sun Mar 24 23:16:17 2024 +0400 initial commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..6abc6bf --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# nixos-hyprland-flake diff --git a/configuration.nix b/configuration.nix new file mode 100644 index 0000000..b29eef5 --- /dev/null +++ b/configuration.nix @@ -0,0 +1,7 @@ +{ config, lib, pkgs, ... }: + +{ + + system.stateVersion = "23.11"; +} + diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..76735a0 --- /dev/null +++ b/flake.lock @@ -0,0 +1,290 @@ +{ + "nodes": { + "crane": { + "inputs": { + "flake-compat": [ + "lanzaboote", + "flake-compat" + ], + "flake-utils": [ + "lanzaboote", + "flake-utils" + ], + "nixpkgs": [ + "lanzaboote", + "nixpkgs" + ], + "rust-overlay": [ + "lanzaboote", + "rust-overlay" + ] + }, + "locked": { + "lastModified": 1681177078, + "narHash": "sha256-ZNIjBDou2GOabcpctiQykEQVkI8BDwk7TyvlWlI4myE=", + "owner": "ipetkov", + "repo": "crane", + "rev": "0c9f468ff00576577d83f5019a66c557ede5acf6", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "lanzaboote", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1680392223, + "narHash": "sha256-n3g7QFr85lDODKt250rkZj2IFS3i4/8HBU2yKHO3tqw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "dcc36e45d054d7bb554c9cdab69093debd91a0b5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1681202837, + "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "cfacdce06f30d2b68473a46042957675eebb3401", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "lanzaboote", + "pre-commit-hooks-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1660459072, + "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1710888565, + "narHash": "sha256-s9Hi4RHhc6yut4EcYD50sZWRDKsugBJHSbON8KFwoTw=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "f33900124c23c4eca5831b9b5eb32ea5894375ce", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-23.11", + "repo": "home-manager", + "type": "github" + } + }, + "lanzaboote": { + "inputs": { + "crane": "crane", + "flake-compat": "flake-compat", + "flake-parts": "flake-parts", + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixpkgs" + ], + "pre-commit-hooks-nix": "pre-commit-hooks-nix", + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1682802423, + "narHash": "sha256-Fb5TeRTdvUlo/5Yi2d+FC8a6KoRLk2h1VE0/peMhWPs=", + "owner": "nix-community", + "repo": "lanzaboote", + "rev": "64b903ca87d18cef2752c19c098af275c6e51d63", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "v0.3.0", + "repo": "lanzaboote", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1711124224, + "narHash": "sha256-l0zlN/3CiodvWDtfBOVxeTwYSRz93muVbXWSpaMjXxM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "56528ee42526794d413d6f244648aaee4a7b56c0", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1678872516, + "narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9b8e5abb18324c7fe9f07cb100c3cd4a29cda8b8", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-22.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1711001935, + "narHash": "sha256-URtGpHue7HHZK0mrHnSf8wJ6OmMKYSsoLmJybrOLFSQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "20f77aa09916374aa3141cbc605c955626762c9a", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, + "pre-commit-hooks-nix": { + "inputs": { + "flake-compat": [ + "lanzaboote", + "flake-compat" + ], + "flake-utils": [ + "lanzaboote", + "flake-utils" + ], + "gitignore": "gitignore", + "nixpkgs": [ + "lanzaboote", + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable" + }, + "locked": { + "lastModified": 1681413034, + "narHash": "sha256-/t7OjNQcNkeWeSq/CFLYVBfm+IEnkjoSm9iKvArnUUI=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "d3de8f69ca88fb6f8b09e5b598be5ac98d28ede5", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "lanzaboote": "lanzaboote", + "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable" + } + }, + "rust-overlay": { + "inputs": { + "flake-utils": [ + "lanzaboote", + "flake-utils" + ], + "nixpkgs": [ + "lanzaboote", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1682129965, + "narHash": "sha256-1KRPIorEL6pLpJR04FwAqqnt4Tzcm4MqD84yhlD+XSk=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "2c417c0460b788328220120c698630947547ee83", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..327671c --- /dev/null +++ b/flake.nix @@ -0,0 +1,87 @@ +{ + + description = "gpskwlkr NixOS"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + nixpkgs-unstable.url = "nixpkgs/nixos-unstable"; + home-manager.url = "github:nix-community/home-manager/release-23.11"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + + lanzaboote = { + url = "github:nix-community/lanzaboote/v0.3.0"; + + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, lanzaboote, ... }: + let + lib = nixpkgs.lib; + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + pkgs-unstable = nixpkgs-unstable.legacyPackages.${system}; + in + { + + nixosConfigurations = { + nixos-personal = lib.nixosSystem { + inherit system; + modules = [ + ./configuration.nix + ./hardware-configuration.nix + ./system/boot.nix + ./system/fonts.nix + ./system/gaming.nix + ./system/hardware.nix + ./system/hyprland.nix + ./system/internationalisation.nix + ./system/misc.nix + ./system/networking.nix + ./system/nixsettings.nix + ./system/packages.nix + ./system/polkit.nix + ./system/programming.nix + ./system/programs.nix + ./system/security.nix + ./system/services.nix + ./system/sound.nix + ./system/time.nix + ./system/users.nix + ./system/virtualisation.nix + ./system/theme.nix + ./system/work.nix + + lanzaboote.nixosModules.lanzaboote + + + ({pkgs, lib, ...}: { + environment.systemPackages = [ + pkgs.sbctl + ]; + + boot.loader.systemd-boot.enable = lib.mkForce false; + + boot.lanzaboote = { + enable = true; + pkiBundle = "/etc/secureboot"; + }; + }) + ]; + specialArgs = { + inherit pkgs-unstable; + }; + }; + }; + + homeConfigurations = { + gpskwlkr = home-manager.lib.homeManagerConfiguration { + inherit pkgs; + modules = [ ./home.nix ]; + extraSpecialArgs = { + inherit pkgs-unstable; + }; + }; + }; + }; +} diff --git a/hardware-configuration.nix b/hardware-configuration.nix new file mode 100644 index 0000000..4ce05a1 --- /dev/null +++ b/hardware-configuration.nix @@ -0,0 +1,46 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/755bd859-a650-4acd-99a3-d48ef8119370"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/3E0E-A359"; + fsType = "vfat"; + }; + + fileSystems."/home/gpskwlkr/HDD" = + { + device = "/dev/disk/by-uuid/5ffff838-c04f-4a9b-aa5c-b985e52b6993"; + fsType = "ext4"; + options = [ "defaults,noatime" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/dd5fab99-0fad-4dc6-bb4c-723245e9f477"; } + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/home.nix b/home.nix new file mode 100644 index 0000000..20a4d74 --- /dev/null +++ b/home.nix @@ -0,0 +1,96 @@ +{ config, pkgs, pkgs-unstable, lib, ... }: +let configDir = ./user/config; +in +{ + imports = [ + ./user/sh.nix + ./user/git + ]; + + home.username = "gpskwlkr"; + home.homeDirectory = "/home/gpskwlkr"; + home.stateVersion = "23.11"; + + home.packages = [ + pkgs.nnn + pkgs.qbittorrent + pkgs.telegram-desktop + pkgs.fnm + pkgs.blueberry + + pkgs-unstable.vesktop + pkgs-unstable.hyprshot + ]; + + + # FIX: make it automatically scan config dir and symlink all folders + home.file = { + ".config/nvim".source = "${configDir}/nvim"; + ".config/wallpapers".source = "${configDir}/wallpapers"; + ".config/kitty".source = "${configDir}/kitty"; + ".config/neofetch".source = "${configDir}/neofetch"; + ".config/hypr".source = "${configDir}/hypr"; + ".config/swayidle".source = "${configDir}/swayidle"; + ".config/swaylock".source = "${configDir}/swaylock"; + ".config/wlogout".source = "${configDir}/wlogout"; + ".config/waybar".source = "${configDir}/waybar"; + ".config/btop".source = "${configDir}/btop"; + ".config/wofi".source = "${configDir}/wofi"; + ".config/mako".source = "${configDir}/mako"; + }; + + gtk = { + enable = true; + + cursorTheme = { + name = "Catppuccin-Macchiato-Teal"; + package = pkgs.catppuccin-gtk; + }; + + gtk3.extraConfig = { + Settings = '' + gtk-application-prefer-dark-theme = 1; + gtk-cursor-theme-name=Catppuccin-Macchiato-Teal + ''; + }; + + gtk4.extraConfig = { + Settings = '' + gtk-application-prefer-dark-theme = 1; + gtk-cursor-theme-name=Catppuccin-Macchiato-Teal + ''; + }; + }; + + home.sessionVariables = { + BROWSER = "firefox"; + EDITOR = "nvim"; + TERMINAL = "kitty"; + #NIXOS_OZONE_WL = "1"; + QT_QPA_PLATFORMTHEME = "gtk3"; + QT_SCALE_FACTOR = "1"; + MOZ_ENABLE_WAYLAND = "1"; + SDL_VIDEODRIVER = "wayland"; + QT_QPA_PLATFORM = "wayland-egl"; + QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; + QT_AUTO_SCREEN_SCALE_FACTOR = "1"; + WLR_DRM_DEVICES = "/dev/dri/card0"; + #WLR_NO_HARDWARE_CURSORS = "1"; # if no cursor,uncomment this line + CLUTTER_BACKEND = "wayland"; + WLR_RENDERER = "vulkan"; + XCURSOR_SIZE = "24"; + XDG_CURRENT_DESKTOP = "Hyprland"; + XDG_SESSION_DESKTOP = "Hyprland"; + XDG_SESSION_TYPE = "wayland"; + GTK_USE_PORTAL = "1"; + #NIXOS_XDG_OPEN_USE_PORTAL = "1"; + XDG_CACHE_HOME = "\${HOME}/.cache"; + XDG_CONFIG_HOME = "\${HOME}/.config"; + #XDG_BIN_HOME = "\${HOME}/.local/bin"; + XDG_DATA_HOME = "\${HOME}/.local/share"; + + }; + + programs.home-manager.enable = true; +} + diff --git a/system/boot.nix b/system/boot.nix new file mode 100644 index 0000000..5b0511d --- /dev/null +++ b/system/boot.nix @@ -0,0 +1,28 @@ +{ config, pkgs, ... }: + +{ + # Switched to lanzaboote Secure Boot + # boot = { + # kernelParams = ["nohibernate" "ipv6.disable=1"]; + # tmp.cleanOnBoot = true; + # supportedFilesystems = ["ntfs"]; + # loader = { + # grub = { + # device = "nodev"; + # efiSupport = true; + # enable = true; + # useOSProber = true; + # timeoutStyle = "menu"; + # efiInstallAsRemovable = true; + # extraConfig = '' + # insmod tpm + # ''; + # }; + # timeout = 300; + # }; + # }; + + environment.systemPackages = with pkgs; [ + sbctl + ]; +} diff --git a/system/fonts.nix b/system/fonts.nix new file mode 100644 index 0000000..5d7253e --- /dev/null +++ b/system/fonts.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: + +{ + fonts.packages = with pkgs; [ + nerdfonts + font-awesome + ]; +} diff --git a/system/gaming.nix b/system/gaming.nix new file mode 100644 index 0000000..f9f728f --- /dev/null +++ b/system/gaming.nix @@ -0,0 +1,24 @@ +{ config, pkgs, ... }: + +{ + nix = { + settings = { + warn-dirty = false; + experimental-features = [ "nix-command" "flakes" ]; + auto-optimise-store = true; + substituters = ["https://nix-gaming.cachix.org"]; + trusted-public-keys = ["nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="]; + }; + }; + + environment.systemPackages = with pkgs; [ + steam + steam-run + (lutris.override { + extraPkgs = pkgs: [ + wineWowPackages.stable + winetricks + ]; + }) + ]; +} diff --git a/system/hardware.nix b/system/hardware.nix new file mode 100644 index 0000000..b1434a9 --- /dev/null +++ b/system/hardware.nix @@ -0,0 +1,13 @@ +{ config, pkgs, ... }: + +{ + hardware = { + bluetooth.enable = true; + + opengl = { + enable = true; + driSupport = true; + driSupport32Bit = true; + }; + }; +} diff --git a/system/hyprland.nix b/system/hyprland.nix new file mode 100644 index 0000000..94c907c --- /dev/null +++ b/system/hyprland.nix @@ -0,0 +1,24 @@ +{ config, pkgs, ... }: + +{ + programs.hyprland = { + enable = true; + }; + + environment.systemPackages = with pkgs; [ + hyprpaper + kitty + libnotify + mako + nwg-look + qt5.qtwayland + qt6.qtwayland + swayidle + swaylock-effects + wlogout + wl-clipboard + wofi + waybar + xfce.thunar + ]; +} diff --git a/system/internationalisation.nix b/system/internationalisation.nix new file mode 100644 index 0000000..3ce9093 --- /dev/null +++ b/system/internationalisation.nix @@ -0,0 +1,23 @@ +{ pkgs, ... }: + +{ + i18n.defaultLocale = "en_US.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "en_US.UTF-8"; + LC_IDENTIFICATION = "en_US.UTF-8"; + LC_MEASUREMENT = "en_US.UTF-8"; + LC_MONETARY = "en_US.UTF-8"; + LC_NAME = "en_US.UTF-8"; + LC_NUMERIC = "en_US.UTF-8"; + LC_PAPER = "en_US.UTF-8"; + LC_TELEPHONE = "en_US.UTF-8"; + LC_TIME = "en_US.UTF-8"; + }; + + i18n.supportedLocales = [ + "en_US.UTF-8/UTF-8" + "ru_RU.UTF-8/UTF-8" + "ka_GE.UTF-8/UTF-8" + ]; +} diff --git a/system/misc.nix b/system/misc.nix new file mode 100644 index 0000000..417a3da --- /dev/null +++ b/system/misc.nix @@ -0,0 +1,8 @@ +{ ... }: + +{ + console = { + font = "Lat2-Terminus16"; + useXkbConfig = true; + }; +} diff --git a/system/networking.nix b/system/networking.nix new file mode 100644 index 0000000..bb978e9 --- /dev/null +++ b/system/networking.nix @@ -0,0 +1,10 @@ +{ config, pkgs, ... }: + +{ + networking = { + hostName = "nixos-personal"; + networkmanager.enable = true; + enableIPv6 = false; + firewall.enable = false; + }; +} diff --git a/system/nixsettings.nix b/system/nixsettings.nix new file mode 100644 index 0000000..0c4b391 --- /dev/null +++ b/system/nixsettings.nix @@ -0,0 +1,32 @@ +{ config, pkgs, ... }: + +{ + documentation.nixos.enable = false; + + nix = { + settings = { + warn-dirty = false; + experimental-features = [ "nix-command" "flakes" ]; + auto-optimise-store = true; + substituters = ["https://nix-gaming.cachix.org"]; + trusted-public-keys = ["nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="]; + }; + + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 7d"; + }; + }; + + nixpkgs = { + config = { + allowUnfree = true; + allowUnfreePredicate = pkg: builtins.elem (builtins.parseDrvName pkg.name).name ["steam"]; + + permittedInsecurePackages = [ + "electron-25.9.0" + ]; + }; + }; +} diff --git a/system/packages.nix b/system/packages.nix new file mode 100644 index 0000000..cd392ca --- /dev/null +++ b/system/packages.nix @@ -0,0 +1,23 @@ + +{ config, pkgs, ... }: + +{ + environment.systemPackages = with pkgs; [ + bat + btop + fzf + gimp + git + lm_sensors + neofetch + neovim + ripgrep + sysstat + tldr + unzip + wget + xdg-desktop-portal-gtk + zoxide + ]; +} + diff --git a/system/polkit.nix b/system/polkit.nix new file mode 100644 index 0000000..ebd551c --- /dev/null +++ b/system/polkit.nix @@ -0,0 +1,27 @@ +{ pkgs, ... }: + +{ + systemd = { + user.services.polkit-gnome-authentication-agent-1 = { + description = "polkit-gnome-authentication-agent-1"; + wantedBy = [ "graphical-session.target" ]; + wants = [ "graphical-session.target" ]; + after = [ "graphical-session.target" ]; + serviceConfig = { + Type = "simple"; + ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + extraConfig = '' + DefaultTimeoutStopSec=10s + ''; + }; + + environment.systemPackages = with pkgs; [ + polkit + polkit_gnome + ]; +} diff --git a/system/programming.nix b/system/programming.nix new file mode 100644 index 0000000..1f34366 --- /dev/null +++ b/system/programming.nix @@ -0,0 +1,19 @@ +{ pkgs, ... }: + +{ + environment.systemPackages = with pkgs; [ + dotnet-runtime_8 + dotnet-sdk_8 + dotnetPackages.Nuget + gcc + go + lua + nodejs_21 + nodePackages.pnpm + (python3.withPackages (python-pkgs: [ + python-pkgs.pip + python-pkgs.requests + ])) + zig + ]; +} diff --git a/system/programs.nix b/system/programs.nix new file mode 100644 index 0000000..5cac421 --- /dev/null +++ b/system/programs.nix @@ -0,0 +1,78 @@ +{ config, pkgs, ... }: + +{ + + programs = { + steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + }; + + hyprland = { + enable = true; + }; + + gnupg = { + agent = { + enable = true; + enableSSHSupport = true; + }; + }; + + tmux = { + enable = true; + escapeTime = 0; + + plugins = with pkgs; [ + tmuxPlugins.vim-tmux-navigator + tmuxPlugins.resurrect + tmuxPlugins.continuum + tmuxPlugins.nord + ]; + + extraConfig = '' + set -g default-terminal "xterm-256color" + set -ga terminal-overrides ",*256col*:Tc" + set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' + set-environment -g COLORTERM "truecolor" + set -g prefix C-a + unbind C-b + bind-key C-a send-prefix + + unbind % + bind | split-window -h + + unbind '"' + bind - split-window -v + + unbind r + bind r source-file ~/.tmux.conf + + bind -r j resize-pane -D 5 + bind -r k resize-pane -U 5 + bind -r l resize-pane -R 5 + bind -r h resize-pane -L 5 + + bind -r m resize-pane -Z + + set -g mouse on + + set-window-option -g mode-keys vi + + bind-key -T copy-mode-vi 'v' send -X begin-selection + bind-key -T copy-mode-vi 'y' send -X copy-selection + + unbind -T copy-mode-vi MouseDragEnd1Pane + + set -g @resurrect-capture-pane-contents 'on' + set -g @continuum-restore 'on' + set -g @themepack 'nord' + ''; + }; + + zsh.enable = true; + mtr.enable = true; + }; + +} diff --git a/system/security.nix b/system/security.nix new file mode 100644 index 0000000..d8d9e3b --- /dev/null +++ b/system/security.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + security.polkit.enable = true; + security.pam.services.swaylock = {}; + security.pam.services.swaylock.fprintAuth = false; +} diff --git a/system/services.nix b/system/services.nix new file mode 100644 index 0000000..06336e8 --- /dev/null +++ b/system/services.nix @@ -0,0 +1,20 @@ +{ config, pkgs, ... }: + +{ + services = { + dbus.enable = true; + picom.enable = true; + openssh.enable = true; + + xserver = { + enable = true; + layout = "us, ru, ge"; + xkbOptions = "grp:alt_shift_toggle, caps:swapescape"; + + displayManager = { + sddm.enable = true; + }; + }; + + }; +} diff --git a/system/sound.nix b/system/sound.nix new file mode 100644 index 0000000..e7f5042 --- /dev/null +++ b/system/sound.nix @@ -0,0 +1,21 @@ +{ pkgs, ... }: + +{ + sound.enable = true; + security.rtkit.enable = true; + hardware.pulseaudio.enable = false; + + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + wireplumber.enable = true; + }; + + environment.systemPackages = with pkgs; [ + pamixer + pavucontrol + ]; +} diff --git a/system/theme.nix b/system/theme.nix new file mode 100644 index 0000000..0e5419f --- /dev/null +++ b/system/theme.nix @@ -0,0 +1,51 @@ +{ pkgs, ... }: + +{ + # Enable Theme + environment.variables.GTK_THEME = "Catppuccin-Macchiato-Standard-Teal-Dark"; + environment.variables.XCURSOR_THEME = "Catppuccin-Macchiato-Teal"; + environment.variables.XCURSOR_SIZE = "24"; + console = { + earlySetup = true; + colors = [ + "24273a" + "ed8796" + "a6da95" + "eed49f" + "8aadf4" + "f5bde6" + "8bd5ca" + "cad3f5" + "5b6078" + "ed8796" + "a6da95" + "eed49f" + "8aadf4" + "f5bde6" + "8bd5ca" + "a5adcb" + ]; + }; + + # Override packages + nixpkgs.config.packageOverrides = pkgs: { + colloid-icon-theme = pkgs.colloid-icon-theme.override { colorVariants = ["teal"]; }; + catppuccin-gtk = pkgs.catppuccin-gtk.override { + accents = [ "teal" ]; # You can specify multiple accents here to output multiple themes + size = "standard"; + variant = "macchiato"; + }; + discord = pkgs.discord.override { + withOpenASAR = true; + withTTS = true; + }; + }; + + environment.systemPackages = with pkgs; [ + catppuccin-cursors.macchiatoTeal + catppuccin-gtk + catppuccin-kvantum + colloid-icon-theme + numix-icon-theme-circle + ]; +} diff --git a/system/time.nix b/system/time.nix new file mode 100644 index 0000000..0cbc42b --- /dev/null +++ b/system/time.nix @@ -0,0 +1,5 @@ +{ ... }: + +{ + time.timeZone = "Asia/Tbilisi"; +} diff --git a/system/users.nix b/system/users.nix new file mode 100644 index 0000000..64d6786 --- /dev/null +++ b/system/users.nix @@ -0,0 +1,21 @@ +{ config, pkgs, ... }: + +{ +users.users.gpskwlkr = { + isNormalUser = true; + shell = pkgs.zsh; + extraGroups = [ + "wheel" + "qemu" + "kvm" + "libvirtd" + "networkmanager" + "docker" + ]; + packages = with pkgs; [ + firefox + tree + ]; + }; + +} diff --git a/system/virtualisation.nix b/system/virtualisation.nix new file mode 100644 index 0000000..d7cb2ef --- /dev/null +++ b/system/virtualisation.nix @@ -0,0 +1,37 @@ +{ pkgs, ... }: + +{ + virtualisation.libvirtd = { + enable = true; + + qemu = { + swtpm.enable = true; + ovmf.enable = true; + ovmf.packages = [ pkgs.OVMFFull.fd ]; + }; + }; + + virtualisation.spiceUSBRedirection.enable = true; + services.spice-vdagentd.enable = true; + + virtualisation.docker = { + enable = true; + enableOnBoot = true; + rootless = { + enable = true; + setSocketVariable = true; + }; + }; + + environment.systemPackages = with pkgs; [ + docker-compose + qemu + spice + spice-gtk + spice-protocol + virt-manager + virt-viewer + win-spice + win-virtio + ]; +} diff --git a/system/work.nix b/system/work.nix new file mode 100644 index 0000000..2cfa84f --- /dev/null +++ b/system/work.nix @@ -0,0 +1,11 @@ +{ pkgs, ... }: + +{ + environment.systemPackages = with pkgs; [ + jetbrains.rider + obsidian + teams-for-linux + thunderbird + zoom-us + ]; +} diff --git a/user/config/btop/btop.conf b/user/config/btop/btop.conf new file mode 100644 index 0000000..b6202f6 --- /dev/null +++ b/user/config/btop/btop.conf @@ -0,0 +1,64 @@ +color_theme = "/home/gpskwlkr/.config/btop/themes/catppuccin_macchiato.theme" +theme_background = True +truecolor = True +force_tty = False +presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty" +vim_keys = True +rounded_corners = True +graph_symbol = "braille" +graph_symbol_cpu = "default" +graph_symbol_mem = "default" +graph_symbol_net = "default" +graph_symbol_proc = "default" +shown_boxes = "cpu mem net proc" +update_ms = 2000 +proc_sorting = "cpu lazy" +proc_reversed = False +proc_tree = False +proc_colors = True +proc_gradient = True +proc_per_core = False +proc_mem_bytes = True +proc_cpu_graphs = True +proc_info_smaps = False +proc_left = False +proc_filter_kernel = False +cpu_graph_upper = "total" +cpu_graph_lower = "total" +cpu_invert_lower = True +cpu_single_graph = False +cpu_bottom = False +show_uptime = True +check_temp = True +cpu_sensor = "Auto" +show_coretemp = True +cpu_core_map = "" +temp_scale = "celsius" +base_10_sizes = False +show_cpu_freq = True +clock_format = "%X" +background_update = True +custom_cpu_name = "" +disks_filter = "" +mem_graphs = True +mem_below_net = False +zfs_arc_cached = True +show_swap = True +swap_disk = True +show_disks = True +only_physical = True +use_fstab = True +zfs_hide_datasets = False +disk_free_priv = False +show_io_stat = True +io_mode = False +io_graph_combined = False +io_graph_speeds = "" +net_download = 100 +net_upload = 100 +net_auto = True +net_sync = True +net_iface = "" +show_battery = True +selected_battery = "Auto" +log_level = "WARNING" diff --git a/user/config/btop/themes/catppuccin_macchiato.theme b/user/config/btop/themes/catppuccin_macchiato.theme new file mode 100644 index 0000000..7abd0bf --- /dev/null +++ b/user/config/btop/themes/catppuccin_macchiato.theme @@ -0,0 +1,42 @@ +theme[main_bg]="#24273A" +theme[main_fg]="#CAD3F5" +theme[title]="#CAD3F5" +theme[hi_fg]="#8AADF4" +theme[selected_bg]="#494D64" +theme[selected_fg]="#8AADF4" +theme[inactive_fg]="#8087A2" +theme[graph_text]="#F4DBD6" +theme[meter_bg]="#494D64" +theme[proc_misc]="#F4DBD6" +theme[cpu_box]="#7DC4E4" +theme[mem_box]="#A6DA95" +theme[net_box]="#C6A0F6" +theme[proc_box]="#F0C6C6" +theme[div_line]="#6E738D" +theme[temp_start]="#EED49F" +theme[temp_mid]="#F5A97F" +theme[temp_end]="#ED8796" +theme[cpu_start]="#7DC4E4" +theme[cpu_mid]="#91D7E3" +theme[cpu_end]="#8BD5CA" +theme[free_start]="#8BD5CA" +theme[free_mid]="#8BD5CA" +theme[free_end]="#A6DA95" +theme[cached_start]="#F5BDE6" +theme[cached_mid]="#F5BDE6" +theme[cached_end]="#C6A0F6" +theme[available_start]="#F4DBD6" +theme[available_mid]="#F0C6C6" +theme[available_end]="#F0C6C6" +theme[used_start]="#F5A97F" +theme[used_mid]="#F5A97F" +theme[used_end]="#ED8796" +theme[download_start]="#B7BDF8" +theme[download_mid]="#B7BDF8" +theme[download_end]="#C6A0F6" +theme[upload_start]="#B7BDF8" +theme[upload_mid]="#B7BDF8" +theme[upload_end]="#C6A0F6" +theme[process_start]="#7DC4E4" +theme[process_mid]="#91D7E3" +theme[process_end]="#8BD5CA" diff --git a/user/config/hypr/bind.conf b/user/config/hypr/bind.conf new file mode 100644 index 0000000..efca48a --- /dev/null +++ b/user/config/hypr/bind.conf @@ -0,0 +1,48 @@ +$mainMod = SUPER + +bind = $mainMod, Return, exec, kitty +bind = $mainMod, Q, killactive, +bind = $mainMod, M, exec, wlogout --protocol layer-shell +bind = $mainMod, E, exec, dolphin +bind = $mainMod, V, togglefloating, +bind = $mainMod, D, exec, wofi --show drun +bind = $mainMod, P, pseudo, # dwindle +bind = $mainMod, S, togglesplit, # dwindle +bind = $mainMod SHIFT, L, exec, swaylock +bind = , PRINT, exec, hyprshot -m region --clipboard-only + +bind = $mainMod, h, movefocus, l +bind = $mainMod, l, movefocus, r +bind = $mainMod, k, movefocus, u +bind = $mainMod, j, movefocus, d + +bind = $mainMod, 1, workspace, 1 +bind = $mainMod, 2, workspace, 2 +bind = $mainMod, 3, workspace, 3 +bind = $mainMod, 4, workspace, 4 +bind = $mainMod, 5, workspace, 5 +bind = $mainMod, 6, workspace, 6 +bind = $mainMod, 7, workspace, 7 +bind = $mainMod, 8, workspace, 8 +bind = $mainMod, 9, workspace, 9 +bind = $mainMod, 0, workspace, 10 + +bind = $mainMod SHIFT, 1, movetoworkspace, 1 +bind = $mainMod SHIFT, 2, movetoworkspace, 2 +bind = $mainMod SHIFT, 3, movetoworkspace, 3 +bind = $mainMod SHIFT, 4, movetoworkspace, 4 +bind = $mainMod SHIFT, 5, movetoworkspace, 5 +bind = $mainMod SHIFT, 6, movetoworkspace, 6 +bind = $mainMod SHIFT, 7, movetoworkspace, 7 +bind = $mainMod SHIFT, 8, movetoworkspace, 8 +bind = $mainMod SHIFT, 9, movetoworkspace, 9 +bind = $mainMod SHIFT, 0, movetoworkspace, 10 + +bind = $mainMod CTRL, l, resizeactive, 10 0 +bind = $mainMod CTRL, h, resizeactive, -10 0 +bind = $mainMod CTRL, k, resizeactive, 0 -10 +bind = $mainMod CTRL, j, resizeactive, 0 10 + +# Move/resize windows with mainMod + LMB/RMB and dragging +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod, mouse:273, resizewindow diff --git a/user/config/hypr/exec.conf b/user/config/hypr/exec.conf new file mode 100644 index 0000000..9fb61ee --- /dev/null +++ b/user/config/hypr/exec.conf @@ -0,0 +1,8 @@ +exec-once = dbus-update-activation-environment --systemd --all +exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP +exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 +exec-once = waybar & hyprpaper +exec-once = swayidle -w +exec-once = nwg-look -a +exec-once = hyprctl setcursor Catppuccin-Macchiato-Teal 24 + diff --git a/user/config/hypr/hyprland.conf b/user/config/hypr/hyprland.conf new file mode 100644 index 0000000..5d41d52 --- /dev/null +++ b/user/config/hypr/hyprland.conf @@ -0,0 +1,8 @@ +source = ~/.config/hypr/monitor.conf +source = ~/.config/hypr/exec.conf +source = ~/.config/hypr/bind.conf +source = ~/.config/hypr/input.conf +source = ~/.config/hypr/window.conf +source = ~/.config/hypr/windowrule.conf + + diff --git a/user/config/hypr/hyprpaper.conf b/user/config/hypr/hyprpaper.conf new file mode 100644 index 0000000..e188f5c --- /dev/null +++ b/user/config/hypr/hyprpaper.conf @@ -0,0 +1,3 @@ +preload = ~/.config/wallpapers/wallpaper.jpg +wallpaper = DP-2, ~/.config/wallpapers/wallpaper.jpg +splash = false diff --git a/user/config/hypr/input.conf b/user/config/hypr/input.conf new file mode 100644 index 0000000..44982d7 --- /dev/null +++ b/user/config/hypr/input.conf @@ -0,0 +1,16 @@ +input { + kb_layout = us, ru, ge + + kb_variant = + kb_model = + kb_options = grp:alt_shift_toggle, caps:swapescape + kb_rules = + + follow_mouse = 1 + + touchpad { + natural_scroll = no + } + + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. +} diff --git a/user/config/hypr/monitor.conf b/user/config/hypr/monitor.conf new file mode 100644 index 0000000..7517176 --- /dev/null +++ b/user/config/hypr/monitor.conf @@ -0,0 +1 @@ +monitor=DP-2,2560x1440@164.835999,auto,auto diff --git a/user/config/hypr/window.conf b/user/config/hypr/window.conf new file mode 100644 index 0000000..32d9e1a --- /dev/null +++ b/user/config/hypr/window.conf @@ -0,0 +1,55 @@ +general { + gaps_in = 5 + gaps_out = 10 + border_size = 1 + col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg + col.inactive_border = rgba(595959aa) + layout = dwindle + allow_tearing = false +} + +decoration { + rounding = 10 + blur { + enabled = true + size = 2 + passes = 2 + new_optimizations = true + xray = false + } + drop_shadow = yes + shadow_range = 4 + shadow_render_power = 3 + col.shadow = rgba(1a1a1aee) +} + +animations { + enabled = yes + bezier = overshot, 0.05, 0.9, 0.1, 1.05 + bezier = smoothOut, 0.36, 0, 0.66, -0.56 + bezier = smoothIn, 0.25, 1, 0.5, 1 + animation = windows, 1, 5, overshot, slide + animation = windowsOut, 1, 4, smoothOut, slide + animation = windowsMove, 1, 4, default + animation = border, 1, 10, default + animation = fade, 1, 10, smoothIn + animation = fadeDim, 1, 10, smoothIn + animation = workspaces, 1, 6, default +} + +dwindle { + pseudotile = yes + preserve_split = yes +} + +master { + new_is_master = true +} + +gestures { + workspace_swipe = off +} + +misc { + force_default_wallpaper = 0 +} diff --git a/user/config/hypr/windowrule.conf b/user/config/hypr/windowrule.conf new file mode 100644 index 0000000..513b7ed --- /dev/null +++ b/user/config/hypr/windowrule.conf @@ -0,0 +1,34 @@ +windowrule = float, file_progress +windowrule = float, confirm +windowrule = float, dialog +windowrule = float, download +windowrule = float, notification +windowrule = float, error +windowrule = float, splash +windowrule = float, confirmreset +windowrule = float, title:Open File +windowrule = float, title:branchdialog +windowrule = float,viewnior +windowrule = float, pavucontrol-qt +windowrule = float, pavucontrol +windowrule = float, file-roller +windowrule = fullscreen, wlogout +windowrule = float, title:wlogout +windowrule = fullscreen, title:wlogout +windowrule = idleinhibit stayfocused, mpv +windowrulev2 = float, title:^(Media viewer)$ + +# Picture in picture windows +windowrulev2 = float, title:^(Picture-in-Picture)$ +windowrulev2 = pin, title:^(Picture-in-Picture)$ +windowrulev2 = float, class:^(vesktop)$,title:^(Discord Popout)$ +windowrulev2 = pin, class:^(vesktop)$,title:^(Discord Popout)$ + + +# Workspace assign + +windowrulev2 = workspace: 1, class:^(kitty)$ +windowrulev2 = workspace: 2, class:^(firefox)$ +windowrulev2 = workspace: 5, class:^(steam)$ +windowrulev2 = workspace: 10, class:^(org.telegram.desktop)$ +windowrulev2 = workspace: 10, class:^(vesktop)$ diff --git a/user/config/kitty/kitty.conf b/user/config/kitty/kitty.conf new file mode 100644 index 0000000..530e075 --- /dev/null +++ b/user/config/kitty/kitty.conf @@ -0,0 +1,13 @@ +include ~/.config/kitty/mocha.conf +font_family jetbrains mono nerd font +font_size 16 +bold_font auto +italic_font auto +bold_italic_font auto +mouse_hide_wait 2.0 +cursor_shape block +url_color #0087bd +url_style dotted +#Close the terminal without confirmation +confirm_os_window_close 0 +background_opacity 0.5 diff --git a/user/config/kitty/mocha.conf b/user/config/kitty/mocha.conf new file mode 100644 index 0000000..2533db7 --- /dev/null +++ b/user/config/kitty/mocha.conf @@ -0,0 +1,80 @@ +# vim:ft=kitty + +## name: Catppuccin-Mocha +## author: Pocco81 (https://github.com/Pocco81) +## license: MIT +## upstream: https://github.com/catppuccin/kitty/blob/main/mocha.conf +## blurb: Soothing pastel theme for the high-spirited! + + + +# The basic colors +foreground #CDD6F4 +background #1E1E2E +selection_foreground #1E1E2E +selection_background #F5E0DC + +# Cursor colors +cursor #F5E0DC +cursor_text_color #1E1E2E + +# URL underline color when hovering with mouse +url_color #F5E0DC + +# Kitty window border colors +active_border_color #B4BEFE +inactive_border_color #6C7086 +bell_border_color #F9E2AF + +# OS Window titlebar colors +wayland_titlebar_color system +macos_titlebar_color system + +# Tab bar colors +active_tab_foreground #11111B +active_tab_background #CBA6F7 +inactive_tab_foreground #CDD6F4 +inactive_tab_background #181825 +tab_bar_background #11111B + +# Colors for marks (marked text in the terminal) +mark1_foreground #1E1E2E +mark1_background #B4BEFE +mark2_foreground #1E1E2E +mark2_background #CBA6F7 +mark3_foreground #1E1E2E +mark3_background #74C7EC + +# The 16 terminal colors + +# black +color0 #45475A +color8 #585B70 + +# red +color1 #F38BA8 +color9 #F38BA8 + +# green +color2 #A6E3A1 +color10 #A6E3A1 + +# yellow +color3 #F9E2AF +color11 #F9E2AF + +# blue +color4 #89B4FA +color12 #89B4FA + +# magenta +color5 #F5C2E7 +color13 #F5C2E7 + +# cyan +color6 #94E2D5 +color14 #94E2D5 + +# white +color7 #BAC2DE +color15 #A6ADC8 diff --git a/user/config/mako/config b/user/config/mako/config new file mode 100644 index 0000000..6592566 --- /dev/null +++ b/user/config/mako/config @@ -0,0 +1,27 @@ +sort=-time +layer=overlay +background-color=#2e3440 +width=300 +height=110 +border-size=2 +border-color=#88c0d0 +border-radius=15 +icons=0 +max-icon-size=64 +default-timeout=5000 +ignore-timeout=1 +font=monospace 14 + +[urgency=low] +border-color=#cccccc + +[urgency=normal] +border-color=#d08770 + +[urgency=high] +border-color=#bf616a +default-timeout=0 + +[category=mpd] +default-timeout=2000 +group-by=category diff --git a/user/config/neofetch/config b/user/config/neofetch/config new file mode 100644 index 0000000..e611a26 --- /dev/null +++ b/user/config/neofetch/config @@ -0,0 +1,869 @@ +# https://github.com/chick2d/neofetch-themes +# Made by https://github.com/arionrefat + +print_info() { + prin "\n" + prin "┌──────────────────────────────────────┐" + info "\n \n OS" distro + info "\n \n Host" model + info "\n \n CPU" cpu + info "\n \n GPU" gpu + info "\n \n Memory" memory + info "\n \n Kernel" kernel + info "\n \n Uptime" uptime + info "\n \n Packages" packages + info "\n \n Shell" shell + info "\n \n Resolution" resolution + info "\n \n DE" de + info "\n \n WM" wm + info "\n \n Terminal" term + prin "└──────────────────────────────────────┘" + prin "\n" + prin "\n \n ${cl0}──${cl1}────${cl2}────${cl3}────${cl4}────${cl5}────${cl6}────${cl7}──" +} + +reset="\033[0m" +gray="\033[1;90m" +red="\033[1;31m" +green="\033[1;32m" +yellow="\033[1;33m" +blue="\033[1;34m" +magenta="\033[1;35m" +cyan="\033[1;36m" +white="\033[1;37m" + +cl0="${gray}" +cl1="${red}" +cl2="${green}" +cl3="${yellow}" +cl4="${blue}" +cl5="${magenta}" +cl6="${cyan}" +cl7="${white}" + + +# Title + + +# Hide/Show Fully qualified domain name. +# +# Default: 'off' +# Values: 'on', 'off' +# Flag: --title_fqdn +title_fqdn="off" + + +# Kernel + + +# Shorten the output of the kernel function. +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --kernel_shorthand +# Supports: Everything except *BSDs (except PacBSD and PC-BSD) +# +# Example: +# on: '4.8.9-1-ARCH' +# off: 'Linux 4.8.9-1-ARCH' +kernel_shorthand="on" + + +# Distro + + +# Shorten the output of the distro function +# +# Default: 'off' +# Values: 'on', 'tiny', 'off' +# Flag: --distro_shorthand +# Supports: Everything except Windows and Haiku +distro_shorthand="off" + +# Show/Hide OS Architecture. +# Show 'x86_64', 'x86' and etc in 'Distro:' output. +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --os_arch +# +# Example: +# on: 'Arch Linux x86_64' +# off: 'Arch Linux' +os_arch="off" + + +# Uptime + + +# Shorten the output of the uptime function +# +# Default: 'on' +# Values: 'on', 'tiny', 'off' +# Flag: --uptime_shorthand +# +# Example: +# on: '2 days, 10 hours, 3 mins' +# tiny: '2d 10h 3m' +# off: '2 days, 10 hours, 3 minutes' +uptime_shorthand="on" + + +# Memory + + +# Show memory pecentage in output. +# +# Default: 'off' +# Values: 'on', 'off' +# Flag: --memory_percent +# +# Example: +# on: '1801MiB / 7881MiB (22%)' +# off: '1801MiB / 7881MiB' +memory_percent="off" + +# Change memory output unit. +# +# Default: 'mib' +# Values: 'kib', 'mib', 'gib' +# Flag: --memory_unit +# +# Example: +# kib '1020928KiB / 7117824KiB' +# mib '1042MiB / 6951MiB' +# gib: ' 0.98GiB / 6.79GiB' +memory_unit="mib" + + +# Packages + + +# Show/Hide Package Manager names. +# +# Default: 'tiny' +# Values: 'on', 'tiny' 'off' +# Flag: --package_managers +# +# Example: +# on: '998 (pacman), 8 (flatpak), 4 (snap)' +# tiny: '908 (pacman, flatpak, snap)' +# off: '908' +package_managers="on" + + +# Shell + + +# Show the path to $SHELL +# +# Default: 'off' +# Values: 'on', 'off' +# Flag: --shell_path +# +# Example: +# on: '/bin/bash' +# off: 'bash' +shell_path="off" + +# Show $SHELL version +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --shell_version +# +# Example: +# on: 'bash 4.4.5' +# off: 'bash' +shell_version="on" + + +# CPU + + +# CPU speed type +# +# Default: 'bios_limit' +# Values: 'scaling_cur_freq', 'scaling_min_freq', 'scaling_max_freq', 'bios_limit'. +# Flag: --speed_type +# Supports: Linux with 'cpufreq' +# NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value. +speed_type="bios_limit" + +# CPU speed shorthand +# +# Default: 'off' +# Values: 'on', 'off'. +# Flag: --speed_shorthand +# NOTE: This flag is not supported in systems with CPU speed less than 1 GHz +# +# Example: +# on: 'i7-6500U (4) @ 3.1GHz' +# off: 'i7-6500U (4) @ 3.100GHz' +speed_shorthand="off" + +# Enable/Disable CPU brand in output. +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --cpu_brand +# +# Example: +# on: 'Intel i7-6500U' +# off: 'i7-6500U (4)' +cpu_brand="on" + +# CPU Speed +# Hide/Show CPU speed. +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --cpu_speed +# +# Example: +# on: 'Intel i7-6500U (4) @ 3.1GHz' +# off: 'Intel i7-6500U (4)' +cpu_speed="on" + +# CPU Cores +# Display CPU cores in output +# +# Default: 'logical' +# Values: 'logical', 'physical', 'off' +# Flag: --cpu_cores +# Support: 'physical' doesn't work on BSD. +# +# Example: +# logical: 'Intel i7-6500U (4) @ 3.1GHz' (All virtual cores) +# physical: 'Intel i7-6500U (2) @ 3.1GHz' (All physical cores) +# off: 'Intel i7-6500U @ 3.1GHz' +cpu_cores="logical" + +# CPU Temperature +# Hide/Show CPU temperature. +# Note the temperature is added to the regular CPU function. +# +# Default: 'off' +# Values: 'C', 'F', 'off' +# Flag: --cpu_temp +# Supports: Linux, BSD +# NOTE: For FreeBSD and NetBSD-based systems, you'll need to enable +# coretemp kernel module. This only supports newer Intel processors. +# +# Example: +# C: 'Intel i7-6500U (4) @ 3.1GHz [27.2°C]' +# F: 'Intel i7-6500U (4) @ 3.1GHz [82.0°F]' +# off: 'Intel i7-6500U (4) @ 3.1GHz' +cpu_temp="off" + + +# GPU + + +# Enable/Disable GPU Brand +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --gpu_brand +# +# Example: +# on: 'AMD HD 7950' +# off: 'HD 7950' +gpu_brand="on" + +# Which GPU to display +# +# Default: 'all' +# Values: 'all', 'dedicated', 'integrated' +# Flag: --gpu_type +# Supports: Linux +# +# Example: +# all: +# GPU1: AMD HD 7950 +# GPU2: Intel Integrated Graphics +# +# dedicated: +# GPU1: AMD HD 7950 +# +# integrated: +# GPU1: Intel Integrated Graphics +gpu_type="all" + + +# Resolution + + +# Display refresh rate next to each monitor +# Default: 'off' +# Values: 'on', 'off' +# Flag: --refresh_rate +# Supports: Doesn't work on Windows. +# +# Example: +# on: '1920x1080 @ 60Hz' +# off: '1920x1080' +refresh_rate="off" + + +# Gtk Theme / Icons / Font + + +# Shorten output of GTK Theme / Icons / Font +# +# Default: 'off' +# Values: 'on', 'off' +# Flag: --gtk_shorthand +# +# Example: +# on: 'Numix, Adwaita' +# off: 'Numix [GTK2], Adwaita [GTK3]' +gtk_shorthand="off" + + +# Enable/Disable gtk2 Theme / Icons / Font +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --gtk2 +# +# Example: +# on: 'Numix [GTK2], Adwaita [GTK3]' +# off: 'Adwaita [GTK3]' +gtk2="on" + +# Enable/Disable gtk3 Theme / Icons / Font +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --gtk3 +# +# Example: +# on: 'Numix [GTK2], Adwaita [GTK3]' +# off: 'Numix [GTK2]' +gtk3="on" + + +# IP Address + + +# Website to ping for the public IP +# +# Default: 'http://ident.me' +# Values: 'url' +# Flag: --ip_host +public_ip_host="http://ident.me" + +# Public IP timeout. +# +# Default: '2' +# Values: 'int' +# Flag: --ip_timeout +public_ip_timeout=2 + + +# Desktop Environment + + +# Show Desktop Environment version +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --de_version +de_version="on" + + +# Disk + + +# Which disks to display. +# The values can be any /dev/sdXX, mount point or directory. +# NOTE: By default we only show the disk info for '/'. +# +# Default: '/' +# Values: '/', '/dev/sdXX', '/path/to/drive'. +# Flag: --disk_show +# +# Example: +# disk_show=('/' '/dev/sdb1'): +# 'Disk (/): 74G / 118G (66%)' +# 'Disk (/mnt/Videos): 823G / 893G (93%)' +# +# disk_show=('/'): +# 'Disk (/): 74G / 118G (66%)' +# +disk_show=('/storage/emulated' '/' '/server') + +# Disk subtitle. +# What to append to the Disk subtitle. +# +# Default: 'mount' +# Values: 'mount', 'name', 'dir', 'none' +# Flag: --disk_subtitle +# +# Example: +# name: 'Disk (/dev/sda1): 74G / 118G (66%)' +# 'Disk (/dev/sdb2): 74G / 118G (66%)' +# +# mount: 'Disk (/): 74G / 118G (66%)' +# 'Disk (/mnt/Local Disk): 74G / 118G (66%)' +# 'Disk (/mnt/Videos): 74G / 118G (66%)' +# +# dir: 'Disk (/): 74G / 118G (66%)' +# 'Disk (Local Disk): 74G / 118G (66%)' +# 'Disk (Videos): 74G / 118G (66%)' +# +# none: 'Disk: 74G / 118G (66%)' +# 'Disk: 74G / 118G (66%)' +# 'Disk: 74G / 118G (66%)' +disk_subtitle="none" + +# Disk percent. +# Show/Hide disk percent. +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --disk_percent +# +# Example: +# on: 'Disk (/): 74G / 118G (66%)' +# off: 'Disk (/): 74G / 118G' +disk_percent="on" + + +# Song + + +# Manually specify a music player. +# +# Default: 'auto' +# Values: 'auto', 'player-name' +# Flag: --music_player +# +# Available values for 'player-name': +# +# amarok +# audacious +# banshee +# bluemindo +# clementine +# cmus +# deadbeef +# deepin-music +# dragon +# elisa +# exaile +# gnome-music +# gmusicbrowser +# gogglesmm +# guayadeque +# io.elementary.music +# iTunes +# juk +# lollypop +# mocp +# mopidy +# mpd +# muine +# netease-cloud-music +# olivia +# playerctl +# pogo +# pragha +# qmmp +# quodlibet +# rhythmbox +# sayonara +# smplayer +# spotify +# strawberry +# tauonmb +# tomahawk +# vlc +# xmms2d +# xnoise +# yarock +music_player="auto" + +# Format to display song information. +# +# Default: '%artist% - %album% - %title%' +# Values: '%artist%', '%album%', '%title%' +# Flag: --song_format +# +# Example: +# default: 'Song: Jet - Get Born - Sgt Major' +song_format="%artist% - %album% - %title%" + +# Print the Artist, Album and Title on separate lines +# +# Default: 'off' +# Values: 'on', 'off' +# Flag: --song_shorthand +# +# Example: +# on: 'Artist: The Fratellis' +# 'Album: Costello Music' +# 'Song: Chelsea Dagger' +# +# off: 'Song: The Fratellis - Costello Music - Chelsea Dagger' +song_shorthand="off" + +# 'mpc' arguments (specify a host, password etc). +# +# Default: '' +# Example: mpc_args=(-h HOST -P PASSWORD) +mpc_args=() + + +# Text Colors + + +# Text Colors +# +# Default: 'distro' +# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num' +# Flag: --colors +# +# Each number represents a different part of the text in +# this order: 'title', '@', 'underline', 'subtitle', 'colon', 'info' +# +# Example: +# colors=(distro) - Text is colored based on Distro colors. +# colors=(4 6 1 8 8 6) - Text is colored in the order above. +colors=(distro) + + +# Text Options + + +# Toggle bold text +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --bold +bold="on" + +# Enable/Disable Underline +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --underline +underline_enabled="on" + +# Underline character +# +# Default: '-' +# Values: 'string' +# Flag: --underline_char +underline_char="-" + + +# Info Separator +# Replace the default separator with the specified string. +# +# Default: ':' +# Flag: --separator +# +# Example: +# separator="->": 'Shell-> bash' +# separator=" =": 'WM = dwm' +separator=":" + + +# Color Blocks + + +# Color block range +# The range of colors to print. +# +# Default: '0', '15' +# Values: 'num' +# Flag: --block_range +# +# Example: +# +# Display colors 0-7 in the blocks. (8 colors) +# neofetch --block_range 0 7 +# +# Display colors 0-15 in the blocks. (16 colors) +# neofetch --block_range 0 15 +block_range=(0 15) + +# Toggle color blocks +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --color_blocks +color_blocks="on" + +# Color block width in spaces +# +# Default: '3' +# Values: 'num' +# Flag: --block_width +block_width=3 + +# Color block height in lines +# +# Default: '1' +# Values: 'num' +# Flag: --block_height +block_height=1 + +# Color Alignment +# +# Default: 'auto' +# Values: 'auto', 'num' +# Flag: --col_offset +# +# Number specifies how far from the left side of the terminal (in spaces) to +# begin printing the columns, in case you want to e.g. center them under your +# text. +# Example: +# col_offset="auto" - Default behavior of neofetch +# col_offset=7 - Leave 7 spaces then print the colors +col_offset="auto" + +# Progress Bars + + +# Bar characters +# +# Default: '-', '=' +# Values: 'string', 'string' +# Flag: --bar_char +# +# Example: +# neofetch --bar_char 'elapsed' 'total' +# neofetch --bar_char '-' '=' +bar_char_elapsed="-" +bar_char_total="=" + +# Toggle Bar border +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --bar_border +bar_border="on" + +# Progress bar length in spaces +# Number of chars long to make the progress bars. +# +# Default: '15' +# Values: 'num' +# Flag: --bar_length +bar_length=15 + +# Progress bar colors +# When set to distro, uses your distro's logo colors. +# +# Default: 'distro', 'distro' +# Values: 'distro', 'num' +# Flag: --bar_colors +# +# Example: +# neofetch --bar_colors 3 4 +# neofetch --bar_colors distro 5 +bar_color_elapsed="distro" +bar_color_total="distro" + + +# Info display +# Display a bar with the info. +# +# Default: 'off' +# Values: 'bar', 'infobar', 'barinfo', 'off' +# Flags: --cpu_display +# --memory_display +# --battery_display +# --disk_display +# +# Example: +# bar: '[---=======]' +# infobar: 'info [---=======]' +# barinfo: '[---=======] info' +# off: 'info' +cpu_display="off" +memory_display="off" +battery_display="off" +disk_display="off" + + +# Backend Settings + + +# Image backend. +# +# Default: 'ascii' +# Values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'off', +# 'pot', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty' +# Flag: --backend +image_backend="ascii" + +# Image Source +# +# Which image or ascii file to display. +# +# Default: 'auto' +# Values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/' +# 'command output (neofetch --ascii "$(fortune | cowsay -W 30)")' +# Flag: --source +# +# NOTE: 'auto' will pick the best image source for whatever image backend is used. +# In ascii mode, distro ascii art will be used and in an image mode, your +# wallpaper will be used. +image_source="auto" + + +# Ascii Options + + +# Ascii distro +# Which distro's ascii art to display. +# +# Default: 'auto' +# Values: 'auto', 'distro_name' +# Flag: --ascii_distro +# NOTE: AIX, Alpine, Anarchy, Android, Antergos, antiX, "AOSC OS", +# "AOSC OS/Retro", Apricity, ArcoLinux, ArchBox, ARCHlabs, +# ArchStrike, XFerience, ArchMerge, Arch, Artix, Arya, Bedrock, +# Bitrig, BlackArch, BLAG, BlankOn, BlueLight, bonsai, BSD, +# BunsenLabs, Calculate, Carbs, CentOS, Chakra, ChaletOS, +# Chapeau, Chrom*, Cleanjaro, ClearOS, Clear_Linux, Clover, +# Condres, Container_Linux, CRUX, Cucumber, Debian, Deepin, +# DesaOS, Devuan, DracOS, DarkOs, DragonFly, Drauger, Elementary, +# EndeavourOS, Endless, EuroLinux, Exherbo, Fedora, Feren, FreeBSD, +# FreeMiNT, Frugalware, Funtoo, GalliumOS, Garuda, Gentoo, Pentoo, +# gNewSense, GNOME, GNU, GoboLinux, Grombyang, Guix, Haiku, Huayra, +# Hyperbola, janus, Kali, KaOS, KDE_neon, Kibojoe, Kogaion, +# Korora, KSLinux, Kubuntu, LEDE, LFS, Linux_Lite, +# LMDE, Lubuntu, Lunar, macos, Mageia, MagpieOS, Mandriva, +# Manjaro, Maui, Mer, Minix, LinuxMint, MX_Linux, Namib, +# Neptune, NetBSD, Netrunner, Nitrux, NixOS, Nurunner, +# NuTyX, OBRevenge, OpenBSD, openEuler, OpenIndiana, openmamba, +# OpenMandriva, OpenStage, OpenWrt, osmc, Oracle, OS Elbrus, PacBSD, +# Parabola, Pardus, Parrot, Parsix, TrueOS, PCLinuxOS, Peppermint, +# popos, Porteus, PostMarketOS, Proxmox, Puppy, PureOS, Qubes, Radix, +# Raspbian, Reborn_OS, Redstar, Redcore, Redhat, Refracted_Devuan, +# Regata, Rosa, sabotage, Sabayon, Sailfish, SalentOS, Scientific, +# Septor, SereneLinux, SharkLinux, Siduction, Slackware, SliTaz, +# SmartOS, Solus, Source_Mage, Sparky, Star, SteamOS, SunOS, +# openSUSE_Leap, openSUSE_Tumbleweed, openSUSE, SwagArch, Tails, +# Trisquel, Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE, Ubuntu-Studio, +# Ubuntu, Venom, Void, Obarun, windows10, Windows7, Xubuntu, Zorin, +# and IRIX have ascii logos +# NOTE: Arch, Ubuntu, Redhat, and Dragonfly have 'old' logo variants. +# Use '{distro name}_old' to use the old logos. +# NOTE: Ubuntu has flavor variants. +# Change this to Lubuntu, Kubuntu, Xubuntu, Ubuntu-GNOME, +# Ubuntu-Studio, Ubuntu-Mate or Ubuntu-Budgie to use the flavors. +# NOTE: Arcolinux, Dragonfly, Fedora, Alpine, Arch, Ubuntu, +# CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, android, +# Antrix, CentOS, Cleanjaro, ElementaryOS, GUIX, Hyperbola, +# Manjaro, MXLinux, NetBSD, Parabola, POP_OS, PureOS, +# Slackware, SunOS, LinuxLite, OpenSUSE, Raspbian, +# postmarketOS, and Void have a smaller logo variant. +# Use '{distro name}_small' to use the small variants. +ascii_distro="NixOS_small" + +# Ascii Colors +# +# Default: 'distro' +# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num' +# Flag: --ascii_colors +# +# Example: +# ascii_colors=(distro) - Ascii is colored based on Distro colors. +# ascii_colors=(4 6 1 8 8 6) - Ascii is colored using these colors. +ascii_colors=(distro) + +# Bold ascii logo +# Whether or not to bold the ascii logo. +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --ascii_bold +ascii_bold="on" + + +# Image Options + + +# Image loop +# Setting this to on will make neofetch redraw the image constantly until +# Ctrl+C is pressed. This fixes display issues in some terminal emulators. +# +# Default: 'off' +# Values: 'on', 'off' +# Flag: --loop +image_loop="off" + +# Thumbnail directory +# +# Default: '~/.cache/thumbnails/neofetch' +# Values: 'dir' +thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch" + +# Crop mode +# +# Default: 'normal' +# Values: 'normal', 'fit', 'fill' +# Flag: --crop_mode +# +# See this wiki page to learn about the fit and fill options. +# https://github.com/dylanaraps/neofetch/wiki/What-is-Waifu-Crop%3F +crop_mode="normal" + +# Crop offset +# Note: Only affects 'normal' crop mode. +# +# Default: 'center' +# Values: 'northwest', 'north', 'northeast', 'west', 'center' +# 'east', 'southwest', 'south', 'southeast' +# Flag: --crop_offset +crop_offset="center" + +# Image size +# The image is half the terminal width by default. +# +# Default: 'auto' +# Values: 'auto', '00px', '00%', 'none' +# Flags: --image_size +# --size +image_size="auto" + +# Gap between image and text +# +# Default: '3' +# Values: 'num', '-num' +# Flag: --gap +gap=2 + +# Image offsets +# Only works with the w3m backend. +# +# Default: '0' +# Values: 'px' +# Flags: --xoffset +# --yoffset +yoffset=0 +xoffset=0 + +# Image background color +# Only works with the w3m backend. +# +# Default: '' +# Values: 'color', 'blue' +# Flag: --bg_color +background_color= + + +# Misc Options + +# Stdout mode +# Turn off all colors and disables image backend (ASCII/Image). +# Useful for piping into another command. +# Default: 'off' +# Values: 'on', 'off' +stdout="off" diff --git a/user/config/nvim/init.lua b/user/config/nvim/init.lua new file mode 100644 index 0000000..4207902 --- /dev/null +++ b/user/config/nvim/init.lua @@ -0,0 +1,2 @@ +require("gpskwlkr.core") +require("gpskwlkr.lazy") diff --git a/user/config/nvim/lazy-lock.json b/user/config/nvim/lazy-lock.json new file mode 100644 index 0000000..9c64d47 --- /dev/null +++ b/user/config/nvim/lazy-lock.json @@ -0,0 +1,41 @@ +{ + "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, + "LuaSnip": { "branch": "master", "commit": "2463d687fe704b76eb0aa3bb34e95f69a5bb0362" }, + "bufferline.nvim": { "branch": "main", "commit": "6c456b888823d9e4832aa91c482bccd19445c009" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, + "conform.nvim": { "branch": "master", "commit": "ad2b5ecd907128ed1b66b1cf4bed57902ef836ee" }, + "dressing.nvim": { "branch": "master", "commit": "94b0d24483d56f3777ee0c8dc51675f21709318c" }, + "friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" }, + "gitsigns.nvim": { "branch": "main", "commit": "d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9" }, + "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, + "lspkind.nvim": { "branch": "master", "commit": "7f26cf5e27e2bd910ce0ea00c514da2bf97423b8" }, + "lualine.nvim": { "branch": "master", "commit": "566b7036f717f3d676362742630518a47f132fff" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "56e435e09f8729af2d41973e81a0db440f8fe9c9" }, + "mason-null-ls.nvim": { "branch": "main", "commit": "d1f7258f80867f718d643d88eee66959671a4bef" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "8b70e7f1e0a4119c1234c3bde4a01c241cabcc74" }, + "mason.nvim": { "branch": "main", "commit": "a09da6ac634926a299dd439da08bdb547a8ca011" }, + "move.nvim": { "branch": "main", "commit": "d663b74b4e38f257aae757541c9076b8047844d6" }, + "none-ls.nvim": { "branch": "main", "commit": "e7382de51b4cf629e56f1fa18192e716e5ba8145" }, + "nvim-autopairs": { "branch": "master", "commit": "9fd41181693dd4106b3e414a822bb6569924de81" }, + "nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" }, + "nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" }, + "nvim-lint": { "branch": "master", "commit": "3ffa176628fe49e74f47992757016b7371a9b86b" }, + "nvim-lsp-file-operations": { "branch": "master", "commit": "8e7223e138590c1bd9d86d3de810e65939d8b12f" }, + "nvim-lspconfig": { "branch": "master", "commit": "0d9e870d01894c592d7ea93cfe0fa451916d9a7f" }, + "nvim-surround": { "branch": "main", "commit": "703ec63aa798e5e07d309b35e42def34bebe0174" }, + "nvim-tree.lua": { "branch": "master", "commit": "50f30bcd8c62ac4a83d133d738f268279f2c2ce2" }, + "nvim-treesitter": { "branch": "master", "commit": "362ebd3a210f20aab80be05557f216cbaf4531e6" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "0e2d5bd4cbe75849a013901555d436a48c6680cb" }, + "nvim-ts-autotag": { "branch": "main", "commit": "8515e48a277a2f4947d91004d9aa92c29fdc5e18" }, + "nvim-ts-context-commentstring": { "branch": "main", "commit": "1277b4a1f451b0f18c0790e1a7f12e1e5fdebfee" }, + "nvim-web-devicons": { "branch": "master", "commit": "808627b8d412b2a6b6fc6eed816fec3557198b01" }, + "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, + "telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, + "vim-ReplaceWithRegister": { "branch": "master", "commit": "aad1e8fa31cb4722f20fe40679caa56e25120032" }, + "vim-nightfly-guicolors": { "branch": "master", "commit": "90d85c8a094266122fb1fd173e7bcc0cd0efdd49" }, + "vim-tmux-navigator": { "branch": "master", "commit": "38b1d0402c4600543281dc85b3f51884205674b6" } +} \ No newline at end of file diff --git a/user/config/nvim/lua/gpskwlkr/core/init.lua b/user/config/nvim/lua/gpskwlkr/core/init.lua new file mode 100644 index 0000000..0477b91 --- /dev/null +++ b/user/config/nvim/lua/gpskwlkr/core/init.lua @@ -0,0 +1,2 @@ +require("gpskwlkr.core.options") +require("gpskwlkr.core.keymaps") diff --git a/user/config/nvim/lua/gpskwlkr/core/keymaps.lua b/user/config/nvim/lua/gpskwlkr/core/keymaps.lua new file mode 100644 index 0000000..6000350 --- /dev/null +++ b/user/config/nvim/lua/gpskwlkr/core/keymaps.lua @@ -0,0 +1,37 @@ +vim.g.mapleader = " " + +local keymap = vim.keymap + +keymap.set("n", "pv", vim.cmd.Ex) +keymap.set("n", "x", '"_x') +keymap.set("n", "", ":w") + +-- increment/decrement numbers +keymap.set("n", "+", "") -- increment +keymap.set("n", "-", "") -- decrement + +-- window management +keymap.set("n", "sv", "v") -- split window vertically +keymap.set("n", "sh", "s") -- split window horizontally +keymap.set("n", "se", "=") -- make split windows equal width & height +keymap.set("n", "sx", ":close") -- close current split window + +keymap.set("n", "to", ":tabnew") -- open new tab +keymap.set("n", "tx", ":tabclose") -- close current tab +keymap.set("n", "tn", ":tabn") -- go to next tab +keymap.set("n", "tp", ":tabp") -- go to previous tab + +keymap.set("n", "ff", ":Format") -- fix indentations in the current file + +opts = { noremap = true, silent = true } +-- Normal-mode commands +vim.keymap.set("n", "", ":MoveLine(1)", opts) +vim.keymap.set("n", "", ":MoveLine(-1)", opts) +vim.keymap.set("n", "", ":MoveHChar(-1)", opts) +vim.keymap.set("n", "", ":MoveHChar(1)", opts) + +-- Visual-mode commands +vim.keymap.set("v", "", ":MoveBlock(1)", opts) +vim.keymap.set("v", "", ":MoveBlock(-1)", opts) +vim.keymap.set("v", "", ":MoveHBlock(-1)", opts) +vim.keymap.set("v", "", ":MoveHBlock(1)", opts) diff --git a/user/config/nvim/lua/gpskwlkr/core/options.lua b/user/config/nvim/lua/gpskwlkr/core/options.lua new file mode 100644 index 0000000..e09d390 --- /dev/null +++ b/user/config/nvim/lua/gpskwlkr/core/options.lua @@ -0,0 +1,34 @@ +local opt = vim.opt + +opt.nu = true +opt.relativenumber = true + +opt.tabstop = 4 +opt.softtabstop = 4 +opt.shiftwidth = 4 +opt.expandtab = true + +opt.smartindent = true +opt.wrap = false + +opt.hlsearch = false +opt.incsearch = true +opt.ignorecase = true +opt.smartcase = true + +opt.termguicolors = true + +opt.scrolloff = 8 +opt.signcolumn = "yes" + +opt.updatetime = 50 + +-- opt.colorcolumn = "80" + +opt.cursorline = true + +opt.clipboard:append("unnamedplus") +opt.backspace = "indent,eol,start" +opt.splitright = true +opt.splitbelow = true +opt.iskeyword:append("-") diff --git a/user/config/nvim/lua/gpskwlkr/lazy.lua b/user/config/nvim/lua/gpskwlkr/lazy.lua new file mode 100644 index 0000000..258df96 --- /dev/null +++ b/user/config/nvim/lua/gpskwlkr/lazy.lua @@ -0,0 +1,25 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.loop.fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) + +require("lazy").setup({ { import = "gpskwlkr.plugins" }, { import = "gpskwlkr.plugins.lsp" } }, { + install = { + colorscheme = { "nightfly" }, + }, + checker = { + enabled = true, + notify = false, + }, + change_detection = { + notify = false, + }, +}) diff --git a/user/config/nvim/lua/gpskwlkr/plugins/bufferline.lua b/user/config/nvim/lua/gpskwlkr/plugins/bufferline.lua new file mode 100644 index 0000000..ec340e9 --- /dev/null +++ b/user/config/nvim/lua/gpskwlkr/plugins/bufferline.lua @@ -0,0 +1,11 @@ +return { + "akinsho/bufferline.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + version = "*", + opts = { + options = { + mode = "tabs", + separator_style = "slant", + }, + }, +} diff --git a/user/config/nvim/lua/gpskwlkr/plugins/colorizer.lua b/user/config/nvim/lua/gpskwlkr/plugins/colorizer.lua new file mode 100644 index 0000000..a65b5cc --- /dev/null +++ b/user/config/nvim/lua/gpskwlkr/plugins/colorizer.lua @@ -0,0 +1,5 @@ +return { + "NvChad/nvim-colorizer.lua", + event = { "BufReadPre", "BufNewFile" }, + config = true, +} diff --git a/user/config/nvim/lua/gpskwlkr/plugins/colorscheme.lua b/user/config/nvim/lua/gpskwlkr/plugins/colorscheme.lua new file mode 100644 index 0000000..24a8a59 --- /dev/null +++ b/user/config/nvim/lua/gpskwlkr/plugins/colorscheme.lua @@ -0,0 +1,10 @@ +return { + { + "bluz71/vim-nightfly-guicolors", + priority = 1000, -- make sure to load this before all the other start plugins + config = function() + -- load the colorscheme here + vim.cmd([[colorscheme nightfly]]) + end, + } +} diff --git a/user/config/nvim/lua/gpskwlkr/plugins/comment.lua b/user/config/nvim/lua/gpskwlkr/plugins/comment.lua new file mode 100644 index 0000000..8f5f9fc --- /dev/null +++ b/user/config/nvim/lua/gpskwlkr/plugins/comment.lua @@ -0,0 +1,19 @@ +return { + "numToStr/Comment.nvim", + event = { "BufReadPre", "BufNewFile" }, + dependencies = { + "JoosepAlviste/nvim-ts-context-commentstring", + }, + config = function() + -- import comment plugin safely + local comment = require("Comment") + + local ts_context_commentstring = require("ts_context_commentstring.integrations.comment_nvim") + + -- enable comment + comment.setup({ + -- for commenting tsx and jsx files + pre_hook = ts_context_commentstring.create_pre_hook(), + }) + end, +} diff --git a/user/config/nvim/lua/gpskwlkr/plugins/dressing.lua b/user/config/nvim/lua/gpskwlkr/plugins/dressing.lua new file mode 100644 index 0000000..105f7e5 --- /dev/null +++ b/user/config/nvim/lua/gpskwlkr/plugins/dressing.lua @@ -0,0 +1,4 @@ +return { + "stevearc/dressing.nvim", + event = "VeryLazy", +} diff --git a/user/config/nvim/lua/gpskwlkr/plugins/formatting.lua b/user/config/nvim/lua/gpskwlkr/plugins/formatting.lua new file mode 100644 index 0000000..05a9a81 --- /dev/null +++ b/user/config/nvim/lua/gpskwlkr/plugins/formatting.lua @@ -0,0 +1,39 @@ +return { + "stevearc/conform.nvim", + lazy = true, + event = { "BufReadPre", "BufNewFile" }, -- to disable, comment this out + config = function() + local conform = require("conform") + + conform.setup({ + formatters_by_ft = { + javascript = { "prettier" }, + typescript = { "prettier" }, + javascriptreact = { "prettier" }, + typescriptreact = { "prettier" }, + svelte = { "prettier" }, + css = { "prettier" }, + html = { "prettier" }, + json = { "prettier" }, + yaml = { "prettier" }, + markdown = { "prettier" }, + graphql = { "prettier" }, + lua = { "stylua" }, + python = { "isort", "black" }, + }, + format_on_save = { + lsp_fallback = true, + async = false, + timeout_ms = 1000, + }, + }) + + vim.keymap.set({ "n", "v" }, "mp", function() + conform.format({ + lsp_fallback = true, + async = false, + timeout_ms = 1000, + }) + end, { desc = "Format file or range (in visual mode)" }) + end, +} diff --git a/user/config/nvim/lua/gpskwlkr/plugins/gitsigns.lua b/user/config/nvim/lua/gpskwlkr/plugins/gitsigns.lua new file mode 100644 index 0000000..eaf7ae7 --- /dev/null +++ b/user/config/nvim/lua/gpskwlkr/plugins/gitsigns.lua @@ -0,0 +1,5 @@ +return { + "lewis6991/gitsigns.nvim", + event = { "BufReadPre", "BufNewFile" }, + config = true, +} diff --git a/user/config/nvim/lua/gpskwlkr/plugins/init.lua b/user/config/nvim/lua/gpskwlkr/plugins/init.lua new file mode 100644 index 0000000..5cdd28a --- /dev/null +++ b/user/config/nvim/lua/gpskwlkr/plugins/init.lua @@ -0,0 +1,8 @@ +return { + "christoomey/vim-tmux-navigator", + "nvim-lua/plenary.nvim", -- lua functions that many plugins use + "christoomey/vim-tmux-navigator", -- tmux & split window navigation + "inkarkat/vim-ReplaceWithRegister", + "fedepujol/move.nvim", + "xiyaowong/transparent.nvim" +} diff --git a/user/config/nvim/lua/gpskwlkr/plugins/linting.lua b/user/config/nvim/lua/gpskwlkr/plugins/linting.lua new file mode 100644 index 0000000..782b3c5 --- /dev/null +++ b/user/config/nvim/lua/gpskwlkr/plugins/linting.lua @@ -0,0 +1,30 @@ +return { + "mfussenegger/nvim-lint", + lazy = true, + event = { "BufReadPre", "BufNewFile" }, -- to disable, comment this out + config = function() + local lint = require("lint") + + lint.linters_by_ft = { + javascript = { "eslint_d" }, + typescript = { "eslint_d" }, + javascriptreact = { "eslint_d" }, + typescriptreact = { "eslint_d" }, + svelte = { "eslint_d" }, + python = { "pylint" }, + } + + local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true }) + + vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, { + group = lint_augroup, + callback = function() + lint.try_lint() + end, + }) + + vim.keymap.set("n", "l", function() + lint.try_lint() + end, { desc = "Trigger linting for current file" }) + end, +} diff --git a/user/config/nvim/lua/gpskwlkr/plugins/lsp/lspconfig.lua b/user/config/nvim/lua/gpskwlkr/plugins/lsp/lspconfig.lua new file mode 100644 index 0000000..96fae6c --- /dev/null +++ b/user/config/nvim/lua/gpskwlkr/plugins/lsp/lspconfig.lua @@ -0,0 +1,166 @@ +return { + "neovim/nvim-lspconfig", + event = { "BufReadPre", "BufNewFile" }, + dependencies = { + "hrsh7th/cmp-nvim-lsp", + { "antosha417/nvim-lsp-file-operations", config = true }, + }, + config = function() + -- import lspconfig plugin + local lspconfig = require("lspconfig") + + -- import cmp-nvim-lsp plugin + local cmp_nvim_lsp = require("cmp_nvim_lsp") + + local keymap = vim.keymap -- for conciseness + + local opts = { noremap = true, silent = true } + local on_attach = function(client, bufnr) + opts.buffer = bufnr + + -- set keybinds + opts.desc = "Show LSP references" + keymap.set("n", "gR", "Telescope lsp_references", opts) -- show definition, references + + opts.desc = "Go to declaration" + keymap.set("n", "gD", vim.lsp.buf.declaration, opts) -- go to declaration + + opts.desc = "Show LSP definitions" + keymap.set("n", "gd", "Telescope lsp_definitions", opts) -- show lsp definitions + + opts.desc = "Show LSP implementations" + keymap.set("n", "gi", "Telescope lsp_implementations", opts) -- show lsp implementations + + opts.desc = "Show LSP type definitions" + keymap.set("n", "gt", "Telescope lsp_type_definitions", opts) -- show lsp type definitions + + opts.desc = "See available code actions" + keymap.set({ "n", "v" }, "ca", vim.lsp.buf.code_action, opts) -- see available code actions, in visual mode will apply to selection + + opts.desc = "Smart rename" + keymap.set("n", "rn", vim.lsp.buf.rename, opts) -- smart rename + + opts.desc = "Show buffer diagnostics" + keymap.set("n", "D", "Telescope diagnostics bufnr=0", opts) -- show diagnostics for file + + opts.desc = "Show line diagnostics" + keymap.set("n", "d", vim.diagnostic.open_float, opts) -- show diagnostics for line + + opts.desc = "Go to previous diagnostic" + keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) -- jump to previous diagnostic in buffer + + opts.desc = "Go to next diagnostic" + keymap.set("n", "]d", vim.diagnostic.goto_next, opts) -- jump to next diagnostic in buffer + + opts.desc = "Show documentation for what is under cursor" + keymap.set("n", "K", vim.lsp.buf.hover, opts) -- show documentation for what is under cursor + + opts.desc = "Restart LSP" + keymap.set("n", "rs", ":LspRestart", opts) -- mapping to restart lsp if necessary + end + + -- used to enable autocompletion (assign to every lsp server config) + local capabilities = cmp_nvim_lsp.default_capabilities() + + -- Change the Diagnostic symbols in the sign column (gutter) + -- (not in youtube nvim video) + local signs = { Error = " ", Warn = " ", Hint = "󰠠 ", Info = " " } + for type, icon in pairs(signs) do + local hl = "DiagnosticSign" .. type + vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" }) + end + + -- configure html server + lspconfig["html"].setup({ + capabilities = capabilities, + on_attach = on_attach, + }) + + -- configure typescript server with plugin + lspconfig["tsserver"].setup({ + capabilities = capabilities, + on_attach = on_attach, + }) + + -- configure css server + lspconfig["cssls"].setup({ + capabilities = capabilities, + on_attach = on_attach, + }) + + -- configure tailwindcss server + lspconfig["tailwindcss"].setup({ + capabilities = capabilities, + on_attach = on_attach, + }) + + -- configure svelte server + lspconfig["svelte"].setup({ + capabilities = capabilities, + on_attach = function(client, bufnr) + on_attach(client, bufnr) + + vim.api.nvim_create_autocmd("BufWritePost", { + pattern = { "*.js", "*.ts" }, + callback = function(ctx) + if client.name == "svelte" then + client.notify("$/onDidChangeTsOrJsFile", { uri = ctx.file }) + end + end, + }) + end, + }) + + lspconfig["csharp_ls"].setup({ + capabilities = capabilities, + on_attach = on_attach, + }) + + -- configure prisma orm server + lspconfig["prismals"].setup({ + capabilities = capabilities, + on_attach = on_attach, + }) + + -- configure graphql language server + lspconfig["graphql"].setup({ + capabilities = capabilities, + on_attach = on_attach, + filetypes = { "graphql", "gql", "svelte", "typescriptreact", "javascriptreact" }, + }) + + -- configure emmet language server + lspconfig["emmet_ls"].setup({ + capabilities = capabilities, + on_attach = on_attach, + filetypes = { "html", "typescriptreact", "javascriptreact", "css", "sass", "scss", "less", "svelte" }, + }) + + -- configure python server + lspconfig["pyright"].setup({ + capabilities = capabilities, + on_attach = on_attach, + }) + + -- configure lua server (with special settings) + lspconfig["lua_ls"].setup({ + capabilities = capabilities, + on_attach = on_attach, + settings = { -- custom settings for lua + Lua = { + -- make the language server recognize "vim" global + diagnostics = { + globals = { "vim" }, + }, + workspace = { + -- make language server aware of runtime files + library = { + [vim.fn.expand("$VIMRUNTIME/lua")] = true, + [vim.fn.stdpath("config") .. "/lua"] = true, + }, + }, + }, + }, + }) + end, +} diff --git a/user/config/nvim/lua/gpskwlkr/plugins/lsp/mason.lua b/user/config/nvim/lua/gpskwlkr/plugins/lsp/mason.lua new file mode 100644 index 0000000..17e1d8f --- /dev/null +++ b/user/config/nvim/lua/gpskwlkr/plugins/lsp/mason.lua @@ -0,0 +1,57 @@ +return { + "williamboman/mason.nvim", + dependencies = { + "williamboman/mason-lspconfig.nvim", + "WhoIsSethDaniel/mason-tool-installer.nvim", + }, + config = function() + -- import mason + local mason = require("mason") + + -- import mason-lspconfig + local mason_lspconfig = require("mason-lspconfig") + + local mason_tool_installer = require("mason-tool-installer") + + -- enable mason and configure icons + mason.setup({ + ui = { + icons = { + package_installed = "✓", + package_pending = "➜", + package_uninstalled = "✗", + }, + }, + }) + + mason_lspconfig.setup({ + -- list of servers for mason to install + ensure_installed = { + "tsserver", + "html", + "cssls", + "tailwindcss", + "svelte", + "lua_ls", + "graphql", + "emmet_ls", + "prismals", + "pyright", + "csharp_ls" + }, + -- auto-install configured servers (with lspconfig) + automatic_installation = true, -- not the same as ensure_installed + }) + + mason_tool_installer.setup({ + ensure_installed = { + "prettier", -- prettier formatter + "stylua", -- lua formatter + "isort", -- python formatter + "black", -- python formatter + "pylint", -- python linter + "eslint_d", -- js linter + }, + }) + end, +} diff --git a/user/config/nvim/lua/gpskwlkr/plugins/lsp/none-ls.lua b/user/config/nvim/lua/gpskwlkr/plugins/lsp/none-ls.lua new file mode 100644 index 0000000..c4833f1 --- /dev/null +++ b/user/config/nvim/lua/gpskwlkr/plugins/lsp/none-ls.lua @@ -0,0 +1,74 @@ +return { + "nvimtools/none-ls.nvim", -- configure formatters & linters + lazy = true, + -- event = { "BufReadPre", "BufNewFile" }, -- to enable uncomment this + dependencies = { + "jay-babu/mason-null-ls.nvim", + }, + config = function() + local mason_null_ls = require("mason-null-ls") + + local null_ls = require("null-ls") + + local null_ls_utils = require("null-ls.utils") + + mason_null_ls.setup({ + ensure_installed = { + "prettier", -- prettier formatter + "stylua", -- lua formatter + "black", -- python formatter + "pylint", -- python linter + "eslint_d", -- js linter + }, + }) + + -- for conciseness + local formatting = null_ls.builtins.formatting -- to setup formatters + local diagnostics = null_ls.builtins.diagnostics -- to setup linters + + -- to setup format on save + local augroup = vim.api.nvim_create_augroup("LspFormatting", {}) + + -- configure null_ls + null_ls.setup({ + -- add package.json as identifier for root (for typescript monorepos) + root_dir = null_ls_utils.root_pattern(".null-ls-root", "Makefile", ".git", "package.json"), + -- setup formatters & linters + sources = { + -- to disable file types use + -- "formatting.prettier.with({disabled_filetypes: {}})" (see null-ls docs) + formatting.prettier.with({ + extra_filetypes = { "svelte" }, + }), -- js/ts formatter + formatting.stylua, -- lua formatter + formatting.isort, + formatting.black, + diagnostics.pylint, + diagnostics.eslint_d.with({ -- js/ts linter + condition = function(utils) + return utils.root_has_file({ ".eslintrc.js", ".eslintrc.cjs" }) -- only enable if root has .eslintrc.js or .eslintrc.cjs + end, + }), + }, + -- configure format on save + on_attach = function(current_client, bufnr) + if current_client.supports_method("textDocument/formatting") then + vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr }) + vim.api.nvim_create_autocmd("BufWritePre", { + group = augroup, + buffer = bufnr, + callback = function() + vim.lsp.buf.format({ + filter = function(client) + -- only use null-ls for formatting instead of lsp server + return client.name == "null-ls" + end, + bufnr = bufnr, + }) + end, + }) + end + end, + }) + end, +} diff --git a/user/config/nvim/lua/gpskwlkr/plugins/lualine.lua b/user/config/nvim/lua/gpskwlkr/plugins/lualine.lua new file mode 100644 index 0000000..3698644 --- /dev/null +++ b/user/config/nvim/lua/gpskwlkr/plugins/lualine.lua @@ -0,0 +1,71 @@ +return { + "nvim-lualine/lualine.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + local lualine = require("lualine") + local lazy_status = require("lazy.status") -- to configure lazy pending updates count + + local colors = { + blue = "#65D1FF", + green = "#3EFFDC", + violet = "#FF61EF", + yellow = "#FFDA7B", + red = "#FF4A4A", + fg = "#c3ccdc", + bg = "#112638", + inactive_bg = "#2c3043", + } + + local my_lualine_theme = { + normal = { + a = { bg = colors.blue, fg = colors.bg, gui = "bold" }, + b = { bg = colors.bg, fg = colors.fg }, + c = { bg = colors.bg, fg = colors.fg }, + }, + insert = { + a = { bg = colors.green, fg = colors.bg, gui = "bold" }, + b = { bg = colors.bg, fg = colors.fg }, + c = { bg = colors.bg, fg = colors.fg }, + }, + visual = { + a = { bg = colors.violet, fg = colors.bg, gui = "bold" }, + b = { bg = colors.bg, fg = colors.fg }, + c = { bg = colors.bg, fg = colors.fg }, + }, + command = { + a = { bg = colors.yellow, fg = colors.bg, gui = "bold" }, + b = { bg = colors.bg, fg = colors.fg }, + c = { bg = colors.bg, fg = colors.fg }, + }, + replace = { + a = { bg = colors.red, fg = colors.bg, gui = "bold" }, + b = { bg = colors.bg, fg = colors.fg }, + c = { bg = colors.bg, fg = colors.fg }, + }, + inactive = { + a = { bg = colors.inactive_bg, fg = colors.semilightgray, gui = "bold" }, + b = { bg = colors.inactive_bg, fg = colors.semilightgray }, + c = { bg = colors.inactive_bg, fg = colors.semilightgray }, + }, + } + + -- configure lualine with modified theme + lualine.setup({ + options = { + theme = my_lualine_theme, + }, + sections = { + lualine_x = { + { + lazy_status.updates, + cond = lazy_status.has_updates, + color = { fg = "#ff9e64" }, + }, + { "encoding" }, + { "fileformat" }, + { "filetype" }, + }, + }, + }) + end, +} diff --git a/user/config/nvim/lua/gpskwlkr/plugins/nvim-autopairs.lua b/user/config/nvim/lua/gpskwlkr/plugins/nvim-autopairs.lua new file mode 100644 index 0000000..8ee54b3 --- /dev/null +++ b/user/config/nvim/lua/gpskwlkr/plugins/nvim-autopairs.lua @@ -0,0 +1,30 @@ +return { + "windwp/nvim-autopairs", + event = { "InsertEnter" }, + dependencies = { + "hrsh7th/nvim-cmp", + }, + config = function() + -- import nvim-autopairs + local autopairs = require("nvim-autopairs") + + -- configure autopairs + autopairs.setup({ + check_ts = true, -- enable treesitter + ts_config = { + lua = { "string" }, -- don't add pairs in lua string treesitter nodes + javascript = { "template_string" }, -- don't add pairs in javscript template_string treesitter nodes + java = false, -- don't check treesitter on java + }, + }) + + -- import nvim-autopairs completion functionality + local cmp_autopairs = require("nvim-autopairs.completion.cmp") + + -- import nvim-cmp plugin (completions plugin) + local cmp = require("cmp") + + -- make autopairs and completion work together + cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done()) + end, +} diff --git a/user/config/nvim/lua/gpskwlkr/plugins/nvim-cmp.lua b/user/config/nvim/lua/gpskwlkr/plugins/nvim-cmp.lua new file mode 100644 index 0000000..35fe5bc --- /dev/null +++ b/user/config/nvim/lua/gpskwlkr/plugins/nvim-cmp.lua @@ -0,0 +1,56 @@ +return { + "hrsh7th/nvim-cmp", + event = "InsertEnter", + dependencies = { + "hrsh7th/cmp-buffer", -- source for text in buffer + "hrsh7th/cmp-path", -- source for file system paths + "L3MON4D3/LuaSnip", -- snippet engine + "saadparwaiz1/cmp_luasnip", -- for autocompletion + "rafamadriz/friendly-snippets", -- useful snippets + "onsails/lspkind.nvim", -- vs-code like pictograms + }, + config = function() + local cmp = require("cmp") + + local luasnip = require("luasnip") + + local lspkind = require("lspkind") + + -- loads vscode style snippets from installed plugins (e.g. friendly-snippets) + require("luasnip.loaders.from_vscode").lazy_load() + + cmp.setup({ + completion = { + completeopt = "menu,menuone,preview,noselect", + }, + snippet = { -- configure how nvim-cmp interacts with snippet engine + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + mapping = cmp.mapping.preset.insert({ + [""] = cmp.mapping.select_prev_item(), -- previous suggestion + [""] = cmp.mapping.select_next_item(), -- next suggestion + [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.complete(), -- show completion suggestions + [""] = cmp.mapping.abort(), -- close completion window + [""] = cmp.mapping.confirm({ select = false }), + }), + -- sources for autocompletion + sources = cmp.config.sources({ + { name = "nvim_lsp" }, + { name = "luasnip" }, -- snippets + { name = "buffer" }, -- text within current buffer + { name = "path" }, -- file system paths + }), + -- configure lspkind for vs-code like pictograms in completion menu + formatting = { + format = lspkind.cmp_format({ + maxwidth = 50, + ellipsis_char = "...", + }), + }, + }) + end, +} diff --git a/user/config/nvim/lua/gpskwlkr/plugins/nvim-surround.lua b/user/config/nvim/lua/gpskwlkr/plugins/nvim-surround.lua new file mode 100644 index 0000000..77f5073 --- /dev/null +++ b/user/config/nvim/lua/gpskwlkr/plugins/nvim-surround.lua @@ -0,0 +1,6 @@ +return { + "kylechui/nvim-surround", + event = { "BufReadPre", "BufNewFile" }, + version = "*", -- Use for stability; omit to use `main` branch for the latest features + config = true, +} diff --git a/user/config/nvim/lua/gpskwlkr/plugins/nvim-tree.lua b/user/config/nvim/lua/gpskwlkr/plugins/nvim-tree.lua new file mode 100644 index 0000000..d8c3cc8 --- /dev/null +++ b/user/config/nvim/lua/gpskwlkr/plugins/nvim-tree.lua @@ -0,0 +1,61 @@ +return { + "nvim-tree/nvim-tree.lua", + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + local nvimtree = require("nvim-tree") + + -- recommended settings from nvim-tree documentation + vim.g.loaded_netrw = 1 + vim.g.loaded_netrwPlugin = 1 + + -- change color for arrows in tree to light blue + vim.cmd([[ highlight NvimTreeFolderArrowClosed guifg=#3FC5FF ]]) + vim.cmd([[ highlight NvimTreeFolderArrowOpen guifg=#3FC5FF ]]) + + -- configure nvim-tree + nvimtree.setup({ + view = { + width = 35, + relativenumber = true, + }, + -- change folder arrow icons + renderer = { + indent_markers = { + enable = true, + }, + icons = { + glyphs = { + folder = { + arrow_closed = "", -- arrow when folder is closed + arrow_open = "", -- arrow when folder is open + }, + }, + }, + }, + -- disable window_picker for + -- explorer to work well with + -- window splits + actions = { + open_file = { + window_picker = { + enable = false, + }, + }, + }, + filters = { + custom = { ".DS_Store" }, + }, + git = { + ignore = false, + }, + }) + + -- set keymaps + local keymap = vim.keymap -- for conciseness + + keymap.set("n", "ee", "NvimTreeToggle", { desc = "Toggle file explorer" }) -- toggle file explorer + keymap.set("n", "ef", "NvimTreeFindFileToggle", { desc = "Toggle file explorer on current file" }) -- toggle file explorer on current file + keymap.set("n", "ec", "NvimTreeCollapse", { desc = "Collapse file explorer" }) -- collapse file explorer + keymap.set("n", "er", "NvimTreeRefresh", { desc = "Refresh file explorer" }) -- refresh file explorer + end, +} diff --git a/user/config/nvim/lua/gpskwlkr/plugins/nvim-treesitter.lua b/user/config/nvim/lua/gpskwlkr/plugins/nvim-treesitter.lua new file mode 100644 index 0000000..5fa2906 --- /dev/null +++ b/user/config/nvim/lua/gpskwlkr/plugins/nvim-treesitter.lua @@ -0,0 +1,59 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + event = { "BufReadPre", "BufNewFile" }, + build = ":TSUpdate", + dependencies = { + "nvim-treesitter/nvim-treesitter-textobjects", + "windwp/nvim-ts-autotag", + }, + config = function() + -- import nvim-treesitter plugin + local treesitter = require("nvim-treesitter.configs") + + -- configure treesitter + treesitter.setup({ -- enable syntax highlighting + highlight = { + enable = true, + }, + -- enable indentation + indent = { enable = true }, + -- enable autotagging (w/ nvim-ts-autotag plugin) + autotag = { + enable = true, + }, + -- ensure these language parsers are installed + ensure_installed = { + "json", + "javascript", + "typescript", + "tsx", + "yaml", + "html", + "css", + "prisma", + "markdown", + "markdown_inline", + "svelte", + "graphql", + "bash", + "lua", + "vim", + "dockerfile", + "gitignore", + "query", + }, + incremental_selection = { + enable = true, + keymaps = { + init_selection = "", + node_incremental = "", + scope_incremental = false, + node_decremental = "", + }, + }, + enable_autocmd = false, + }) + end, + }, +} diff --git a/user/config/nvim/lua/gpskwlkr/plugins/telescope.lua b/user/config/nvim/lua/gpskwlkr/plugins/telescope.lua new file mode 100644 index 0000000..bfc4537 --- /dev/null +++ b/user/config/nvim/lua/gpskwlkr/plugins/telescope.lua @@ -0,0 +1,39 @@ +return { + "nvim-telescope/telescope.nvim", + branch = "0.1.x", + dependencies = { + "nvim-lua/plenary.nvim", + { "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, + "nvim-tree/nvim-web-devicons", + }, + config = function() + local telescope = require("telescope") + local actions = require("telescope.actions") + local builtin = require("telescope.builtin") + + telescope.setup({ + defaults = { + path_display = { "truncate " }, + mappings = { + i = { + [""] = actions.move_selection_previous, -- move to prev result + [""] = actions.move_selection_next, -- move to next result + [""] = actions.send_selected_to_qflist + actions.open_qflist, + }, + }, + }, + }) + + -- telescope.load_extension("fzf") + + -- set keymaps + local keymap = vim.keymap -- for conciseness + + keymap.set("n", "pf", builtin.find_files, {}) + keymap.set("n", "", builtin.git_files, {}) + keymap.set("n", "ps", function() + builtin.grep_string({ search = vim.fn.input("Grep > ") }) + end) + keymap.set("n", "vh", builtin.help_tags, {}) + end, +} diff --git a/user/config/swayidle/config b/user/config/swayidle/config new file mode 100644 index 0000000..5390e8e --- /dev/null +++ b/user/config/swayidle/config @@ -0,0 +1,3 @@ +timeout 300 'swaylock' +timeout 420 'systemctl suspend' +before-sleep 'swaylock' diff --git a/user/config/swaylock/config b/user/config/swaylock/config new file mode 100644 index 0000000..3ba53bc --- /dev/null +++ b/user/config/swaylock/config @@ -0,0 +1,31 @@ +daemonize +indicator +clock +screenshots + +effect-blur=11x11 +font=JetBrains Mono +indicator-radius=80 +indicator-thickness=8 +timestr=%I:%M %p +datestr=%F + +inside-color=#181926 +ring-color=#8bd5ca +key-hl-color=#a6da95 +text-color=#cad3f5 +layout-text-color=#cad3f5 +layout-bg-color=#181926 +text-caps-lock-color=#cad3f5 + +inside-clear-color=#f4dbd6 +ring-clear-color=#f0c6c6 +text-clear-color=#1e2030 + +inside-ver-color=#91d7e3 +ring-ver-color=#7dc4e4 +text-ver-color=#1e2030 + +inside-wrong-color=#ee99a0 +ring-wrong-color=#ed8796 +text-wrong-color=#1e2030 diff --git a/user/config/wallpapers/wallpaper.jpg b/user/config/wallpapers/wallpaper.jpg new file mode 100644 index 0000000..e3fe01d Binary files /dev/null and b/user/config/wallpapers/wallpaper.jpg differ diff --git a/user/config/waybar/config.jsonc b/user/config/waybar/config.jsonc new file mode 100644 index 0000000..9ac304f --- /dev/null +++ b/user/config/waybar/config.jsonc @@ -0,0 +1,82 @@ +{ + "layer": "top", + "position": "top", + "mod": "dock", + "exclusive": true, + "passthrough": false, + "gtk-layer-shell": true, + "height": 0, + "modules-left": [ + "hyprland/workspaces" + ], + "modules-center": ["hyprland/window"], + "modules-right": [ + "tray", + "custom/updates", + "hyprland/language", + "pulseaudio", + "pulseaudio#microphone", + "clock", + "custom/weather" + ], + + "hyprland/window": { + "format": "{}" + }, + "hyprland/workspaces": { + "disable-scroll": true, + "all-outputs": true, + "on-click": "activate", + "persistent_workspaces": { + "1": [] + } + }, + "hyprland/language": { + "format": "{}", + "format-en": "US", + "format-ru": "RU", + "format-ka": "GE" + }, + "custom/weather" : { + "tooltip" : true, + "format" : "{}", + "interval" : 30, + "exec" : "~/.config/waybar/scripts/waybar-wttr.py", + "return-type" : "json" + }, + "tray": { + "icon-size": 16, + "spacing": 10 + }, + "clock": { + "format": "{: %R  %d/%m}", + "tooltip-format": "{:%Y %B}\n{calendar}" + }, + "pulseaudio": { + "format": "{icon} {volume}%", + "tooltip": false, + "format-muted": " Muted", + "on-click": "pamixer -t", + "on-scroll-up": "pamixer -i 5", + "on-scroll-down": "pamixer -d 5", + "scroll-step": 5, + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["", "", ""] + } + }, + "pulseaudio#microphone": { + "format": "{format_source}", + "format-source": "🎙{volume}%", + "format-source-muted": "🎙Muted", + "on-click": "pamixer --default-source -t", + "on-scroll-up": "pamixer --default-source -i 5", + "on-scroll-down": "pamixer --default-source -d 5", + "scroll-step": 5 + } +} diff --git a/user/config/waybar/scripts/waybar-wttr.py b/user/config/waybar/scripts/waybar-wttr.py new file mode 100755 index 0000000..f115abb --- /dev/null +++ b/user/config/waybar/scripts/waybar-wttr.py @@ -0,0 +1,133 @@ +#!/run/current-system/sw/bin/python + +import json +from datetime import datetime + +import requests + +WEATHER_CODES = { + "113": "☀️ ", + "116": "⛅ ", + "119": "☁️ ", + "122": "☁️ ", + "143": "☁️ ", + "176": "🌧️", + "179": "🌧️", + "182": "🌧️", + "185": "🌧️", + "200": "⛈️ ", + "227": "🌨️", + "230": "🌨️", + "248": "☁️ ", + "260": "☁️ ", + "263": "🌧️", + "266": "🌧️", + "281": "🌧️", + "284": "🌧️", + "293": "🌧️", + "296": "🌧️", + "299": "🌧️", + "302": "🌧️", + "305": "🌧️", + "308": "🌧️", + "311": "🌧️", + "314": "🌧️", + "317": "🌧️", + "320": "🌨️", + "323": "🌨️", + "326": "🌨️", + "329": "❄️ ", + "332": "❄️ ", + "335": "❄️ ", + "338": "❄️ ", + "350": "🌧️", + "353": "🌧️", + "356": "🌧️", + "359": "🌧️", + "362": "🌧️", + "365": "🌧️", + "368": "🌧️", + "371": "❄️", + "374": "🌨️", + "377": "🌨️", + "386": "🌨️", + "389": "🌨️", + "392": "🌧️", + "395": "❄️ ", +} + +data = {} + + +weather = requests.get("https://wttr.in/?format=j1").json() + + +def format_time(time): + return time.replace("00", "").zfill(2) + + +def format_temp(temp): + return (hour["FeelsLikeC"] + "°").ljust(3) + + +def format_chances(hour): + chances = { + "chanceoffog": "Fog", + "chanceoffrost": "Frost", + "chanceofovercast": "Overcast", + "chanceofrain": "Rain", + "chanceofsnow": "Snow", + "chanceofsunshine": "Sunshine", + "chanceofthunder": "Thunder", + "chanceofwindy": "Wind", + } + + conditions = [] + for event in chances.keys(): + if int(hour[event]) > 0: + conditions.append(chances[event] + " " + hour[event] + "%") + return ", ".join(conditions) + + +tempint = int(weather["current_condition"][0]["FeelsLikeC"]) +extrachar = "" +if tempint > 0 and tempint < 10: + extrachar = "+" + + +data["text"] = ( + " " + + WEATHER_CODES[weather["current_condition"][0]["weatherCode"]] + + " " + + extrachar + + weather["current_condition"][0]["FeelsLikeC"] + + "°" +) + +data["tooltip"] = ( + f"{weather['current_condition'][0]['weatherDesc'][0]['value']} {weather['current_condition'][0]['temp_C']}°\n" +) +data["tooltip"] += f"Feels like: {weather['current_condition'][0]['FeelsLikeC']}°\n" +data["tooltip"] += f"Wind: {weather['current_condition'][0]['windspeedKmph']}Km/h\n" +data["tooltip"] += f"Humidity: {weather['current_condition'][0]['humidity']}%\n" +for i, day in enumerate(weather["weather"]): + data["tooltip"] += f"\n" + if i == 0: + data["tooltip"] += "Today, " + if i == 1: + data["tooltip"] += "Tomorrow, " + data["tooltip"] += f"{day['date']}\n" + data["tooltip"] += f"⬆️ {day['maxtempF']}° ⬇️ {day['mintempF']}° " + data[ + "tooltip" + ] += f"🌅 {day['astronomy'][0]['sunrise']} 🌇 {day['astronomy'][0]['sunset']}\n" + for hour in day["hourly"]: + if i == 0: + if int(format_time(hour["time"])) < datetime.now().hour - 2: + continue + data[ + "tooltip" + ] += f"{format_time(hour['time'])} {WEATHER_CODES[hour['weatherCode']]} {format_temp(hour['FeelsLikeC'])} {hour['weatherDesc'][0]['value']}, {format_chances(hour)}\n" + + +print(json.dumps(data)) diff --git a/user/config/waybar/style.css b/user/config/waybar/style.css new file mode 100644 index 0000000..f2f8b97 --- /dev/null +++ b/user/config/waybar/style.css @@ -0,0 +1,149 @@ +* { + border: none; + border-radius: 0; + font-family: + Cartograph CF Nerd Font, + monospace; + font-weight: bold; + font-size: 14px; + min-height: 0; +} + +window#waybar { + background: rgba(21, 18, 27, 0); + color: #cdd6f4; +} + +tooltip { + background: #1e1e2e; + border-radius: 10px; + border-width: 2px; + border-style: solid; + border-color: #11111b; +} + +#workspaces button { + padding: 5px; + color: #313244; + margin-right: 5px; +} + +#workspaces button.active { + color: #a6adc8; +} + +#workspaces button.focused { + color: #a6adc8; + background: #eba0ac; + border-radius: 10px; +} + +#workspaces button.urgent { + color: #11111b; + background: #a6e3a1; + border-radius: 10px; +} + +#workspaces button:hover { + background: #11111b; + color: #cdd6f4; + border-radius: 10px; +} + +#language, +#custom-updates, +#custom-caffeine, +#custom-weather, +#window, +#clock, +#battery, +#pulseaudio, +#network, +#workspaces, +#tray, +#backlight { + background: #1e1e2e; + padding: 0px 10px; + margin: 3px 0px; + margin-top: 10px; + border: 1px solid #181825; +} + +#tray { + border-radius: 10px; + margin-right: 10px; +} + +#workspaces { + background: #1e1e2e; + border-radius: 10px; + margin-left: 10px; + padding-right: 0px; + padding-left: 5px; +} + +#custom-caffeine { + color: #89dceb; + border-radius: 10px 0px 0px 10px; + border-right: 0px; + margin-left: 10px; +} + +#custom-language { + color: #f38ba8; + border-left: 0px; + border-right: 0px; +} + +#custom-updates { + color: #f5c2e7; + border-radius: 10px 0px 0px 10px; + border-left: 0px; + border-right: 0px; +} + +#window { + border-radius: 10px; + margin-left: 60px; + margin-right: 60px; +} + +#clock { + color: #fab387; + border-radius: 10px 0px 0px 10px; + margin-left: 5px; + border-right: 0px; +} + +#network { + color: #f9e2af; + border-left: 0px; + border-right: 0px; +} + +#pulseaudio { + color: #89b4fa; + border-left: 0px; + border-right: 0px; +} + +#pulseaudio.microphone { + color: #cba6f7; + border-radius: 0px 10px 10px 0px; + border-left: 0px; + border-right: 0px; + margin-right: 5px; +} + +#battery { + color: #a6e3a1; + border-radius: 0 10px 10px 0; + margin-right: 10px; + border-left: 0px; +} + +#custom-weather { + border-radius: 0px 10px 10px 0px; + border-right: 0px; + margin-left: 0px; +} diff --git a/user/config/wlogout/icons/hibernate.png b/user/config/wlogout/icons/hibernate.png new file mode 100644 index 0000000..1aa6730 Binary files /dev/null and b/user/config/wlogout/icons/hibernate.png differ diff --git a/user/config/wlogout/icons/lock.png b/user/config/wlogout/icons/lock.png new file mode 100644 index 0000000..2fdf2de Binary files /dev/null and b/user/config/wlogout/icons/lock.png differ diff --git a/user/config/wlogout/icons/logout.png b/user/config/wlogout/icons/logout.png new file mode 100644 index 0000000..c398d22 Binary files /dev/null and b/user/config/wlogout/icons/logout.png differ diff --git a/user/config/wlogout/icons/reboot.png b/user/config/wlogout/icons/reboot.png new file mode 100644 index 0000000..6db3aaa Binary files /dev/null and b/user/config/wlogout/icons/reboot.png differ diff --git a/user/config/wlogout/icons/shutdown.png b/user/config/wlogout/icons/shutdown.png new file mode 100644 index 0000000..3025cd0 Binary files /dev/null and b/user/config/wlogout/icons/shutdown.png differ diff --git a/user/config/wlogout/icons/suspend.png b/user/config/wlogout/icons/suspend.png new file mode 100644 index 0000000..124a58e Binary files /dev/null and b/user/config/wlogout/icons/suspend.png differ diff --git a/user/config/wlogout/layout b/user/config/wlogout/layout new file mode 100644 index 0000000..6e546a1 --- /dev/null +++ b/user/config/wlogout/layout @@ -0,0 +1,36 @@ +{ + "label" : "lock", + "action" : "swaylock", + "text" : "Lock", + "keybind" : "l" +} +{ + "label" : "hibernate", + "action" : "systemctl hibernate", + "text" : "Hibernate", + "keybind" : "h" +} +{ + "label" : "logout", + "action" : "sleep 1; hyprctl dispatch exit", + "text" : "Logout", + "keybind" : "e" +} +{ + "label" : "shutdown", + "action" : "systemctl poweroff", + "text" : "Shutdown", + "keybind" : "s" +} +{ + "label" : "suspend", + "action" : "systemctl suspend", + "text" : "Suspend", + "keybind" : "u" +} +{ + "label" : "reboot", + "action" : "systemctl reboot", + "text" : "Reboot", + "keybind" : "r" +} diff --git a/user/config/wlogout/style.css b/user/config/wlogout/style.css new file mode 100644 index 0000000..5ba48fe --- /dev/null +++ b/user/config/wlogout/style.css @@ -0,0 +1,50 @@ +* { + background-image: none; +} + +window { + background-color: rgba(36, 39, 58, 0.9); +} + +button { + margin: 8px; + color: #cad3f5; + background-color: #363a4f; + border-style: solid; + border-width: 2px; + background-repeat: no-repeat; + background-position: center; + background-size: 25%; +} + +button:active, +button:focus, +button:hover { + color: #8bd5ca; + background-color: #24273a; + outline-style: none; +} + +#lock { + background-image: image(url("icons/lock.png")); +} + +#logout { + background-image: image(url("icons/logout.png")); +} + +#suspend { + background-image: image(url("icons/suspend.png")); +} + +#hibernate { + background-image: image(url("icons/hibernate.png")); +} + +#shutdown { + background-image: image(url("icons/shutdown.png")); +} + +#reboot { + background-image: image(url("icons/reboot.png")); +} diff --git a/user/config/wofi/style.css b/user/config/wofi/style.css new file mode 100644 index 0000000..9476152 --- /dev/null +++ b/user/config/wofi/style.css @@ -0,0 +1,51 @@ +window { + margin: 0px; + border: 1px solid #bd93f9; + background-color: #282a36; +} + +#input { + margin: 5px; + border: none; + color: #f8f8f2; + background-color: #44475a; +} + +#inner-box { + margin: 5px; + border: none; + background-color: #282a36; +} + +#outer-box { + margin: 5px; + border: none; + background-color: #282a36; +} + +#scroll { + margin: 0px; + border: none; +} + +#text { + margin: 5px; + border: none; + color: #f8f8f2; +} + +#entry.activatable #text { + color: #282a36; +} + +#entry > * { + color: #f8f8f2; +} + +#entry:selected { + background-color: #44475a; +} + +#entry:selected #text { + font-weight: bold; +} diff --git a/user/git/default.nix b/user/git/default.nix new file mode 100644 index 0000000..b330bac --- /dev/null +++ b/user/git/default.nix @@ -0,0 +1,7 @@ +{ + programs.git = { + enable = true; + userName = "gpskwlkr"; + userEmail = "giorgi.anakidze@outlook.com"; + }; +} diff --git a/user/sh.nix b/user/sh.nix new file mode 100644 index 0000000..08d1016 --- /dev/null +++ b/user/sh.nix @@ -0,0 +1,44 @@ +{ config, pkgs, ... }: +let + myAliases = { + ll = "ls -l"; + fullClean = '' + nix-collect-garbage --delete-old + + sudo nix-collect-garbage -d + + sudo /run/current-system/bin/switch-to-configuration boot + ''; + rebuild = "sudo nixos-rebuild switch --flake ~/.dotfiles/"; + fullRebuild = "sudo nixos-rebuild switch --flake ~/.dotfiles/ && home-manager switch --flake ~/.dotfiles/ -b backup"; + homeRebuild = "home-manager switch --flake ~/.dotfiles/ -b backup"; +}; +in +{ + programs = { + zsh = { + enable = true; + enableAutosuggestions = true; + syntaxHighlighting.enable = true; + initExtra = '' + source ~/.p10k.zsh && + eval "$(zoxide init --cmd cd zsh)" && + + j() { cdi; clear } + + export PATH="$PATH:/home/gpskwlkr/.dotnet/tools" + ''; + shellAliases = myAliases; + oh-my-zsh = { + enable = true; + custom = "$HOME/.oh-my-custom"; + theme = "powerlevel10k/powerlevel10k"; + plugins = [ + "git" + "history" + "wd" + ]; + }; + }; + }; +}