aboutsummaryrefslogtreecommitdiff
path: root/2024-installfest/flake.nix
blob: 4cce0a84f552dbc104d50b5712ed81c7433ffaa0 (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
{
  description = "NixOS configuration for Turris system";

  inputs.nixturris = {
    url = "gitlab:cynerd/nixturris";
    inputs.nixpkgs.follows = "nixpkgs";
  };

  outputs = {
    self,
    flake-utils,
    nixpkgs,
    nixturris,
  }: let
    inherit (flake-utils.lib) eachDefaultSystem;
    inherit (nixturris.lib) nixturrisSystem;
  in
    {
      nixosConfigurations = {
        omnia = nixturrisSystem {
          modules = [./omnia.nix ./configuration.nix];
        };
        mox = nixturrisSystem {
          modules = [./mox.nix ./configuration.nix];
        };
      };
    }
    // eachDefaultSystem (system: {
      packages = {
        omnia-toplevel =
          self.nixosConfigurations.omnia.buildPlatform.${system}.config.system.build.toplevel;
        mox-toplevel =
          self.nixosConfigurations.mox.buildPlatform.${system}.config.system.build.toplevel;
        omnia-tarball =
          self.nixosConfigurations.omnia.buildPlatform.${system}.config.system.build.tarball;
        mox-tarball =
          self.nixosConfigurations.mox.buildPlatform.${system}.config.system.build.tarball;
      };

      formatter = nixpkgs.legacyPackages.${system}.alejandra;
    });
}