Add formatter to project.

This commit is contained in:
Kevin Baensch 2023-09-11 20:05:16 +02:00
parent 3e1fe49657
commit 1dc50ae17d
Signed by: derped
GPG key ID: C0F1D326C7626543
2 changed files with 86 additions and 1 deletions

View file

@ -5,15 +5,20 @@
nixpkgs-stable.url = "github:/NixOS/nixpkgs/nixos-22.11";
nixpkgs-unstable.url = "github:/NixOS/nixpkgs/nixos-unstable";
nixpkgs.url = "github:/NixOS/nixpkgs/nixos-unstable";
alejandra = {
url = github:kamadorueda/alejandra/3.0.0;
inputs.nixpkgs.follows = "nixpkgs";
};
mailserver.url = "gitlab:/simple-nixos-mailserver/nixos-mailserver";
sops-nix = {
url = github:Mic92/sops-nix;
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, sops-nix, mailserver, ... }@attrs: let
outputs = { self, nixpkgs, alejandra, mailserver, sops-nix, ... }@attrs: let
lib = nixpkgs.lib;
fn = import ./fn.nix { inherit lib; };
mappedFormatter = builtins.mapAttrs (arch: packages: packages.default) alejandra.packages;
system = "x86_64-linux";
machineList = fn.lst { p = (toString ./machines); t = "directory"; b = false; };
configFiles = fn.lst { p = (toString ./config); b = true; };
@ -37,6 +42,7 @@
};
};
in {
formatter = mappedFormatter;
nixosConfigurations = lib.listToAttrs (map nixosSystemFor machineList);
};
}