home/flake.nix

34 lines
905 B
Nix
Raw Normal View History

2024-03-25 14:42:21 +01:00
{
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" ''
2024-03-27 07:17:02 +01:00
${pkgs.simple-http-server}/bin/simple-http-server -i $@
2024-03-25 14:42:21 +01:00
'';
2024-03-27 11:38:31 +01:00
homepage = pkgs.writeShellScriptBin "homepage" ''
${pkgs.simple-http-server}/bin/simple-http-server -i ${./static} $@
'';
2024-03-25 14:42:21 +01:00
in {
2024-03-27 11:38:31 +01:00
packages.default = homepage;
2024-03-25 14:42:21 +01:00
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
pkgs.vscode-langservers-extracted # html, css lsp
simple-http-server
dev_serve
2024-03-27 11:23:10 +01:00
imagemagick
ffmpeg
2024-03-25 14:42:21 +01:00
];
};
});
}