Something went wrong. Try again.
Just a first repo to make sure I have tangled and everything set up correctly. I figured this would be a good way to say hello :)
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536{ description = "HTML dev environment";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
outputs = { self, nixpkgs }: let systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f { pkgs = import nixpkgs { inherit system; }; }); in { devShells = forAllSystems ({ pkgs }: { default = pkgs.mkShell { packages = with pkgs; [ html-tidy nodePackages.prettier nodePackages.vscode-html-languageserver-bin ]; }; });
apps = forAllSystems ({ pkgs }: { default = { type = "app"; program = toString (pkgs.writeShellScript "validate-html" '' ${pkgs.html-tidy}/bin/tidy -q -e ${./hello.html} 2>&1 || true echo "--- serving on http://localhost:8000 (Ctrl-C to stop) ---" cd ${./.} && ${pkgs.python3}/bin/python3 -m http.server 8000 ''); }; }); };}