From 24b42258ccb411aa5d14f7f8d6af2c47fd4f90b1 Mon Sep 17 00:00:00 2001 From: uttarayan21 Date: Sat, 9 Mar 2024 22:32:54 +0530 Subject: [PATCH] [feat] Move overlays to seperate file --- config/nix/common/home.nix | 3 +- config/nix/flake.nix | 99 +----------------------------- config/nix/nixos/configuration.nix | 1 + config/nix/nixos/ryu.nix | 2 +- config/nix/overlays.nix | 79 ++++++++++++++++++++++++ 5 files changed, 84 insertions(+), 100 deletions(-) create mode 100644 config/nix/overlays.nix diff --git a/config/nix/common/home.nix b/config/nix/common/home.nix index 21e8be03..e9fc4a99 100644 --- a/config/nix/common/home.nix +++ b/config/nix/common/home.nix @@ -14,6 +14,7 @@ in home.packages = with pkgs; [ + psst comma neovide sqls @@ -47,7 +48,6 @@ in nil pkg-config lua-language-server - # neovim (nerdfonts.override { fonts = [ "Hasklig" ]; }) mpv ] ++ (if device.isLinux then [ @@ -73,7 +73,6 @@ in }) swaynotificationcenter usbutils - picotool handlr-regex webcord-vencord spotify diff --git a/config/nix/flake.nix b/config/nix/flake.nix index 9c6f3b07..fdbbdeec 100644 --- a/config/nix/flake.nix +++ b/config/nix/flake.nix @@ -56,27 +56,9 @@ # nixneovimplugins = { # url = "github:NixNeovim/NixNeovimPlugins"; # inputs.nixpkgs.follows = "nixpkgs"; - # }; nur.url = "github:nix-community/nur"; - # { pkgs, inputs, system, ... }: - # { - # nixpkgs.overlays = [ - # (final: prev: { - # postman = prev.postman.overrideAttrs(old: rec { - # version = "20230716100528"; - # src = final.fetchurl { - # url = "https://web.archive.org/web/${version}/https://dl.pstmn.io/download/latest/linux_64"; - # sha256 = "sha256-svk60K4pZh0qRdx9+5OUTu0xgGXMhqvQTGTcmqBOMq8="; - - # name = "${old.pname}-${version}.tar.gz"; - # }; - # }); - # }) - # ]; - # } - }; outputs = @@ -136,86 +118,9 @@ linux_devices = builtins.filter (x: x.isLinux) devices; darwin_devices = builtins.filter (x: x.isMac) devices; - anyrun-overlay = final: prev: { - anyrun = inputs.anyrun.packages.${prev.system}.anyrun; - hyprwin = inputs.anyrun-hyprwin.packages.${prev.system}.hyprwin; - nixos-options = - inputs.anyrun-nixos-options.packages.${prev.system}.default; - anyrun-rink = inputs.anyrun-rink.packages.${prev.system}.default; + overlays = import ./overlays.nix { + inherit inputs; }; - - vimPlugins = final: prev: { - vimPlugins = prev.vimPlugins // { - comfortable-motion = final.pkgs.vimUtils.buildVimPlugin { - name = "comfortable-motion"; - src = final.pkgs.fetchFromGitHub { - owner = "yuttie"; - repo = "comfortable-motion.vim"; - rev = "master"; - sha256 = "sha256-S1LJXmShhpCJIg/FEPx3jFbmPpS/1U4MAQN2RY/nkI0"; - }; - }; - sqls-nvim = final.pkgs.vimUtils.buildVimPlugin { - name = "sqls-nvim"; - src = final.pkgs.fetchFromGitHub { - owner = "nanotee"; - repo = "sqls.nvim"; - rev = "master"; - sha256 = "sha256-jKFut6NZAf/eIeIkY7/2EsjsIhvZQKCKAJzeQ6XSr0s"; - }; - }; - outline-nvim = final.pkgs.vimUtils.buildVimPlugin { - name = "outline-nvim"; - src = final.pkgs.fetchFromGitHub { - owner = "hedyhli"; - repo = "outline.nvim"; - rev = "master"; - sha256 = "sha256-HaxfnvgFy7fpa2CS7/dQhf6dK9+Js7wP5qGdIeXLGPY"; - }; - }; - rest-nvim = final.pkgs.vimUtils.buildVimPlugin { - name = "rest-nvim"; - src = final.pkgs.fetchFromGitHub { - owner = "rest-nvim"; - repo = "rest.nvim"; - rev = "main"; - sha256 = "sha256-EclCwr0Oi6+5zF47niO0nt8wjNmb6cAADxd7S71DAiI"; - }; - }; - }; - }; - - tmuxPlugins = final: prev: { - tmuxPlugins = prev.tmuxPlugins // { - - tmux-super-fingers = final.pkgs.tmuxPlugins.mkTmuxPlugin { - pluginName = "tmux-super-fingers"; - version = "v1-2024-02-14"; - src = final.pkgs.fetchFromGitHub { - owner = "artemave"; - repo = "tmux_super_fingers"; - rev = "518044ef78efa1cf3c64f2e693fef569ae570ddd"; - sha256 = "sha256-iKfx9Ytk2vSuINvQTB6Kww8Vv7i51cFEnEBHLje+IJw="; - }; - }; - }; - }; - - catppuccinThemes = final: prev: { - catppuccinThemes = - import ./themes/catppuccin.nix { pkgs = final.pkgs; }; - }; - - overlays = [ - catppuccinThemes - vimPlugins - tmuxPlugins - inputs.neovim-nightly-overlay.overlay - anyrun-overlay - inputs.nixneovim.overlays.default - # inputs.nixneovimplugins.overlays.default - nur.overlay - ]; in { nixosConfigurations = diff --git a/config/nix/nixos/configuration.nix b/config/nix/nixos/configuration.nix index d1b8cc04..e405d29e 100644 --- a/config/nix/nixos/configuration.nix +++ b/config/nix/nixos/configuration.nix @@ -153,6 +153,7 @@ ]; environment.sessionVariables = { WLR_NO_HARDWARE_CURSORS = "1"; + NIXOS_OZONE_WL = "1"; }; programs = { diff --git a/config/nix/nixos/ryu.nix b/config/nix/nixos/ryu.nix index c822b57a..5783e73f 100644 --- a/config/nix/nixos/ryu.nix +++ b/config/nix/nixos/ryu.nix @@ -42,7 +42,7 @@ nvidiaSettings = true; # Optionally, you may need to select the appropriate driver version for your specific GPU. - package = config.boot.kernelPackages.nvidiaPackages.stable; + package = config.boot.kernelPackages.nvidiaPackages.beta; }; diff --git a/config/nix/overlays.nix b/config/nix/overlays.nix new file mode 100644 index 00000000..a2c5de65 --- /dev/null +++ b/config/nix/overlays.nix @@ -0,0 +1,79 @@ +{ inputs, ... }: +let + anyrun-overlay = final: prev: { + anyrun = inputs.anyrun.packages.${prev.system}.anyrun; + hyprwin = inputs.anyrun-hyprwin.packages.${prev.system}.hyprwin; + nixos-options = + inputs.anyrun-nixos-options.packages.${prev.system}.default; + anyrun-rink = inputs.anyrun-rink.packages.${prev.system}.default; + }; + vimPlugins = final: prev: { + vimPlugins = prev.vimPlugins // { + comfortable-motion = final.pkgs.vimUtils.buildVimPlugin { + name = "comfortable-motion"; + src = final.pkgs.fetchFromGitHub { + owner = "yuttie"; + repo = "comfortable-motion.vim"; + rev = "master"; + sha256 = "sha256-S1LJXmShhpCJIg/FEPx3jFbmPpS/1U4MAQN2RY/nkI0"; + }; + }; + sqls-nvim = final.pkgs.vimUtils.buildVimPlugin { + name = "sqls-nvim"; + src = final.pkgs.fetchFromGitHub { + owner = "nanotee"; + repo = "sqls.nvim"; + rev = "master"; + sha256 = "sha256-jKFut6NZAf/eIeIkY7/2EsjsIhvZQKCKAJzeQ6XSr0s"; + }; + }; + outline-nvim = final.pkgs.vimUtils.buildVimPlugin { + name = "outline-nvim"; + src = final.pkgs.fetchFromGitHub { + owner = "hedyhli"; + repo = "outline.nvim"; + rev = "master"; + sha256 = "sha256-HaxfnvgFy7fpa2CS7/dQhf6dK9+Js7wP5qGdIeXLGPY"; + }; + }; + rest-nvim = final.pkgs.vimUtils.buildVimPlugin { + name = "rest-nvim"; + src = final.pkgs.fetchFromGitHub { + owner = "rest-nvim"; + repo = "rest.nvim"; + rev = "main"; + sha256 = "sha256-EclCwr0Oi6+5zF47niO0nt8wjNmb6cAADxd7S71DAiI"; + }; + }; + }; + }; + tmuxPlugins = final: prev: { + tmuxPlugins = prev.tmuxPlugins // { + + tmux-super-fingers = final.pkgs.tmuxPlugins.mkTmuxPlugin { + pluginName = "tmux-super-fingers"; + version = "v1-2024-02-14"; + src = final.pkgs.fetchFromGitHub { + owner = "artemave"; + repo = "tmux_super_fingers"; + rev = "518044ef78efa1cf3c64f2e693fef569ae570ddd"; + sha256 = "sha256-iKfx9Ytk2vSuINvQTB6Kww8Vv7i51cFEnEBHLje+IJw="; + }; + }; + }; + }; + catppuccinThemes = final: prev: { + catppuccinThemes = + import ./themes/catppuccin.nix { pkgs = final.pkgs; }; + }; +in +[ + catppuccinThemes + vimPlugins + tmuxPlugins + inputs.neovim-nightly-overlay.overlay + anyrun-overlay + inputs.nixneovim.overlays.default + # inputs.nixneovimplugins.overlays.default + inputs.nur.overlay +]