diff options
-rwxr-xr-x | install | 1 | ||||
-rwxr-xr-x | local/bin/new-flake-dev | 29 |
2 files changed, 30 insertions, 0 deletions
@@ -60,6 +60,7 @@ if ask "dev" "Development tools configuration"; then inst flake8 ~/.flake8 inst pylintrc ~/.pylintrc inst config/mypy/ ~/.config/mypy + inst local/bin/new-flake-dev ~/.local/bin/new-flake-dev fi if ask "sync" "Install synchronization"; then diff --git a/local/bin/new-flake-dev b/local/bin/new-flake-dev new file mode 100755 index 0000000..a45c86d --- /dev/null +++ b/local/bin/new-flake-dev @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +set -eu +if [ -f ./flake.nix ]; then + echo "There is already existing flake.nix file!" >&2 + exit 1 +fi +cat >./flake.nix <<EOF +{ + outputs = { self, nixpkgs, flake-utils, personal }: + with flake-utils.lib; + eachDefaultSystem (system: let + pkgs = nixpkgs.legacyPackages.${system}; + in { + devShells = filterPackages system { + default = pkgs.mkShell { + packages = with pkgs; [ + clang-tools + gcc gdb pkg-config + cppcheck flawfinder bear + meson + ]; + inputsFrom = with pkgs; [ + personal.devShells.${system}.default + ]; + }; + }; + }); +} +EOF |