diff --git a/.commitlintrc.yaml b/.commitlintrc.yaml deleted file mode 100644 index ce74ea6..0000000 --- a/.commitlintrc.yaml +++ /dev/null @@ -1,26 +0,0 @@ -rules: - description-format: - level: error - format: ^[A-Z].*$ # Description must start with a capital letter - footers-empty: - level: ignore - scope: - optional: true - options: - type: - level: error - options: - - build # Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm) - - chore # Other changes that don't modify src or test files - - ci # Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs) - - docs # Documentation only changes - - feat # A new feature - - fix # A bug fix - - perf # A code change that improves performance - - refactor # A code change that neither fixes a bug nor adds a feature - - revert # Reverts a previous commit - - style # Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) - - test # Adding missing tests or correcting existing tests - type-format: - level: error - format: ^[a-z].*$ # Type must start with a lowercase letter diff --git a/.envrc b/.envrc deleted file mode 100644 index a0818f4..0000000 --- a/.envrc +++ /dev/null @@ -1,2 +0,0 @@ -# shellcheck disable=SC2148 -use flake diff --git a/.gitignore b/.gitignore index 0820dbb..d96a56e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,12 @@ .devenv .direnv .pre-commit-config.yaml +# Devenv +.devenv* +devenv.local.nix + +# direnv +.direnv + +# pre-commit +.pre-commit-config.yaml diff --git a/ci/default.nix b/ci/default.nix deleted file mode 100644 index b607572..0000000 --- a/ci/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -let - pinnedNixpkgs = builtins.fromJSON (builtins.readFile ./pinned-nixpkgs.json); -in - { - system ? builtins.currentSystem, - nixpkgs ? null, - }: let - nixpkgs' = - if nixpkgs == null - then - fetchTarball { - url = "https://github.com/NixOS/nixpkgs/archive/${pinnedNixpkgs.rev}.tar.gz"; - sha256 = pinnedNixpkgs.sha256; - } - else nixpkgs; - - pkgs = import nixpkgs' { - inherit system; - config = {}; - overlays = []; - }; - in { - inherit pkgs; - } diff --git a/ci/pinned-nixpkgs-for-nixshell.json b/ci/pinned-nixpkgs-for-nixshell.json deleted file mode 100644 index 5aa805f..0000000 --- a/ci/pinned-nixpkgs-for-nixshell.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "nixpkgs": { - "rev": "9201b5ff357e781bf014d0330d18555695df7ba8", - "sha256": "sha256-x9Opq06rIiwdwGeK2Ykj69dNc2IvUH1fY55Wm7atwrE=" - }, - "nixpkgs-unstable": { - "rev": "4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0", - "sha256": "sha256-/uilDXvCIEs3C9l73JTACm4quuHUsIHcns1c+cHUJwA=" - }, - "devenv": { - "rev": "c5353d1a0483b8f0dc15933de91c6b1b9a892831", - "sha256": "sha256-ogmpmsPOlX4qeWVW4NZkTd0Lx8V4rvnjwlgOX7WnTZo=" - } -} diff --git a/ci/update-shell-lock.sh b/ci/update-shell-lock.sh deleted file mode 100755 index dc8908c..0000000 --- a/ci/update-shell-lock.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env bash - -# Exit on error, undefined variables, and pipe failures -set -euo pipefail - -INPUT_FILE="../flake.lock" -OUTPUT_FILE="pinned-nixpkgs-for-nixshell.json" - -# Check if input file exists -if [[ ! -f "$INPUT_FILE" ]]; then - echo "Error: Input file '$INPUT_FILE' not found" >&2 - exit 1 -fi - -# Check if input file is readable -if [[ ! -r "$INPUT_FILE" ]]; then - echo "Error: Input file '$INPUT_FILE' is not readable" >&2 - exit 1 -fi - -# Check if output directory is writable -if [[ ! -w "$(dirname "$OUTPUT_FILE")" ]]; then - echo "Error: Directory '$(dirname "$OUTPUT_FILE")' is not writable" >&2 - exit 1 -fi - -# Check if the input file contains valid JSON -if ! jq empty "$INPUT_FILE" 2>/dev/null; then - echo "Error: Input file '$INPUT_FILE' is not valid JSON" >&2 - exit 1 -fi - -# If all checks pass, create the output file -jq ' - . as $root | - ["nixpkgs", "nixpkgs-unstable", "devenv"] as $packages | - reduce $packages[] as $pkg ({}; - . + { - ($pkg): { - rev: $root.nodes[$pkg].locked.rev, - sha256: $root.nodes[$pkg].locked.narHash - } - } - ) -' "$INPUT_FILE" >"$OUTPUT_FILE" - -# Verify the output is valid JSON -if ! jq empty "$OUTPUT_FILE" 2>/dev/null; then - echo "Error: Failed to create valid JSON output" >&2 - rm -f "$OUTPUT_FILE" # Clean up invalid output - exit 1 -fi - -echo "Successfully created $OUTPUT_FILE with pinned package information" diff --git a/flake.nix b/flake.nix index 761c683..b976bee 100644 --- a/flake.nix +++ b/flake.nix @@ -91,46 +91,5 @@ ./hosts/thinkpad/hardware-configuration-thinkpad.nix ]; }; - - devShells = inputs.nixpkgs.lib.genAttrs ["x86_64-linux"] (system: { - default = import ./shell.nix {inherit system;}; - # let - # pkgs = inputs.nixpkgs.legacyPackages.${system}; - # in - # inputs.devenv.lib.mkShell { - # inherit inputs pkgs; - # modules = [ - # (_: { - # # packages = [ - # # pkgs.cargo - # # ]; - # - # languages = { - # nix.enable = true; - # shell.enable = true; - # }; - # - # pre-commit.hooks = { - # commitlint-rs = { - # enable = true; - # entry = "commitlint --edit"; - # language = "rust"; - # package = pkgs-unstable.commitlint-rs; - # pass_filenames = false; - # fail_fast = true; - # stages = ["commit-msg"]; - # extraPackages = [pkgs.cargo]; - # }; - # deadnix.enable = true; - # shellcheck.enable = true; - # # statix.enable = true; - # treefmt.settings.formatters = [ - # pkgs.alejandra - # ]; - # }; - # }) - # ]; - # }; - }); }; } diff --git a/shell.nix b/shell.nix deleted file mode 100644 index 36b991d..0000000 --- a/shell.nix +++ /dev/null @@ -1,32 +0,0 @@ -# From nixpkgs shell.nix -# Note: We intentionally don't use Flakes here, -# because every time you change any file and do another `nix develop`, -# it would create another copy of the entire ~500MB tree in the store. -# See https://github.com/NixOS/nix/pull/6530 for the future -{ - system ? builtins.currentSystem, - nixpkgs ? null, -}: let - pinnedNixpkgs = builtins.fromJSON (builtins.readFile ./ci/pinned-nixpkgs-for-nixshell.json); - nixpkgs' = - if nixpkgs == null - then - fetchTarball { - url = "https://github.com/NixOS/nixpkgs/archive/${pinnedNixpkgs.nixpkgs.rev}.tar.gz"; - sha256 = pinnedNixpkgs.nixpkgs.sha256; - } - else nixpkgs; - - pkgs = import nixpkgs' { - inherit system; - config = {}; - overlays = []; - }; -in - pkgs.mkShell { - packages = [ - pkgs.devenv - pkgs.hello - pkgs.pridefetch - ]; - }