This repository serves as the central definition for all developer tooling and configuration that we use.
This includes things such as linter rules, CI workflows, toolchain versions, editorconfig files, etc. - everything you need to start working on a Famedly project.
Everything is defined using flake-parts modules, allowing us to easily spin this up in new projects, or on newly onboarded developers' machines.
If you want to get started using this, follow these steps:
- Install lix, following the upstream instructions.
- Once lix is installed, you can enter any Famedly project and run
nix develop. #standards. Assuming the project is configured to use the engineering standards, the resulting shell will give any further instructions. - [Optional] use direnv to automatically enter
project shells when entering Famedly project directories.
- This is especially useful if you use a non-bash shell.
- [Optional] configure your editor to use the direnv-based shell as
well
- Various plugins exist for this. Examples:
- Vscode: direnv-vscode
- Emacs: direnv
- Vim: direnv.vim
- Various plugins exist for this. Examples:
To use the standards in a new project, create the following
flake.nix file at the root of the project:
{
description = "Example project";
inputs = {
famedly-engineering-standards.url = "github:famedly/engineering-standards";
nixpkgs.follows = "famedly-engineering-standards/nixpkgs";
flake-parts.follows = "famedly-engineering-standards/flake-parts";
};
outputs =
{ famedly-engineering-standards, flake-parts, ... }@inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [ famedly-engineering-standards.flakeModules.default ];
systems = famedly-engineering-standards.lib.famedlySystems;
perSystem.famedly.standards = {
# Read module documentation for further details, but most
# likely you want one of the following:
#
# dart.projects."." = { };
# rust.projects."." = { };
};
};
}After this, follow the Updating section.
Run these commands:
$ nix flake update famedly-engineering-standards
$ nix run .#filegen-activateCurrently, this may introduce breaking changes. We will provide migrations and generally a better update process in the future, but while we are iterating on the initial standards large changes are to be expected.
General "standards", i.e. anything that can be defined reasonably
without benefiting from nix module semantics, should live in the
standards/ directory.
Care will be taken that these can be maintained without involving nix, to ensure that most developers can interact with this repository.
If you struggle creating a completely new file, ask someone with more nix experience to help you hook this into the filegen-activate command.