forked from fediversity/fediversity
		
	closes #325 Reviewed-on: Fediversity/Fediversity#345 Reviewed-by: Nicolas Jeannerod <nicolas.jeannerod@moduscreate.com> Co-authored-by: Kiara Grouwstra <kiara@procolix.eu> Co-committed-by: Kiara Grouwstra <kiara@procolix.eu>
		
			
				
	
	
		
			58 lines
		
	
	
	
		
			1.6 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			58 lines
		
	
	
	
		
			1.6 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
| {
 | |
|   inputs = {
 | |
|     nixops4.follows = "nixops4-nixos/nixops4";
 | |
|     nixops4-nixos.url = "github:nixops4/nixops4-nixos";
 | |
|   };
 | |
| 
 | |
|   outputs =
 | |
|     inputs:
 | |
|     {
 | |
|       nixConfig = {
 | |
|         extra-trusted-substituters = "https://cache.saumon.network/proxmox-nixos";
 | |
|         extra-trusted-public-keys = "proxmox-nixos:D9RYSWpQQC/msZUWphOY2I5RLH5Dd6yQcaHIuug7dWM=";
 | |
|       };
 | |
|     }
 | |
|     // import ./mkFlake.nix inputs (
 | |
|       { inputs, sources, ... }:
 | |
|       {
 | |
|         imports = [
 | |
|           "${sources.git-hooks}/flake-module.nix"
 | |
|           inputs.nixops4.modules.flake.default
 | |
| 
 | |
|           ./deployment/flake-part.nix
 | |
|           ./infra/flake-part.nix
 | |
|           ./keys/flake-part.nix
 | |
|           ./secrets/flake-part.nix
 | |
|           ./services/tests/flake-part.nix
 | |
|         ];
 | |
| 
 | |
|         perSystem =
 | |
|           {
 | |
|             pkgs,
 | |
|             lib,
 | |
|             system,
 | |
|             ...
 | |
|           }:
 | |
|           {
 | |
|             checks = {
 | |
|               panel = (import ./. { inherit sources system; }).tests.panel.basic;
 | |
|             };
 | |
|             formatter = pkgs.nixfmt-rfc-style;
 | |
| 
 | |
|             pre-commit.settings.hooks =
 | |
|               let
 | |
|                 ## Add a directory here if pre-commit hooks shouldn't apply to it.
 | |
|                 optout = [ "npins" ];
 | |
|                 excludes = map (dir: "^${dir}/") optout;
 | |
|                 addExcludes = lib.mapAttrs (_: c: c // { inherit excludes; });
 | |
|               in
 | |
|               addExcludes {
 | |
|                 nixfmt-rfc-style.enable = true;
 | |
|                 deadnix.enable = true;
 | |
|                 trim-trailing-whitespace.enable = true;
 | |
|                 shellcheck.enable = true;
 | |
|               };
 | |
|           };
 | |
|       }
 | |
|     );
 | |
| }
 |