From 0e22544a8a80efa09248b2464ffd779c239d6ceb Mon Sep 17 00:00:00 2001 From: Charlie Root Date: Wed, 22 May 2024 14:29:45 +0200 Subject: [PATCH] new formatting, nixvim is working --- flake.nix | 11 +- hosts/default.nix | 6 +- hosts/vali/mars/configuration.nix | 14 +- hosts/vali/mars/hardware-configuration.nix | 24 +- hosts/vali/mars/programs.nix | 7 +- lib/options.nix | 9 +- modules/cli/default.nix | 2 +- modules/cli/fish.nix | 56 +-- modules/cli/neovim.nix | 12 +- modules/cli/nh.nix | 10 +- modules/default.nix | 2 +- modules/editors/default.nix | 2 +- modules/editors/emacs.nix | 25 +- modules/editors/helix.nix | 33 +- modules/editors/kakoune.nix | 14 +- modules/editors/kakoune/default.nix | 2 +- modules/editors/kakoune/kakoune.nix | 18 +- modules/editors/nixvim/keys.nix | 6 +- .../editors/nixvim/plug/completion/cmp.nix | 218 +++++------ modules/editors/nixvim/plug/git/gitsigns.nix | 140 +++---- modules/editors/nixvim/plug/git/lazygit.nix | 32 +- modules/editors/nixvim/plug/lsp/fidget.nix | 184 ++++----- modules/editors/nixvim/plug/lsp/lsp.nix | 174 ++++----- modules/editors/nixvim/plug/lsp/lspsaga.nix | 362 +++++++++--------- modules/editors/nixvim/plug/lsp/none-ls.nix | 88 ++--- .../nixvim/plug/statusline/lualine.nix | 70 ++-- .../nixvim/plug/treesitter/treesitter.nix | 60 +-- modules/editors/nixvim/plug/ui/alpha.nix | 178 ++++----- modules/editors/nixvim/plug/ui/btw.nix | 36 +- modules/editors/nixvim/plug/ui/bufferline.nix | 326 ++++++++-------- .../editors/nixvim/plug/ui/nvim-notify.nix | 86 ++--- modules/editors/nixvim/plug/ui/telescope.nix | 354 ++++++++--------- modules/editors/nixvim/plug/utils/copilot.nix | 86 ++--- modules/editors/nixvim/plug/utils/flash.nix | 104 ++--- modules/editors/nixvim/plug/utils/grapple.nix | 34 +- modules/editors/nixvim/plug/utils/oil.nix | 90 ++--- .../editors/nixvim/plug/utils/undotree.nix | 36 +- modules/editors/nixvim/settings.nix | 3 +- modules/gui/anyrun/anyrun.nix | 15 +- modules/gui/anyrun/default.nix | 2 +- modules/gui/foot.nix | 53 +-- modules/gui/gtk.nix | 11 +- modules/gui/kitty.nix | 12 +- modules/gui/minecraft.nix | 15 +- modules/gui/mpv.nix | 12 +- modules/gui/qt.nix | 12 +- modules/gui/rofi.nix | 14 +- modules/gui/schizofox.nix | 49 ++- modules/gui/spicetify.nix | 11 +- modules/gui/steam.nix | 13 +- modules/gui/stylix.nix | 13 +- modules/gui/vesktop.nix | 21 +- modules/gui/vivado.nix | 5 +- modules/gui/waybar.nix | 31 +- modules/gui/zathura.nix | 16 +- modules/other/default.nix | 3 +- modules/other/home-manager.nix | 13 +- modules/other/system.nix | 12 +- modules/other/xdg.nix | 78 ++-- modules/services/default.nix | 2 +- modules/services/dunst.nix | 11 +- modules/services/greetd.nix | 15 +- modules/services/pipewire.nix | 10 +- modules/services/ssh.nix | 13 +- modules/tui/btop.nix | 9 +- modules/tui/default.nix | 2 +- modules/tui/ncmpcpp.nix | 24 +- modules/tui/neovim.nix | 22 +- modules/tui/newsboat.nix | 15 +- modules/tui/yazi.nix | 11 +- modules/wms/default.nix | 2 +- modules/wms/wayland/default.nix | 8 +- modules/wms/wayland/hypr/default.nix | 2 +- modules/wms/wayland/hypr/land.nix | 38 +- modules/wms/wayland/niri/config.nix | 175 +++++---- modules/wms/wayland/niri/default.nix | 20 +- modules/wms/wayland/services.nix | 8 +- modules/wms/wayland/variables.nix | 15 +- modules/wms/x/awesome/awesome.nix | 14 +- options/boot/grub-boot.nix | 7 +- options/common/bluetooth.nix | 13 +- options/common/gpu/nvidia.nix | 24 +- options/common/networking.nix | 12 +- options/common/pin-registry.nix | 8 +- options/common/preserve-system.nix | 2 +- options/desktop/fonts.nix | 12 +- options/desktop/monitors.nix | 10 +- overlay.nix | 10 +- 88 files changed, 1994 insertions(+), 1845 deletions(-) diff --git a/flake.nix b/flake.nix index 04209af..70083aa 100644 --- a/flake.nix +++ b/flake.nix @@ -1,8 +1,12 @@ { description = "My NixOS config flake"; - outputs = inputs@{ self, nixpkgs, ... }: { + outputs = inputs @ { + self, + nixpkgs, + ... + }: { inherit (nixpkgs) lib; - nixosConfigurations = import ./hosts { inherit inputs; }; + nixosConfigurations = import ./hosts {inherit inputs;}; }; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; @@ -49,7 +53,7 @@ }; }; spicetify-nix.url = "github:the-argus/spicetify-nix"; - nur = { url = "github:nix-community/NUR"; }; + nur = {url = "github:nix-community/NUR";}; nixvim = { url = "github:nix-community/nixvim"; inputs.nixpkgs.follows = "nixpkgs"; @@ -63,6 +67,5 @@ url = "github:nix-community/fenix"; inputs.nixpkgs.follows = "nixpkgs"; }; - }; } diff --git a/hosts/default.nix b/hosts/default.nix index 00094c1..dd54eae 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -1,11 +1,10 @@ -{ inputs, ... }: -let +{inputs, ...}: let inherit (inputs) self; inherit (self) lib; in { mars = lib.nixosSystem { system = "x86_64-linux"; - specialArgs = { inherit lib inputs self; }; + specialArgs = {inherit lib inputs self;}; modules = [ inputs.stylix.nixosModules.stylix ./vali/mars @@ -15,5 +14,4 @@ in { inputs.nixvim.nixosModules.nixvim ]; }; - } diff --git a/hosts/vali/mars/configuration.nix b/hosts/vali/mars/configuration.nix index 54602cf..ae258f0 100644 --- a/hosts/vali/mars/configuration.nix +++ b/hosts/vali/mars/configuration.nix @@ -1,31 +1,31 @@ -{ pkgs, ... }: { +{pkgs, ...}: { # allow unfree packages nixpkgs.config.allowUnfree = true; - # Time Zone + # Time Zone time.timeZone = "Europe/Zurich"; # Select internationalisation properties. i18n.defaultLocale = "en_US.UTF-8"; console.keyMap = "de"; nix = { settings = { - substituters = [ "https://hyprland.cachix.org" ]; + substituters = ["https://hyprland.cachix.org"]; trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ]; # enable flakes - experimental-features = [ "nix-command" "flakes" ]; + experimental-features = ["nix-command" "flakes"]; # reduce file size used & automatic garbage collector auto-optimise-store = true; }; }; - security.sudo.package = pkgs.sudo.override { withInsults = true; }; + security.sudo.package = pkgs.sudo.override {withInsults = true;}; security.polkit.enable = true; programs.kdeconnect.enable = true; programs.dconf.enable = true; # boot.kernelModules = [ "v4l2loopback" ]; boot.kernelPackages = pkgs.linuxPackages_zen; # boot.extraModulePackages = [ pkgs.linuxPackages.v4l2loopback ]; - # services.picom.enable = true; + # services.picom.enable = true; services.emacs.enable = true; modules = { other = { @@ -75,7 +75,7 @@ dunst.enable = true; }; themes = { - gtk = { enable = true; }; + gtk = {enable = true;}; qt = { enable = false; package = pkgs.kde-gruvbox; diff --git a/hosts/vali/mars/hardware-configuration.nix b/hosts/vali/mars/hardware-configuration.nix index 8d7af14..85ad7f6 100644 --- a/hosts/vali/mars/hardware-configuration.nix +++ b/hosts/vali/mars/hardware-configuration.nix @@ -1,22 +1,24 @@ -{ config, lib, pkgs, modulesPath, ... }: - { - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [(modulesPath + "/installer/scan/not-detected.nix")]; - boot.initrd.availableKernelModules = - [ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; + boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "sd_mod"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-intel"]; + boot.extraModulePackages = []; fileSystems."/" = { device = "/dev/disk/by-uuid/0423508a-6906-4872-baeb-2b1e6bd017a4"; fsType = "ext4"; - options = [ "noatime" "nodiratime" "discard" ]; + options = ["noatime" "nodiratime" "discard"]; }; - boot.initrd.luks.devices."luks-c03fc486-bdd7-46bf-ac2f-1a55fe1abd6f".device = - "/dev/disk/by-uuid/c03fc486-bdd7-46bf-ac2f-1a55fe1abd6f"; + boot.initrd.luks.devices."luks-c03fc486-bdd7-46bf-ac2f-1a55fe1abd6f".device = "/dev/disk/by-uuid/c03fc486-bdd7-46bf-ac2f-1a55fe1abd6f"; fileSystems."/boot" = { device = "/dev/disk/by-uuid/D299-5174"; diff --git a/hosts/vali/mars/programs.nix b/hosts/vali/mars/programs.nix index 897dca9..33270a2 100644 --- a/hosts/vali/mars/programs.nix +++ b/hosts/vali/mars/programs.nix @@ -1,5 +1,8 @@ -{ inputs, pkgs, ... }: -let +{ + inputs, + pkgs, + ... +}: let fenix = inputs.fenix.packages.${pkgs.system}; nixpkgs-wayland = inputs.nixpkgs-wayland.packages.${pkgs.system}; in { diff --git a/lib/options.nix b/lib/options.nix index 94b8c5c..2393d68 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -1,12 +1,11 @@ # Taken from: https://github.com/hlissner/dotfiles/blob/master/lib/options.nix -{ lib, ... }: - -let inherit (lib) mkOption types; +{lib, ...}: let + inherit (lib) mkOption types; in { - mkOpt = type: default: mkOption { inherit type default; }; + mkOpt = type: default: mkOption {inherit type default;}; mkOpt' = type: default: description: - mkOption { inherit type default description; }; + mkOption {inherit type default description;}; mkBoolOpt = default: mkOption { diff --git a/modules/cli/default.nix b/modules/cli/default.nix index b5afc7b..22ea6b7 100644 --- a/modules/cli/default.nix +++ b/modules/cli/default.nix @@ -1 +1 @@ -_: { imports = [ ./neovim.nix ./fish.nix ./nh.nix ]; } +_: {imports = [./neovim.nix ./fish.nix ./nh.nix];} diff --git a/modules/cli/fish.nix b/modules/cli/fish.nix index 77fb501..831bcde 100644 --- a/modules/cli/fish.nix +++ b/modules/cli/fish.nix @@ -1,6 +1,10 @@ -{ config, lib, pkgs, ... }: -with lib; -let +{ + config, + lib, + pkgs, + ... +}: +with lib; let cfg = config.modules.programs.fish; username = config.modules.other.system.username; # not needed because I'm using nh os switch @@ -12,7 +16,7 @@ in { extraAliases = mkOption { type = types.attrs; description = "extra shell aliases"; - default = { }; + default = {}; }; }; @@ -22,12 +26,12 @@ in { users.users.${username}.shell = pkgs.fish; environment = { - shells = [ pkgs.fish ]; - pathsToLink = [ "/share/fish" ]; + shells = [pkgs.fish]; + pathsToLink = ["/share/fish"]; }; home-manager.users.${username} = { - home.packages = with pkgs; [ nix-output-monitor ]; + home.packages = with pkgs; [nix-output-monitor]; programs.zoxide.enable = true; programs.zoxide.enableFishIntegration = true; programs.fish = { @@ -55,24 +59,26 @@ in { src = pkgs.fishPlugins.tide.src; } ]; - shellAbbrs = { - c = "clear"; - cc = "cd ~ && clear"; - mv = "mv -iv"; - rm = "trash -v"; - ls = "eza --icons"; - l = "eza -a --icons"; - la = "eza -lha --icons --git"; - kys = "shutdown now"; - lg = "lazygit"; - cd = "z"; - v = "nvim"; - h = "hx"; - k = "kak"; - e = "emacs"; - update = ''nh os switch "${gitPath}"''; - flake = "cd '${gitPath}'"; - } // cfg.extraAliases; + shellAbbrs = + { + c = "clear"; + cc = "cd ~ && clear"; + mv = "mv -iv"; + rm = "trash -v"; + ls = "eza --icons"; + l = "eza -a --icons"; + la = "eza -lha --icons --git"; + kys = "shutdown now"; + lg = "lazygit"; + cd = "z"; + v = "nvim"; + h = "hx"; + k = "kak"; + e = "emacs"; + update = ''nh os switch "${gitPath}"''; + flake = "cd '${gitPath}'"; + } + // cfg.extraAliases; }; }; }; diff --git a/modules/cli/neovim.nix b/modules/cli/neovim.nix index 73d0c42..9c74151 100644 --- a/modules/cli/neovim.nix +++ b/modules/cli/neovim.nix @@ -1,6 +1,9 @@ -{ config, lib, pkgs, ... }: - -let +{ + config, + lib, + pkgs, + ... +}: let lazyvim-config = pkgs.fetchFromGitHub { owner = "Dragyx"; repo = "lazyvim-config"; @@ -14,7 +17,7 @@ in { config = lib.mkIf cfg.enable { home-manager.users.${username} = { - home.packages = with pkgs; [ lazygit ripgrep fd gcc xclip rust-analyzer ]; + home.packages = with pkgs; [lazygit ripgrep fd gcc xclip rust-analyzer]; programs.neovim = { enable = true; viAlias = true; @@ -28,6 +31,5 @@ in { recursive = true; }; }; - }; } diff --git a/modules/cli/nh.nix b/modules/cli/nh.nix index 0ab66f9..ee5f851 100644 --- a/modules/cli/nh.nix +++ b/modules/cli/nh.nix @@ -1,6 +1,10 @@ -{ lib, config, ... }: -with lib; -let cfg = config.modules.programs.nh; +{ + lib, + config, + ... +}: +with lib; let + cfg = config.modules.programs.nh; in { options.modules.programs.nh.enable = mkEnableOption "nh"; diff --git a/modules/default.nix b/modules/default.nix index 5f406f6..ea3e341 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1 +1 @@ -_: { imports = [ ./cli ./gui ./tui ./other ./services ./editors ./wms ]; } +_: {imports = [./cli ./gui ./tui ./other ./services ./editors ./wms];} diff --git a/modules/editors/default.nix b/modules/editors/default.nix index 78fb579..15d64e4 100644 --- a/modules/editors/default.nix +++ b/modules/editors/default.nix @@ -1 +1 @@ -_: { imports = [ ./emacs.nix ./helix.nix ./kakoune.nix ./nixvim ]; } +_: {imports = [./emacs.nix ./helix.nix ./kakoune.nix ./nixvim];} diff --git a/modules/editors/emacs.nix b/modules/editors/emacs.nix index a2f3a8f..1d03645 100644 --- a/modules/editors/emacs.nix +++ b/modules/editors/emacs.nix @@ -1,8 +1,12 @@ # Taken from: https://github.com/hlissner/dotfiles/blob/master/modules/editors/emacs.nix -{ config, lib, pkgs, inputs, ... }: - -with lib; -let +{ + config, + lib, + pkgs, + inputs, + ... +}: +with lib; let cfg = config.modules.editors.emacs; username = config.modules.other.system.username; repoUrl = inputs.doomemacs; @@ -20,18 +24,18 @@ in { config = mkIf cfg.enable { ## Emacs itself as an overlay - nixpkgs.overlays = [ inputs.emacs-overlay.overlay ]; + nixpkgs.overlays = [inputs.emacs-overlay.overlay]; environment.systemPackages = with pkgs; [ binutils # native-comp needs 'as', provided by this # 28.2 + native-comp ((emacsPackagesFor emacsNativeComp).emacsWithPackages - (epkgs: [ epkgs.vterm ])) + (epkgs: [epkgs.vterm])) emacs-desktop-symbol ## Doom dependencies git - (ripgrep.override { withPCRE2 = true; }) + (ripgrep.override {withPCRE2 = true;}) gnutls # for TLS connectivity ## Optional dependencies @@ -41,7 +45,7 @@ in { ## Module dependencies # :checkers spell - (aspellWithDicts (ds: with ds; [ en en-computers en-science ])) + (aspellWithDicts (ds: with ds; [en en-computers en-science])) # :tools editorconfig editorconfig-core-c # per-project style config # :tools lookup & :lang org +roam @@ -52,12 +56,11 @@ in { beancount ]; - home-manager.users.${username}.home.sessionPath = - [ "/home/vali/.config/emacs/bin" ]; + home-manager.users.${username}.home.sessionPath = ["/home/vali/.config/emacs/bin"]; # modules.shell.zsh.rcFiles = [ "${configDir}/emacs/aliases.zsh" ]; - fonts.fonts = [ pkgs.emacs-all-the-icons-fonts ]; + fonts.fonts = [pkgs.emacs-all-the-icons-fonts]; system.userActivationScripts = mkIf cfg.doom.enable { installDoomEmacs = '' diff --git a/modules/editors/helix.nix b/modules/editors/helix.nix index 0a84f56..22eb41b 100644 --- a/modules/editors/helix.nix +++ b/modules/editors/helix.nix @@ -1,5 +1,9 @@ -{ config, lib, pkgs, ... }: -let +{ + config, + lib, + pkgs, + ... +}: let cfg = config.modules.editors.helix; username = config.modules.other.system.username; in { @@ -16,26 +20,25 @@ in { bufferline = "multiple"; soft-wrap.enable = true; lsp.display-messages = true; - cursor-shape = { insert = "bar"; }; - statusline.left = - - [ "mode" "spinner" "version-control" "file-name" ]; + cursor-shape = {insert = "bar";}; + statusline.left = ["mode" "spinner" "version-control" "file-name"]; }; keys.normal = { - C-g = - [ ":new" ":insert-output lazygit" ":buffer-close!" ":redraw" ]; - C-t = [ ":new" ":insert-output fish" ":buffer-close!" ":redraw" ]; - esc = [ "collapse_selection" "keep_primary_selection" ]; + C-g = [":new" ":insert-output lazygit" ":buffer-close!" ":redraw"]; + C-t = [":new" ":insert-output fish" ":buffer-close!" ":redraw"]; + esc = ["collapse_selection" "keep_primary_selection"]; A-H = "goto_previous_buffer"; A-L = "goto_next_buffer"; A-w = ":buffer-close"; }; }; - languages.language = [{ - name = "nix"; - auto-format = true; - formatter.command = "${pkgs.nixfmt-classic}/bin/nixfmt"; - }]; + languages.language = [ + { + name = "nix"; + auto-format = true; + formatter.command = "${pkgs.nixfmt-classic}/bin/nixfmt"; + } + ]; }; }; }; diff --git a/modules/editors/kakoune.nix b/modules/editors/kakoune.nix index 7e6173b..2049e2b 100644 --- a/modules/editors/kakoune.nix +++ b/modules/editors/kakoune.nix @@ -1,6 +1,10 @@ -{ config, lib, pkgs, ... }: -with lib; -let +{ + config, + lib, + pkgs, + ... +}: +with lib; let cfg = config.modules.editors.kakoune; username = config.modules.other.system.username; # inherit (inputs.kakoune.packages.${pkgs.system}) kakoun; @@ -41,8 +45,7 @@ in { mode = "normal"; key = ""; effect = ";,"; - docstring = - "Press escape to clear highlighted text and collapse cursors"; + docstring = "Press escape to clear highlighted text and collapse cursors"; } { mode = "normal"; @@ -119,6 +122,5 @@ in { ''; }; }; - }; } diff --git a/modules/editors/kakoune/default.nix b/modules/editors/kakoune/default.nix index 641f21b..9db817b 100644 --- a/modules/editors/kakoune/default.nix +++ b/modules/editors/kakoune/default.nix @@ -1 +1 @@ -_: { imports = [ ./kakoune.nix ]; } +_: {imports = [./kakoune.nix];} diff --git a/modules/editors/kakoune/kakoune.nix b/modules/editors/kakoune/kakoune.nix index 56416c8..c00e5d8 100644 --- a/modules/editors/kakoune/kakoune.nix +++ b/modules/editors/kakoune/kakoune.nix @@ -1,6 +1,11 @@ -{ config, lib, pkgs, buildGoModule, ... }: -with lib; -let +{ + config, + lib, + pkgs, + buildGoModule, + ... +}: +with lib; let cfg = config.modules.programs.kakoune; username = config.modules.other.system.username; kakship = pkgs.rustPlatform.buildRustPackage rec { @@ -16,8 +21,7 @@ let lockFile = "${src}/Cargo.lock"; outputHashes = { "kak-0.1.2" = "sha256-RhtHQkC9yCSJtr/kbC5c9MavbL79acrsiEGXyoAST8U="; - "yew-ansi-0.1.0" = - "sha256-dSaEzqiOon+OqCZKQudzLRNP+Iv97kC+XZcTElKNrzs="; + "yew-ansi-0.1.0" = "sha256-dSaEzqiOon+OqCZKQudzLRNP+Iv97kC+XZcTElKNrzs="; }; }; @@ -70,7 +74,7 @@ let description = "Handy Kakoune companion."; homepage = "https://github.com/kkga/kks"; license = licenses.unfree; - maintainers = with maintainers; [ kalbasit ]; + maintainers = with maintainers; [kalbasit]; }; }; kak-alacritty = pkgs.kakouneUtils.buildKakounePluginFrom2Nix rec { @@ -97,7 +101,7 @@ let in { options.modules.programs.kakoune.enable = mkEnableOption "kakoune"; config = mkIf cfg.enable { - home-manager.users.${username} = { programs.kakoune.enable = true; }; + home-manager.users.${username} = {programs.kakoune.enable = true;}; environment.systemPackages = with pkgs; [ rust-analyzer rustfmt # Rust LSP diff --git a/modules/editors/nixvim/keys.nix b/modules/editors/nixvim/keys.nix index e419581..640a758 100644 --- a/modules/editors/nixvim/keys.nix +++ b/modules/editors/nixvim/keys.nix @@ -244,7 +244,8 @@ { mode = "n"; key = ""; - action = "zz"; + action = ""; + #action = "zz"; options = { desc = "Allow C-d and C-u to keep the cursor in the middle"; }; @@ -253,7 +254,8 @@ { mode = "n"; key = ""; - action = "zz"; + #action = "zz"; + action = ""; options = { desc = "Allow C-d and C-u to keep the cursor in the middle"; }; diff --git a/modules/editors/nixvim/plug/completion/cmp.nix b/modules/editors/nixvim/plug/completion/cmp.nix index 038d3d4..278f9e1 100644 --- a/modules/editors/nixvim/plug/completion/cmp.nix +++ b/modules/editors/nixvim/plug/completion/cmp.nix @@ -1,122 +1,122 @@ { programs.nixvim = { plugins = { - cmp-emoji = {enable = true;}; - cmp = { - enable = true; - settings = { - autoEnableSources = true; - experimental = {ghost_text = true;}; - performance = { - debounce = 60; - fetchingTimeout = 200; - maxViewEntries = 30; - }; - snippet = {expand = "luasnip";}; - formatting = {fields = ["kind" "abbr" "menu"];}; - sources = [ - {name = "nvim_lsp";} - {name = "emoji";} - { - name = "buffer"; # text within current buffer - option.get_bufnrs.__raw = "vim.api.nvim_list_bufs"; - keywordLength = 3; - } - { - name = "path"; # file system paths - keywordLength = 3; - } - { - name = "luasnip"; # snippets - keywordLength = 3; - } - ]; + cmp-emoji = {enable = true;}; + cmp = { + enable = true; + settings = { + autoEnableSources = true; + experimental = {ghost_text = true;}; + performance = { + debounce = 60; + fetchingTimeout = 200; + maxViewEntries = 30; + }; + snippet = {expand = "luasnip";}; + formatting = {fields = ["kind" "abbr" "menu"];}; + sources = [ + {name = "nvim_lsp";} + {name = "emoji";} + { + name = "buffer"; # text within current buffer + option.get_bufnrs.__raw = "vim.api.nvim_list_bufs"; + keywordLength = 3; + } + { + name = "path"; # file system paths + keywordLength = 3; + } + { + name = "luasnip"; # snippets + keywordLength = 3; + } + ]; - window = { - completion = {border = "solid";}; - documentation = {border = "solid";}; - }; + window = { + completion = {border = "solid";}; + documentation = {border = "solid";}; + }; - mapping = { - "" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; - "" = "cmp.mapping.select_next_item()"; - "" = "cmp.mapping.select_prev_item()"; - "" = "cmp.mapping.abort()"; - "" = "cmp.mapping.scroll_docs(-4)"; - "" = "cmp.mapping.scroll_docs(4)"; - "" = "cmp.mapping.complete()"; - "" = "cmp.mapping.confirm({ select = true })"; - "" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true })"; + mapping = { + "" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; + "" = "cmp.mapping.select_next_item()"; + "" = "cmp.mapping.select_prev_item()"; + "" = "cmp.mapping.abort()"; + "" = "cmp.mapping.scroll_docs(-4)"; + "" = "cmp.mapping.scroll_docs(4)"; + "" = "cmp.mapping.complete()"; + "" = "cmp.mapping.confirm({ select = true })"; + "" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true })"; + }; }; }; + cmp-nvim-lsp = {enable = true;}; # lsp + cmp-buffer = {enable = true;}; + cmp-path = {enable = true;}; # file system paths + cmp_luasnip = {enable = true;}; # snippets + cmp-cmdline = {enable = false;}; # autocomplete for cmdline }; - cmp-nvim-lsp = {enable = true;}; # lsp - cmp-buffer = {enable = true;}; - cmp-path = {enable = true;}; # file system paths - cmp_luasnip = {enable = true;}; # snippets - cmp-cmdline = {enable = false;}; # autocomplete for cmdline - }; - extraConfigLua = '' - luasnip = require("luasnip") - kind_icons = { - Text = "󰊄", - Method = "", - Function = "󰡱", - Constructor = "", - Field = "", - Variable = "󱀍", - Class = "", - Interface = "", - Module = "󰕳", - Property = "", - Unit = "", - Value = "", - Enum = "", - Keyword = "", - Snippet = "", - Color = "", - File = "", - Reference = "", - Folder = "", - EnumMember = "", - Constant = "", - Struct = "", - Event = "", - Operator = "", - TypeParameter = "", - } + extraConfigLua = '' + luasnip = require("luasnip") + kind_icons = { + Text = "󰊄", + Method = "", + Function = "󰡱", + Constructor = "", + Field = "", + Variable = "󱀍", + Class = "", + Interface = "", + Module = "󰕳", + Property = "", + Unit = "", + Value = "", + Enum = "", + Keyword = "", + Snippet = "", + Color = "", + File = "", + Reference = "", + Folder = "", + EnumMember = "", + Constant = "", + Struct = "", + Event = "", + Operator = "", + TypeParameter = "", + } - local cmp = require'cmp' + local cmp = require'cmp' - -- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore). - cmp.setup.cmdline({'/', "?" }, { - sources = { - { name = 'buffer' } - } - }) - - -- Set configuration for specific filetype. - cmp.setup.filetype('gitcommit', { - sources = cmp.config.sources({ - { name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it. - }, { - { name = 'buffer' }, + -- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore). + cmp.setup.cmdline({'/', "?" }, { + sources = { + { name = 'buffer' } + } }) - }) - -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). - cmp.setup.cmdline(':', { - sources = cmp.config.sources({ - { name = 'path' } - }, { - { name = 'cmdline' } - }), - -- formatting = { - -- format = function(_, vim_item) - -- vim_item.kind = cmdIcons[vim_item.kind] or "FOO" - -- return vim_item - -- end - -- } - }) ''; - }; + -- Set configuration for specific filetype. + cmp.setup.filetype('gitcommit', { + sources = cmp.config.sources({ + { name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it. + }, { + { name = 'buffer' }, + }) + }) + + -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). + cmp.setup.cmdline(':', { + sources = cmp.config.sources({ + { name = 'path' } + }, { + { name = 'cmdline' } + }), + -- formatting = { + -- format = function(_, vim_item) + -- vim_item.kind = cmdIcons[vim_item.kind] or "FOO" + -- return vim_item + -- end + -- } + }) ''; + }; } diff --git a/modules/editors/nixvim/plug/git/gitsigns.nix b/modules/editors/nixvim/plug/git/gitsigns.nix index bb72997..4383c20 100644 --- a/modules/editors/nixvim/plug/git/gitsigns.nix +++ b/modules/editors/nixvim/plug/git/gitsigns.nix @@ -1,78 +1,78 @@ { programs.nixvim = { plugins.gitsigns = { - enable = true; - settings = { - trouble = true; - current_line_blame = true; - signs = { - add = { - text = "│"; - }; - change = { - text = "│"; - }; - delete = { - text = "_"; - }; - topdelete = { - text = "‾"; - }; - changedelete = { - text = "~"; - }; - untracked = { - text = "│"; + enable = true; + settings = { + trouble = true; + current_line_blame = true; + signs = { + add = { + text = "│"; + }; + change = { + text = "│"; + }; + delete = { + text = "_"; + }; + topdelete = { + text = "‾"; + }; + changedelete = { + text = "~"; + }; + untracked = { + text = "│"; + }; }; }; }; + keymaps = [ + { + mode = ["n" "v"]; + key = "gh"; + action = "gitsigns"; + options = { + silent = true; + desc = "+hunks"; + }; + } + { + mode = "n"; + key = "ghb"; + action = ":Gitsigns blame_line"; + options = { + silent = true; + desc = "Blame line"; + }; + } + { + mode = "n"; + key = "ghd"; + action = ":Gitsigns diffthis"; + options = { + silent = true; + desc = "Diff This"; + }; + } + { + mode = "n"; + key = "ghR"; + action = ":Gitsigns reset_buffer"; + options = { + silent = true; + desc = "Reset Buffer"; + }; + } + { + mode = "n"; + key = "ghS"; + action = ":Gitsigns stage_buffer"; + options = { + silent = true; + desc = "Stage Buffer"; + }; + } + ]; }; - keymaps = [ - { - mode = ["n" "v"]; - key = "gh"; - action = "gitsigns"; - options = { - silent = true; - desc = "+hunks"; - }; - } - { - mode = "n"; - key = "ghb"; - action = ":Gitsigns blame_line"; - options = { - silent = true; - desc = "Blame line"; - }; - } - { - mode = "n"; - key = "ghd"; - action = ":Gitsigns diffthis"; - options = { - silent = true; - desc = "Diff This"; - }; - } - { - mode = "n"; - key = "ghR"; - action = ":Gitsigns reset_buffer"; - options = { - silent = true; - desc = "Reset Buffer"; - }; - } - { - mode = "n"; - key = "ghS"; - action = ":Gitsigns stage_buffer"; - options = { - silent = true; - desc = "Stage Buffer"; - }; - } - ]; -}; } diff --git a/modules/editors/nixvim/plug/git/lazygit.nix b/modules/editors/nixvim/plug/git/lazygit.nix index 1bacd5f..46d2c27 100644 --- a/modules/editors/nixvim/plug/git/lazygit.nix +++ b/modules/editors/nixvim/plug/git/lazygit.nix @@ -1,22 +1,22 @@ {pkgs, ...}: { programs.nixvim = { extraPlugins = with pkgs.vimPlugins; [ - lazygit-nvim - ]; + lazygit-nvim + ]; - extraConfigLua = '' - require("telescope").load_extension("lazygit") - ''; + extraConfigLua = '' + require("telescope").load_extension("lazygit") + ''; - keymaps = [ - { - mode = "n"; - key = "gg"; - action = "LazyGit"; - options = { - desc = "LazyGit (root dir)"; - }; - } - ]; -}; + keymaps = [ + { + mode = "n"; + key = "gg"; + action = "LazyGit"; + options = { + desc = "LazyGit (root dir)"; + }; + } + ]; + }; } diff --git a/modules/editors/nixvim/plug/lsp/fidget.nix b/modules/editors/nixvim/plug/lsp/fidget.nix index 1cd9e6b..225c841 100644 --- a/modules/editors/nixvim/plug/lsp/fidget.nix +++ b/modules/editors/nixvim/plug/lsp/fidget.nix @@ -1,101 +1,101 @@ { programs.nixvim = { - plugins.fidget = { - enable = true; - logger = { - level = "warn"; # “off”, “error”, “warn”, “info”, “debug”, “trace” - floatPrecision = 0.01; # Limit the number of decimals displayed for floats - }; - progress = { - pollRate = 0; # How and when to poll for progress messages - suppressOnInsert = true; # Suppress new messages while in insert mode - ignoreDoneAlready = false; # Ignore new tasks that are already complete - ignoreEmptyMessage = false; # Ignore new tasks that don't contain a message - clearOnDetach = - # Clear notification group when LSP server detaches - '' - function(client_id) - local client = vim.lsp.get_client_by_id(client_id) - return client and client.name or nil + plugins.fidget = { + enable = true; + logger = { + level = "warn"; # “off”, “error”, “warn”, “info”, “debug”, “trace” + floatPrecision = 0.01; # Limit the number of decimals displayed for floats + }; + progress = { + pollRate = 0; # How and when to poll for progress messages + suppressOnInsert = true; # Suppress new messages while in insert mode + ignoreDoneAlready = false; # Ignore new tasks that are already complete + ignoreEmptyMessage = false; # Ignore new tasks that don't contain a message + clearOnDetach = + # Clear notification group when LSP server detaches + '' + function(client_id) + local client = vim.lsp.get_client_by_id(client_id) + return client and client.name or nil + end + ''; + notificationGroup = + # How to get a progress message's notification group key + '' + function(msg) return msg.lsp_client.name end + ''; + ignore = []; # List of LSP servers to ignore + lsp = { + progressRingbufSize = 0; # Configure the nvim's LSP progress ring buffer size + }; + display = { + renderLimit = 16; # How many LSP messages to show at once + doneTtl = 3; # How long a message should persist after completion + doneIcon = "✔"; # Icon shown when all LSP progress tasks are complete + doneStyle = "Constant"; # Highlight group for completed LSP tasks + progressTtl = "math.huge"; # How long a message should persist when in progress + progressIcon = { + pattern = "dots"; + period = 1; + }; # Icon shown when LSP progress tasks are in progress + progressStyle = "WarningMsg"; # Highlight group for in-progress LSP tasks + groupStyle = "Title"; # Highlight group for group name (LSP server name) + iconStyle = "Question"; # Highlight group for group icons + priority = 30; # Ordering priority for LSP notification group + skipHistory = true; # Whether progress notifications should be omitted from history + formatMessage = '' + require ("fidget.progress.display").default_format_message + ''; # How to format a progress message + formatAnnote = '' + function (msg) return msg.title end + ''; # How to format a progress annotation + formatGroupName = '' + function (group) return tostring (group) end + ''; # How to format a progress notification group's name + overrides = { + rust_analyzer = { + name = "rust-analyzer"; + }; + }; # Override options from the default notification config + }; + }; + notification = { + pollRate = 10; # How frequently to update and render notifications + filter = "info"; # “off”, “error”, “warn”, “info”, “debug”, “trace” + historySize = 128; # Number of removed messages to retain in history + overrideVimNotify = true; + redirect = '' + function(msg, level, opts) + if opts and opts.on_open then + return require("fidget.integration.nvim-notify").delegate(msg, level, opts) + end end ''; - notificationGroup = - # How to get a progress message's notification group key - '' - function(msg) return msg.lsp_client.name end - ''; - ignore = []; # List of LSP servers to ignore - lsp = { - progressRingbufSize = 0; # Configure the nvim's LSP progress ring buffer size - }; - display = { - renderLimit = 16; # How many LSP messages to show at once - doneTtl = 3; # How long a message should persist after completion - doneIcon = "✔"; # Icon shown when all LSP progress tasks are complete - doneStyle = "Constant"; # Highlight group for completed LSP tasks - progressTtl = "math.huge"; # How long a message should persist when in progress - progressIcon = { - pattern = "dots"; - period = 1; - }; # Icon shown when LSP progress tasks are in progress - progressStyle = "WarningMsg"; # Highlight group for in-progress LSP tasks - groupStyle = "Title"; # Highlight group for group name (LSP server name) - iconStyle = "Question"; # Highlight group for group icons - priority = 30; # Ordering priority for LSP notification group - skipHistory = true; # Whether progress notifications should be omitted from history - formatMessage = '' - require ("fidget.progress.display").default_format_message - ''; # How to format a progress message - formatAnnote = '' - function (msg) return msg.title end - ''; # How to format a progress annotation - formatGroupName = '' - function (group) return tostring (group) end - ''; # How to format a progress notification group's name - overrides = { - rust_analyzer = { - name = "rust-analyzer"; - }; - }; # Override options from the default notification config - }; - }; - notification = { - pollRate = 10; # How frequently to update and render notifications - filter = "info"; # “off”, “error”, “warn”, “info”, “debug”, “trace” - historySize = 128; # Number of removed messages to retain in history - overrideVimNotify = true; - redirect = '' - function(msg, level, opts) - if opts and opts.on_open then - return require("fidget.integration.nvim-notify").delegate(msg, level, opts) - end - end - ''; - configs = { - default = "require('fidget.notification').default_config"; - }; + configs = { + default = "require('fidget.notification').default_config"; + }; - window = { - normalHl = "Comment"; - winblend = 0; - border = "none"; # none, single, double, rounded, solid, shadow - zindex = 45; - maxWidth = 0; - maxHeight = 0; - xPadding = 1; - yPadding = 0; - align = "bottom"; - relative = "editor"; - }; - view = { - stackUpwards = true; # Display notification items from bottom to top - iconSeparator = " "; # Separator between group name and icon - groupSeparator = "---"; # Separator between notification groups - groupSeparatorHl = - # Highlight group used for group separator - "Comment"; + window = { + normalHl = "Comment"; + winblend = 0; + border = "none"; # none, single, double, rounded, solid, shadow + zindex = 45; + maxWidth = 0; + maxHeight = 0; + xPadding = 1; + yPadding = 0; + align = "bottom"; + relative = "editor"; + }; + view = { + stackUpwards = true; # Display notification items from bottom to top + iconSeparator = " "; # Separator between group name and icon + groupSeparator = "---"; # Separator between notification groups + groupSeparatorHl = + # Highlight group used for group separator + "Comment"; + }; }; }; }; -}; } diff --git a/modules/editors/nixvim/plug/lsp/lsp.nix b/modules/editors/nixvim/plug/lsp/lsp.nix index ffe2384..bb7a8be 100644 --- a/modules/editors/nixvim/plug/lsp/lsp.nix +++ b/modules/editors/nixvim/plug/lsp/lsp.nix @@ -1,98 +1,98 @@ { programs.nixvim = { - plugins = { - lsp-format = {enable = true;}; - lsp = { - enable = true; - servers = { - eslint = {enable = true;}; - html = {enable = true;}; - lua-ls = {enable = true;}; - nil_ls = {enable = true;}; - marksman = {enable = true;}; - pyright = {enable = true;}; - gopls = {enable = true;}; - terraformls = {enable = true;}; - tsserver = {enable = false;}; - yamlls = { - enable = true; - }; - }; - keymaps = { - silent = true; - lspBuf = { - gd = { - action = "definition"; - desc = "Goto Definition"; - }; - gr = { - action = "references"; - desc = "Goto References"; - }; - gD = { - action = "declaration"; - desc = "Goto Declaration"; - }; - gI = { - action = "implementation"; - desc = "Goto Implementation"; - }; - gT = { - action = "type_definition"; - desc = "Type Definition"; - }; - K = { - action = "hover"; - desc = "Hover"; - }; - "cw" = { - action = "workspace_symbol"; - desc = "Workspace Symbol"; - }; - "cr" = { - action = "rename"; - desc = "Rename"; + plugins = { + lsp-format = {enable = true;}; + lsp = { + enable = true; + servers = { + eslint = {enable = true;}; + html = {enable = true;}; + lua-ls = {enable = true;}; + nil_ls = {enable = true;}; + marksman = {enable = true;}; + pyright = {enable = true;}; + gopls = {enable = true;}; + terraformls = {enable = true;}; + tsserver = {enable = false;}; + yamlls = { + enable = true; }; }; - diagnostic = { - "cd" = { - action = "open_float"; - desc = "Line Diagnostics"; + keymaps = { + silent = true; + lspBuf = { + gd = { + action = "definition"; + desc = "Goto Definition"; + }; + gr = { + action = "references"; + desc = "Goto References"; + }; + gD = { + action = "declaration"; + desc = "Goto Declaration"; + }; + gI = { + action = "implementation"; + desc = "Goto Implementation"; + }; + gT = { + action = "type_definition"; + desc = "Type Definition"; + }; + K = { + action = "hover"; + desc = "Hover"; + }; + "cw" = { + action = "workspace_symbol"; + desc = "Workspace Symbol"; + }; + "cr" = { + action = "rename"; + desc = "Rename"; + }; }; - "[d" = { - action = "goto_next"; - desc = "Next Diagnostic"; - }; - "]d" = { - action = "goto_prev"; - desc = "Previous Diagnostic"; + diagnostic = { + "cd" = { + action = "open_float"; + desc = "Line Diagnostics"; + }; + "[d" = { + action = "goto_next"; + desc = "Next Diagnostic"; + }; + "]d" = { + action = "goto_prev"; + desc = "Previous Diagnostic"; + }; }; }; }; }; + extraConfigLua = '' + local _border = "rounded" + + vim.lsp.handlers["textDocument/hover"] = vim.lsp.with( + vim.lsp.handlers.hover, { + border = _border + } + ) + + vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with( + vim.lsp.handlers.signature_help, { + border = _border + } + ) + + vim.diagnostic.config{ + float={border=_border} + }; + + require('lspconfig.ui.windows').default_options = { + border = _border + } + ''; }; - extraConfigLua = '' - local _border = "rounded" - - vim.lsp.handlers["textDocument/hover"] = vim.lsp.with( - vim.lsp.handlers.hover, { - border = _border - } - ) - - vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with( - vim.lsp.handlers.signature_help, { - border = _border - } - ) - - vim.diagnostic.config{ - float={border=_border} - }; - - require('lspconfig.ui.windows').default_options = { - border = _border - } - ''; -}; } diff --git a/modules/editors/nixvim/plug/lsp/lspsaga.nix b/modules/editors/nixvim/plug/lsp/lspsaga.nix index e3052e4..7eb444f 100644 --- a/modules/editors/nixvim/plug/lsp/lspsaga.nix +++ b/modules/editors/nixvim/plug/lsp/lspsaga.nix @@ -1,188 +1,188 @@ { programs.nixvim = { - plugins.lspsaga = { - enable = true; - beacon = { + plugins.lspsaga = { enable = true; - }; - ui = { - border = "rounded"; # One of none, single, double, rounded, solid, shadow - codeAction = "💡"; # Can be any symbol you want 💡 - }; - hover = { - openCmd = "!floorp"; # Choose your browser - openLink = "gx"; - }; - diagnostic = { - borderFollow = true; - diagnosticOnlyCurrent = false; - showCodeAction = true; - }; - symbolInWinbar = { - enable = true; # Breadcrumbs - }; - codeAction = { - extendGitSigns = false; - showServerName = true; - onlyInCursor = true; - numShortcut = true; - keys = { - exec = ""; - quit = ["" "q"]; + beacon = { + enable = true; + }; + ui = { + border = "rounded"; # One of none, single, double, rounded, solid, shadow + codeAction = "💡"; # Can be any symbol you want 💡 + }; + hover = { + openCmd = "!floorp"; # Choose your browser + openLink = "gx"; + }; + diagnostic = { + borderFollow = true; + diagnosticOnlyCurrent = false; + showCodeAction = true; + }; + symbolInWinbar = { + enable = true; # Breadcrumbs + }; + codeAction = { + extendGitSigns = false; + showServerName = true; + onlyInCursor = true; + numShortcut = true; + keys = { + exec = ""; + quit = ["" "q"]; + }; + }; + lightbulb = { + enable = false; + sign = false; + virtualText = true; + }; + implement = { + enable = false; + }; + rename = { + autoSave = false; + keys = { + exec = ""; + quit = ["" ""]; + select = "x"; + }; + }; + outline = { + autoClose = true; + autoPreview = true; + closeAfterJump = true; + layout = "normal"; # normal or float + winPosition = "right"; # left or right + keys = { + jump = "e"; + quit = "q"; + toggleOrJump = "o"; + }; + }; + scrollPreview = { + scrollDown = ""; + scrollUp = ""; }; }; - lightbulb = { - enable = false; - sign = false; - virtualText = true; - }; - implement = { - enable = false; - }; - rename = { - autoSave = false; - keys = { - exec = ""; - quit = ["" ""]; - select = "x"; - }; - }; - outline = { - autoClose = true; - autoPreview = true; - closeAfterJump = true; - layout = "normal"; # normal or float - winPosition = "right"; # left or right - keys = { - jump = "e"; - quit = "q"; - toggleOrJump = "o"; - }; - }; - scrollPreview = { - scrollDown = ""; - scrollUp = ""; - }; + keymaps = [ + { + mode = "n"; + key = "gd"; + action = "Lspsaga finder def"; + options = { + desc = "Goto Definition"; + silent = true; + }; + } + { + mode = "n"; + key = "gr"; + action = "Lspsaga finder ref"; + options = { + desc = "Goto References"; + silent = true; + }; + } + + # { + # mode = "n"; + # key = "gD"; + # action = "Lspsaga show_line_diagnostics"; + # options = { + # desc = "Goto Declaration"; + # silent = true; + # }; + # } + + { + mode = "n"; + key = "gI"; + action = "Lspsaga finder imp"; + options = { + desc = "Goto Implementation"; + silent = true; + }; + } + + { + mode = "n"; + key = "gT"; + action = "Lspsaga peek_type_definition"; + options = { + desc = "Type Definition"; + silent = true; + }; + } + + { + mode = "n"; + key = "K"; + action = "Lspsaga hover_doc"; + options = { + desc = "Hover"; + silent = true; + }; + } + + { + mode = "n"; + key = "cw"; + action = "Lspsaga outline"; + options = { + desc = "Outline"; + silent = true; + }; + } + + { + mode = "n"; + key = "cr"; + action = "Lspsaga rename"; + options = { + desc = "Rename"; + silent = true; + }; + } + + { + mode = "n"; + key = "ca"; + action = "Lspsaga code_action"; + options = { + desc = "Code Action"; + silent = true; + }; + } + + { + mode = "n"; + key = "cd"; + action = "Lspsaga show_line_diagnostics"; + options = { + desc = "Line Diagnostics"; + silent = true; + }; + } + + { + mode = "n"; + key = "[d"; + action = "Lspsaga diagnostic_jump_next"; + options = { + desc = "Next Diagnostic"; + silent = true; + }; + } + + { + mode = "n"; + key = "]d"; + action = "Lspsaga diagnostic_jump_prev"; + options = { + desc = "Previous Diagnostic"; + silent = true; + }; + } + ]; }; - keymaps = [ - { - mode = "n"; - key = "gd"; - action = "Lspsaga finder def"; - options = { - desc = "Goto Definition"; - silent = true; - }; - } - { - mode = "n"; - key = "gr"; - action = "Lspsaga finder ref"; - options = { - desc = "Goto References"; - silent = true; - }; - } - - # { - # mode = "n"; - # key = "gD"; - # action = "Lspsaga show_line_diagnostics"; - # options = { - # desc = "Goto Declaration"; - # silent = true; - # }; - # } - - { - mode = "n"; - key = "gI"; - action = "Lspsaga finder imp"; - options = { - desc = "Goto Implementation"; - silent = true; - }; - } - - { - mode = "n"; - key = "gT"; - action = "Lspsaga peek_type_definition"; - options = { - desc = "Type Definition"; - silent = true; - }; - } - - { - mode = "n"; - key = "K"; - action = "Lspsaga hover_doc"; - options = { - desc = "Hover"; - silent = true; - }; - } - - { - mode = "n"; - key = "cw"; - action = "Lspsaga outline"; - options = { - desc = "Outline"; - silent = true; - }; - } - - { - mode = "n"; - key = "cr"; - action = "Lspsaga rename"; - options = { - desc = "Rename"; - silent = true; - }; - } - - { - mode = "n"; - key = "ca"; - action = "Lspsaga code_action"; - options = { - desc = "Code Action"; - silent = true; - }; - } - - { - mode = "n"; - key = "cd"; - action = "Lspsaga show_line_diagnostics"; - options = { - desc = "Line Diagnostics"; - silent = true; - }; - } - - { - mode = "n"; - key = "[d"; - action = "Lspsaga diagnostic_jump_next"; - options = { - desc = "Next Diagnostic"; - silent = true; - }; - } - - { - mode = "n"; - key = "]d"; - action = "Lspsaga diagnostic_jump_prev"; - options = { - desc = "Previous Diagnostic"; - silent = true; - }; - } - ]; -}; } diff --git a/modules/editors/nixvim/plug/lsp/none-ls.nix b/modules/editors/nixvim/plug/lsp/none-ls.nix index 2799a30..97cfe4a 100644 --- a/modules/editors/nixvim/plug/lsp/none-ls.nix +++ b/modules/editors/nixvim/plug/lsp/none-ls.nix @@ -1,52 +1,52 @@ { programs.nixvim = { - plugins.none-ls = { - enable = true; - enableLspFormat = true; - updateInInsert = false; - sources = { - code_actions = { - gitsigns.enable = true; - statix.enable = true; - }; - diagnostics = { - statix.enable = true; - yamllint.enable = true; - }; - formatting = { - alejandra.enable = true; - black = { - enable = true; - withArgs = '' - { - extra_args = { "--fast" }, - } - ''; + plugins.none-ls = { + enable = true; + enableLspFormat = true; + updateInInsert = false; + sources = { + code_actions = { + gitsigns.enable = true; + statix.enable = true; }; - prettier = { - enable = true; - disableTsServerFormatter = true; - withArgs = '' - { - extra_args = { "--no-semi", "--single-quote" }, - } - ''; + diagnostics = { + statix.enable = true; + yamllint.enable = true; + }; + formatting = { + alejandra.enable = true; + black = { + enable = true; + withArgs = '' + { + extra_args = { "--fast" }, + } + ''; + }; + prettier = { + enable = true; + disableTsServerFormatter = true; + withArgs = '' + { + extra_args = { "--no-semi", "--single-quote" }, + } + ''; + }; + stylua.enable = true; + yamlfmt.enable = true; }; - stylua.enable = true; - yamlfmt.enable = true; }; }; + keymaps = [ + { + mode = ["n" "v"]; + key = "cf"; + action = "lua vim.lsp.buf.format()"; + options = { + silent = true; + desc = "Format"; + }; + } + ]; }; - keymaps = [ - { - mode = ["n" "v"]; - key = "cf"; - action = "lua vim.lsp.buf.format()"; - options = { - silent = true; - desc = "Format"; - }; - } - ]; -}; } diff --git a/modules/editors/nixvim/plug/statusline/lualine.nix b/modules/editors/nixvim/plug/statusline/lualine.nix index fc8cd20..911cdd4 100644 --- a/modules/editors/nixvim/plug/statusline/lualine.nix +++ b/modules/editors/nixvim/plug/statusline/lualine.nix @@ -5,36 +5,34 @@ disabledFiletypes = { statusline = ["dashboard" "alpha" "starter"]; }; -# theme = { -# normal = { -# a = { -# bg = "#b4befe"; -# fg = "#1c1d21"; -# }; -# b = { -# bg = "nil"; -# }; -# c = { -# bg = "nil"; -# }; -# z = { -# bg = "nil"; -# }; -# y = { -# bg = "nil"; -# }; -# }; -# }; + # theme = { + # normal = { + # a = { + # bg = "#b4befe"; + # fg = "#1c1d21"; + # }; + # b = { + # bg = "nil"; + # }; + # c = { + # bg = "nil"; + # }; + # z = { + # bg = "nil"; + # }; + # y = { + # bg = "nil"; + # }; + # }; + # }; sections = { lualine_a = [ { name = "mode"; fmt = "string.lower"; color = { - fg = - "none"; - bg = - "none"; + fg = "none"; + bg = "none"; }; } ]; @@ -43,10 +41,8 @@ name = "branch"; icon = ""; color = { - fg = - "none"; - bg = - "none"; + fg = "none"; + bg = "none"; }; } "diff" @@ -63,10 +59,8 @@ }; }; color = { - fg = - "none"; - bg = - "none"; + fg = "none"; + bg = "none"; }; } ]; @@ -89,10 +83,8 @@ }; }; color = { - fg = - "none"; - bg = - "none"; + fg = "none"; + bg = "none"; }; separator.left = ""; } @@ -101,10 +93,8 @@ { name = "location"; color = { - fg = - "none"; - bg = - "none"; + fg = "none"; + bg = "none"; }; } ]; diff --git a/modules/editors/nixvim/plug/treesitter/treesitter.nix b/modules/editors/nixvim/plug/treesitter/treesitter.nix index 35be148..24acbe2 100644 --- a/modules/editors/nixvim/plug/treesitter/treesitter.nix +++ b/modules/editors/nixvim/plug/treesitter/treesitter.nix @@ -11,36 +11,36 @@ }; in { programs.nixvim = { - filetype.extension.liq = "liquidsoap"; - filetype.extension.nu = "nu"; + filetype.extension.liq = "liquidsoap"; + filetype.extension.nu = "nu"; - plugins.treesitter = { - enable = true; - indent = true; - folding = true; - languageRegister.nu = "nu"; - languageRegister.liq = "liquidsoap"; - nixvimInjections = true; - grammarPackages = - [ - nu-grammar - ] - ++ pkgs.vimPlugins.nvim-treesitter.allGrammars; + plugins.treesitter = { + enable = true; + indent = true; + folding = true; + languageRegister.nu = "nu"; + languageRegister.liq = "liquidsoap"; + nixvimInjections = true; + grammarPackages = + [ + nu-grammar + ] + ++ pkgs.vimPlugins.nvim-treesitter.allGrammars; + }; + + extraFiles = { + "/queries/nu/highlights.scm" = builtins.readFile "${nu-grammar}/queries/nu/highlights.scm"; + "/queries/nu/injections.scm" = builtins.readFile "${nu-grammar}/queries/nu/injections.scm"; + }; + extraConfigLua = '' + local parser_config = require("nvim-treesitter.parsers").get_parser_configs() + + parser_config.liquidsoap = { + filetype = "liquidsoap", + } + parser_config.nu = { + filetype = "nu", + } + ''; }; - - extraFiles = { - "/queries/nu/highlights.scm" = builtins.readFile "${nu-grammar}/queries/nu/highlights.scm"; - "/queries/nu/injections.scm" = builtins.readFile "${nu-grammar}/queries/nu/injections.scm"; - }; - extraConfigLua = '' - local parser_config = require("nvim-treesitter.parsers").get_parser_configs() - - parser_config.liquidsoap = { - filetype = "liquidsoap", - } - parser_config.nu = { - filetype = "nu", - } - ''; -}; } diff --git a/modules/editors/nixvim/plug/ui/alpha.nix b/modules/editors/nixvim/plug/ui/alpha.nix index 7bc388c..dc59c64 100644 --- a/modules/editors/nixvim/plug/ui/alpha.nix +++ b/modules/editors/nixvim/plug/ui/alpha.nix @@ -1,93 +1,93 @@ { -programs.nixvim = { - plugins.alpha = let - nixFlake = [ - "⠄⠄⠄⢰⣧⣼⣯⠄⣸⣠⣶⣶⣦⣾⠄⠄⠄⠄⡀⠄⢀⣿⣿⠄⠄⠄⢸⡇⠄⠄" - "⠄⠄⠄⣾⣿⠿⠿⠶⠿⢿⣿⣿⣿⣿⣦⣤⣄⢀⡅⢠⣾⣛⡉⠄⠄⠄⠸⢀⣿⠄" - "⠄⠄⢀⡋⣡⣴⣶⣶⡀⠄⠄⠙⢿⣿⣿⣿⣿⣿⣴⣿⣿⣿⢃⣤⣄⣀⣥⣿⣿⠄" - "⠄⠄⢸⣇⠻⣿⣿⣿⣧⣀⢀⣠⡌⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠿⠿⣿⣿⣿⠄" - "⠄⢀⢸⣿⣷⣤⣤⣤⣬⣙⣛⢿⣿⣿⣿⣿⣿⣿⡿⣿⣿⡍⠄⠄⢀⣤⣄⠉⠋⣰" - "⠄⣼⣖⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⣿⣿⣿⣿⣿⢇⣿⣿⡷⠶⠶⢿⣿⣿⠇⢀⣤" - "⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣽⣿⣿⣿⡇⣿⣿⣿⣿⣿⣿⣷⣶⣥⣴⣿⡗" - "⢀⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠄" - "⢸⣿⣦⣌⣛⣻⣿⣿⣧⠙⠛⠛⡭⠅⠒⠦⠭⣭⡻⣿⣿⣿⣿⣿⣿⣿⣿⡿⠃⠄" - "⠘⣿⣿⣿⣿⣿⣿⣿⣿⡆⠄⠄⠄⠄⠄⠄⠄⠄⠹⠈⢋⣽⣿⣿⣿⣿⣵⣾⠃⠄" - "⠄⠘⣿⣿⣿⣿⣿⣿⣿⣿⠄⣴⣿⣶⣄⠄⣴⣶⠄⢀⣾⣿⣿⣿⣿⣿⣿⠃⠄⠄" - "⠄⠄⠈⠻⣿⣿⣿⣿⣿⣿⡄⢻⣿⣿⣿⠄⣿⣿⡀⣾⣿⣿⣿⣿⣛⠛⠁⠄⠄⠄" - "⠄⠄⠄⠄⠈⠛⢿⣿⣿⣿⠁⠞⢿⣿⣿⡄⢿⣿⡇⣸⣿⣿⠿⠛⠁⠄⠄⠄⠄⠄" - "⠄⠄⠄⠄⠄⠄⠄⠉⠻⣿⣿⣾⣦⡙⠻⣷⣾⣿⠃⠿⠋⠁⠄⠄⠄⠄⠄⢀⣠⣴" - "⣿⣿⣿⣶⣶⣮⣥⣒⠲⢮⣝⡿⣿⣿⡆⣿⡿⠃⠄⠄⠄⠄⠄⠄⠄⣠⣴⣿⣿⣿" - ]; - in { - enable = true; - layout = [ - { - type = "padding"; - val = 4; - } - { - opts = { - hl = "AlphaHeader"; - position = "center"; - }; - type = "text"; - val = nixFlake; - } - { - type = "padding"; - val = 2; - } - { - type = "group"; - val = let - mkButton = shortcut: cmd: val: hl: { - type = "button"; - inherit val; - opts = { - inherit hl shortcut; - keymap = [ - "n" - shortcut - cmd - {} - ]; - position = "center"; - cursor = 0; - width = 40; - align_shortcut = "right"; - hl_shortcut = "Keyword"; - }; + programs.nixvim = { + plugins.alpha = let + nixFlake = [ + "⠄⠄⠄⢰⣧⣼⣯⠄⣸⣠⣶⣶⣦⣾⠄⠄⠄⠄⡀⠄⢀⣿⣿⠄⠄⠄⢸⡇⠄⠄" + "⠄⠄⠄⣾⣿⠿⠿⠶⠿⢿⣿⣿⣿⣿⣦⣤⣄⢀⡅⢠⣾⣛⡉⠄⠄⠄⠸⢀⣿⠄" + "⠄⠄⢀⡋⣡⣴⣶⣶⡀⠄⠄⠙⢿⣿⣿⣿⣿⣿⣴⣿⣿⣿⢃⣤⣄⣀⣥⣿⣿⠄" + "⠄⠄⢸⣇⠻⣿⣿⣿⣧⣀⢀⣠⡌⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠿⠿⣿⣿⣿⠄" + "⠄⢀⢸⣿⣷⣤⣤⣤⣬⣙⣛⢿⣿⣿⣿⣿⣿⣿⡿⣿⣿⡍⠄⠄⢀⣤⣄⠉⠋⣰" + "⠄⣼⣖⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⣿⣿⣿⣿⣿⢇⣿⣿⡷⠶⠶⢿⣿⣿⠇⢀⣤" + "⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣽⣿⣿⣿⡇⣿⣿⣿⣿⣿⣿⣷⣶⣥⣴⣿⡗" + "⢀⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠄" + "⢸⣿⣦⣌⣛⣻⣿⣿⣧⠙⠛⠛⡭⠅⠒⠦⠭⣭⡻⣿⣿⣿⣿⣿⣿⣿⣿⡿⠃⠄" + "⠘⣿⣿⣿⣿⣿⣿⣿⣿⡆⠄⠄⠄⠄⠄⠄⠄⠄⠹⠈⢋⣽⣿⣿⣿⣿⣵⣾⠃⠄" + "⠄⠘⣿⣿⣿⣿⣿⣿⣿⣿⠄⣴⣿⣶⣄⠄⣴⣶⠄⢀⣾⣿⣿⣿⣿⣿⣿⠃⠄⠄" + "⠄⠄⠈⠻⣿⣿⣿⣿⣿⣿⡄⢻⣿⣿⣿⠄⣿⣿⡀⣾⣿⣿⣿⣿⣛⠛⠁⠄⠄⠄" + "⠄⠄⠄⠄⠈⠛⢿⣿⣿⣿⠁⠞⢿⣿⣿⡄⢿⣿⡇⣸⣿⣿⠿⠛⠁⠄⠄⠄⠄⠄" + "⠄⠄⠄⠄⠄⠄⠄⠉⠻⣿⣿⣾⣦⡙⠻⣷⣾⣿⠃⠿⠋⠁⠄⠄⠄⠄⠄⢀⣠⣴" + "⣿⣿⣿⣶⣶⣮⣥⣒⠲⢮⣝⡿⣿⣿⡆⣿⡿⠃⠄⠄⠄⠄⠄⠄⠄⣠⣴⣿⣿⣿" + ]; + in { + enable = true; + layout = [ + { + type = "padding"; + val = 4; + } + { + opts = { + hl = "AlphaHeader"; + position = "center"; }; - in [ - ( - mkButton - "f" - "lua require('telescope.builtin').find_files({hidden = true})" - "🔍 Find File" - "Operator" - ) - ( - mkButton - "q" - "qa" - "💣 Quit Neovim" - "String" - ) - ]; - } - { - type = "padding"; - val = 2; - } - { - opts = { - hl = "GruvboxBlue"; - position = "center"; - }; - type = "text"; - val = "https://github.com/elythh/nixvim"; - } - ]; + type = "text"; + val = nixFlake; + } + { + type = "padding"; + val = 2; + } + { + type = "group"; + val = let + mkButton = shortcut: cmd: val: hl: { + type = "button"; + inherit val; + opts = { + inherit hl shortcut; + keymap = [ + "n" + shortcut + cmd + {} + ]; + position = "center"; + cursor = 0; + width = 40; + align_shortcut = "right"; + hl_shortcut = "Keyword"; + }; + }; + in [ + ( + mkButton + "f" + "lua require('telescope.builtin').find_files({hidden = true})" + "🔍 Find File" + "Operator" + ) + ( + mkButton + "q" + "qa" + "💣 Quit Neovim" + "String" + ) + ]; + } + { + type = "padding"; + val = 2; + } + { + opts = { + hl = "Gruvbox"; + position = "center"; + }; + type = "text"; + val = "https://github.com/bloxx12/nichts"; + } + ]; + }; }; -}; } diff --git a/modules/editors/nixvim/plug/ui/btw.nix b/modules/editors/nixvim/plug/ui/btw.nix index 42db20d..239e731 100644 --- a/modules/editors/nixvim/plug/ui/btw.nix +++ b/modules/editors/nixvim/plug/ui/btw.nix @@ -1,22 +1,22 @@ {pkgs, ...}: { programs.nixvim = { - extraPlugins = with pkgs.vimUtils; [ - (buildVimPlugin { - pname = "btw.nvim"; - version = "2024-04-36"; - src = pkgs.fetchFromGitHub { - owner = "letieu"; - repo = "btw.nvim"; - rev = "47f6419e90d3383987fd06e8f3e06a4bc032ac83"; - hash = "sha256-91DZUfa4FBvXnkcNHdllr82Dr1Ie+MGVD3ibwkqo04c="; - }; - }) - ]; + extraPlugins = with pkgs.vimUtils; [ + (buildVimPlugin { + pname = "btw.nvim"; + version = "2024-04-36"; + src = pkgs.fetchFromGitHub { + owner = "letieu"; + repo = "btw.nvim"; + rev = "47f6419e90d3383987fd06e8f3e06a4bc032ac83"; + hash = "sha256-91DZUfa4FBvXnkcNHdllr82Dr1Ie+MGVD3ibwkqo04c="; + }; + }) + ]; - extraConfigLua = '' - require('btw').setup({ - text = "I use Neovim (and NixOS, BTW)", - }) - ''; -}; + extraConfigLua = '' + require('btw').setup({ + text = "I use Neovim (and NixOS, BTW)", + }) + ''; + }; } diff --git a/modules/editors/nixvim/plug/ui/bufferline.nix b/modules/editors/nixvim/plug/ui/bufferline.nix index df440e2..a2e35be 100644 --- a/modules/editors/nixvim/plug/ui/bufferline.nix +++ b/modules/editors/nixvim/plug/ui/bufferline.nix @@ -6,172 +6,172 @@ colors = import ../../colors/${config.theme}.nix {}; in { programs.nixvim = { - plugins = { - bufferline = { - enable = true; - separatorStyle = "thick"; # “slant”, “padded_slant”, “slope”, “padded_slope”, “thick”, “thin” - highlights = { - fill = { - fg = colors.base00; - bg = colors.base00; - }; - background = { - fg = colors.base03; - bg = colors.base00; - }; - bufferSelected = { - fg = colors.base05; - bg = colors.base00; - italic = false; - }; - bufferVisible = { - fg = colors.base03; - bg = colors.base00; - }; - closeButton = { - fg = colors.base03; - bg = colors.base00; - }; - closeButtonVisible = { - fg = colors.base03; - bg = colors.base00; - }; - closeButtonSelected = { - fg = colors.base08; - bg = colors.base00; - }; + plugins = { + bufferline = { + enable = true; + separatorStyle = "thick"; # “slant”, “padded_slant”, “slope”, “padded_slope”, “thick”, “thin” + highlights = { + fill = { + fg = colors.base00; + bg = colors.base00; + }; + background = { + fg = colors.base03; + bg = colors.base00; + }; + bufferSelected = { + fg = colors.base05; + bg = colors.base00; + italic = false; + }; + bufferVisible = { + fg = colors.base03; + bg = colors.base00; + }; + closeButton = { + fg = colors.base03; + bg = colors.base00; + }; + closeButtonVisible = { + fg = colors.base03; + bg = colors.base00; + }; + closeButtonSelected = { + fg = colors.base08; + bg = colors.base00; + }; - indicatorSelected = { - fg = colors.base00; - bg = colors.base00; - }; - modified = { - fg = colors.base03; - bg = colors.base00; - }; - modifiedVisible = { - fg = colors.base00; - bg = colors.base00; - }; - modifiedSelected = { - fg = colors.base0B; - bg = colors.base00; - }; - tabClose = { - fg = colors.base00; - bg = colors.base00; + indicatorSelected = { + fg = colors.base00; + bg = colors.base00; + }; + modified = { + fg = colors.base03; + bg = colors.base00; + }; + modifiedVisible = { + fg = colors.base00; + bg = colors.base00; + }; + modifiedSelected = { + fg = colors.base0B; + bg = colors.base00; + }; + tabClose = { + fg = colors.base00; + bg = colors.base00; + }; }; }; }; + keymaps = [ + { + mode = "n"; + key = ""; + action = "BufferLineCycleNext"; + options = { + desc = "Cycle to next buffer"; + }; + } + + { + mode = "n"; + key = ""; + action = "BufferLineCyclePrev"; + options = { + desc = "Cycle to previous buffer"; + }; + } + + { + mode = "n"; + key = ""; + action = "BufferLineCycleNext"; + options = { + desc = "Cycle to next buffer"; + }; + } + + { + mode = "n"; + key = ""; + action = "BufferLineCyclePrev"; + options = { + desc = "Cycle to previous buffer"; + }; + } + + { + mode = "n"; + key = "bd"; + action = "bdelete"; + options = { + desc = "Delete buffer"; + }; + } + + { + mode = "n"; + key = "bb"; + action = "e #"; + options = { + desc = "Switch to Other Buffer"; + }; + } + + # { + # mode = "n"; + # key = "`"; + # action = "e #"; + # options = { + # desc = "Switch to Other Buffer"; + # }; + # } + + { + mode = "n"; + key = "br"; + action = "BufferLineCloseRight"; + options = { + desc = "Delete buffers to the right"; + }; + } + + { + mode = "n"; + key = "bl"; + action = "BufferLineCloseLeft"; + options = { + desc = "Delete buffers to the left"; + }; + } + + { + mode = "n"; + key = "bo"; + action = "BufferLineCloseOthers"; + options = { + desc = "Delete other buffers"; + }; + } + + { + mode = "n"; + key = "bp"; + action = "BufferLineTogglePin"; + options = { + desc = "Toggle pin"; + }; + } + + { + mode = "n"; + key = "bP"; + action = "BufferLineGroupClose ungrouped"; + options = { + desc = "Delete non-pinned buffers"; + }; + } + ]; }; - keymaps = [ - { - mode = "n"; - key = ""; - action = "BufferLineCycleNext"; - options = { - desc = "Cycle to next buffer"; - }; - } - - { - mode = "n"; - key = ""; - action = "BufferLineCyclePrev"; - options = { - desc = "Cycle to previous buffer"; - }; - } - - { - mode = "n"; - key = ""; - action = "BufferLineCycleNext"; - options = { - desc = "Cycle to next buffer"; - }; - } - - { - mode = "n"; - key = ""; - action = "BufferLineCyclePrev"; - options = { - desc = "Cycle to previous buffer"; - }; - } - - { - mode = "n"; - key = "bd"; - action = "bdelete"; - options = { - desc = "Delete buffer"; - }; - } - - { - mode = "n"; - key = "bb"; - action = "e #"; - options = { - desc = "Switch to Other Buffer"; - }; - } - - # { - # mode = "n"; - # key = "`"; - # action = "e #"; - # options = { - # desc = "Switch to Other Buffer"; - # }; - # } - - { - mode = "n"; - key = "br"; - action = "BufferLineCloseRight"; - options = { - desc = "Delete buffers to the right"; - }; - } - - { - mode = "n"; - key = "bl"; - action = "BufferLineCloseLeft"; - options = { - desc = "Delete buffers to the left"; - }; - } - - { - mode = "n"; - key = "bo"; - action = "BufferLineCloseOthers"; - options = { - desc = "Delete other buffers"; - }; - } - - { - mode = "n"; - key = "bp"; - action = "BufferLineTogglePin"; - options = { - desc = "Toggle pin"; - }; - } - - { - mode = "n"; - key = "bP"; - action = "BufferLineGroupClose ungrouped"; - options = { - desc = "Delete non-pinned buffers"; - }; - } - ]; -}; } diff --git a/modules/editors/nixvim/plug/ui/nvim-notify.nix b/modules/editors/nixvim/plug/ui/nvim-notify.nix index 810aa1c..e4b8ff4 100644 --- a/modules/editors/nixvim/plug/ui/nvim-notify.nix +++ b/modules/editors/nixvim/plug/ui/nvim-notify.nix @@ -1,47 +1,47 @@ { programs.nixvim = { - plugins.notify = { - enable = true; - backgroundColour = "#000000"; - fps = 60; - render = "default"; - timeout = 1000; - topDown = true; + plugins.notify = { + enable = true; + backgroundColour = "#000000"; + fps = 60; + render = "default"; + timeout = 1000; + topDown = true; + }; + keymaps = [ + { + mode = "n"; + key = "un"; + action = '' + lua require("notify").dismiss({ silent = true, pending = true }) + ''; + options = { + desc = "Dismiss All Notifications"; + }; + } + ]; + extraConfigLua = '' + local notify = require("notify") + + local filtered_message = { "No information available" } + + -- Override notify function to filter out messages + ---@diagnostic disable-next-line: duplicate-set-field + vim.notify = function(message, level, opts) + local merged_opts = vim.tbl_extend("force", { + on_open = function(win) + local buf = vim.api.nvim_win_get_buf(win) + vim.api.nvim_buf_set_option(buf, "filetype", "markdown") + end, + }, opts or {}) + + for _, msg in ipairs(filtered_message) do + if message == msg then + return + end + end + return notify(message, level, merged_opts) + end + ''; }; - keymaps = [ - { - mode = "n"; - key = "un"; - action = '' - lua require("notify").dismiss({ silent = true, pending = true }) - ''; - options = { - desc = "Dismiss All Notifications"; - }; - } - ]; - extraConfigLua = '' - local notify = require("notify") - - local filtered_message = { "No information available" } - - -- Override notify function to filter out messages - ---@diagnostic disable-next-line: duplicate-set-field - vim.notify = function(message, level, opts) - local merged_opts = vim.tbl_extend("force", { - on_open = function(win) - local buf = vim.api.nvim_win_get_buf(win) - vim.api.nvim_buf_set_option(buf, "filetype", "markdown") - end, - }, opts or {}) - - for _, msg in ipairs(filtered_message) do - if message == msg then - return - end - end - return notify(message, level, merged_opts) - end - ''; -}; } diff --git a/modules/editors/nixvim/plug/ui/telescope.nix b/modules/editors/nixvim/plug/ui/telescope.nix index 9946048..645ce14 100644 --- a/modules/editors/nixvim/plug/ui/telescope.nix +++ b/modules/editors/nixvim/plug/ui/telescope.nix @@ -1,212 +1,212 @@ { programs.nixvim = { - plugins.telescope = { - enable = true; - extensions = { - file-browser = { - enable = true; + plugins.telescope = { + enable = true; + extensions = { + file-browser = { + enable = true; + }; + fzf-native = { + enable = true; + }; }; - fzf-native = { - enable = true; + settings = { + defaults = { + layout_config = { + horizontal = { + prompt_position = "top"; + }; + }; + sorting_strategy = "ascending"; + }; }; - }; - settings = { - defaults = { - layout_config = { - horizontal = { - prompt_position = "top"; + keymaps = { + "" = { + action = "find_files, {}"; + options = { + desc = "Find project files"; }; }; - sorting_strategy = "ascending"; - }; - }; - keymaps = { - "" = { - action = "find_files, {}"; - options = { - desc = "Find project files"; + "/" = { + action = "live_grep"; + options = { + desc = "Grep (root dir)"; + }; }; - }; - "/" = { - action = "live_grep"; - options = { - desc = "Grep (root dir)"; + ":" = { + action = "command_history, {}"; + options = { + desc = "Command History"; + }; }; - }; - ":" = { - action = "command_history, {}"; - options = { - desc = "Command History"; + "b" = { + action = "buffers, {}"; + options = { + desc = "+buffer"; + }; }; - }; - "b" = { - action = "buffers, {}"; - options = { - desc = "+buffer"; + "ff" = { + action = "find_files, {}"; + options = { + desc = "Find project files"; + }; }; - }; - "ff" = { - action = "find_files, {}"; - options = { - desc = "Find project files"; + "fr" = { + action = "live_grep, {}"; + options = { + desc = "Find text"; + }; }; - }; - "fr" = { - action = "live_grep, {}"; - options = { - desc = "Find text"; + "fR" = { + action = "resume, {}"; + options = { + desc = "Resume"; + }; }; - }; - "fR" = { - action = "resume, {}"; - options = { - desc = "Resume"; + "fg" = { + action = "oldfiles, {}"; + options = { + desc = "Recent"; + }; }; - }; - "fg" = { - action = "oldfiles, {}"; - options = { - desc = "Recent"; + "fb" = { + action = "buffers, {}"; + options = { + desc = "Buffers"; + }; }; - }; - "fb" = { - action = "buffers, {}"; - options = { - desc = "Buffers"; + "" = { + action = "git_files, {}"; + options = { + desc = "Search git files"; + }; }; - }; - "" = { - action = "git_files, {}"; - options = { - desc = "Search git files"; + "gc" = { + action = "git_commits, {}"; + options = { + desc = "Commits"; + }; }; - }; - "gc" = { - action = "git_commits, {}"; - options = { - desc = "Commits"; + "gs" = { + action = "git_status, {}"; + options = { + desc = "Status"; + }; }; - }; - "gs" = { - action = "git_status, {}"; - options = { - desc = "Status"; + "sa" = { + action = "autocommands, {}"; + options = { + desc = "Auto Commands"; + }; }; - }; - "sa" = { - action = "autocommands, {}"; - options = { - desc = "Auto Commands"; + "sb" = { + action = "current_buffer_fuzzy_find, {}"; + options = { + desc = "Buffer"; + }; }; - }; - "sb" = { - action = "current_buffer_fuzzy_find, {}"; - options = { - desc = "Buffer"; + "sc" = { + action = "command_history, {}"; + options = { + desc = "Command History"; + }; }; - }; - "sc" = { - action = "command_history, {}"; - options = { - desc = "Command History"; + "sC" = { + action = "commands, {}"; + options = { + desc = "Commands"; + }; }; - }; - "sC" = { - action = "commands, {}"; - options = { - desc = "Commands"; + "sD" = { + action = "diagnostics, {}"; + options = { + desc = "Workspace diagnostics"; + }; }; - }; - "sD" = { - action = "diagnostics, {}"; - options = { - desc = "Workspace diagnostics"; + "sh" = { + action = "help_tags, {}"; + options = { + desc = "Help pages"; + }; }; - }; - "sh" = { - action = "help_tags, {}"; - options = { - desc = "Help pages"; + "sH" = { + action = "highlights, {}"; + options = { + desc = "Search Highlight Groups"; + }; }; - }; - "sH" = { - action = "highlights, {}"; - options = { - desc = "Search Highlight Groups"; + "sk" = { + action = "keymaps, {}"; + options = { + desc = "Keymaps"; + }; }; - }; - "sk" = { - action = "keymaps, {}"; - options = { - desc = "Keymaps"; + "sM" = { + action = "man_pages, {}"; + options = { + desc = "Man pages"; + }; }; - }; - "sM" = { - action = "man_pages, {}"; - options = { - desc = "Man pages"; + "sm" = { + action = "marks, {}"; + options = { + desc = "Jump to Mark"; + }; }; - }; - "sm" = { - action = "marks, {}"; - options = { - desc = "Jump to Mark"; + "so" = { + action = "vim_options, {}"; + options = { + desc = "Options"; + }; }; - }; - "so" = { - action = "vim_options, {}"; - options = { - desc = "Options"; + "sR" = { + action = "resume, {}"; + options = { + desc = "Resume"; + }; }; - }; - "sR" = { - action = "resume, {}"; - options = { - desc = "Resume"; - }; - }; - "uC" = { - action = "colorscheme, {}"; - options = { - desc = "Colorscheme preview"; + "uC" = { + action = "colorscheme, {}"; + options = { + desc = "Colorscheme preview"; + }; }; }; }; - }; - keymaps = [ - { - mode = "n"; - key = "sd"; - action = "Telescope diagnostics bufnr=0"; - options = { - desc = "Document diagnostics"; - }; - } - { - mode = "n"; - key = "fe"; - action = "Telescope file_browser"; - options = { - desc = "File browser"; - }; - } - { - mode = "n"; - key = "fE"; - action = "Telescope file_browser path=%:p:h select_buffer=true"; - options = { - desc = "File browser"; - }; - } - ]; - extraConfigLua = '' - require("telescope").setup{ - pickers = { - colorscheme = { - enable_preview = true + keymaps = [ + { + mode = "n"; + key = "sd"; + action = "Telescope diagnostics bufnr=0"; + options = { + desc = "Document diagnostics"; + }; + } + { + mode = "n"; + key = "fe"; + action = "Telescope file_browser"; + options = { + desc = "File browser"; + }; + } + { + mode = "n"; + key = "fE"; + action = "Telescope file_browser path=%:p:h select_buffer=true"; + options = { + desc = "File browser"; + }; + } + ]; + extraConfigLua = '' + require("telescope").setup{ + pickers = { + colorscheme = { + enable_preview = true + } } } - } - ''; -}; + ''; + }; } diff --git a/modules/editors/nixvim/plug/utils/copilot.nix b/modules/editors/nixvim/plug/utils/copilot.nix index a1c802a..4de0878 100644 --- a/modules/editors/nixvim/plug/utils/copilot.nix +++ b/modules/editors/nixvim/plug/utils/copilot.nix @@ -11,48 +11,48 @@ }; in { programs.nixvim = { - extraPlugins = with pkgs.vimUtils; [ - (buildVimPlugin { - pname = "copilotchat"; - version = "2.4.0"; - src = pkgs.fetchFromGitHub copilotChatRepo; - meta = { - description = "Chat with GitHub Copilot in Neovim"; - homepage = "https://github.com/CopilotC-Nvim/CopilotChat.nvim/"; - license = lib.licenses.gpl3; - }; - }) - ]; - extraConfigLua = '' - require("CopilotChat").setup { } - ''; + extraPlugins = with pkgs.vimUtils; [ + (buildVimPlugin { + pname = "copilotchat"; + version = "2.4.0"; + src = pkgs.fetchFromGitHub copilotChatRepo; + meta = { + description = "Chat with GitHub Copilot in Neovim"; + homepage = "https://github.com/CopilotC-Nvim/CopilotChat.nvim/"; + license = lib.licenses.gpl3; + }; + }) + ]; + extraConfigLua = '' + require("CopilotChat").setup { } + ''; - keymaps = [ - { - mode = "x"; - key = "a"; - action = "+copilot"; - } - { - mode = "x"; - key = "ae"; - action = "CopilotChatExplain"; - } - { - mode = "x"; - key = "af"; - action = "CopilotChatFix"; - } - { - mode = "x"; - key = "ad"; - action = "CopilotChatDocs"; - } - { - mode = "x"; - key = "ac"; - action = "CopilotChatCommit"; - } - ]; -}; + keymaps = [ + { + mode = "x"; + key = "a"; + action = "+copilot"; + } + { + mode = "x"; + key = "ae"; + action = "CopilotChatExplain"; + } + { + mode = "x"; + key = "af"; + action = "CopilotChatFix"; + } + { + mode = "x"; + key = "ad"; + action = "CopilotChatDocs"; + } + { + mode = "x"; + key = "ac"; + action = "CopilotChatCommit"; + } + ]; + }; } diff --git a/modules/editors/nixvim/plug/utils/flash.nix b/modules/editors/nixvim/plug/utils/flash.nix index 0493876..bf078bf 100644 --- a/modules/editors/nixvim/plug/utils/flash.nix +++ b/modules/editors/nixvim/plug/utils/flash.nix @@ -1,58 +1,58 @@ { programs.nixvim = { - plugins.flash = { - enable = true; - labels = "asdfghjklqwertyuiopzxcvbnm"; - search = { - mode = "fuzzy"; - }; - jump = { - autojump = true; - }; - label = { - uppercase = false; - rainbow = { - enabled = false; - shade = 5; + plugins.flash = { + enable = true; + labels = "asdfghjklqwertyuiopzxcvbnm"; + search = { + mode = "fuzzy"; + }; + jump = { + autojump = true; + }; + label = { + uppercase = false; + rainbow = { + enabled = false; + shade = 5; + }; }; }; + keymaps = [ + { + mode = ["n" "x" "o"]; + key = "s"; + action = "lua require('flash').jump()"; + options = { + desc = "Flash"; + }; + } + + { + mode = ["n" "x" "o"]; + key = "S"; + action = "lua require('flash').treesitter()"; + options = { + desc = "Flash Treesitter"; + }; + } + + { + mode = "o"; + key = "r"; + action = "lua require('flash').remote()"; + options = { + desc = "Remote Flash"; + }; + } + + { + mode = ["x" "o"]; + key = "R"; + action = "lua require('flash').treesitter_search()"; + options = { + desc = "Treesitter Search"; + }; + } + ]; }; - keymaps = [ - { - mode = ["n" "x" "o"]; - key = "s"; - action = "lua require('flash').jump()"; - options = { - desc = "Flash"; - }; - } - - { - mode = ["n" "x" "o"]; - key = "S"; - action = "lua require('flash').treesitter()"; - options = { - desc = "Flash Treesitter"; - }; - } - - { - mode = "o"; - key = "r"; - action = "lua require('flash').remote()"; - options = { - desc = "Remote Flash"; - }; - } - - { - mode = ["x" "o"]; - key = "R"; - action = "lua require('flash').treesitter_search()"; - options = { - desc = "Treesitter Search"; - }; - } - ]; -}; } diff --git a/modules/editors/nixvim/plug/utils/grapple.nix b/modules/editors/nixvim/plug/utils/grapple.nix index d8ba0bf..962591a 100644 --- a/modules/editors/nixvim/plug/utils/grapple.nix +++ b/modules/editors/nixvim/plug/utils/grapple.nix @@ -1,22 +1,22 @@ {pkgs, ...}: { programs.nixvim = { - extraPlugins = with pkgs.vimUtils; [ - (buildVimPlugin { - pname = "grapple.nvim"; - version = "1.0"; - src = pkgs.fetchFromGitHub { - owner = "cbochs"; - repo = "grapple.nvim"; - rev = "59d458e378c4884f22b7a68e61c07ed3e41aabf0"; - hash = "sha256-4k8BE9i8kG4pL7Fj0xw9cG8sjA0u4jzJ40WSV/lBFhY="; - }; - }) - ]; + extraPlugins = with pkgs.vimUtils; [ + (buildVimPlugin { + pname = "grapple.nvim"; + version = "1.0"; + src = pkgs.fetchFromGitHub { + owner = "cbochs"; + repo = "grapple.nvim"; + rev = "59d458e378c4884f22b7a68e61c07ed3e41aabf0"; + hash = "sha256-4k8BE9i8kG4pL7Fj0xw9cG8sjA0u4jzJ40WSV/lBFhY="; + }; + }) + ]; - extraConfigLua = '' - require('grapple').setup({ - scope = "git_branch", - }) - ''; + extraConfigLua = '' + require('grapple').setup({ + scope = "git_branch", + }) + ''; }; } diff --git a/modules/editors/nixvim/plug/utils/oil.nix b/modules/editors/nixvim/plug/utils/oil.nix index 0a0ba37..0c95a21 100644 --- a/modules/editors/nixvim/plug/utils/oil.nix +++ b/modules/editors/nixvim/plug/utils/oil.nix @@ -1,52 +1,52 @@ { programs.nixvim = { - plugins.oil = { - enable = true; - settings = { - useDefaultKeymaps = true; - deleteToTrash = true; - float = { - padding = 2; - maxWidth = 0; # ''math.ceil(vim.o.lines * 0.8 - 4)''; - maxHeight = 0; # ''math.ceil(vim.o.columns * 0.8)''; - border = "rounded"; # 'single' | 'double' | 'shadow' | 'curved' | ... other options supported by win open - winOptions = { - winblend = 0; + plugins.oil = { + enable = true; + settings = { + useDefaultKeymaps = true; + deleteToTrash = true; + float = { + padding = 2; + maxWidth = 0; # ''math.ceil(vim.o.lines * 0.8 - 4)''; + maxHeight = 0; # ''math.ceil(vim.o.columns * 0.8)''; + border = "rounded"; # 'single' | 'double' | 'shadow' | 'curved' | ... other options supported by win open + winOptions = { + winblend = 0; + }; + }; + preview = { + border = "rounded"; + }; + keymaps = { + "g?" = "actions.show_help"; + "" = "actions.select"; + "" = "actions.select_vsplit"; + "" = "actions.select_split"; # this is used to navigate left + "" = "actions.select_tab"; + "" = "actions.preview"; + "" = "actions.close"; + "" = "actions.refresh"; + "-" = "actions.parent"; + "_" = "actions.open_cwd"; + "`" = "actions.cd"; + "~" = "actions.tcd"; + "gs" = "actions.change_sort"; + "gx" = "actions.open_external"; + "g." = "actions.toggle_hidden"; + "q" = "actions.close"; }; }; - preview = { - border = "rounded"; - }; - keymaps = { - "g?" = "actions.show_help"; - "" = "actions.select"; - "" = "actions.select_vsplit"; - "" = "actions.select_split"; # this is used to navigate left - "" = "actions.select_tab"; - "" = "actions.preview"; - "" = "actions.close"; - "" = "actions.refresh"; - "-" = "actions.parent"; - "_" = "actions.open_cwd"; - "`" = "actions.cd"; - "~" = "actions.tcd"; - "gs" = "actions.change_sort"; - "gx" = "actions.open_external"; - "g." = "actions.toggle_hidden"; - "q" = "actions.close"; - }; }; + keymaps = [ + { + mode = "n"; + key = "-"; + action = ":Oil"; + options = { + desc = "Open parent directory"; + silent = true; + }; + } + ]; }; - keymaps = [ - { - mode = "n"; - key = "-"; - action = ":Oil"; - options = { - desc = "Open parent directory"; - silent = true; - }; - } - ]; -}; } diff --git a/modules/editors/nixvim/plug/utils/undotree.nix b/modules/editors/nixvim/plug/utils/undotree.nix index 79d8304..8640c0b 100644 --- a/modules/editors/nixvim/plug/utils/undotree.nix +++ b/modules/editors/nixvim/plug/utils/undotree.nix @@ -1,22 +1,22 @@ { programs.nixvim = { - plugins.undotree = { - enable = true; - settings = { - autoOpenDiff = true; - focusOnToggle = true; - }; - }; - keymaps = [ - { - mode = "n"; - key = "ut"; - action = "UndotreeToggle"; - options = { - silent = true; - desc = "Undotree"; + plugins.undotree = { + enable = true; + settings = { + autoOpenDiff = true; + focusOnToggle = true; }; - } - ]; -}; + }; + keymaps = [ + { + mode = "n"; + key = "ut"; + action = "UndotreeToggle"; + options = { + silent = true; + desc = "Undotree"; + }; + } + ]; + }; } diff --git a/modules/editors/nixvim/settings.nix b/modules/editors/nixvim/settings.nix index f0ed2e6..f5a5c74 100644 --- a/modules/editors/nixvim/settings.nix +++ b/modules/editors/nixvim/settings.nix @@ -13,7 +13,7 @@ # Enable auto indenting and set it to spaces smartindent = true; shiftwidth = 2; - # Enable smart indenting (see https://stackoverflow.com/questions/1204149/smart-wrap-in-vim) + # Enable smart indenting (see https://stackoverflow.com/questions/1204149/smart-wrap-in-vim) breakindent = true; # Enable incremental searching @@ -82,7 +82,6 @@ # We don't need to see things like INSERT anymore showmode = false; - }; }; } diff --git a/modules/gui/anyrun/anyrun.nix b/modules/gui/anyrun/anyrun.nix index 583fa2a..c06134a 100644 --- a/modules/gui/anyrun/anyrun.nix +++ b/modules/gui/anyrun/anyrun.nix @@ -1,14 +1,18 @@ -{ config, pkgs, lib, inputs, ... }: - -with lib; -let +{ + config, + pkgs, + lib, + inputs, + ... +}: +with lib; let username = config.modules.other.system.username; cfg = config.modules.programs.anyrun; in { options.modules.programs.anyrun.enable = mkEnableOption "anyrun"; config = mkIf cfg.enable { home-manager.users.${username} = { - imports = [ inputs.anyrun.homeManagerModules.default ]; + imports = [inputs.anyrun.homeManagerModules.default]; programs.anyrun = { enable = true; @@ -45,4 +49,3 @@ in { }; }; } - diff --git a/modules/gui/anyrun/default.nix b/modules/gui/anyrun/default.nix index 59c2ad1..34be47b 100644 --- a/modules/gui/anyrun/default.nix +++ b/modules/gui/anyrun/default.nix @@ -1 +1 @@ -_: { imports = [ ./anyrun.nix ]; } +_: {imports = [./anyrun.nix];} diff --git a/modules/gui/foot.nix b/modules/gui/foot.nix index 9739422..22daf8c 100644 --- a/modules/gui/foot.nix +++ b/modules/gui/foot.nix @@ -1,5 +1,10 @@ -{ config, inputs, lib, pkgs, ... }: -let +{ + config, + inputs, + lib, + pkgs, + ... +}: let cfg = config.modules.programs.foot; inherit (config.modules.other.system) username; @@ -11,7 +16,7 @@ in { }; config = mkIf cfg.enable { - environment.sessionVariables = { TERM = "foot"; }; + environment.sessionVariables = {TERM = "foot";}; home-manager.users.${username} = { programs.foot = { enable = true; @@ -19,29 +24,28 @@ in { server.enable = cfg.server; settings = { main = { - term = "foot"; - app-id = "foot"; - title = "foot"; - locked-title = "no"; + term = "foot"; + app-id = "foot"; + title = "foot"; + locked-title = "no"; - line-height = 20; - letter-spacing = 0; - horizontal-letter-offset = 0; - vertical-letter-offset = -0.75; - box-drawings-uses-font-glyphs = "no"; - dpi-aware = "no"; + line-height = 20; + letter-spacing = 0; + horizontal-letter-offset = 0; + vertical-letter-offset = -0.75; + box-drawings-uses-font-glyphs = "no"; + dpi-aware = "no"; - initial-window-size-chars = "104x36"; - initial-window-mode = "windowed"; - pad = "5x5 center"; - resize-delay-ms = 100; + initial-window-size-chars = "104x36"; + initial-window-mode = "windowed"; + pad = "5x5 center"; + resize-delay-ms = 100; - notify = - "${pkgs.libnotify}/bin/notify-send -a \${app-id} -i \${app-id} \${title} \${body}"; + notify = "${pkgs.libnotify}/bin/notify-send -a \${app-id} -i \${app-id} \${title} \${body}"; - bold-text-in-bright = "no"; - word-delimiters = '',│`|:"'()[]{}<>''; - selection-target = "primary"; + bold-text-in-bright = "no"; + word-delimiters = '',│`|:"'()[]{}<>''; + selection-target = "primary"; }; bell = { urgent = "yes"; @@ -59,8 +63,7 @@ in { launch = "${pkgs.xdg-utils}/bin/xdg-open \${url}"; label-letters = "sadfjklewcmpgh"; osc8-underline = "always"; - protocols = - "http, https, ftp, ftps, file, gemini, gopher, irc, ircs"; + protocols = "http, https, ftp, ftps, file, gemini, gopher, irc, ircs"; uri-characters = '' abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[]''; }; @@ -93,7 +96,7 @@ in { # bright6 = "94e2d5"; # teal # bright7 = "a6adc8"; # Subtext 0 # }; - csd = { preferred = "server"; }; + csd = {preferred = "server";}; key-bindings = { show-urls-launch = "Control+Shift+u"; unicode-input = "Control+Shift+i"; diff --git a/modules/gui/gtk.nix b/modules/gui/gtk.nix index 6c606f6..acec4ed 100644 --- a/modules/gui/gtk.nix +++ b/modules/gui/gtk.nix @@ -1,6 +1,10 @@ -{ config, lib, pkgs, ... }: -with lib; -let +{ + config, + lib, + pkgs, + ... +}: +with lib; let cfg = config.modules.themes.gtk; username = config.modules.other.system.username; in { @@ -47,7 +51,6 @@ in { home.sessionVariables = { #GTK_THEME = "Gruvbox-Dark-BL"; # GTK_USE_PORTAL = "1"; - }; }; }; diff --git a/modules/gui/kitty.nix b/modules/gui/kitty.nix index f3700c3..16c4f5b 100644 --- a/modules/gui/kitty.nix +++ b/modules/gui/kitty.nix @@ -1,6 +1,10 @@ -{ config, lib, pkgs, ... }: -with lib; -let +{ + config, + lib, + pkgs, + ... +}: +with lib; let cfg = config.modules.programs.kitty; username = config.modules.other.system.username; in { @@ -19,9 +23,7 @@ in { #background_opacity = "0.9"; confirm_os_window_close = "0"; }; - }; }; }; - } diff --git a/modules/gui/minecraft.nix b/modules/gui/minecraft.nix index 3b8d3ab..7d21247 100644 --- a/modules/gui/minecraft.nix +++ b/modules/gui/minecraft.nix @@ -1,6 +1,11 @@ -{ config, lib, inputs, pkgs, ... }: -with lib; -let +{ + config, + lib, + inputs, + pkgs, + ... +}: +with lib; let username = config.modules.other.system.username; cfg = config.modules.programs.minecraft; in { @@ -12,7 +17,7 @@ in { config = mkIf cfg.enable { # Set wayland environment flag environment.variables = - mkIf cfg.wayland { __GL_THREADED_OPTIMIZATIONS = 0; }; + mkIf cfg.wayland {__GL_THREADED_OPTIMIZATIONS = 0;}; # Install glfw-wayland-minecraft environment.systemPackages = with pkgs; mkIf cfg.wayland [ @@ -21,7 +26,7 @@ in { home-manager.users.${username} = { # Install minecraft - home.packages = with pkgs; [ prismlauncher ]; + home.packages = with pkgs; [prismlauncher]; }; }; } diff --git a/modules/gui/mpv.nix b/modules/gui/mpv.nix index de6dffa..50a3f2c 100644 --- a/modules/gui/mpv.nix +++ b/modules/gui/mpv.nix @@ -1,6 +1,10 @@ -{ config, lib, pkgs, ... }: -with lib; -let +{ + config, + lib, + pkgs, + ... +}: +with lib; let cfg = config.modules.programs.mpv; username = config.modules.other.system.username; in { @@ -17,7 +21,7 @@ in { osd-bar = "no"; border = "no"; }; - scripts = with pkgs.mpvScripts; [ mpris thumbfast sponsorblock uosc ]; + scripts = with pkgs.mpvScripts; [mpris thumbfast sponsorblock uosc]; }; }; }; diff --git a/modules/gui/qt.nix b/modules/gui/qt.nix index 2e38b0d..9a60fa0 100644 --- a/modules/gui/qt.nix +++ b/modules/gui/qt.nix @@ -1,6 +1,10 @@ -{ config, lib, pkgs, ... }: -with lib; -let +{ + config, + lib, + pkgs, + ... +}: +with lib; let theme = { package = pkgs.gruvbox-gtk-theme; name = "Gruvbox-Dark-BL"; @@ -29,7 +33,7 @@ in { }; config = mkIf cfg.enable { - environment.sessionVariables = { QT_QPA_PLATFORMTHEME = "qt5ct"; }; + environment.sessionVariables = {QT_QPA_PLATFORMTHEME = "qt5ct";}; environment.variables = { QT_STYLE_OVERRIDE = lib.mkForce "kvantum"; GTK_THEME = theme.name; diff --git a/modules/gui/rofi.nix b/modules/gui/rofi.nix index 8827e49..d9068cb 100644 --- a/modules/gui/rofi.nix +++ b/modules/gui/rofi.nix @@ -1,12 +1,14 @@ -{ config, pkgs, lib, ... }: - -with lib; -let +{ + config, + pkgs, + lib, + ... +}: +with lib; let username = config.modules.other.system.username; cfg = config.modules.programs.rofi; in { options.modules.programs.rofi.enable = mkEnableOption "rofi"; config = - mkIf cfg.enable { environment.systemPackages = with pkgs; [ rofi ]; }; + mkIf cfg.enable {environment.systemPackages = with pkgs; [rofi];}; } - diff --git a/modules/gui/schizofox.nix b/modules/gui/schizofox.nix index a94e766..23d9bd4 100644 --- a/modules/gui/schizofox.nix +++ b/modules/gui/schizofox.nix @@ -1,24 +1,28 @@ -{ config, inputs, lib, ... }: -let +{ + config, + inputs, + lib, + ... +}: let cfg = config.modules.programs.schizofox; inherit (config.modules.other.system) username; inherit (lib) mkEnableOption mkIf; in { - options.modules.programs.schizofox = { enable = mkEnableOption "schizofox"; }; + options.modules.programs.schizofox = {enable = mkEnableOption "schizofox";}; config = mkIf cfg.enable { home-manager.users.${username} = { - imports = [ inputs.schizofox.homeManagerModule ]; + imports = [inputs.schizofox.homeManagerModule]; programs.schizofox = { enable = true; theme = { - # colors = { - # background-darker = "181825"; - # background = "1e1e2e"; - # foreground = "cdd6f4"; - # }; + # colors = { + # background-darker = "181825"; + # background = "1e1e2e"; + # foreground = "cdd6f4"; + # }; colors = { background-darker = "1d2021"; background = "282828"; @@ -34,24 +38,21 @@ in { }; search = { defaultSearchEngine = "DuckDuckGo"; - removeEngines = - [ "Google" "Bing" "Amazon.com" "eBay" "Twitter" "Wikipedia" ]; + removeEngines = ["Google" "Bing" "Amazon.com" "eBay" "Twitter" "Wikipedia"]; addEngines = [ { Name = "NixOS Packages"; Description = "NixOS Unstable package search"; Alias = "!np"; Method = "GET"; - URLTemplate = - "https://search.nixos.org/packages?channel=unstable&query={searchTerms}"; + URLTemplate = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}"; } { Name = "NixOS Options"; Description = "NixOS Unstable option search"; Alias = "!no"; Method = "GET"; - URLTemplate = - "https://search.nixos.org/options?channel=unstable&query={searchTerms}"; + URLTemplate = "https://search.nixos.org/options?channel=unstable&query={searchTerms}"; } { Name = "NixOS Wiki"; @@ -65,32 +66,28 @@ in { Description = "Home Manager option search"; Alias = "!hm"; Method = "GET"; - URLTemplate = - "https://mipmip.github.io/home-manager-option-search?query={searchTerms}"; + URLTemplate = "https://mipmip.github.io/home-manager-option-search?query={searchTerms}"; } { Name = "Arch Wiki"; Description = "Arch Wiki search"; Alias = "!aw"; Method = "GET"; - URLTemplate = - "https://wiki.archlinux.org/index.php?search={searchTerms}"; + URLTemplate = "https://wiki.archlinux.org/index.php?search={searchTerms}"; } { Name = "Gentoo Wiki"; Description = "Gentoo Wiki search"; Alias = "!gw"; Method = "GET"; - URLTemplate = - "https://wiki.gentoo.org/index.php?search={searchTerms}"; + URLTemplate = "https://wiki.gentoo.org/index.php?search={searchTerms}"; } { Name = "Debian Wiki"; Description = "Debian Wiki search"; Alias = "!dw"; Method = "GET"; - URLTemplate = - "https://wiki.debian.org/FrontPage?action=fullsearch&value={searchTerms}"; + URLTemplate = "https://wiki.debian.org/FrontPage?action=fullsearch&value={searchTerms}"; } { Name = "noogle"; @@ -106,15 +103,13 @@ in { darkreader.enable = true; # vimium.enable = true; extraExtensions = { - "webextension@vimium".install_url = - "https://addons.mozilla.org/firefox/downloads/file/4259790/vimium_ff-2.1.2.xpi"; + "webextension@vimium".install_url = "https://addons.mozilla.org/firefox/downloads/file/4259790/vimium_ff-2.1.2.xpi"; }; }; security = { sanitizeOnShutdown = false; sandbox = true; - userAgent = - "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0"; + userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0"; }; misc = { diff --git a/modules/gui/spicetify.nix b/modules/gui/spicetify.nix index 39c89ae..889aee8 100644 --- a/modules/gui/spicetify.nix +++ b/modules/gui/spicetify.nix @@ -1,5 +1,10 @@ -{ config, pkgs, lib, inputs, ... }: -let +{ + config, + pkgs, + lib, + inputs, + ... +}: let cfg = config.modules.programs.spicetify; username = config.modules.other.system.username; spicePkgs = inputs.spicetify-nix.packages.${pkgs.system}.default; @@ -8,7 +13,7 @@ in { options.modules.programs.spicetify.enable = lib.mkEnableOption "spicetify"; config = lib.mkIf cfg.enable { home-manager.users.${username} = { - imports = [ inputs.spicetify-nix.homeManagerModule ]; + imports = [inputs.spicetify-nix.homeManagerModule]; programs.spicetify = { enable = true; spotifyPackage = pkgs.spotify; diff --git a/modules/gui/steam.nix b/modules/gui/steam.nix index 1f118b3..5e31886 100644 --- a/modules/gui/steam.nix +++ b/modules/gui/steam.nix @@ -1,6 +1,11 @@ -{ config, lib, inputs, pkgs, ... }: -with lib; -let +{ + config, + lib, + inputs, + pkgs, + ... +}: +with lib; let username = config.modules.other.system.username; cfg = config.modules.programs.steam; in { @@ -16,6 +21,6 @@ in { dedicatedServer.openFirewall = true; gamescopeSession.enable = mkIf cfg.gamescope true; }; - home-manager.users.${username} = { }; + home-manager.users.${username} = {}; }; } diff --git a/modules/gui/stylix.nix b/modules/gui/stylix.nix index 1d5a039..e9c8a47 100644 --- a/modules/gui/stylix.nix +++ b/modules/gui/stylix.nix @@ -1,6 +1,10 @@ -{ config, pkgs, lib, ... }: -with lib; -let +{ + config, + pkgs, + lib, + ... +}: +with lib; let cfg = config.modules.programs.stylix; username = config.modules.other.system.username; in { @@ -47,11 +51,10 @@ in { sizes = { terminal = 14; popups = 14; - }; monospace = { package = - (pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; }); + pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];}; name = "JetBrainsMono"; }; serif = { diff --git a/modules/gui/vesktop.nix b/modules/gui/vesktop.nix index b930e6c..ca4c78a 100644 --- a/modules/gui/vesktop.nix +++ b/modules/gui/vesktop.nix @@ -1,14 +1,18 @@ -{ config, lib, pkgs, ... }: -with lib; -let +{ + config, + lib, + pkgs, + ... +}: +with lib; let cfg = config.modules.programs.vesktop; username = config.modules.other.system.username; in { - options.modules.programs.vesktop = { enable = mkEnableOption "vesktop"; }; + options.modules.programs.vesktop = {enable = mkEnableOption "vesktop";}; config = mkIf cfg.enable { home-manager.users.${username} = { - home.packages = with pkgs; [ vesktop ]; + home.packages = with pkgs; [vesktop]; xdg.configFile."vesktop/settings.json".text = builtins.toJSON { discordBranch = "ptb"; firstLaunch = false; @@ -31,7 +35,7 @@ in { themeLinks = [ "https://github.com/Costeer/Gruvbox-Material-Themes/blob/main/Discord%20Theme/gruvboxmaterial.theme.css" ]; - enabledThemes = [ "gruvboxmaterial.theme.css" ]; + enabledThemes = ["gruvboxmaterial.theme.css"]; enableReactDevtools = true; frameless = false; transparent = false; @@ -129,7 +133,7 @@ in { iLoveSpam.enabled = true; IgnoreActivities = { enabled = true; - ignoredActivities = [ ]; + ignoredActivities = []; }; ImageZoom = { enabled = true; @@ -261,8 +265,7 @@ in { ServerProfile.enabled = true; ShikiCodeblocks = { enabled = true; - theme = - "https://raw.githubusercontent.com/shikijs/shiki/0b28ad8ccfbf2615f2d9d38ea8255416b8ac3043/packages/shiki/themes/dark-plus.json"; + theme = "https://raw.githubusercontent.com/shikijs/shiki/0b28ad8ccfbf2615f2d9d38ea8255416b8ac3043/packages/shiki/themes/dark-plus.json"; tryHljs = "SECONDARY"; uesDevIcon = "GREYSCALE"; }; diff --git a/modules/gui/vivado.nix b/modules/gui/vivado.nix index d5e2515..3010330 100644 --- a/modules/gui/vivado.nix +++ b/modules/gui/vivado.nix @@ -1,13 +1,10 @@ -{ pkgs, ... }: - -let +{pkgs, ...}: let vivado-desktop-symbol = pkgs.makeDesktopItem { name = "vivado-2019-2"; desktopName = "Vivado"; exec = "${pkgs.nur.repos.Nick1296.vivado-2019-2}/bin/vivado"; }; in { - environment.systemPackages = with pkgs; [ # this propietary software is huge, but I need it for # university diff --git a/modules/gui/waybar.nix b/modules/gui/waybar.nix index 2288a93..d049270 100644 --- a/modules/gui/waybar.nix +++ b/modules/gui/waybar.nix @@ -1,5 +1,10 @@ -{ config, lib, inputs, pkgs, ... }: -let +{ + config, + lib, + inputs, + pkgs, + ... +}: let cfg = config.modules.programs.waybar; inherit (config.modules.other.system) username; in { @@ -12,9 +17,10 @@ in { settings.mainBar = { gtk-layer-shell = true; layer = "top"; - modules-left = [ "custom/launcher" "tray" "hyprland/window" ]; - modules-center = [ "hyprland/workspaces" ]; - modules-right = [ # "custom/dnd" + modules-left = ["custom/launcher" "tray" "hyprland/window"]; + modules-center = ["hyprland/workspaces"]; + modules-right = [ + # "custom/dnd" "mpd" "cpu" "memory" @@ -27,9 +33,8 @@ in { scroll-step = "1"; format = " {icon} {volume}%"; format-muted = " 󰸈 {volume}%"; - format-icons = { default = [ "󰕿" "󰖀" "󰕾" ]; }; - on-click = - "${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; + format-icons = {default = ["󰕿" "󰖀" "󰕾"];}; + on-click = "${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; }; "hyprland/workspaces" = { sort-by-name = true; @@ -75,7 +80,7 @@ in { icon-size = 18; spacing = 8; }; - # 󰃰 + # 󰃰 clock = { interval = 1; format = " {:%a %d %b %H:%M:%S}"; @@ -137,12 +142,11 @@ in { waves = false; noise_reduction = 0.77; input_delay = 0; - format-icons = [ "▁" "▂" "▃" "▄" "▅" "▆" "▇" "█" ]; - actions = { on-click-right = "mode"; }; + format-icons = ["▁" "▂" "▃" "▄" "▅" "▆" "▇" "█"]; + actions = {on-click-right = "mode";}; }; mpd = { - format = - "󰝚 {artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})"; + format = "󰝚 {artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})"; format-disconnected = "󰝚 Disconnected"; format-stopped = "󰝚 Stopped"; interval = 1; @@ -458,4 +462,3 @@ in { }; }; } - diff --git a/modules/gui/zathura.nix b/modules/gui/zathura.nix index 421f545..0bb5af9 100644 --- a/modules/gui/zathura.nix +++ b/modules/gui/zathura.nix @@ -1,6 +1,10 @@ -{ config, lib, pkgs, ... }: -with lib; -let +{ + config, + lib, + pkgs, + ... +}: +with lib; let cfg = config.modules.programs.zathura; username = config.modules.other.system.username; catppuccin = pkgs.fetchFromGitHub { @@ -9,20 +13,18 @@ let rev = "4eb02fd206de63b2423f6deb58242d352545b52f"; hash = "sha256-/vD/hOi6KcaGyAp6Az7jL5/tQSGRzIrf0oHjAJf4QbI="; }; - in { options.modules.programs.zathura.enable = mkEnableOption "zathura"; config = mkIf cfg.enable { home-manager.users.${username} = { - xdg.configFile."zathura/catppuccin-mocha".source = - "${catppuccin}/src/catppuccin-mocha"; + xdg.configFile."zathura/catppuccin-mocha".source = "${catppuccin}/src/catppuccin-mocha"; programs.zathura = { enable = true; extraConfig = '' include catppuccin-mocha ''; - options = { selection-clipboard = "clipboard"; }; + options = {selection-clipboard = "clipboard";}; }; }; }; diff --git a/modules/other/default.nix b/modules/other/default.nix index de04108..f031458 100644 --- a/modules/other/default.nix +++ b/modules/other/default.nix @@ -1,2 +1 @@ -_: { imports = [ ./home-manager.nix ./system.nix ./xdg.nix ]; } - +_: {imports = [./home-manager.nix ./system.nix ./xdg.nix];} diff --git a/modules/other/home-manager.nix b/modules/other/home-manager.nix index 40934c9..6f724cc 100644 --- a/modules/other/home-manager.nix +++ b/modules/other/home-manager.nix @@ -1,6 +1,11 @@ -{ config, inputs, lib, self, ... }: -with lib; -let +{ + config, + inputs, + lib, + self, + ... +}: +with lib; let cfg = config.modules.other.home-manager; username = config.modules.other.system.username; in { @@ -13,7 +18,7 @@ in { home-manager = { useUserPackages = true; useGlobalPkgs = true; - extraSpecialArgs = { inherit inputs self; }; + extraSpecialArgs = {inherit inputs self;}; users.${username} = { programs = { home-manager.enable = true; diff --git a/modules/other/system.nix b/modules/other/system.nix index 5ec68b6..60040d8 100644 --- a/modules/other/system.nix +++ b/modules/other/system.nix @@ -1,6 +1,10 @@ -{ config, lib, ... }: -with lib; -let cfg = config.modules.other.system; +{ + config, + lib, + ... +}: +with lib; let + cfg = config.modules.other.system; in { options.modules.other.system = { hostname = mkOption { @@ -24,7 +28,7 @@ in { users.users.${cfg.username} = { isNormalUser = true; - extraGroups = [ "wheel" ]; + extraGroups = ["wheel"]; }; }; } diff --git a/modules/other/xdg.nix b/modules/other/xdg.nix index a96a69b..b020786 100644 --- a/modules/other/xdg.nix +++ b/modules/other/xdg.nix @@ -1,5 +1,4 @@ -{ config, ... }: -let +{config, ...}: let username = config.modules.other.system.username; hmCfg = config.home-manager.users.${username}; @@ -11,8 +10,7 @@ let text_editor = "helix.desktop"; terminal = "foot.desktop"; in { - - environment.sessionVariables = { TERMINAL = "${terminal}"; }; + environment.sessionVariables = {TERMINAL = "${terminal}";}; home-manager.users.${username} = { xdg = { @@ -23,42 +21,42 @@ in { mimeApps = { enable = true; defaultApplications = { - "text/html" = [ primary_browser ]; - "x-scheme-handler/http" = [ primary_browser ]; - "x-scheme-handler/https" = [ primary_browser ]; - "x-scheme-handler/about" = [ primary_browser ]; - "x-scheme-handler/unknown" = [ primary_browser ]; - "x-scheme-handler/mailto" = [ mail_client ]; - "message/rfc822" = [ mail_client ]; - "x-scheme-handler/mid" = [ mail_client ]; - "inode/directory" = [ file_manager ]; - "audio/mp3" = [ media_player ]; - "audio/ogg" = [ media_player ]; - "audio/mpeg" = [ media_player ]; - "audio/aac" = [ media_player ]; - "audio/opus" = [ media_player ]; - "audio/wav" = [ media_player ]; - "audio/webm" = [ media_player ]; - "audio/3gpp" = [ media_player ]; - "audio/3gpp2" = [ media_player ]; - "video/mp4" = [ media_player ]; - "video/x-msvideo" = [ media_player ]; - "video/mpeg" = [ media_player ]; - "video/ogg" = [ media_player ]; - "video/mp2t" = [ media_player ]; - "video/webm" = [ media_player ]; - "video/3gpp" = [ media_player ]; - "video/3gpp2" = [ media_player ]; - "image/png" = [ image_viewer ]; - "image/jpeg" = [ image_viewer ]; - "image/gif" = [ image_viewer ]; - "image/avif" = [ image_viewer ]; - "image/bmp" = [ image_viewer ]; - "image/vnd.microsoft.icon" = [ image_viewer ]; - "image/svg+xml" = [ image_viewer ]; - "image/tiff" = [ image_viewer ]; - "image/webp" = [ image_viewer ]; - "text/plain" = [ text_editor ]; + "text/html" = [primary_browser]; + "x-scheme-handler/http" = [primary_browser]; + "x-scheme-handler/https" = [primary_browser]; + "x-scheme-handler/about" = [primary_browser]; + "x-scheme-handler/unknown" = [primary_browser]; + "x-scheme-handler/mailto" = [mail_client]; + "message/rfc822" = [mail_client]; + "x-scheme-handler/mid" = [mail_client]; + "inode/directory" = [file_manager]; + "audio/mp3" = [media_player]; + "audio/ogg" = [media_player]; + "audio/mpeg" = [media_player]; + "audio/aac" = [media_player]; + "audio/opus" = [media_player]; + "audio/wav" = [media_player]; + "audio/webm" = [media_player]; + "audio/3gpp" = [media_player]; + "audio/3gpp2" = [media_player]; + "video/mp4" = [media_player]; + "video/x-msvideo" = [media_player]; + "video/mpeg" = [media_player]; + "video/ogg" = [media_player]; + "video/mp2t" = [media_player]; + "video/webm" = [media_player]; + "video/3gpp" = [media_player]; + "video/3gpp2" = [media_player]; + "image/png" = [image_viewer]; + "image/jpeg" = [image_viewer]; + "image/gif" = [image_viewer]; + "image/avif" = [image_viewer]; + "image/bmp" = [image_viewer]; + "image/vnd.microsoft.icon" = [image_viewer]; + "image/svg+xml" = [image_viewer]; + "image/tiff" = [image_viewer]; + "image/webp" = [image_viewer]; + "text/plain" = [text_editor]; }; }; }; diff --git a/modules/services/default.nix b/modules/services/default.nix index bc5610f..e147e91 100644 --- a/modules/services/default.nix +++ b/modules/services/default.nix @@ -1 +1 @@ -_: { imports = [ ./pipewire.nix ./ssh.nix ./greetd.nix ./dunst.nix ]; } +_: {imports = [./pipewire.nix ./ssh.nix ./greetd.nix ./dunst.nix];} diff --git a/modules/services/dunst.nix b/modules/services/dunst.nix index e17a40d..2f0057b 100644 --- a/modules/services/dunst.nix +++ b/modules/services/dunst.nix @@ -1,5 +1,10 @@ -{ config, inputs, lib, pkgs, ... }: -let +{ + config, + inputs, + lib, + pkgs, + ... +}: let cfg = config.modules.services.dunst; inherit (config.modules.other.system) username; @@ -67,7 +72,7 @@ in { mouse_middle_click = "context"; mouse_right_click = "close_all"; }; - experimental = { per_monitor_dpi = false; }; + experimental = {per_monitor_dpi = false;}; urgency_low = { background = "#1E1E2E"; foreground = "#CDD6F4"; diff --git a/modules/services/greetd.nix b/modules/services/greetd.nix index b1e76a7..5d46792 100644 --- a/modules/services/greetd.nix +++ b/modules/services/greetd.nix @@ -1,6 +1,11 @@ -{ config, inputs, lib, pkgs, ... }: -with lib; -let +{ + config, + inputs, + lib, + pkgs, + ... +}: +with lib; let cfg = config.modules.services.greetd; inherit (config.modules.other.system) username; @@ -44,8 +49,8 @@ in { enable = true; settings.default_session = { command = "${ - inputs.hyprland.packages.${pkgs.system}.hyprland - }/bin/Hyprland --config ${hyprlandConfig}"; + inputs.hyprland.packages.${pkgs.system}.hyprland + }/bin/Hyprland --config ${hyprlandConfig}"; user = username; }; }; diff --git a/modules/services/pipewire.nix b/modules/services/pipewire.nix index fcf32d3..9fd29a8 100644 --- a/modules/services/pipewire.nix +++ b/modules/services/pipewire.nix @@ -1,6 +1,10 @@ -{ config, lib, ... }: -with lib; -let cfg = config.modules.services.pipewire; +{ + config, + lib, + ... +}: +with lib; let + cfg = config.modules.services.pipewire; in { options.modules.services.pipewire.enable = mkEnableOption "pipewire"; diff --git a/modules/services/ssh.nix b/modules/services/ssh.nix index 759bb6e..8bfdf82 100644 --- a/modules/services/ssh.nix +++ b/modules/services/ssh.nix @@ -1,11 +1,14 @@ -{ config, lib, pkgs, ... }: -with lib; -let +{ + config, + lib, + pkgs, + ... +}: +with lib; let cfg = config.modules.programs.ssh; username = config.modules.other.system.username; in { options.modules.programs.ssh.enable = mkEnableOption "ssh"; - config = mkIf cfg.enable { programs.ssh = { startAgent = true; }; }; - + config = mkIf cfg.enable {programs.ssh = {startAgent = true;};}; } diff --git a/modules/tui/btop.nix b/modules/tui/btop.nix index c2627d9..41a09b7 100644 --- a/modules/tui/btop.nix +++ b/modules/tui/btop.nix @@ -1,6 +1,9 @@ -{ config, lib, ... }: -with lib; -let +{ + config, + lib, + ... +}: +with lib; let cfg = config.modules.programs.btop; username = config.modules.other.system.username; in { diff --git a/modules/tui/default.nix b/modules/tui/default.nix index 6acc448..41054a3 100644 --- a/modules/tui/default.nix +++ b/modules/tui/default.nix @@ -1,3 +1,3 @@ _: { - imports = [ ./btop.nix ./neovim.nix ./newsboat.nix ./ncmpcpp.nix ./yazi.nix ]; + imports = [./btop.nix ./neovim.nix ./newsboat.nix ./ncmpcpp.nix ./yazi.nix]; } diff --git a/modules/tui/ncmpcpp.nix b/modules/tui/ncmpcpp.nix index 733bbb7..5980891 100644 --- a/modules/tui/ncmpcpp.nix +++ b/modules/tui/ncmpcpp.nix @@ -1,6 +1,10 @@ -{ config, lib, pkgs, ... }: -with lib; -let +{ + config, + lib, + pkgs, + ... +}: +with lib; let cfg = config.modules.programs.ncmpcpp; username = config.modules.other.system.username; in { @@ -11,20 +15,16 @@ in { xdg.configFile."ncmpcpp/config".source = ./config; programs.ncmpcpp = { enable = true; - package = (pkgs.ncmpcpp.override { visualizerSupport = true; }); + package = pkgs.ncmpcpp.override {visualizerSupport = true;}; mpdMusicDir = "/home/vali/Nextcloud/Media/Music"; settings = { mpd_host = "127.0.0.1"; mpd_port = "6600"; alternative_header_first_line_format = "$5{$b%t$/b}$9"; - alternative_header_second_line_format = - "$3by $7{$b%a$/b}$9 $3from $7{$b%b$/b}$9 $5{(%y)}"; - song_list_format = - "♫ $2%n$(end) $9 $3%a$(end) $(245)-$9 $(246)%t$9 $R{ $5%y$9}$(end) $(246)%lq$(end)"; - song_columns_list_format = - "(3f)[red]{n} (3f)[246]{} (35)[white]{t} (18)[blue]{a} (30)[green]{b} (5f)[yellow]{d} (5f)[red]{y} (7f)[magenta]{l}"; - song_status_format = - "$b $8%A $8•$3• $3%t $3•$5• $5%b $5•$2• $2%y $2•$8• %g"; + alternative_header_second_line_format = "$3by $7{$b%a$/b}$9 $3from $7{$b%b$/b}$9 $5{(%y)}"; + song_list_format = "♫ $2%n$(end) $9 $3%a$(end) $(245)-$9 $(246)%t$9 $R{ $5%y$9}$(end) $(246)%lq$(end)"; + song_columns_list_format = "(3f)[red]{n} (3f)[246]{} (35)[white]{t} (18)[blue]{a} (30)[green]{b} (5f)[yellow]{d} (5f)[red]{y} (7f)[magenta]{l}"; + song_status_format = "$b $8%A $8•$3• $3%t $3•$5• $5%b $5•$2• $2%y $2•$8• %g"; playlist_display_mode = "columns"; browser_display_mode = "columns"; search_engine_display_mode = "columns"; diff --git a/modules/tui/neovim.nix b/modules/tui/neovim.nix index 4ce9966..be1c7c9 100644 --- a/modules/tui/neovim.nix +++ b/modules/tui/neovim.nix @@ -1,6 +1,11 @@ -{ config, inputs, lib, pkgs, ... }: -with lib; -let +{ + config, + inputs, + lib, + pkgs, + ... +}: +with lib; let cfg = config.modules.programs.neovim; username = config.modules.other.system.username; in { @@ -8,7 +13,7 @@ in { config = mkIf cfg.enable { home-manager.users.${username} = { - imports = [ inputs.nixvim.homeManagerModules.nixvim ]; + imports = [inputs.nixvim.homeManagerModules.nixvim]; programs.nixvim = { enable = true; enableMan = true; @@ -51,7 +56,7 @@ in { nixvimInjections = true; incrementalSelection.enable = true; }; - treesitter-context = { enable = true; }; + treesitter-context = {enable = true;}; coq-nvim = { enable = true; installArtifacts = true; @@ -61,7 +66,7 @@ in { completion.always = false; }; }; - neo-tree = { enable = true; }; + neo-tree = {enable = true;}; # TODO laytan/cloak.nvim lsp = { enable = true; @@ -118,7 +123,7 @@ in { rust-tools = { enable = true; crateGraph = { - enabledGraphvizBackends = [ "png" "svg" ]; + enabledGraphvizBackends = ["png" "svg"]; backend = "x11"; }; inlayHints = { @@ -157,10 +162,9 @@ in { enable = true; settings.theme = "dark"; }; - }; - extraPlugins = with pkgs.vimPlugins; [ zen-mode-nvim lazygit-nvim ]; + extraPlugins = with pkgs.vimPlugins; [zen-mode-nvim lazygit-nvim]; keymaps = [ { diff --git a/modules/tui/newsboat.nix b/modules/tui/newsboat.nix index 816f778..cab41c9 100644 --- a/modules/tui/newsboat.nix +++ b/modules/tui/newsboat.nix @@ -1,6 +1,9 @@ -{ config, lib, ... }: -with lib; -let +{ + config, + lib, + ... +}: +with lib; let cfg = config.modules.programs.newsboat; username = config.modules.other.system.username; in { @@ -51,13 +54,11 @@ in { } { title = "Veronica Explains"; - url = - "https://www.youtube.com/feeds/videos.xml?channel_id=UCMiyV_Ib77XLpzHPQH_q0qQ"; + url = "https://www.youtube.com/feeds/videos.xml?channel_id=UCMiyV_Ib77XLpzHPQH_q0qQ"; } { title = "Mental Outlaw"; - url = - "https://www.youtube.com/feeds/videos.xml?channel_id=UC7YOGHUfC1Tb6E4pudI9STA"; + url = "https://www.youtube.com/feeds/videos.xml?channel_id=UC7YOGHUfC1Tb6E4pudI9STA"; } { title = "Hacker News"; diff --git a/modules/tui/yazi.nix b/modules/tui/yazi.nix index bad9797..4faaa65 100644 --- a/modules/tui/yazi.nix +++ b/modules/tui/yazi.nix @@ -1,10 +1,13 @@ -{ config, lib, ... }: -with lib; -let +{ + config, + lib, + ... +}: +with lib; let cfg = config.modules.programs.yazi; username = config.modules.other.system.username; in { - options.modules.programs.yazi = { enable = mkEnableOption "yazi"; }; + options.modules.programs.yazi = {enable = mkEnableOption "yazi";}; config = mkIf cfg.enable { home-manager.users.${username} = { diff --git a/modules/wms/default.nix b/modules/wms/default.nix index 36de93a..c6aa3d6 100644 --- a/modules/wms/default.nix +++ b/modules/wms/default.nix @@ -1 +1 @@ -_: { imports = [ ./wayland ]; } +_: {imports = [./wayland];} diff --git a/modules/wms/wayland/default.nix b/modules/wms/wayland/default.nix index bc9388d..58e3c23 100644 --- a/modules/wms/wayland/default.nix +++ b/modules/wms/wayland/default.nix @@ -1,10 +1,14 @@ -{ config, pkgs, inputs, ... }: { +{ + config, + pkgs, + inputs, + ... +}: { imports = [ # inputs.niri.nixosModules.niri ./hypr ./variables.nix - ]; # programs.niri.enable = true; } diff --git a/modules/wms/wayland/hypr/default.nix b/modules/wms/wayland/hypr/default.nix index 114b11e..5758662 100644 --- a/modules/wms/wayland/hypr/default.nix +++ b/modules/wms/wayland/hypr/default.nix @@ -1 +1 @@ -_: { imports = [ ./land.nix ]; } +_: {imports = [./land.nix];} diff --git a/modules/wms/wayland/hypr/land.nix b/modules/wms/wayland/hypr/land.nix index 998f8bd..f6f5944 100644 --- a/modules/wms/wayland/hypr/land.nix +++ b/modules/wms/wayland/hypr/land.nix @@ -1,18 +1,28 @@ -{ config, pkgs, lib, inputs, ... }: -let +{ + config, + pkgs, + lib, + inputs, + ... +}: let cfg = config.modules.wms.wayland.hyprland; username = config.modules.other.system.username; inherit (inputs.hyprland.packages.${pkgs.system}) hyprland; inherit (inputs.anyrun.packages.${pkgs.system}) anyrun; - inherit (inputs.nixpkgs-wayland.packages.${pkgs.system}) - foot swww wlsunset; + inherit + (inputs.nixpkgs-wayland.packages.${pkgs.system}) + foot + swww + wlsunset + ; inherit (inputs.waybar.packages.${pkgs.system}) waybar; - inherit (inputs.split-monitor-workspaces.packages.${pkgs.system}) - split-monitor-workspaces; + inherit + (inputs.split-monitor-workspaces.packages.${pkgs.system}) + split-monitor-workspaces + ; in { options.modules.wms.wayland.hyprland.enable = lib.mkEnableOption "hyprland"; config = lib.mkIf cfg.enable { - # xdg Portal xdg.portal = { enable = true; @@ -27,13 +37,13 @@ in { enable = true; package = hyprland; # Split-monitor-workspaces provides awesome-like workspace behaviour - plugins = [ split-monitor-workspaces ]; + plugins = [split-monitor-workspaces]; # Xwayland for X applications xwayland.enable = true; # No idea why I set this systemd = { enable = true; - variables = [ "--all" ]; + variables = ["--all"]; }; # Hyprland settings @@ -100,7 +110,7 @@ in { follow_mouse = true; repeat_rate = 50; repeat_delay = 250; - tablet = { output = "HDMI-A-2"; }; + tablet = {output = "HDMI-A-2";}; }; general = { sensitivity = 1.0; @@ -123,7 +133,7 @@ in { shadow_offset = "2 4"; shadow_scale = 1; }; - # Bezier curves for aninmations. + # Bezier curves for aninmations. # Generate your own at https://www.cssportal.com/css-cubic-bezier-generator/ bezier = [ "dupa, 0.1, 0.9, 0.1, 1.05" @@ -141,7 +151,7 @@ in { "workspaces, 1, 5, dupa, slidevert" ]; }; - dwindle = { no_gaps_when_only = true; }; + dwindle = {no_gaps_when_only = true;}; debug.disable_logs = false; @@ -220,7 +230,6 @@ in { "$mainMod, J, movefocus, d" "$mainMod, K, movefocus, u" "$mainMod, L, movefocus, r" - ]; # Media controls bindl = let @@ -291,7 +300,6 @@ in { }; }; }; - environment.systemPackages = with pkgs; [ libnotify ]; + environment.systemPackages = with pkgs; [libnotify]; }; } - diff --git a/modules/wms/wayland/niri/config.nix b/modules/wms/wayland/niri/config.nix index c1391af..df3db39 100644 --- a/modules/wms/wayland/niri/config.nix +++ b/modules/wms/wayland/niri/config.nix @@ -1,4 +1,9 @@ -{ pkgs, theme, config, ... }: +{ + pkgs, + theme, + config, + ... +}: with theme.colors; { programs.niri.settings = { outputs."eDP-1".position = { @@ -38,11 +43,11 @@ with theme.colors; { gaps = 16; center-focused-column = "never"; preset-column-widths = [ - { proportion = 0.333; } - { proportion = 0.5; } - { proportion = 0.666; } + {proportion = 0.333;} + {proportion = 0.5;} + {proportion = 0.666;} ]; - default-column-width = { proportion = 0.5; }; + default-column-width = {proportion = 0.5;}; focus-ring = { enable = true; @@ -76,87 +81,91 @@ with theme.colors; { window-close = smooth; }; - window-rules = [{ - geometry-corner-radius = let radius = 8.0; - in { - bottom-left = radius; - bottom-right = radius; - top-left = radius; - top-right = radius; - }; - clip-to-geometry = true; - }]; - - binds = with config.lib.niri.actions; - let sh = spawn "sh" "-c"; - in { - "Mod+Return" = { - action = spawn "${pkgs.foot}/bin/foot"; - cooldown-ms = 500; + window-rules = [ + { + geometry-corner-radius = let + radius = 8.0; + in { + bottom-left = radius; + bottom-right = radius; + top-left = radius; + top-right = radius; }; - "Mod+Space".action = spawn "${pkgs.fuzzel}/bin/fuzzel"; - "Mod+V".action = sh - "${pkgs.cliphist}/bin/cliphist list | fuzzel --dmenu | cliphist decode | wl-copy"; - "Mod+Shift+Period".action = spawn "emoji"; + clip-to-geometry = true; + } + ]; - "XF86AudioRaiseVolume".action = spawn "pamixer" "-i" "5"; - "XF86AudioLowerVolume".action = spawn "pamixer" "-d" "5"; - "XF86AudioMute".action = spawn "pamixer" "-t"; - "XF86AudioMicMute".action = spawn "micmute"; - - "XF86MonBrightnessUp".action = spawn "brightnessctl" "set" "+5%"; - "XF86MonBrightnessDown".action = spawn "brightnessctl" "set" "5%-"; - - "Super+WheelScrollDown".action = focus-workspace-down; - "Super+WheelScrollDown".cooldown-ms = 500; - "Super+WheelScrollUp".action = focus-workspace-up; - "Super+WheelScrollUp".cooldown-ms = 500; - "Super+WheelScrollRight".action = focus-column-right; - "Super+WheelScrollLeft".action = focus-column-left; - - "Super+H".action = focus-column-left; - "Super+L".action = focus-column-right; - "Super+J".action = focus-workspace-down; - "Super+K".action = focus-workspace-up; - "Super+Left".action = focus-column-left; - "Super+Right".action = focus-column-right; - "Super+Down".action = focus-window-down; - "Super+Up".action = focus-window-up; - - "Super+Print".action = screenshot-window; - "Super+Shift+Print".action = screenshot-screen; - "Super+Shift+S".action = screenshot; - - "Super+Ctrl+H".action = move-column-left; - "Super+Ctrl+J".action = move-window-down; - "Super+Ctrl+K".action = move-window-up; - "Super+Ctrl+L".action = move-column-right; - - "Super+U".action = move-workspace-down; - "Super+I".action = move-workspace-up; - - "Super+Minus".action = set-column-width "-10%"; - "Super+Equal".action = set-column-width "+10%"; - "Super+Shift+Minus".action = set-window-height "-10%"; - "Super+Shift+Equal".action = set-window-height "+10%"; - - "Super+Shift+H".action = focus-monitor-left; - "Super+Shift+J".action = focus-monitor-down; - "Super+Shift+K".action = focus-monitor-up; - "Super+Shift+L".action = focus-monitor-right; - - "Super+Shift+Ctrl+H".action = move-column-to-monitor-left; - "Super+Shift+Ctrl+J".action = move-column-to-monitor-down; - "Super+Shift+Ctrl+K".action = move-column-to-monitor-up; - "Super+Shift+Ctrl+L".action = move-column-to-monitor-right; - - "Super+R".action = switch-preset-column-width; - "Super+F".action = maximize-column; - "Super+Shift+F".action = fullscreen-window; - "Super+C".action = center-column; - - "Mod+Q".action = close-window; + binds = with config.lib.niri.actions; let + sh = spawn "sh" "-c"; + in { + "Mod+Return" = { + action = spawn "${pkgs.foot}/bin/foot"; + cooldown-ms = 500; }; + "Mod+Space".action = spawn "${pkgs.fuzzel}/bin/fuzzel"; + "Mod+V".action = + sh + "${pkgs.cliphist}/bin/cliphist list | fuzzel --dmenu | cliphist decode | wl-copy"; + "Mod+Shift+Period".action = spawn "emoji"; + + "XF86AudioRaiseVolume".action = spawn "pamixer" "-i" "5"; + "XF86AudioLowerVolume".action = spawn "pamixer" "-d" "5"; + "XF86AudioMute".action = spawn "pamixer" "-t"; + "XF86AudioMicMute".action = spawn "micmute"; + + "XF86MonBrightnessUp".action = spawn "brightnessctl" "set" "+5%"; + "XF86MonBrightnessDown".action = spawn "brightnessctl" "set" "5%-"; + + "Super+WheelScrollDown".action = focus-workspace-down; + "Super+WheelScrollDown".cooldown-ms = 500; + "Super+WheelScrollUp".action = focus-workspace-up; + "Super+WheelScrollUp".cooldown-ms = 500; + "Super+WheelScrollRight".action = focus-column-right; + "Super+WheelScrollLeft".action = focus-column-left; + + "Super+H".action = focus-column-left; + "Super+L".action = focus-column-right; + "Super+J".action = focus-workspace-down; + "Super+K".action = focus-workspace-up; + "Super+Left".action = focus-column-left; + "Super+Right".action = focus-column-right; + "Super+Down".action = focus-window-down; + "Super+Up".action = focus-window-up; + + "Super+Print".action = screenshot-window; + "Super+Shift+Print".action = screenshot-screen; + "Super+Shift+S".action = screenshot; + + "Super+Ctrl+H".action = move-column-left; + "Super+Ctrl+J".action = move-window-down; + "Super+Ctrl+K".action = move-window-up; + "Super+Ctrl+L".action = move-column-right; + + "Super+U".action = move-workspace-down; + "Super+I".action = move-workspace-up; + + "Super+Minus".action = set-column-width "-10%"; + "Super+Equal".action = set-column-width "+10%"; + "Super+Shift+Minus".action = set-window-height "-10%"; + "Super+Shift+Equal".action = set-window-height "+10%"; + + "Super+Shift+H".action = focus-monitor-left; + "Super+Shift+J".action = focus-monitor-down; + "Super+Shift+K".action = focus-monitor-up; + "Super+Shift+L".action = focus-monitor-right; + + "Super+Shift+Ctrl+H".action = move-column-to-monitor-left; + "Super+Shift+Ctrl+J".action = move-column-to-monitor-down; + "Super+Shift+Ctrl+K".action = move-column-to-monitor-up; + "Super+Shift+Ctrl+L".action = move-column-to-monitor-right; + + "Super+R".action = switch-preset-column-width; + "Super+F".action = maximize-column; + "Super+Shift+F".action = fullscreen-window; + "Super+C".action = center-column; + + "Mod+Q".action = close-window; + }; prefer-no-csd = true; hotkey-overlay.skip-at-startup = true; diff --git a/modules/wms/wayland/niri/default.nix b/modules/wms/wayland/niri/default.nix index 6851bb2..f84beb2 100644 --- a/modules/wms/wayland/niri/default.nix +++ b/modules/wms/wayland/niri/default.nix @@ -1,13 +1,17 @@ -{ pkgs, lib, theme, ... }: -let +{ + pkgs, + lib, + theme, + ... +}: let mkService = lib.recursiveUpdate { - Unit.PartOf = [ "graphical-session.target" ]; - Unit.After = [ "graphical-session.target" ]; - Install.WantedBy = [ "graphical-session.target" ]; + Unit.PartOf = ["graphical-session.target"]; + Unit.After = ["graphical-session.target"]; + Install.WantedBy = ["graphical-session.target"]; }; in { - imports = [ ./config.nix ]; - home.packages = with pkgs; [ pamixer ]; + imports = [./config.nix]; + home.packages = with pkgs; [pamixer]; services = { wlsunset = { # TODO: fix opaque red screen issue @@ -28,7 +32,7 @@ in { tray = { Unit = { Description = "Home Manager System Tray"; - Requires = [ "graphical-session-pre.target" ]; + Requires = ["graphical-session-pre.target"]; }; }; }; diff --git a/modules/wms/wayland/services.nix b/modules/wms/wayland/services.nix index c882d5d..92f2c18 100644 --- a/modules/wms/wayland/services.nix +++ b/modules/wms/wayland/services.nix @@ -1,5 +1,9 @@ -{ pkgs, inputs, config, ... }: { - +{ + pkgs, + inputs, + config, + ... +}: { programs.niri = { enable = true; package = inputs.niri.packages.${pkgs.system}.niri-unstable; diff --git a/modules/wms/wayland/variables.nix b/modules/wms/wayland/variables.nix index bec3560..8b15a3b 100644 --- a/modules/wms/wayland/variables.nix +++ b/modules/wms/wayland/variables.nix @@ -1,5 +1,8 @@ -{ config, lib, ... }: -let +{ + config, + lib, + ... +}: let cfg = config.modules.wms.wayland; hyprland = config.modules.wms.wayland.hyprland; in { @@ -12,7 +15,7 @@ in { NIXOS_OZONE_WL = "1"; __GL_GSYNC_ALLOWED = "0"; __GL_VRR_ALLOWED = "0"; - # _JAVA_AWT_WM_NONEREPARENTING = "1"; + # _JAVA_AWT_WM_NONEREPARENTING = "1"; # SSH_AUTH_SOCK = "/run/user/1000/keyring/ssh"; DISABLE_QT5_COMPAT = "0"; GDK_BACKEND = "wayland,x11"; @@ -24,15 +27,15 @@ in { DISABLE_QT_COMPAT = "0"; QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; MOZ_ENABLE_WAYLAND = "1"; - # WLR_BACKEND = "vulkan"; - # WLR_RENDERER = "vulkan"; + # WLR_BACKEND = "vulkan"; + # WLR_RENDERER = "vulkan"; XDG_SESSION_TYPE = "wayland"; SDL_VIDEODRIVER = "wayland"; CLUTTER_BACKEND = "wayland"; # WLR_DRM_DEVICES = "/dev/dri/card1:/dev/dri/card0"; # }; # } - # Session variables for Hyprland + # Session variables for Hyprland # (lib.mkIf (hyprland.enable) { # environment.variables = { LIBVA_DRIVER_NAME = "nvidia"; diff --git a/modules/wms/x/awesome/awesome.nix b/modules/wms/x/awesome/awesome.nix index 91f578c..8b80e07 100644 --- a/modules/wms/x/awesome/awesome.nix +++ b/modules/wms/x/awesome/awesome.nix @@ -1,6 +1,11 @@ -{ pkgs, lib, config, callPackage, ... }: -with lib; -let +{ + pkgs, + lib, + config, + callPackage, + ... +}: +with lib; let username = config.modules.other.system.username; cfg = config.modules.programs.awesome; in { @@ -17,8 +22,7 @@ in { options = "grp:alt_space_toggle"; }; windowManager.awesome.enable = true; - displayManager.setupCommands = - "${pkgs.xorg.xrandr}/bin/xrandr --output HDMI-1 --rotate normal --output DP-2 --rotate normal --left-of HDMI-1 --output HDMI-0 --right-of HDMI-1"; + displayManager.setupCommands = "${pkgs.xorg.xrandr}/bin/xrandr --output HDMI-1 --rotate normal --output DP-2 --rotate normal --left-of HDMI-1 --output HDMI-0 --right-of HDMI-1"; }; }; }; diff --git a/options/boot/grub-boot.nix b/options/boot/grub-boot.nix index 94f9d49..c03b296 100644 --- a/options/boot/grub-boot.nix +++ b/options/boot/grub-boot.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{pkgs, ...}: { boot.loader = { efi.canTouchEfiVariables = true; grub = { @@ -9,9 +9,8 @@ }; boot.plymouth = { enable = false; - font = - "${pkgs.jetbrains-mono}/share/fonts/truetype/JetBrainsMono-Regular.ttf"; - themePackages = [ pkgs.catppuccin-plymouth ]; + font = "${pkgs.jetbrains-mono}/share/fonts/truetype/JetBrainsMono-Regular.ttf"; + themePackages = [pkgs.catppuccin-plymouth]; theme = "catppuccin-macchiato"; }; } diff --git a/options/common/bluetooth.nix b/options/common/bluetooth.nix index 62f98a1..71ff814 100644 --- a/options/common/bluetooth.nix +++ b/options/common/bluetooth.nix @@ -1,5 +1,10 @@ -{ config, lib, pkgs, ... }: -let username = config.modules.other.system.username; +{ + config, + lib, + pkgs, + ... +}: let + username = config.modules.other.system.username; in { hardware.bluetooth = { enable = true; @@ -11,8 +16,8 @@ in { # Bluetooth headset media control buttons systemd.user.services.mpris-proxy = { description = "Mpris proxy"; - after = [ "network.target" "sound.target" ]; - wantedBy = [ "default.target" ]; + after = ["network.target" "sound.target"]; + wantedBy = ["default.target"]; serviceConfig.ExecStart = "${pkgs.bluez}/bin/mpris-proxy"; }; } diff --git a/options/common/gpu/nvidia.nix b/options/common/gpu/nvidia.nix index b6f06e3..ef0b0dd 100644 --- a/options/common/gpu/nvidia.nix +++ b/options/common/gpu/nvidia.nix @@ -1,5 +1,10 @@ -{ pkgs, config, inputs, ... }: { - services.xserver.videoDrivers = [ "nvidia" ]; +{ + pkgs, + config, + inputs, + ... +}: { + services.xserver.videoDrivers = ["nvidia"]; hardware.opengl = { enable = true; # package = pkgs-unstable.mesa.drivers; @@ -13,13 +18,12 @@ powerManagement.finegrained = false; nvidiaSettings = false; #package = config.boot.kernelPackages.nvidiaPackages.beta; - package = config.boot.kernelPackages.nvidiaPackages.mkDriver { - version = "555.42.02"; - sha256_64bit = "sha256-k7cI3ZDlKp4mT46jMkLaIrc2YUx1lh1wj/J4SVSHWyk="; - openSha256 = "sha256-3/eI1VsBzuZ3Y6RZmt3Q5HrzI2saPTqUNs6zPh5zy6w="; - settingsSha256 = ""; - persistencedSha256 = ""; - }; + package = config.boot.kernelPackages.nvidiaPackages.mkDriver { + version = "555.42.02"; + sha256_64bit = "sha256-k7cI3ZDlKp4mT46jMkLaIrc2YUx1lh1wj/J4SVSHWyk="; + openSha256 = "sha256-3/eI1VsBzuZ3Y6RZmt3Q5HrzI2saPTqUNs6zPh5zy6w="; + settingsSha256 = ""; + persistencedSha256 = ""; + }; }; } - diff --git a/options/common/networking.nix b/options/common/networking.nix index 4622d6d..481a8b5 100644 --- a/options/common/networking.nix +++ b/options/common/networking.nix @@ -1,5 +1,9 @@ -{ config, lib, ... }: -let username = config.modules.other.system.username; +{ + config, + lib, + ... +}: let + username = config.modules.other.system.username; in { networking = { networkmanager = { @@ -9,7 +13,7 @@ in { }; services.resolved = { enable = true; - fallbackDns = [ "9.9.9.9" "2620::fe::fe" ]; + fallbackDns = ["9.9.9.9" "2620::fe::fe"]; }; - users.users.${username}.extraGroups = [ "networkmanager" ]; + users.users.${username}.extraGroups = ["networkmanager"]; } diff --git a/options/common/pin-registry.nix b/options/common/pin-registry.nix index 1cdd25a..c9983fb 100644 --- a/options/common/pin-registry.nix +++ b/options/common/pin-registry.nix @@ -1,3 +1,7 @@ -{ inputs, lib, ... }: { - nix.registry = lib.mapAttrs (_: v: { flake = v; }) inputs; +{ + inputs, + lib, + ... +}: { + nix.registry = lib.mapAttrs (_: v: {flake = v;}) inputs; } diff --git a/options/common/preserve-system.nix b/options/common/preserve-system.nix index c226a09..793e944 100644 --- a/options/common/preserve-system.nix +++ b/options/common/preserve-system.nix @@ -1 +1 @@ -{ self, ... }: { environment.etc."current-flake".source = self; } +{self, ...}: {environment.etc."current-flake".source = self;} diff --git a/options/desktop/fonts.nix b/options/desktop/fonts.nix index 19178f1..17f791f 100644 --- a/options/desktop/fonts.nix +++ b/options/desktop/fonts.nix @@ -1,9 +1,9 @@ -{ pkgs, ... }: { +{pkgs, ...}: { fonts = { packages = with pkgs; [ material-icons material-design-icons - (nerdfonts.override { fonts = [ "Iosevka" "JetBrainsMono" ]; }) + (nerdfonts.override {fonts = ["Iosevka" "JetBrainsMono"];}) noto-fonts noto-fonts-cjk noto-fonts-cjk @@ -17,10 +17,10 @@ # this fixes emoji stuff fontconfig = { defaultFonts = { - monospace = [ "JetBrainsMono Nerd Font" "Noto Color Emoji" ]; - sansSerif = [ "Lexend" "Noto Color Emoji" ]; - serif = [ "Noto Serif" "Noto Color Emoji" ]; - emoji = [ "Noto Color Emoji" ]; + monospace = ["JetBrainsMono Nerd Font" "Noto Color Emoji"]; + sansSerif = ["Lexend" "Noto Color Emoji"]; + serif = ["Noto Serif" "Noto Color Emoji"]; + emoji = ["Noto Color Emoji"]; }; }; }; diff --git a/options/desktop/monitors.nix b/options/desktop/monitors.nix index 114cef7..9341b08 100644 --- a/options/desktop/monitors.nix +++ b/options/desktop/monitors.nix @@ -1,9 +1,12 @@ -{ config, lib, ... }: - +{ + config, + lib, + ... +}: with lib; { options.modules.other.system.monitors = mkOption { description = "\n List of monitors to use\n "; - default = [ ]; + default = []; type = with types; types.listOf (submodule { options = { @@ -69,5 +72,4 @@ with lib; { }; }); }; - } diff --git a/overlay.nix b/overlay.nix index 3466fa4..4e3e36a 100644 --- a/overlay.nix +++ b/overlay.nix @@ -1,6 +1,8 @@ -{ inputs, outputs, ... }: - -let +{ + inputs, + outputs, + ... +}: let add_nur = self: super: { # nur-no-pkgs = import inputs.nur-no-pkgs { pkgs = inputs.nixpkgs.legacyPackages.${profile-config.system}; nurpkgs = inputs.nixpkgs.legacyPackages.${profile-config.system}; }; nur = import inputs.nur { @@ -14,4 +16,4 @@ let }; # .legacyPackages.${profile-config.system}; }; }; -in { nixpkgs.overlays = [ add_nur ]; } +in {nixpkgs.overlays = [add_nur];}