summaryrefslogtreecommitdiffstats
path: root/nixos/modules/programs/extra-container.nix
blob: 30b0785ad47f2d848adfc54267e3b748b297dbe6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
  config,
  pkgs,
  lib,
  ...
}:

let
  cfg = config.programs.extra-container;
in
{
  options = {
    programs.extra-container.enable = lib.mkEnableOption ''
      extra-container, a tool for running declarative NixOS containers
      without host system rebuilds
    '';
  };
  config = lib.mkIf cfg.enable {
    environment.systemPackages = [ pkgs.extra-container ];
    boot.extraSystemdUnitPaths = [ "/etc/systemd-mutable/system" ];
  };
}