From 67edd7ba89d98e7534394dab674360da99f40e3d Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 4 Dec 2023 07:35:44 -0800 Subject: update to 23.11 and break down flakes Update to 23.11 for both nix and home-manager. Break down the flake in multiple parts (hosts, devshell) so that they are easier to maintain. The main reason to start this is because `nix flake check` was failing, the flake was not correct. --- flake/devshell.nix | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 flake/devshell.nix (limited to 'flake/devshell.nix') diff --git a/flake/devshell.nix b/flake/devshell.nix new file mode 100644 index 0000000..f096bfe --- /dev/null +++ b/flake/devshell.nix @@ -0,0 +1,41 @@ +{ inputs, ... }: { + imports = [ + inputs.devshell.flakeModule + inputs.treefmt-nix.flakeModule + inputs.pre-commit-hooks.flakeModule + ]; + + perSystem = { config, pkgs, inputs', ... }: { + devShells.default = pkgs.mkShell { + name = "dotfiles"; + + packages = [ + ]; + + TREEFMT_CONFIG_FILE = config.treefmt.build.configFile; + }; + + treefmt = { + projectRootFile = ".git/config"; + + # list of supported programs + # https://github.com/numtide/treefmt-nix + programs = { + nixpkgs-fmt.enable = true; + shfmt.enable = true; + yamlfmt.enable = true; + taplo.enable = true; + }; + }; + + pre-commit = { + settings = { + hooks = { + # deadnix.enable = true; + shellcheck.enable = true; + treefmt.enable = true; + }; + }; + }; + }; +} -- cgit 1.4.1