summaryrefslogtreecommitdiff
path: root/lxc/flake.nix
blob: 9f6b09d112d2ab7b6fd2264dddb264a2ca7b98eb (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
{
  description = "LXC for OpenRC for testing";

  inputs.openrc.url = "..";

  outputs = { self, flake-utils, nixpkgs, openrc, ... }: 
  let

    flakelib = flake-utils.lib;

    nixos = { system, attr }:
    let
      nixos = nixpkgs.lib.nixosSystem {
        system = system;
        modules = [
          ./lxc.nix
          ./configuration.nix
          openrc.nixosModule
        ];
      };
    in
      nixos.config.system.build."${attr}";

  in flakelib.eachDefaultSystem (system: {
    packages = {
      lxc = nixos {
        system = system;
        attr = "tarball";
      };
      lxc-metadata = nixos {
        system = system;
        attr = "metadata";
      };
    };
  });
}