ytdl-web/flake.nix

57 lines
1.7 KiB
Nix
Raw Permalink Normal View History

{
description = "Description for the project";
inputs = {
nixpkgs.url = "github:cachix/devenv-nixpkgs/rolling";
devenv.url = "github:cachix/devenv";
nix2container.url = "github:nlewo/nix2container";
nix2container.inputs.nixpkgs.follows = "nixpkgs";
mk-shell-bin.url = "github:rrbutani/nix-mk-shell-bin";
};
nixConfig = {
extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
extra-substituters = "https://devenv.cachix.org";
};
outputs = inputs@{ self, flake-parts, ... }:
let
version = "1.2.0";
rev = if (self ? rev) then self.rev else self.dirtyRev;
in
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
inputs.devenv.flakeModule
];
systems = [ "x86_64-linux" "i686-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
perSystem = { config, self', inputs', pkgs, system, ... }: {
# Per-system attributes can be defined here. The self' and inputs'
# module parameters provide easy access to attributes of the same
# system.
# needed for devenv up
packages.devenv-up = self'.devShells.default.config.procfileScript;
packages.default = pkgs.callPackage ./nix/package.nix { inherit rev version; };
devenv.shells.default = {
name = "ytdl-web";
imports = [
./nix/devenv.nix
];
};
};
flake = {
# The usual flake attributes can be defined here, including system-
# agnostic ones like nixosModule and system-enumerating ones, although
# those are more easily expressed in perSystem.
nixosModules.default = import ./nix/module.nix;
};
};
}