/ flake.nix
flake.nix
1 # SPDX-FileCopyrightText: 2024 sntx <sntx@sntx.space> 2 # SPDX-License-Identifier: AGPL-3.0-or-later 3 4 { 5 description = "Easy terminal event handling and rendering with Bevy!"; 6 7 inputs = { 8 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 9 10 rust-overlay.url = "github:oxalica/rust-overlay"; 11 crate2nix = { 12 url = "github:nix-community/crate2nix"; 13 inputs.nixpkgs.follows = "nixpkgs"; 14 }; 15 16 devshell = { 17 url = "github:numtide/devshell"; 18 inputs.nixpkgs.follows = "nixpkgs"; 19 }; 20 nixago = { 21 url = "github:nix-community/nixago"; 22 inputs.nixpkgs.follows = "nixpkgs"; 23 }; 24 std = { 25 url = "github:divnix/std"; 26 inputs.nixpkgs.follows = "nixpkgs"; 27 inputs.devshell.follows = "devshell"; 28 inputs.nixago.follows = "nixago"; 29 }; 30 std-configs = { 31 url = "sourcehut:~sntx/std-configs"; 32 inputs = { 33 devshell.follows = "devshell"; 34 nixago.follows = "nixago"; 35 nixpkgs.follows = "nixpkgs"; 36 std.follows = "std"; 37 }; 38 }; 39 }; 40 41 outputs = 42 { self, std, ... }@inputs: 43 std.growOn 44 { 45 inherit inputs; 46 cellsFrom = ./.nix; 47 cellBlocks = with std.blockTypes; [ 48 (installables "packages") 49 # Contribution Environment 50 (devshells "devshells") 51 (functions "configs") 52 (functions "toolchains") 53 ]; 54 } 55 { 56 devShells = std.harvest self [ 57 "repo" 58 "devshells" 59 ]; 60 packages = std.harvest self [ 61 "rust" 62 "packages" 63 ]; 64 }; 65 66 nixConfig = { 67 allow-import-from-derivation = true; 68 # extra-substituters = [ 69 # "https://nix-community.cachix.org" 70 # ]; 71 # extra-trusted-public-keys = [ 72 # "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" 73 # ]; 74 }; 75 }