Переглянути джерело

fix(pre-commit): fixed pre-commit, removed vivaldi, fixed upgrade notes

Zander Hawke 5 місяців тому
батько
коміт
372f80741e
5 змінених файлів з 48 додано та 25 видалено
  1. 1 0
      .envrc
  2. 1 1
      flake.lock
  3. 31 19
      flake.nix
  4. 14 4
      home/features/cli/default.nix
  5. 1 1
      hosts/meili/software.nix

+ 1 - 0
.envrc

@@ -2,6 +2,7 @@ if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
   source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
 fi
 
+nix_direnv_manual_reload
 watch_file flake.nix
 watch_file flake.lock
 watch_file shell.nix

+ 1 - 1
flake.lock

@@ -287,7 +287,7 @@
         "flake-compat": "flake-compat_2",
         "gitignore": "gitignore_2",
         "nixpkgs": [
-          "nixpkgs"
+          "nixpkgs-unstable"
         ]
       },
       "locked": {

+ 31 - 19
flake.nix

@@ -31,7 +31,7 @@
     disko.inputs.nixpkgs.follows = "nixpkgs";
 
     git-hooks.url = "github:cachix/git-hooks.nix";
-    git-hooks.inputs.nixpkgs.follows = "nixpkgs";
+    git-hooks.inputs.nixpkgs.follows = "nixpkgs-unstable";
 
     zen-browser.url = "github:0xc000022070/zen-browser-flake";
     zen-browser.inputs.nixpkgs.follows = "nixpkgs";
@@ -53,25 +53,37 @@
       modules = import ./modules;
 
       formatter = lib.eachSystem (_system: pkgs: pkgs.nixfmt-tree);
-      packages = lib.eachSystem (system: pkgs: import ./packages {
-        inherit pkgs;
-        nixvim = inputs.nixvim.legacyPackages.${system}.makeNixvimWithModule { };
-      });
-      devShells = lib.eachSystem (system: pkgs: import ./shell.nix {
-        inherit pkgs system;
-        # inherit (self.checks.${system}.pre-commit-check) shellHook;
-        # inherit (self.checks.${system}.pre-commit-check) enabledPackages;
-      });
-
-      checks = lib.eachSystem (system: _pkgs: {
-        pre-commit-check = inputs.git-hooks.lib.${system}.run {
-          src = ./.;
-          hooks = {
-            deadnix.enable = true;
-            nixpkgs-fmt.enable = true;
+      packages = lib.eachSystem (
+        system: pkgs:
+        import ./packages {
+          inherit pkgs;
+          nixvim = inputs.nixvim.legacyPackages.${system}.makeNixvimWithModule { };
+        }
+      );
+      devShells = lib.eachSystem (
+        system: pkgs:
+        import ./shell.nix {
+          inherit pkgs system;
+
+          inherit (self.checks.${system}.pre-commit-check) shellHook;
+          inherit (self.checks.${system}.pre-commit-check) enabledPackages;
+        }
+      );
+
+      checks = lib.eachSystem (
+        system: _pkgs: {
+          pre-commit-check = inputs.git-hooks.lib.${system}.run {
+            src = ./.;
+            hooks = {
+              nixfmt.enable = true;
+              # statix.enable = true;
+              deadnix.enable = true;
+              commitizen.enable = true;
+              trim-trailing-whitespace.enable = true;
+            };
           };
-        };
-      });
+        }
+      );
 
       templates = {
         devenv = {

+ 14 - 4
home/features/cli/default.nix

@@ -1,4 +1,8 @@
-{ pkgs, ... }:
+{
+  config,
+  pkgs,
+  ...
+}:
 {
   imports = [
     ./bat.nix
@@ -14,13 +18,19 @@
     pkgs.unstable.devenv
     pkgs.unstable.glow
     pkgs.unstable.nak
-    pkgs.zapstore-cli
+    # pkgs.zapstore-cli
   ];
 
   programs.bash.enable = true;
-  programs.direnv.enable = true;
+  programs.direnv = {
+    enable = true;
+    nix-direnv.enable = true;
+  };
   programs.zoxide.enable = true;
-  programs.zsh.enable = true;
+  programs.zsh = {
+    enable = true;
+    dotDir = "${config.xdg.configHome}/zsh";
+  };
 
   programs.fzf = {
     enable = true;

+ 1 - 1
hosts/meili/software.nix

@@ -45,7 +45,7 @@
       # "tor-browser"
       # "utm"
       # "vlc"
-      "vivaldi"
+      # "vivaldi"
       # "whatsapp"
       # "krunkit"
     ];