diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2022-11-24 13:58:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-24 13:58:29 +0100 |
commit | f92201f46109aabbbf41b8dc24bb9d342eb93a35 (patch) | |
tree | 122c9547113efdcf4152c3cc87f49d26d6fbe4ad /nixos/modules/tasks | |
parent | 2090e6b6f25336c94fbddf465ca5c699affdfcbf (diff) | |
parent | 5452a260774ac78d71232896aa69734ed1e9607a (diff) |
Merge pull request #197925 from SuperSandro2000/lvm2
Diffstat (limited to 'nixos/modules/tasks')
-rw-r--r-- | nixos/modules/tasks/lvm.nix | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nixos/modules/tasks/lvm.nix b/nixos/modules/tasks/lvm.nix index 760133fafa29c..a14f26c02e48f 100644 --- a/nixos/modules/tasks/lvm.nix +++ b/nixos/modules/tasks/lvm.nix @@ -5,6 +5,10 @@ let cfg = config.services.lvm; in { options.services.lvm = { + enable = mkEnableOption (lib.mdDoc "lvm2") // { + default = true; + }; + package = mkOption { type = types.package; default = pkgs.lvm2; @@ -30,7 +34,7 @@ in { # minimal configuration file to make lvmconfig/lvm2-activation-generator happy environment.etc."lvm/lvm.conf".text = "config {}"; }) - (mkIf (!config.boot.isContainer) { + (mkIf cfg.enable { systemd.tmpfiles.packages = [ cfg.package.out ]; environment.systemPackages = [ cfg.package ]; systemd.packages = [ cfg.package ]; |