diff options
author | Franck Cuny <franck@fcuny.net> | 2024-10-05 10:34:48 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2024-10-05 10:34:48 -0700 |
commit | c418b11c65de29301290501d96f28fae662e245e (patch) | |
tree | 7ad8d7da2422742a0c0a09e8d6eb6ed018af7491 | |
parent | more scripts to delete (diff) | |
download | world-c418b11c65de29301290501d96f28fae662e245e.tar.gz |
clean up the devshell setup
-rw-r--r-- | nix/flake/devshell.nix | 79 |
1 files changed, 37 insertions, 42 deletions
diff --git a/nix/flake/devshell.nix b/nix/flake/devshell.nix index be0c763..8fb0c2c 100644 --- a/nix/flake/devshell.nix +++ b/nix/flake/devshell.nix @@ -5,54 +5,49 @@ inputs.pre-commit-hooks.flakeModule ]; - perSystem = - { config - , pkgs - , ... - }: { - devshells.default = { - name = "world"; - devshell.startup.pre-commit.text = config.pre-commit.installationScript; - packages = with pkgs; [ - (config.treefmt.build.wrapper) - python3 - just - pandoc - nixos-rebuild - ]; - env = [ - { - name = "DEVSHELL_NO_MOTD"; - value = "1"; - } - ]; - }; + perSystem = { config, pkgs, ... }: { + devshells.default = { + name = "world"; + devshell.startup.pre-commit.text = config.pre-commit.installationScript; + packages = with pkgs; [ + (config.treefmt.build.wrapper) + python3 + just + pandoc + nixos-rebuild + ]; + env = [{ + name = "DEVSHELL_NO_MOTD"; + value = "1"; + }]; + }; - treefmt = { - projectRootFile = ".git/config"; + treefmt = { - flakeFormatter = true; - flakeCheck = true; + projectRootFile = ".git/config"; - # list of supported programs - # https://github.com/numtide/treefmt-nix - programs = { - nixpkgs-fmt.enable = true; - shfmt.enable = true; - taplo.enable = true; - ruff.enable = true; - yamlfmt.enable = true; - }; + flakeFormatter = true; + flakeCheck = true; + + # list of supported programs + # https://github.com/numtide/treefmt-nix + programs = { + nixpkgs-fmt.enable = true; + shfmt.enable = true; + taplo.enable = true; + ruff.enable = true; + yamlfmt.enable = true; }; + }; - pre-commit = { - check.enable = true; - settings = { - hooks = { - deadnix.enable = true; - treefmt.enable = true; - }; + pre-commit = { + check.enable = true; + settings = { + hooks = { + deadnix.enable = true; + treefmt.enable = true; }; }; }; + }; } |