79 lines
2.1 KiB
Nix
79 lines
2.1 KiB
Nix
# github.com/brianmcgee has lots of great ideas for going above and beyond for this
|
|||
|
|
{
|
||
|
|
description = "Greg's homepage";
|
||
|
|
inputs = {
|
||
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||
|
|
devshell.url = "github:numtide/devshell";
|
||
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||
|
|
flake-root.url = "github:srid/flake-root";
|
||
|
|
naersk.url = "github:nix-community/naersk";
|
||
|
|
#process-compose.url = "github:Platonic-Systems/process-compose-flake";
|
||
|
|
#services-flake.url = "github:juspay/services-flake";
|
||
|
|
};
|
||
|
|
|
||
|
|
outputs = { flake-parts, ... }@inputs:
|
||
|
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
||
|
|
imports = [
|
||
|
|
inputs.devshell.flakeModule
|
||
|
|
inputs.flake-root.flakeModule
|
||
|
|
#inputs.process-compose.flakeModule
|
||
|
|
];
|
||
|
|
flake = {
|
||
|
|
# Universal things
|
||
|
|
overlays.default = final: prev: {};
|
||
|
|
};
|
||
|
|
systems = [
|
||
|
|
"x86_64-linux"
|
||
|
|
"aarch64-linux"
|
||
|
|
"aarch64-darwin"
|
||
|
|
];
|
||
|
|
perSystem = { pkgs, ... }@inputs': let
|
||
|
|
naersk-lib = pkgs.callPackage inputs.naersk { };
|
||
|
|
in {
|
||
|
|
_module.args.pkgs = import inputs.nixpkgs {
|
||
|
|
inherit (inputs') system;
|
||
|
|
overlays = [];
|
||
|
|
};
|
||
|
|
# https://numtide.github.io/devshell/intro.html
|
||
|
|
devshells.default = {
|
||
|
|
env = [{
|
||
|
|
name = "RUST_SRC_PATH";
|
||
|
|
value = pkgs.rustPlatform.rustLibSrc;
|
||
|
|
}];
|
||
|
|
# These commands will be shown in the motd that users read
|
||
|
|
# upon entering the shell
|
||
|
|
commands = [{
|
||
|
|
package = pkgs.cargo;
|
||
|
|
category = "languages";
|
||
|
|
help = "The Cargo tool";
|
||
|
|
} {
|
||
|
|
package = pkgs.rustc;
|
||
|
|
category = "languages";
|
||
|
|
help = "The rust compiler";
|
||
|
|
} {
|
||
|
|
package = pkgs.rustfmt;
|
||
|
|
category = "tools";
|
||
|
|
help = "Formatting tool for Rust";
|
||
|
|
} {
|
||
|
|
package = pkgs.pre-commit;
|
||
|
|
category = "tools";
|
||
|
|
help = "Helps run certain checks";
|
||
|
|
} {
|
||
|
|
package = pkgs.rustPackages.clippy;
|
||
|
|
category = "tools";
|
||
|
|
help = "Standard Rust clippy tool";
|
||
|
|
} {
|
||
|
|
package = pkgs.stdenv.cc;
|
||
|
|
category = "languages";
|
||
|
|
help = "The C compiler, to help things out";
|
||
|
|
}];
|
||
|
|
};
|
||
|
|
|
||
|
|
# This is not special, this is just flakes
|
||
|
|
packages = {
|
||
|
|
default = naersk-lib.buildPackage ./.;
|
||
|
|
};
|
||
|
|
};
|
||
|
|
};
|
||
|
|
}
|