summaryrefslogtreecommitdiff
path: root/parts/systems/default.nix
blob: e9ef9ba5459035d2d0ae37a9cb34ffcea0a59216 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
  inputs,
  self,
  withSystem,
  ...
}: {
  flake = let
    inherit (self.lib.configs) mapSystems;
    profiles = import ./profiles.nix {inherit self inputs;};
  in {
    darwinConfigurations = mapSystems {
      caroline = {
        system = "x86_64-darwin";
        profile = profiles.personal-darwin;
      };
    };

    nixosConfigurations = mapSystems {
      glados = {
        modules = with inputs; [
          lanzaboote.nixosModules.lanzaboote
        ];
        profile = profiles.personal;
      };

      glados-wsl = {
        modules = [inputs.nixos-wsl.nixosModules.wsl];
        profile = profiles.personal;
      };

      atlas = {
        modules = [inputs.guzzle_api.nixosModules.default];
        system = "aarch64-linux";
        profile = profiles.server;
      };
    };

    openwrtConfigurations.turret = withSystem "x86_64-linux" ({pkgs, ...}:
      pkgs.callPackage ./turret {
        inherit (inputs) openwrt-imagebuilder;
      });
  };

  perSystem = {system, ...}: {
    apps = (inputs.nixinate.nixinate.${system} self).nixinate;
  };
}