Skyler Grey | f08a619 | 2024-06-01 23:55:20 +0000 | [diff] [blame] | 1 | # SPDX-FileCopyrightText: 2024 Auxolotl Infrastructure Contributors |
| 2 | # SPDX-FileCopyrightText: 2024 Clicks Codes |
| 3 | # |
| 4 | # SPDX-License-Identifier: GPL-3.0-only |
| 5 | |
| 6 | { |
| 7 | description = "Auxolotl infrastructure."; |
| 8 | |
| 9 | inputs = { |
| 10 | nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; |
| 11 | unstable.url = "github:nixos/nixpkgs/nixos-unstable"; |
| 12 | |
| 13 | snowfall-lib = { |
| 14 | url = "github:snowfallorg/lib/dev"; |
| 15 | inputs.nixpkgs.follows = "nixpkgs"; |
| 16 | }; |
| 17 | |
| 18 | deploy-rs = { |
| 19 | url = "github:serokell/deploy-rs"; |
| 20 | inputs.nixpkgs.follows = "nixpkgs"; |
| 21 | }; |
Skyler Grey | d337740 | 2024-06-06 22:01:26 +0000 | [diff] [blame] | 22 | |
Skyler Grey | 82ea805 | 2024-06-08 22:56:00 +0000 | [diff] [blame] | 23 | sops-nix = { |
| 24 | url = "github:Mic92/sops-nix"; |
| 25 | inputs = { |
| 26 | nixpkgs.follows = "unstable"; |
| 27 | nixpkgs-stable.follows = "nixpkgs"; |
| 28 | }; |
| 29 | }; |
| 30 | |
Skyler Grey | d337740 | 2024-06-06 22:01:26 +0000 | [diff] [blame] | 31 | impermanence.url = "github:nix-community/impermanence"; |
Skyler Grey | f08a619 | 2024-06-01 23:55:20 +0000 | [diff] [blame] | 32 | }; |
| 33 | |
| 34 | outputs = |
| 35 | inputs: |
| 36 | let |
| 37 | lib = inputs.snowfall-lib.mkLib { |
| 38 | inherit inputs; |
| 39 | |
| 40 | src = ./.; |
| 41 | |
| 42 | snowfall = { |
| 43 | namespace = "clicks"; |
| 44 | }; |
| 45 | }; |
| 46 | in |
| 47 | lib.mkFlake { |
| 48 | overlays = with inputs; [ ]; |
| 49 | |
Skyler Grey | 82ea805 | 2024-06-08 22:56:00 +0000 | [diff] [blame] | 50 | systems.modules.nixos = [ |
| 51 | inputs.impermanence.nixosModules.impermanence |
| 52 | inputs.sops-nix.nixosModules.sops |
| 53 | ]; |
Skyler Grey | d337740 | 2024-06-06 22:01:26 +0000 | [diff] [blame] | 54 | |
Skyler Grey | d083cf4 | 2024-06-08 23:10:24 +0000 | [diff] [blame] | 55 | deploy = lib.deploy.mkDeploy { |
Skyler Grey | f08a619 | 2024-06-01 23:55:20 +0000 | [diff] [blame] | 56 | inherit (inputs) self; |
| 57 | overrides = { |
Skyler Grey | 8ef3481 | 2024-06-09 19:42:15 +0000 | [diff] [blame^] | 58 | teal.hostname = "teal.alpha.clicks.domains"; |
Skyler Grey | f08a619 | 2024-06-01 23:55:20 +0000 | [diff] [blame] | 59 | }; |
| 60 | }; |
| 61 | |
| 62 | checks = builtins.mapAttrs ( |
| 63 | system: deploy-lib: deploy-lib.deployChecks inputs.self.deploy |
| 64 | ) inputs.deploy-rs.lib; |
| 65 | |
| 66 | outputs-builder = channels: { formatter = channels.nixpkgs.nixfmt-rfc-style; }; |
| 67 | }; |
| 68 | } |