From 6fb2cd99042ffc2b8dd395e8477d44a520da35cd Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 20 Nov 2023 18:42:18 +0100 Subject: [PATCH] chore: cleanup devshell, leftover from devos --- shell.nix | 1 - shell/default.nix | 11 ------- shell/devos.nix | 64 --------------------------------------- shell/hooks/default.nix | 6 ---- shell/hooks/pre-commit.sh | 9 ------ 5 files changed, 91 deletions(-) delete mode 100644 shell.nix delete mode 100644 shell/default.nix delete mode 100644 shell/devos.nix delete mode 100644 shell/hooks/default.nix delete mode 100755 shell/hooks/pre-commit.sh diff --git a/shell.nix b/shell.nix deleted file mode 100644 index 575a5d82..00000000 --- a/shell.nix +++ /dev/null @@ -1 +0,0 @@ -(import ./lib/compat).shellNix diff --git a/shell/default.nix b/shell/default.nix deleted file mode 100644 index 4d00b9ef..00000000 --- a/shell/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - self, - inputs, - ... -}: { - modules = with inputs; [ - ]; - exportedModules = [ - ./devos.nix - ]; -} diff --git a/shell/devos.nix b/shell/devos.nix deleted file mode 100644 index 3a61ec3c..00000000 --- a/shell/devos.nix +++ /dev/null @@ -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) - ]; -} diff --git a/shell/hooks/default.nix b/shell/hooks/default.nix deleted file mode 100644 index 1d60d49c..00000000 --- a/shell/hooks/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - git.hooks = { - enable = true; - pre-commit.text = builtins.readFile ./pre-commit.sh; - }; -} diff --git a/shell/hooks/pre-commit.sh b/shell/hooks/pre-commit.sh deleted file mode 100755 index 27fff872..00000000 --- a/shell/hooks/pre-commit.sh +++ /dev/null @@ -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