diff options
author | Sandro Jäckel <sandro.jaeckel@sap.com> | 2022-10-26 17:21:07 +0200 |
---|---|---|
committer | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2022-11-09 23:47:37 +0100 |
commit | 5452a260774ac78d71232896aa69734ed1e9607a (patch) | |
tree | 9bc6a19edd5364c123a7ef3da72f661df57c8898 /nixos/modules/tasks | |
parent | f26896669bc5a92d879f7d34c9458e8c44635ab5 (diff) |
nixos/lvm: replace boot.isContainer with services.lvm.enable
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 ]; |