1
0
Fork 0

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

@ -1,5 +1,28 @@
{
"nodes": {
"alejandra": {
"inputs": {
"fenix": "fenix",
"flakeCompat": "flakeCompat",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1660510326,
"narHash": "sha256-xFumnivtVwu5fFBOrTxrv6fv3geHKF04RGP23EsDVaI=",
"owner": "kamadorueda",
"repo": "alejandra",
"rev": "ef03f7ef74ec97fd91a016a51c9c9667fb315652",
"type": "github"
},
"original": {
"owner": "kamadorueda",
"ref": "3.0.0",
"repo": "alejandra",
"type": "github"
}
},
"blobs": {
"flake": false,
"locked": {
@ -16,6 +39,28 @@
"type": "gitlab"
}
},
"fenix": {
"inputs": {
"nixpkgs": [
"alejandra",
"nixpkgs"
],
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1657607339,
"narHash": "sha256-HaqoAwlbVVZH2n4P3jN2FFPMpVuhxDy1poNOR7kzODc=",
"owner": "nix-community",
"repo": "fenix",
"rev": "b814c83d9e6aa5a28d0cf356ecfdafb2505ad37d",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "fenix",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
@ -32,6 +77,22 @@
"type": "github"
}
},
"flakeCompat": {
"flake": false,
"locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"mailserver": {
"inputs": {
"blobs": "blobs",
@ -181,6 +242,7 @@
},
"root": {
"inputs": {
"alejandra": "alejandra",
"mailserver": "mailserver",
"nixpkgs": "nixpkgs_2",
"nixpkgs-git": "nixpkgs-git",
@ -189,6 +251,23 @@
"sops-nix": "sops-nix"
}
},
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1657557289,
"narHash": "sha256-PRW+nUwuqNTRAEa83SfX+7g+g8nQ+2MMbasQ9nt6+UM=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "caf23f29144b371035b864a1017dbc32573ad56d",
"type": "github"
},
"original": {
"owner": "rust-lang",
"ref": "nightly",
"repo": "rust-analyzer",
"type": "github"
}
},
"sops-nix": {
"inputs": {
"nixpkgs": [

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);
};
}