From a765516271098d43d09ac167aa36a3fba4c3cedb Mon Sep 17 00:00:00 2001 From: alsaiduq-lab Date: Mon, 17 Mar 2025 15:19:39 -0600 Subject: [PATCH] revision --- flake.lock | 130 +--------------------------------- flake.nix | 64 +++++++++-------- home-manager/modules/nvim.nix | 23 +++--- 3 files changed, 47 insertions(+), 170 deletions(-) diff --git a/flake.lock b/flake.lock index 29da067..96546a5 100644 --- a/flake.lock +++ b/flake.lock @@ -18,45 +18,6 @@ "type": "github" } }, - "flake-parts_2": { - "inputs": { - "nixpkgs-lib": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1738453229, - "narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -77,34 +38,6 @@ "type": "github" } }, - "ixx": { - "inputs": { - "flake-utils": [ - "nixvim", - "nuschtosSearch", - "flake-utils" - ], - "nixpkgs": [ - "nixvim", - "nuschtosSearch", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1729958008, - "narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=", - "owner": "NuschtOS", - "repo": "ixx", - "rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb", - "type": "github" - }, - "original": { - "owner": "NuschtOS", - "ref": "v0.0.6", - "repo": "ixx", - "type": "github" - } - }, "nix-gaming": { "inputs": { "flake-parts": "flake-parts", @@ -171,72 +104,11 @@ "type": "github" } }, - "nixvim": { - "inputs": { - "flake-parts": "flake-parts_2", - "nixpkgs": [ - "nixpkgs" - ], - "nuschtosSearch": "nuschtosSearch" - }, - "locked": { - "lastModified": 1741814789, - "narHash": "sha256-NbHsnnNwiYUcUaS4z8XK2tYpo3G8NXEKxaKkzMgMiLk=", - "owner": "nix-community", - "repo": "nixvim", - "rev": "33097dcf776d1fad0ff3842096c4e3546312f251", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixvim", - "type": "github" - } - }, - "nuschtosSearch": { - "inputs": { - "flake-utils": "flake-utils", - "ixx": "ixx", - "nixpkgs": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1738508923, - "narHash": "sha256-4DaDrQDAIxlWhTjH6h/+xfG05jt3qDZrZE/7zDLQaS4=", - "owner": "NuschtOS", - "repo": "search", - "rev": "86e2038290859006e05ca7201425ea5b5de4aecb", - "type": "github" - }, - "original": { - "owner": "NuschtOS", - "repo": "search", - "type": "github" - } - }, "root": { "inputs": { "home-manager": "home-manager", "nix-gaming": "nix-gaming", - "nixpkgs": "nixpkgs_2", - "nixvim": "nixvim" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" + "nixpkgs": "nixpkgs_2" } } }, diff --git a/flake.nix b/flake.nix index 91184c3..57f5809 100644 --- a/flake.nix +++ b/flake.nix @@ -7,46 +7,48 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; - nixvim = { - url = "github:nix-community/nixvim"; - inputs.nixpkgs.follows = "nixpkgs"; - }; nix-gaming = { url = "github:fufexan/nix-gaming"; }; }; - outputs = { self, nixpkgs, home-manager, nixvim, nix-gaming, ... }@inputs: - let - system = "x86_64-linux"; - customPkgsOverlay = final: prev: import ./pkgs { + outputs = { + self, + nixpkgs, + home-manager, + nix-gaming, + ... + } @ inputs: let + system = "x86_64-linux"; + customPkgsOverlay = final: prev: + import ./pkgs { pkgs = prev; lib = prev.lib; }; - pkgs = import nixpkgs { + pkgs = import nixpkgs { + inherit system; + config.allowUnfree = true; + overlays = [customPkgsOverlay]; + }; + lib = nixpkgs.lib; + in { + nixosConfigurations = { + nixos = lib.nixosSystem { inherit system; - config.allowUnfree = true; - overlays = [ customPkgsOverlay ]; - }; - lib = nixpkgs.lib; - in { - nixosConfigurations = { - nixos = lib.nixosSystem { - inherit system; - specialArgs = { inherit inputs; }; - modules = [ - { nixpkgs.overlays = [ customPkgsOverlay ]; } - ./hosts/configuration.nix - ]; - }; - }; - - homeConfigurations = { - "cobray" = home-manager.lib.homeManagerConfiguration { - inherit pkgs; - extraSpecialArgs = { inherit inputs; }; - modules = [ ./home-manager/cobray.nix ]; - }; + specialArgs = {inherit inputs;}; + modules = [ + {nixpkgs.overlays = [customPkgsOverlay];} + ./hosts/configuration.nix + ]; }; }; + + homeConfigurations = { + "cobray" = home-manager.lib.homeManagerConfiguration { + inherit pkgs; + extraSpecialArgs = {inherit inputs;}; + modules = [./home-manager/cobray.nix]; + }; + }; + }; } diff --git a/home-manager/modules/nvim.nix b/home-manager/modules/nvim.nix index 1d8a9f2..ae7675d 100644 --- a/home-manager/modules/nvim.nix +++ b/home-manager/modules/nvim.nix @@ -1,5 +1,4 @@ { config, pkgs, lib, ... }: - { home.packages = with pkgs; [ neovim @@ -15,7 +14,8 @@ lua-language-server curl unzip - ]; + alejandra + ]; home.sessionVariables = { LUA_PATH = "${pkgs.luajit}/share/lua/5.1/?.lua;;"; @@ -26,12 +26,15 @@ "$HOME/.local/share/nvim/mason/bin" ]; - xdg.configFile."nvim" = { - source = builtins.fetchGit { - url = "https://github.com/alsaiduq-lab/nvim-dotfiles.git"; - ref = "master"; - rev = "71155b4a4b63d9974f1bc3b66303d6f7e5e06871"; - }; - recursive = true; - }; + xdg.configFile."nvim" = + if !builtins.pathExists "${config.home.homeDirectory}/.config/nvim" + then { + source = builtins.fetchGit { + url = "https://github.com/alsaiduq-lab/nvim-dotfiles.git"; + ref = "master"; + rev = "71155b4a4b63d9974f1bc3b66303d6f7e5e06871"; + }; + recursive = true; + } + else null; }