summaryrefslogtreecommitdiff
path: root/hosts/default.nix
blob: f3db7e641f2284d77dc8bc2c023187b5474a1bec (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
{
  inputs,
  myLib,
  self,
  withSystem,
  ...
}: {
  flake = {
    nixosConfigurations = let
      inherit (myLib.configs inputs) mkSystems;

      profiles = import ./profiles.nix {inherit self inputs;};
    in
      mkSystems {
        glados = {
          modules = with inputs; [
            nixos-hardware.nixosModules.common-cpu-amd-pstate
            nixos-hardware.nixosModules.common-gpu-nvidia-nonprime
            nixos-hardware.nixosModules.common-pc-ssd
            lanzaboote.nixosModules.lanzaboote
          ];
          profile = profiles.personal;
        };

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

        atlas = {
          system = "aarch64-linux";
          profile = profiles.server;
        };

        p-body = {
          modules = [inputs.guzzle_api.nixosModules.guzzle_api];
          system = "x86_64-linux";
          profile = profiles.server;
        };
      };

    nixosModules.getchoo = import ../modules/nixos;

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

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