From fabafd9623b3d9b1fbd45175958a081a86c79d6b Mon Sep 17 00:00:00 2001 From: joy Date: Wed, 3 Jul 2024 22:40:31 +0200 Subject: [PATCH] rb --- home/default.nix | 26 ++++++++++++++++++-------- home/my_nvchad_config | 1 + modules/default.nix | 1 - modules/nvchad/default.nix | 31 +++++++++++++++---------------- modules/packages/default.nix | 1 - 5 files changed, 34 insertions(+), 26 deletions(-) create mode 160000 home/my_nvchad_config diff --git a/home/default.nix b/home/default.nix index 72737dd..342ff0b 100644 --- a/home/default.nix +++ b/home/default.nix @@ -12,6 +12,24 @@ inputs.nix-colors.homeManagerModules.default inputs.ags.homeManagerModules.default ]; + + programs.neovim.enable = true; + + xdg.configFile."nvim".source = pkgs.stdenv.mkDerivation { + name = "NvChad"; + src = pkgs.fetchFromGitHub { + owner = "NvChad"; + repo = "NvChad"; + rev = "f17e83010f25784b58dea175c6480b3a8225a3e9"; + hash = "sha256-P5TRjg603/7kOVNFC8nXfyciNRLsIeFvKsoRCIwFP3I="; + }; + installPhase = '' + mkdir -p $out + cp -r ./* $out/ + cd $out/ + cp -r ${./my_nvchad_config} $out/lua/custom + ''; + }; home.username = "joy"; home.homeDirectory = "/home/joy"; @@ -22,14 +40,6 @@ }; - - - # basically copy the whole nvchad that is fetched from github to ~/.config/nvim - xdg.configFile."nvim/" = { - source = (pkgs.callPackage ./nvchad/default.nix{}).nvchad; - }; - - colorScheme = inputs.nix-colors.colorSchemes.gruvbox-dark-medium; } diff --git a/home/my_nvchad_config b/home/my_nvchad_config new file mode 160000 index 0000000..82c9711 --- /dev/null +++ b/home/my_nvchad_config @@ -0,0 +1 @@ +Subproject commit 82c9711f62025c16d138c0bc6e8b7cf46ca6ccc5 diff --git a/modules/default.nix b/modules/default.nix index ca86977..790cd62 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -7,6 +7,5 @@ ./misc ./gdm ./ssh - ./nvchad ]; } diff --git a/modules/nvchad/default.nix b/modules/nvchad/default.nix index 0fbfbc8..4590b2c 100644 --- a/modules/nvchad/default.nix +++ b/modules/nvchad/default.nix @@ -1,23 +1,22 @@ { stdenv, pkgs, fetchFromGithub, ... }: { -nvchad = stdenv.mkDerivation rec { - pname = "nvchad"; - version = ""; - dontBuild = true; + programs.neovim.enable = true; - src = pkgs.fetchFromGitHub { - owner = "NvChad"; - repo = "NvChad"; - rev = "c8777040fbda6a656f149877b796d120085cd918"; - sha256 = "sha256-J4SGwo/XkKFXvq+Va1EEBm8YOQwIPPGWH3JqCGpFnxY="; - }; - - installPhase = '' - # Fetch the whole repo and put it in $out - mkdir $out - cp -aR $src/* $out/ - ''; + xdg.configFile."nvim".source = pkgs.stdenv.mkDerivation { + name = "NvChad"; + src = pkgs.fetchFromGitHub { + owner = "NvChad"; + repo = "NvChad"; + rev = "f17e83010f25784b58dea175c6480b3a8225a3e9"; + hash = "sha256-P5TRjg603/7kOVNFC8nXfyciNRLsIeFvKsoRCIwFP3I="; + }; + installPhase = '' + mkdir -p $out + cp -r ./* $out/ + cd $out/ + cp -r ${./my_nvchad_config} $out/lua/custom + ''; }; } diff --git a/modules/packages/default.nix b/modules/packages/default.nix index 60737b3..4505f87 100644 --- a/modules/packages/default.nix +++ b/modules/packages/default.nix @@ -55,6 +55,5 @@ boxbuddy distrobox neovim - stdenv.mkDerivation ]; }