tudorr.ro/flake.nix

64 lines
1.4 KiB
Nix

{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
};
outputs = inputs @ {
self,
nixpkgs,
flake-parts,
...
}:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["x86_64-linux" "aarch64-linux"];
flake = {
overlays.default = final: prev: {
runLume = with prev;
writeShellScriptBin "lume" ''
${lib.getExe deno} task lume $@
'';
caddyDebug = with prev;
writeShellScriptBin "caddy" ''
${lib.getExe caddy} -c Caddyfile.debug $@
'';
};
};
perSystem = {
self',
pkgs,
system,
...
}: {
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
overlays = [self.overlays.default];
};
devShells.default = pkgs.mkShell {
buildInputs = with pkgs;
[
deno
caddyDebug
nodePackages.typescript-language-server
marksman
]
++ pkgs.lib.attrsets.attrValues self'.packages;
};
packages = {
inherit (pkgs) flyctl runLume;
default = self'.packages.runLume;
};
};
};
}