From a807cd3a00e49dfbb37572faa84158fbe2ebac51 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Thu, 30 Sep 2021 21:03:20 +0200 Subject: [PATCH] nixos/extra-container: init --- nixos/modules/module-list.nix | 1 + nixos/modules/programs/extra-container.nix | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 nixos/modules/programs/extra-container.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index bff7b83ea711..3aa9b786c9cc 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -135,6 +135,7 @@ ./programs/droidcam.nix ./programs/environment.nix ./programs/evince.nix + ./programs/extra-container.nix ./programs/feedbackd.nix ./programs/file-roller.nix ./programs/firejail.nix diff --git a/nixos/modules/programs/extra-container.nix b/nixos/modules/programs/extra-container.nix new file mode 100644 index 000000000000..c10ccd769168 --- /dev/null +++ b/nixos/modules/programs/extra-container.nix @@ -0,0 +1,17 @@ +{ config, pkgs, lib, ... }: + +with lib; +let + cfg = config.programs.extra-container; +in { + options = { + programs.extra-container.enable = mkEnableOption '' + extra-container, a tool for running declarative NixOS containers + without host system rebuilds + ''; + }; + config = mkIf cfg.enable { + environment.systemPackages = [ pkgs.extra-container ]; + boot.extraSystemdUnitPaths = [ "/etc/systemd-mutable/system" ]; + }; +}