60 lines
1.7 KiB
Nix
60 lines
1.7 KiB
Nix
{
|
|
description = "Description for the project";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:cachix/devenv-nixpkgs/rolling";
|
|
devenv.url = "github:cachix/devenv";
|
|
};
|
|
|
|
nixConfig = {
|
|
extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
|
|
extra-substituters = "https://devenv.cachix.org";
|
|
};
|
|
|
|
outputs = inputs@{ flake-parts, ... }:
|
|
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;
|
|
|
|
# Equivalent to inputs'.nixpkgs.legacyPackages.hello;
|
|
packages.default = pkgs.hello;
|
|
|
|
devenv.shells.default = {
|
|
name = "my-project";
|
|
|
|
imports = [
|
|
# This is just like the imports in devenv.nix.
|
|
# See https://devenv.sh/guides/using-with-flake-parts/#import-a-devenv-module
|
|
# ./devenv-foo.nix
|
|
];
|
|
|
|
# https://devenv.sh/reference/options/
|
|
packages = [ config.packages.default ];
|
|
|
|
languages.rust.enable = true;
|
|
|
|
enterShell = ''
|
|
hello
|
|
'';
|
|
};
|
|
|
|
};
|
|
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.
|
|
|
|
};
|
|
};
|
|
}
|