From 8321b951570199b6641f703cad75a2649db75dac Mon Sep 17 00:00:00 2001 From: waalge Date: Sat, 24 Jun 2023 15:36:49 +0000 Subject: [PATCH] init --- .envrc | 1 + flake.nix | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 .envrc create mode 100644 flake.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..26136ce --- /dev/null +++ b/flake.nix @@ -0,0 +1,32 @@ +{ + description = "Description for the project"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + devshell.url = "github:numtide/devshell"; + }; + + outputs = inputs@{ flake-parts, ... }: + flake-parts.lib.mkFlake { inherit inputs; } { + imports = [ + inputs.devshell.flakeModule + ]; + systems = [ "x86_64-linux" "aarch64-darwin" ]; + perSystem = { config, self', inputs', pkgs, system, ... }: { + devshells.default = { + env = [{ + name = "HTTP_PORT"; + value = 8080; + }]; + commands = [{ + help = "print hello"; + name = "hello"; + command = "echo hello"; + }]; + packages = with pkgs; [ pandoc nixfmt ]; + }; + }; + flake = { + }; + }; +}