From f1fd6c0cc28fd38417ac2793fff0196d18f27e95 Mon Sep 17 00:00:00 2001 From: Bruce Wang Date: Fri, 23 Aug 2024 10:39:16 +1000 Subject: [PATCH] fix alejandra --- checks/alejandra.nix | 4 +- checks/default.nix | 4 +- flake.lock | 125 +++------------------- flake.nix | 3 +- home/configurations/bruce_at_chestnut.nix | 2 + packages/default.nix | 17 --- parts/auxiliary.nix | 5 +- 7 files changed, 24 insertions(+), 136 deletions(-) delete mode 100644 packages/default.nix diff --git a/checks/alejandra.nix b/checks/alejandra.nix index 5c988e5..ece2da5 100644 --- a/checks/alejandra.nix +++ b/checks/alejandra.nix @@ -1,8 +1,8 @@ { runCommand, - alejandra, +pkgs, self, }: runCommand "alejandra-run-${self.rev or "00000000"}" {} '' - ${alejandra}/bin/alejandra --check ${self} < /dev/null | tee $out + ${pkgs.alejandra}/bin/alejandra --check ${self} < /dev/null | tee $out '' diff --git a/checks/default.nix b/checks/default.nix index 7f84cb0..fd7c8e9 100644 --- a/checks/default.nix +++ b/checks/default.nix @@ -1,9 +1,7 @@ inputs: let pkgs = inputs.unstable.legacyPackages.x86_64-linux; - apkgs = inputs.alejandra.packages.x86_64-linux; - callPackage = pkgs.lib.callPackageWith (pkgs // apkgs // {inherit (inputs) self;}); + callPackage = pkgs.lib.callPackageWith (pkgs // {inherit (inputs) self;}); in { - alejandra = callPackage ./alejandra.nix {}; statix = callPackage ./statix.nix {}; } diff --git a/flake.lock b/flake.lock index a913a6e..c06c56d 100644 --- a/flake.lock +++ b/flake.lock @@ -1,30 +1,9 @@ { "nodes": { - "alejandra": { - "inputs": { - "fenix": "fenix", - "flakeCompat": "flakeCompat", - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1660592437, - "narHash": "sha256-xFumnivtVwu5fFBOrTxrv6fv3geHKF04RGP23EsDVaI=", - "owner": "kamadorueda", - "repo": "alejandra", - "rev": "e7eac49074b70814b542fee987af2987dd0520b5", - "type": "github" - }, - "original": { - "owner": "kamadorueda", - "ref": "3.0.0", - "repo": "alejandra", - "type": "github" - } - }, "anyrun": { "inputs": { "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "systems": "systems" }, "locked": { @@ -116,28 +95,6 @@ "type": "github" } }, - "fenix": { - "inputs": { - "nixpkgs": [ - "alejandra", - "nixpkgs" - ], - "rust-analyzer-src": "rust-analyzer-src" - }, - "locked": { - "lastModified": 1657607339, - "narHash": "sha256-HaqoAwlbVVZH2n4P3jN2FFPMpVuhxDy1poNOR7kzODc=", - "owner": "nix-community", - "repo": "fenix", - "rev": "b814c83d9e6aa5a28d0cf356ecfdafb2505ad37d", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "fenix", - "type": "github" - } - }, "flake-compat": { "flake": false, "locked": { @@ -334,22 +291,6 @@ "type": "github" } }, - "flakeCompat": { - "flake": false, - "locked": { - "lastModified": 1650374568, - "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "b4a34015c698c7793d592d66adbab377907a2be8", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "git-hooks": { "inputs": { "flake-compat": "flake-compat_3", @@ -495,7 +436,7 @@ "hyprlang": "hyprlang", "hyprutils": "hyprutils", "hyprwayland-scanner": "hyprwayland-scanner", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_2", "systems": "systems_2" }, "locked": { @@ -515,7 +456,7 @@ "hyprpicker": { "inputs": { "hyprutils": "hyprutils_2", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_3", "systems": "systems_3" }, "locked": { @@ -674,7 +615,7 @@ "inputs": { "flake-parts": "flake-parts_4", "flake-root": "flake-root", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_4", "treefmt-nix": "treefmt-nix" }, "locked": { @@ -708,16 +649,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1657425264, - "narHash": "sha256-3aHvoI2e8vJKw3hvnHECaBpSsL5mxVsVtaLCnTdNcH8=", - "owner": "nixos", + "lastModified": 1717196966, + "narHash": "sha256-yZKhxVIKd2lsbOqYd5iDoUIwsRZFqE87smE2Vzf6Ck0=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "de5b3dd17034e6106e75746e81618e5bd408de8a", + "rev": "57610d2f8f0937f39dbd72251e9614b1561942d8", "type": "github" }, "original": { - "owner": "nixos", - "ref": "nixos-unstable-small", + "owner": "NixOS", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -785,22 +726,6 @@ } }, "nixpkgs_2": { - "locked": { - "lastModified": 1717196966, - "narHash": "sha256-yZKhxVIKd2lsbOqYd5iDoUIwsRZFqE87smE2Vzf6Ck0=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "57610d2f8f0937f39dbd72251e9614b1561942d8", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { "locked": { "lastModified": 1721138476, "narHash": "sha256-+W5eZOhhemLQxelojLxETfbFbc19NWawsXBlapYpqIA=", @@ -816,7 +741,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_3": { "locked": { "lastModified": 1721138476, "narHash": "sha256-+W5eZOhhemLQxelojLxETfbFbc19NWawsXBlapYpqIA=", @@ -832,7 +757,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_4": { "locked": { "lastModified": 1714562304, "narHash": "sha256-Mr3U37Rh6tH0FbaDFu0aZDwk9mPAe7ASaqDOGgLqqLU=", @@ -848,7 +773,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_5": { "locked": { "lastModified": 1701436327, "narHash": "sha256-tRHbnoNI8SIM5O5xuxOmtSLnswEByzmnQcGGyNRjxsE=", @@ -862,7 +787,7 @@ "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz" } }, - "nixpkgs_7": { + "nixpkgs_6": { "locked": { "lastModified": 1718428119, "narHash": "sha256-WdWDpNaq6u1IPtxtYHHWpl5BmabtpmLnMAx0RdJ/vo8=", @@ -880,7 +805,7 @@ }, "nuenv": { "inputs": { - "nixpkgs": "nixpkgs_6", + "nixpkgs": "nixpkgs_5", "rust-overlay": "rust-overlay" }, "locked": { @@ -938,7 +863,6 @@ }, "root": { "inputs": { - "alejandra": "alejandra", "anyrun": "anyrun", "catppuccin": "catppuccin", "disko": "disko", @@ -966,23 +890,6 @@ ] } }, - "rust-analyzer-src": { - "flake": false, - "locked": { - "lastModified": 1657557289, - "narHash": "sha256-PRW+nUwuqNTRAEa83SfX+7g+g8nQ+2MMbasQ9nt6+UM=", - "owner": "rust-lang", - "repo": "rust-analyzer", - "rev": "caf23f29144b371035b864a1017dbc32573ad56d", - "type": "github" - }, - "original": { - "owner": "rust-lang", - "ref": "nightly", - "repo": "rust-analyzer", - "type": "github" - } - }, "rust-overlay": { "inputs": { "flake-utils": "flake-utils_2", @@ -1007,7 +914,7 @@ }, "rust-overlay_2": { "inputs": { - "nixpkgs": "nixpkgs_7" + "nixpkgs": "nixpkgs_6" }, "locked": { "lastModified": 1724206841, diff --git a/flake.nix b/flake.nix index 72c84b7..9d49110 100644 --- a/flake.nix +++ b/flake.nix @@ -23,7 +23,6 @@ nixd.url = "github:nix-community/nixd"; nuenv.url = "github:DeterminateSystems/nuenv"; - alejandra.url = "github:kamadorueda/alejandra/3.0.0"; # Neovim neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; @@ -92,7 +91,7 @@ ./nixos/configurations ./home/configurations - ./packages + # ./packages ]; flake = { diff --git a/home/configurations/bruce_at_chestnut.nix b/home/configurations/bruce_at_chestnut.nix index 4080916..9f2d257 100644 --- a/home/configurations/bruce_at_chestnut.nix +++ b/home/configurations/bruce_at_chestnut.nix @@ -17,6 +17,8 @@ config = { # display.enable = true; + modules.eww.enable = true; + home.packages = builtins.attrValues { inherit (pkgs) neovim; }; diff --git a/packages/default.nix b/packages/default.nix deleted file mode 100644 index c0ba659..0000000 --- a/packages/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -{inputs, ...}: { - _file = ./default.nix; - - perSystem = { - system, - pkgs, - lib, - inputs', - ... - }: { - packages = lib.mkMerge [ - { - alejandra = inputs'.alejandra.packages.default; - } - ]; - }; -} diff --git a/parts/auxiliary.nix b/parts/auxiliary.nix index 835aad8..caaf028 100644 --- a/parts/auxiliary.nix +++ b/parts/auxiliary.nix @@ -9,7 +9,7 @@ system, ... }: { - formatter = self.packages.${system}.alejandra; + formatter = pkgs.alejandra; apps.rotate.program = let sopsrotate = pkgs.writeShellScript "sops-rotate" '' @@ -30,8 +30,7 @@ devShells.default = pkgs.mkShell { packages = builtins.attrValues { - inherit (self'.packages) alejandra; - inherit (inputs'.unstable.legacyPackages) npins sops age ssh-to-age; + inherit (inputs'.unstable.legacyPackages) npins sops age ssh-to-age alejandra; }; }; };