Mirror of https://git.jolheiser.com/ugit
at main 2.3 kB view raw
1{ 2 description = "Minimal git server"; 3 4 inputs = { 5 nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; 6 tailwind-ctp = { 7 url = "git+https://git.jolheiser.com/tailwind-ctp"; 8 inputs.nixpkgs.follows = "nixpkgs"; 9 }; 10 tailwind-ctp-lsp = { 11 url = "git+https://git.jolheiser.com/tailwind-ctp-intellisense"; 12 inputs.nixpkgs.follows = "nixpkgs"; 13 }; 14 }; 15 16 outputs = 17 { 18 self, 19 nixpkgs, 20 tailwind-ctp, 21 tailwind-ctp-lsp, 22 }: 23 let 24 systems = [ 25 "x86_64-linux" 26 "i686-linux" 27 "x86_64-darwin" 28 "aarch64-linux" 29 "armv6l-linux" 30 "armv7l-linux" 31 ]; 32 forAllSystems = f: nixpkgs.lib.genAttrs systems f; 33 tctp = forAllSystems (system: tailwind-ctp.packages.${system}.default); 34 tctpl = forAllSystems (system: tailwind-ctp-lsp.packages.${system}.default); 35 in 36 { 37 packages = forAllSystems (system: import ./nix { pkgs = nixpkgs.legacyPackages.${system}; }); 38 devShells = forAllSystems ( 39 system: 40 let 41 pkgs = nixpkgs.legacyPackages.${system}; 42 in 43 { 44 default = pkgs.mkShell { 45 nativeBuildInputs = with pkgs; [ 46 go 47 gopls 48 air 49 tctp.${system} 50 #tctpl.${system} 51 #vscode-langservers-extracted 52 ]; 53 }; 54 } 55 ); 56 nixosModules.default = import ./nix/module.nix; 57 nixosConfigurations.ugitVM = nixpkgs.lib.nixosSystem { 58 system = "x86_64-linux"; 59 modules = [ 60 ./nix/vm.nix 61 { 62 virtualisation.vmVariant.virtualisation = { 63 cores = 2; 64 memorySize = 2048; 65 graphics = false; 66 }; 67 system.stateVersion = "23.11"; 68 } 69 ]; 70 }; 71 apps = forAllSystems ( 72 system: 73 let 74 pkgs = import nixpkgs { inherit system; }; 75 in 76 { 77 vm = { 78 type = "app"; 79 program = "${pkgs.writeShellScript "vm" '' 80 nixos-rebuild build-vm --flake .#ugitVM 81 ./result/bin/run-nixos-vm 82 rm nixos.qcow2 83 ''}"; 84 }; 85 } 86 ); 87 }; 88}