From a897f76671f0467590146854b122b74024df61fb Mon Sep 17 00:00:00 2001 From: Tomas Rivera <137088692+Totorile1@users.noreply.github.com> Date: Fri, 27 Feb 2026 11:53:47 +0100 Subject: [PATCH] Removed entierly nixvim as i didnt got it to work. Put home-manager inside the flake and later removed it back to configuration.nix --- flake.lock | 161 ++++++++++++++++++++++++++++++++- flake.nix | 28 +++++- hosts/laptop/configuration.nix | 20 ++-- hosts/laptop/home.nix | 14 ++- 4 files changed, 205 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index 30786fe..35c9dc1 100755 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,44 @@ { "nodes": { + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1768135262, + "narHash": "sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "80daad04eddbbf5a4d883996a73f3f542fa437ac", + "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": [ @@ -21,6 +60,34 @@ "type": "github" } }, + "ixx": { + "inputs": { + "flake-utils": [ + "nixvim", + "nuschtosSearch", + "flake-utils" + ], + "nixpkgs": [ + "nixvim", + "nuschtosSearch", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1754860581, + "narHash": "sha256-EM0IE63OHxXCOpDHXaTyHIOk2cNvMCGPqLt/IdtVxgk=", + "owner": "NuschtOS", + "repo": "ixx", + "rev": "babfe85a876162c4acc9ab6fb4483df88fa1f281", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "ref": "v0.1.1", + "repo": "ixx", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1771903837, @@ -37,10 +104,102 @@ "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1768323494, + "narHash": "sha256-yBXJLE6WCtrGo7LKiB6NOt6nisBEEkguC/lq/rP3zRQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2c3e5ec5df46d3aeee2a1da0bfedd74e21f4bf3a", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixvim": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs_2", + "nuschtosSearch": "nuschtosSearch", + "systems": "systems_2" + }, + "locked": { + "lastModified": 1769049374, + "narHash": "sha256-h0Os2qqNyycDY1FyZgtbn28VF1ySP74/n0f+LDd8j+w=", + "owner": "nix-community", + "repo": "nixvim", + "rev": "b8f76bf5751835647538ef8784e4e6ee8deb8f95", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "nixos-25.11", + "repo": "nixvim", + "type": "github" + } + }, + "nuschtosSearch": { + "inputs": { + "flake-utils": "flake-utils", + "ixx": "ixx", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1768249818, + "narHash": "sha256-ANfn5OqIxq3HONPIXZ6zuI5sLzX1sS+2qcf/Pa0kQEc=", + "owner": "NuschtOS", + "repo": "search", + "rev": "b6f77b88e9009bfde28e2130e218e5123dc66796", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "repo": "search", + "type": "github" + } + }, "root": { "inputs": { "home-manager": "home-manager", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "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" + } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index f0b2e68..3b569dd 100644 --- a/flake.nix +++ b/flake.nix @@ -8,9 +8,13 @@ url = "github:nix-community/home-manager/release-25.11"; inputs.nixpkgs.follows = "nixpkgs"; }; +# never got nixvim to wokrs. ): +# nixvim = { +# url = "github:nix-community/nixvim/nixos-25.11"; + # }; }; - outputs = { self, nixpkgs, ... }@inputs: + outputs = { self, nixpkgs, home-manager, nixvim, ... }@inputs: let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; @@ -20,9 +24,27 @@ laptop = nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs; }; modules = [ - ./hosts/laptop/configuration.nix + ./hosts/laptop/configuration.nix ]; }; }; - }; +# we use home-manager directly inside of configuration.nix +# last time i tried to use flake i broke everything ): +# homeManagerConfigurations = { +# tomasr = home-manager.lib.homeManagerConfiguration { +# pkgs = pkgs; +# system = "x86_64-linux"; +# username = "tomasr"; +# homeDirectory = "/home/tomasr"; +# modules = [ +# ./hosts/laptop/home.nix +# #nixvim.homeModules.default +#]; + # Import your Home Manager module + # configuration = ./hosts/laptop/home.nix; + + # extraSpecialArgs = { inherit inputs; }; + # }; + #}; + #}; } diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 919bb38..ba19a5b 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -9,7 +9,16 @@ [ # Include the results of the hardware scan. ./hardware-configuration.nix inputs.home-manager.nixosModules.default - ]; +# inputs.nixvim.homeModules.default +]; + + + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + +home-manager.users = { + tomasr = { pkgs, ... }: import ./home.nix { inherit pkgs; }; +}; # Bootloader. boot.loader.systemd-boot.enable = true; @@ -114,19 +123,10 @@ services.upower.enable = true; # Allow unfree packages nixpkgs.config.allowUnfree = true; - #home manager config from https://www.youtube.com/watch?v=a67Sv4Mbxmc / https://github.com/vimjoyer/flake-starter-config - home-manager = { - # also pass inputs to home-manager modules - extraSpecialArgs = {inherit inputs;}; - users = { - "tomasr" = import ./home.nix; - }; -}; # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ - neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. wget tree # shows dir in tree zsh # better bash diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index e64c49e..e7224b8 100755 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -18,10 +18,17 @@ imports = [ ]; +#programs.nixvim = { +# enable = true; +# imports = [ ../../modules/nixvim/neovim.nix ]; +# package = pkgs.neovim; +}; # Home Manager needs a bit of information about you and the paths it should -# manage. -home.username = "tomasr"; -home.homeDirectory = "/home/tomasr"; + + # Required for Home Manager + home.username = "tomasr"; + home.homeDirectory = "/home/tomasr"; + home.stateVersion = "25.11"; # match your Home Manager release # This value determines the Home Manager release that your configuration is # compatible with. This helps avoid breakage when a new Home Manager release @@ -30,7 +37,6 @@ home.homeDirectory = "/home/tomasr"; # You should not change this value, even if you update Home Manager. If you do # want to update the value, then make sure to first check the Home Manager # release notes. -home.stateVersion = "25.11"; # Please read the comment before changing. # The home.packages option allows you to install Nix packages into your # environment.