blob: da9ce5a3ca86aa5e7cb170c601b0023f7f4a8798 [file] [log] [blame]
Skyler Greyf08a6192024-06-01 23:55:20 +00001# SPDX-FileCopyrightText: 2024 Auxolotl Infrastructure Contributors
2# SPDX-FileCopyrightText: 2024 Clicks Codes
3#
4# SPDX-License-Identifier: GPL-3.0-only
5
6{
Skyler Grey02c195e2024-06-22 01:35:26 +00007 description = "Clicks Infrastructure";
Skyler Greyf08a6192024-06-01 23:55:20 +00008
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 Greyd3377402024-06-06 22:01:26 +000022
Skyler Grey82ea8052024-06-08 22:56:00 +000023 sops-nix = {
24 url = "github:Mic92/sops-nix";
25 inputs = {
26 nixpkgs.follows = "unstable";
27 nixpkgs-stable.follows = "nixpkgs";
28 };
29 };
30
Skyler Greyd3377402024-06-06 22:01:26 +000031 impermanence.url = "github:nix-community/impermanence";
Skyler Greyf08a6192024-06-01 23:55:20 +000032 };
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 Grey82ea8052024-06-08 22:56:00 +000050 systems.modules.nixos = [
51 inputs.impermanence.nixosModules.impermanence
52 inputs.sops-nix.nixosModules.sops
53 ];
Skyler Greyd3377402024-06-06 22:01:26 +000054
Skyler Greyd083cf42024-06-08 23:10:24 +000055 deploy = lib.deploy.mkDeploy {
Skyler Greyf08a6192024-06-01 23:55:20 +000056 inherit (inputs) self;
57 overrides = {
Skyler Grey8ef34812024-06-09 19:42:15 +000058 teal.hostname = "teal.alpha.clicks.domains";
Skyler Greyf08a6192024-06-01 23:55:20 +000059 };
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}