From 4f1513dfa4fc22240ab7dcbe1c60c14f827645a7 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Thu, 22 Sep 2022 18:05:34 -0700 Subject: ref(home-manager): don't use home-manager when building the host When rebuilding the host (through `nixos-rebuild switch --flake`) I don't want to rebuild also my home-manager configuration. I want these to be two different steps. I rebuild the home-manager configuration more frequently and it's a waste of time and CPU to rebuild the world every time. This is a pretty large refactoring: - move checks back into the flake: if I modify a check, the configuration for `pre-commits` is not regenerated, as the file with the checks is not monitored with `direnv` (I could probably configure it for it, but not now) - remove `home.nix` from the host level configuration - introduce a `mkHomeManagerConfiguration` function to manage the different user@host - fix a warning with the rust overlay --- nix/checks.nix | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 nix/checks.nix (limited to 'nix/checks.nix') diff --git a/nix/checks.nix b/nix/checks.nix deleted file mode 100644 index aadb170..0000000 --- a/nix/checks.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ pkgs, pre-commit-hooks, ... }: - -with pkgs; - -{ - pre-commit-check = pre-commit-hooks.lib.${system}.run { - src = lib.cleanSource ../.; - hooks = { - nix-linter.enable = true; - nixpkgs-fmt.enable = true; - trailing-whitespace = { - enable = true; - entry = - "${pkgs.python3Packages.pre-commit-hooks}/bin/trailing-whitespace-fixer"; - types = [ "text" ]; - }; - end-of-file-fixer = { - enable = true; - entry = - "${pkgs.python3Packages.pre-commit-hooks}/bin/end-of-file-fixer"; - types = [ "text" ]; - }; - terraform-format = { enable = true; }; - shellcheck = { - enable = true; - files = "\\.sh$"; - types_or = [ "file" ]; - }; - }; - }; -} -- cgit v1.2.3