mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-31 02:52:37 +00:00 
			
		
		
		
	flake: provide containerized builds
This commit is contained in:
		
					parent
					
						
							
								d7cf84c514
							
						
					
				
			
			
				commit
				
					
						52ea8a9f45
					
				
			
		
					 1 changed files with 28 additions and 2 deletions
				
			
		|  | @ -1,6 +1,5 @@ | ||||||
| {inputs, ...}: { | {inputs, ...}: { | ||||||
|   perSystem = { |   perSystem = { | ||||||
|     self', |  | ||||||
|     system, |     system, | ||||||
|     config, |     config, | ||||||
|     pkgs, |     pkgs, | ||||||
|  | @ -19,16 +18,43 @@ | ||||||
|         docs-manpages = docs.manPages; |         docs-manpages = docs.manPages; | ||||||
|         docs-json = docs.options.json; |         docs-json = docs.options.json; | ||||||
| 
 | 
 | ||||||
|  |         # Build and open the built manual in your system browser | ||||||
|         docs-html-wrapped = pkgs.writeScriptBin "docs-html-wrapped" '' |         docs-html-wrapped = pkgs.writeScriptBin "docs-html-wrapped" '' | ||||||
|           #!${pkgs.stdenv.shell} |           #!${pkgs.stdenv.shell} | ||||||
|           # use xdg-open to open the docs in the browser |           # use xdg-open to open the docs in the browser | ||||||
|           ${pkgs.xdg_utils}/bin/xdg-open ${docs.manual.html} |           ${pkgs.xdg_utils}/bin/xdg-open ${docs.manual.html} | ||||||
|         ''; |         ''; | ||||||
| 
 | 
 | ||||||
|         # nvim configs |         # Exposed neovim configurations | ||||||
|         nix = config.legacyPackages.neovim-nix; |         nix = config.legacyPackages.neovim-nix; | ||||||
|         maximal = config.legacyPackages.neovim-maximal; |         maximal = config.legacyPackages.neovim-maximal; | ||||||
|         default = config.legacyPackages.neovim-nix; |         default = config.legacyPackages.neovim-nix; | ||||||
|  | 
 | ||||||
|  |         # Publisged docker images | ||||||
|  |         docker-nix = let | ||||||
|  |           inherit (pkgs) bash gitFull buildEnv dockerTools; | ||||||
|  |           inherit (config.legacyPackages) neovim-nix; | ||||||
|  |         in | ||||||
|  |           dockerTools.buildImage { | ||||||
|  |             name = "neovim-flake-nix"; | ||||||
|  |             tag = "latest"; | ||||||
|  | 
 | ||||||
|  |             copyToRoot = buildEnv { | ||||||
|  |               name = "neovim-root"; | ||||||
|  |               pathsToLink = ["/bin"]; | ||||||
|  |               paths = [ | ||||||
|  |                 neovim-nix | ||||||
|  |                 gitFull | ||||||
|  |                 bash | ||||||
|  |               ]; | ||||||
|  |             }; | ||||||
|  | 
 | ||||||
|  |             config = { | ||||||
|  |               Cmd = ["${neovim-nix}/bin/nvim"]; | ||||||
|  |               WorkingDir = "/home/neovim/demo"; | ||||||
|  |               Volumes = {"/home/neovim/demo" = {};}; | ||||||
|  |             }; | ||||||
|  |           }; | ||||||
|       } |       } | ||||||
|       // ( |       // ( | ||||||
|         if !(builtins.elem system ["aarch64-darwin" "x86_64-darwin"]) |         if !(builtins.elem system ["aarch64-darwin" "x86_64-darwin"]) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue