diff options
Diffstat (limited to 'flake/flake.nix')
| -rw-r--r-- | flake/flake.nix | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/flake/flake.nix b/flake/flake.nix new file mode 100644 index 0000000..1cd1028 --- /dev/null +++ b/flake/flake.nix @@ -0,0 +1,46 @@ +{ + inputs = { + nixpkgs.url = "github:cachix/devenv-nixpkgs/rolling"; + systems.url = "github:nix-systems/default"; + devenv.url = "github:cachix/devenv"; + devenv.inputs.nixpkgs.follows = "nixpkgs"; + }; + + nixConfig = { + extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="; + extra-substituters = "https://devenv.cachix.org"; + }; + + outputs = { self, nixpkgs, devenv, systems, ... } @ inputs: + let + forEachSystem = nixpkgs.lib.genAttrs (import systems); + in + { + packages = forEachSystem (system: { + devenv-up = self.devShells.${system}.default.config.procfileScript; + }); + + devShells = forEachSystem + (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in + { + default = devenv.lib.mkShell { + inherit inputs pkgs; + modules = [ + { + # https://devenv.sh/reference/options/ + packages = [ pkgs.hello ]; + + enterShell = '' + hello + ''; + + processes.hello.exec = "hello"; + } + ]; + }; + }); + }; +} |
