summaryrefslogtreecommitdiff
path: root/flake.nix
blob: 4c6b9dacde216c55b671b58516e8da0096753a51 (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
{
  description = "LANDAU infrastructure";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
    disko = {
      url = "github:nix-community/disko";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    srvos = {
      url = "github:nix-community/srvos";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs =
    {
      nixpkgs,
      disko,
      srvos,
      ...
    }@attrs:
    let
      makeServerSystem =
        modules: extraConfig:
        nixpkgs.lib.nixosSystem {
          specialArgs = attrs;
          system = "x86_64-linux";
          modules = [
            disko.nixosModules.disko
            srvos.nixosModules.server
            ./config
            ./modules
            ./pkgs
          ]
          ++ modules;
        }
        // extraConfig;
    in
    {
      nixosConfigurations = {
        cgit = makeServerSystem [ ./servers/cgit.nix ] { };
      };

      inherit (nixpkgs) formatter;
    };
}