blob: 25086f446f160f502e3c340095e6705d21023906 [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{
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 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 Greyf08a6192024-06-01 23:55:20 +000055 deploy = lib.mkDeploy {
56 inherit (inputs) self;
57 overrides = {
58 a1d1.hostname = "d1.a1.clicks.domains";
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}