From 99818845b3f91ed823ba8eb280c2d828fc700c93 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Sun, 25 Feb 2024 08:32:33 -0500 Subject: [PATCH] add treefmt to devShell --- flake.nix | 13 +++++++------ justfile | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/flake.nix b/flake.nix index 641fadc..651845a 100644 --- a/flake.nix +++ b/flake.nix @@ -65,15 +65,15 @@ ]; flake = { - # Configurations for my NixOS VM (running on Mac) - nixosConfigurations.linux-builder = - self.nixos-flake.lib.mkLinuxSystem - ./systems/linux-builder.nix; - - # Configurations for my (only) macOS machine (using nix-darwin) + # Configuration for my M1 Macbook Max (using nix-darwin) darwinConfigurations.appreciate = self.nixos-flake.lib.mkMacosSystem ./systems/darwin.nix; + + # Configuration for a NixOS VM (running on my Mac) + nixosConfigurations.linux-builder = + self.nixos-flake.lib.mkLinuxSystem + ./systems/linux-builder.nix; }; perSystem = { self', system, pkgs, lib, config, inputs', ... }: { @@ -98,6 +98,7 @@ packages.default = self'.packages.activate; devShells.default = pkgs.mkShell { + inputsFrom = [ config.treefmt.build.devShell ]; packages = [ pkgs.nixpkgs-fmt pkgs.sops diff --git a/justfile b/justfile index b02a0f8..42bd8a8 100644 --- a/justfile +++ b/justfile @@ -2,7 +2,7 @@ default: @just --list fmt: - nix fmt + treefmt # Remote deploy to a host remote-deploy host='linux-builder':