forked from pub-solar/os
chore: cleanup devshell, leftover from devos
This commit is contained in:
parent
7392d0904d
commit
6fb2cd9904
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
self,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
modules = with inputs; [
|
||||
];
|
||||
exportedModules = [
|
||||
./devos.nix
|
||||
];
|
||||
}
|
|
@ -1,64 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
extraModulesPath,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit
|
||||
(pkgs)
|
||||
agenix
|
||||
alejandra
|
||||
cachix
|
||||
editorconfig-checker
|
||||
nix
|
||||
nodePackages
|
||||
nvfetcher
|
||||
shellcheck
|
||||
shfmt
|
||||
treefmt
|
||||
nixos-generators
|
||||
;
|
||||
|
||||
inherit
|
||||
(pkgs.nodePackages)
|
||||
prettier
|
||||
;
|
||||
|
||||
pkgWithCategory = category: package: {inherit package category;};
|
||||
devos = pkgWithCategory "devos";
|
||||
formatter = pkgWithCategory "linter";
|
||||
in {
|
||||
imports = ["${extraModulesPath}/git/hooks.nix" ./hooks];
|
||||
|
||||
# override for our own welcome
|
||||
devshell.name = pkgs.lib.mkForce "PubSolarOS";
|
||||
|
||||
packages = [
|
||||
alejandra
|
||||
editorconfig-checker
|
||||
nodePackages.prettier
|
||||
shellcheck
|
||||
shfmt
|
||||
];
|
||||
|
||||
commands = with pkgs;
|
||||
[
|
||||
(devos nix)
|
||||
(devos agenix)
|
||||
{
|
||||
category = "devos";
|
||||
name = pkgs.nvfetcher.pname;
|
||||
help = pkgs.nvfetcher.meta.description;
|
||||
command = "cd $PRJ_ROOT/pkgs; ${pkgs.nvfetcher}/bin/nvfetcher -c ./sources.toml $@";
|
||||
}
|
||||
(formatter treefmt)
|
||||
]
|
||||
++ lib.optionals (!pkgs.stdenv.buildPlatform.isi686) [
|
||||
(devos cachix)
|
||||
]
|
||||
++ lib.optionals (pkgs.stdenv.hostPlatform.isLinux && !pkgs.stdenv.buildPlatform.isDarwin) [
|
||||
(devos nixos-generators)
|
||||
(devos deploy-rs.deploy-rs)
|
||||
];
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
git.hooks = {
|
||||
enable = true;
|
||||
pre-commit.text = builtins.readFile ./pre-commit.sh;
|
||||
};
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Check editorconfig
|
||||
if ! editorconfig-checker; then
|
||||
printf "%b\n" \
|
||||
"\nCode is not aligned with .editorconfig" \
|
||||
"Review the output and commit your fixes" >&2
|
||||
exit 1
|
||||
fi
|
Loading…
Reference in a new issue