summaryrefslogtreecommitdiff
path: root/configs.nix
blob: de3cec739f8d8ffca7c50e62c61d17e1b032a76c (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{
  lib,
  withSystem,
  inputs,
  self,
  ...
}: let
  mkModulesFor = type: extra:
    lib.concatLists [
      (lib.attrValues self."${type}Modules")
      extra
    ];
in {
  imports = [
    ./systems/deploy.nix
    ./modules/flake/configurations.nix
  ];

  configurations = {
    home = {
      builder = inputs.hm.lib.homeManagerConfiguration;
      pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;

      users = {
        seth = {};
      };
    };

    nixos = {
      builder = inputs.nixpkgs.lib.nixosSystem;

      modules = mkModulesFor "nixos" [
        inputs.agenix.nixosModules.default
        inputs.hm.nixosModules.home-manager
      ];

      systems = {
        glados = {};

        glados-wsl = {};

        atlas = {
          builder = inputs.nixpkgs-stable.lib.nixosSystem;
          system = "aarch64-linux";
        };
      };
    };

    darwin = {
      builder = inputs.darwin.lib.darwinSystem;

      modules = mkModulesFor "darwin" [
        inputs.hm.darwinModules.home-manager
      ];

      systems = {
        caroline = {};
      };
    };
  };

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