home/flake.nix
2024-03-27 11:38:31 +01:00

34 lines
905 B
Nix

{
inputs.nixpkgs.url = "github:NixOs/nixpkgs";
inputs.flake-utils.url = "github:numtide/flake-utils";
# inputs.flake-utils.inputs.nixpkgs.follows = "nixpkgs";
outputs = {
flake-utils,
nixpkgs,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
};
dev_serve = pkgs.writeShellScriptBin "serve" ''
${pkgs.simple-http-server}/bin/simple-http-server -i $@
'';
homepage = pkgs.writeShellScriptBin "homepage" ''
${pkgs.simple-http-server}/bin/simple-http-server -i ${./static} $@
'';
in {
packages.default = homepage;
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
pkgs.vscode-langservers-extracted # html, css lsp
simple-http-server
dev_serve
imagemagick
ffmpeg
];
};
});
}