nix
This commit is contained in:
		
							parent
							
								
									340faaa949
								
							
						
					
					
						commit
						c046bffd5d
					
				
					 3 changed files with 73 additions and 30 deletions
				
			
		
							
								
								
									
										36
									
								
								flake.lock
									
									
									
									
									
								
							
							
						
						
									
										36
									
								
								flake.lock
									
									
									
									
									
								
							| 
						 | 
					@ -4,6 +4,24 @@
 | 
				
			||||||
      "inputs": {
 | 
					      "inputs": {
 | 
				
			||||||
        "systems": "systems"
 | 
					        "systems": "systems"
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      "locked": {
 | 
				
			||||||
 | 
					        "lastModified": 1694529238,
 | 
				
			||||||
 | 
					        "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
 | 
				
			||||||
 | 
					        "owner": "numtide",
 | 
				
			||||||
 | 
					        "repo": "flake-utils",
 | 
				
			||||||
 | 
					        "rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
 | 
				
			||||||
 | 
					        "type": "github"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "original": {
 | 
				
			||||||
 | 
					        "owner": "numtide",
 | 
				
			||||||
 | 
					        "repo": "flake-utils",
 | 
				
			||||||
 | 
					        "type": "github"
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "flake-utils_2": {
 | 
				
			||||||
 | 
					      "inputs": {
 | 
				
			||||||
 | 
					        "systems": "systems_2"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
      "locked": {
 | 
					      "locked": {
 | 
				
			||||||
        "lastModified": 1685518550,
 | 
					        "lastModified": 1685518550,
 | 
				
			||||||
        "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
 | 
					        "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
 | 
				
			||||||
| 
						 | 
					@ -40,7 +58,7 @@
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "neovim": {
 | 
					    "neovim": {
 | 
				
			||||||
      "inputs": {
 | 
					      "inputs": {
 | 
				
			||||||
        "flake-utils": "flake-utils",
 | 
					        "flake-utils": "flake-utils_2",
 | 
				
			||||||
        "nixpkgs": [
 | 
					        "nixpkgs": [
 | 
				
			||||||
          "nixpkgs"
 | 
					          "nixpkgs"
 | 
				
			||||||
        ]
 | 
					        ]
 | 
				
			||||||
| 
						 | 
					@ -79,6 +97,7 @@
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "root": {
 | 
					    "root": {
 | 
				
			||||||
      "inputs": {
 | 
					      "inputs": {
 | 
				
			||||||
 | 
					        "flake-utils": "flake-utils",
 | 
				
			||||||
        "home-manager": "home-manager",
 | 
					        "home-manager": "home-manager",
 | 
				
			||||||
        "neovim": "neovim",
 | 
					        "neovim": "neovim",
 | 
				
			||||||
        "nixpkgs": "nixpkgs"
 | 
					        "nixpkgs": "nixpkgs"
 | 
				
			||||||
| 
						 | 
					@ -98,6 +117,21 @@
 | 
				
			||||||
        "repo": "default",
 | 
					        "repo": "default",
 | 
				
			||||||
        "type": "github"
 | 
					        "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"
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "root": "root",
 | 
					  "root": "root",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										51
									
								
								flake.nix
									
									
									
									
									
								
							
							
						
						
									
										51
									
								
								flake.nix
									
									
									
									
									
								
							| 
						 | 
					@ -3,6 +3,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  inputs = {
 | 
					  inputs = {
 | 
				
			||||||
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
 | 
					    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
 | 
				
			||||||
 | 
					    flake-utils.url = "github:numtide/flake-utils";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    home-manager = {
 | 
					    home-manager = {
 | 
				
			||||||
      url = "github:nix-community/home-manager";
 | 
					      url = "github:nix-community/home-manager";
 | 
				
			||||||
| 
						 | 
					@ -15,32 +16,32 @@
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  outputs = { nixpkgs, home-manager, neovim, ... }:
 | 
					  outputs = { nixpkgs, home-manager, flake-utils, neovim, ... }:
 | 
				
			||||||
    let
 | 
					    flake-utils.lib.eachDefaultSystem (system:
 | 
				
			||||||
      system = "x86_64-linux"; # change your system type here
 | 
					      let
 | 
				
			||||||
      user = "nikos"; # change your user here
 | 
					        user = "nikos"; # change your user here
 | 
				
			||||||
      dotfilesHome = "/home/nikos/.dotfiles"; # specify your dotfiles path
 | 
					        dotfilesHome = "/home/${user}/.dotfiles"; # specify your dotfiles path
 | 
				
			||||||
      pkgs = nixpkgs.legacyPackages.${system};
 | 
					        pkgs = nixpkgs.legacyPackages.${system};
 | 
				
			||||||
    in
 | 
					      in
 | 
				
			||||||
    {
 | 
					      {
 | 
				
			||||||
      homeConfigurations.${user} = home-manager.lib.homeManagerConfiguration {
 | 
					        packages.homeConfigurations.${user} = home-manager.lib.homeManagerConfiguration {
 | 
				
			||||||
        inherit pkgs;
 | 
					          inherit pkgs;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Specify your home configuration modules here, for example,
 | 
					          # Specify your home configuration modules here, for example,
 | 
				
			||||||
        # the path to your home.nix.
 | 
					          # the path to your home.nix.
 | 
				
			||||||
        modules = [
 | 
					          modules = [
 | 
				
			||||||
          ./home.nix
 | 
					            ./home.nix
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          {
 | 
					            {
 | 
				
			||||||
            nixpkgs.overlays = [
 | 
					              nixpkgs.overlays = [
 | 
				
			||||||
              (final: prev: {
 | 
					                (final: prev: {
 | 
				
			||||||
                neovim = neovim.packages.${system}.neovim;
 | 
					                  neovim = neovim.packages.${system}.neovim;
 | 
				
			||||||
              })
 | 
					                })
 | 
				
			||||||
            ];
 | 
					              ];
 | 
				
			||||||
          }
 | 
					            }
 | 
				
			||||||
        ];
 | 
					          ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        extraSpecialArgs = { extra = { inherit user dotfilesHome; }; };
 | 
					          extraSpecialArgs = { extra = { inherit user dotfilesHome; }; };
 | 
				
			||||||
      };
 | 
					        };
 | 
				
			||||||
    };
 | 
					      });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										16
									
								
								home.nix
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								home.nix
									
									
									
									
									
								
							| 
						 | 
					@ -28,15 +28,11 @@
 | 
				
			||||||
  # The home.packages option allows you to install Nix packages into your
 | 
					  # The home.packages option allows you to install Nix packages into your
 | 
				
			||||||
  # environment.
 | 
					  # environment.
 | 
				
			||||||
  home.packages = with pkgs; [
 | 
					  home.packages = with pkgs; [
 | 
				
			||||||
    neovim # neovim nightly
 | 
					 | 
				
			||||||
    ripgrep # "rg" cli, alternative to grep, used by nvim
 | 
					    ripgrep # "rg" cli, alternative to grep, used by nvim
 | 
				
			||||||
    fd # find alternative, used by nvim
 | 
					    fd # find alternative, used by nvim
 | 
				
			||||||
    lsd # "ls" alternative
 | 
					    lsd # "ls" alternative
 | 
				
			||||||
    zoxide # "z" command
 | 
					    zoxide # "z" command
 | 
				
			||||||
    nil # Nix LSP
 | 
					 | 
				
			||||||
    nixpkgs-fmt # Nix formatter
 | 
					 | 
				
			||||||
    (nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) # nerdfonts jetbrains mono
 | 
					    (nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) # nerdfonts jetbrains mono
 | 
				
			||||||
    efm-langserver # Generic language server
 | 
					 | 
				
			||||||
  ];
 | 
					  ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  fonts.fontconfig.enable = true;
 | 
					  fonts.fontconfig.enable = true;
 | 
				
			||||||
| 
						 | 
					@ -69,6 +65,18 @@
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  programs.neovim = {
 | 
				
			||||||
 | 
					    enable = true;
 | 
				
			||||||
 | 
					    defaultEditor = true;
 | 
				
			||||||
 | 
					    package = pkgs.neovim;
 | 
				
			||||||
 | 
					    extraPackages = [
 | 
				
			||||||
 | 
					      pkgs.nil # Nix lsp
 | 
				
			||||||
 | 
					      pkgs.nixpkgs-fmt # Nix formatter
 | 
				
			||||||
 | 
					      pkgs.efm-langserver # Generic language server
 | 
				
			||||||
 | 
					      pkgs.lua-language-server
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  programs.direnv = {
 | 
					  programs.direnv = {
 | 
				
			||||||
    enable = true;
 | 
					    enable = true;
 | 
				
			||||||
    nix-direnv.enable = true;
 | 
					    nix-direnv.enable = true;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue