Skip to content

Commit

Permalink
feat: scaffold nix run .#code
Browse files Browse the repository at this point in the history
  • Loading branch information
cor committed Nov 25, 2024
1 parent aea6f97 commit 0df6a33
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
description = "Union Labs Development Tools";
inputs = {

nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default";

devenv.url = "github:cachix/devenv";
Expand All @@ -24,10 +23,23 @@
forEachSystem = nixpkgs.lib.genAttrs (import systems);
in
{
packages = forEachSystem (system: {
devenv-up = self.devShells.${system}.default.config.procfileScript;
packages.${system}.devenv-test = self.devShells.${system}.default.config.test;
});
packages = forEachSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
in
{
devenv-up = self.devShells.${system}.default.config.procfileScript;
packages.${system}.devenv-test = self.devShells.${system}.default.config.test;
code = pkgs.writeShellApplication {
name = "code";
runtimeInputs = [ pkgs.openvscode-server ];
text = ''
openvscode-server --update-extensions --disable-telemetry --disable-telemetry --accept-server-license-terms --start-server "$@"
'';
};
}
);
devShells = forEachSystem (
system:
let
Expand Down

0 comments on commit 0df6a33

Please sign in to comment.