add formatter

This commit is contained in:
Osman Faruk Bayram 2025-07-12 12:47:26 +03:00
parent ca3c15e172
commit ecee9286b1

View file

@ -49,6 +49,9 @@
... ...
} @ inputs: let } @ inputs: let
inherit (self) outputs; inherit (self) outputs;
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system);
makePkgs = system: import nixpkgs { inherit system; };
in { in {
nixosConfigurations = { nixosConfigurations = {
tartarus = nixpkgs.lib.nixosSystem { tartarus = nixpkgs.lib.nixosSystem {
@ -92,8 +95,7 @@
modules = [./hosts/atreus/configuration.nix]; modules = [./hosts/atreus/configuration.nix];
}; };
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra; formatter = forAllSystems (system: (makePkgs system).nixfmt-rfc-style);
formatter.aarch64-linux = nixpkgs.legacyPackages.aarch64-linux.alejandra;
deploy.nodes.harmonica = { deploy.nodes.harmonica = {
hostname = "192.168.0.11"; hostname = "192.168.0.11";
profiles.system = { profiles.system = {