about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorAdam Stephens <adam@valkor.net>2023-12-02 09:41:52 -0500
committerAdam Stephens <adam@valkor.net>2023-12-04 10:06:54 -0500
commit27064dd722bb233ed13d23cfd4e062cf09be9f08 (patch)
tree12992129bd2cbe33c620209d495113b8fb5ac7ac /nixos
parentccb7b8e3095adb7096596df6f03eb57a542aec58 (diff)
downloadnixlib-27064dd722bb233ed13d23cfd4e062cf09be9f08.tar
nixlib-27064dd722bb233ed13d23cfd4e062cf09be9f08.tar.gz
nixlib-27064dd722bb233ed13d23cfd4e062cf09be9f08.tar.bz2
nixlib-27064dd722bb233ed13d23cfd4e062cf09be9f08.tar.lz
nixlib-27064dd722bb233ed13d23cfd4e062cf09be9f08.tar.xz
nixlib-27064dd722bb233ed13d23cfd4e062cf09be9f08.tar.zst
nixlib-27064dd722bb233ed13d23cfd4e062cf09be9f08.zip
nixos/lxc: remove with lib
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/virtualisation/lxc.nix23
1 files changed, 9 insertions, 14 deletions
diff --git a/nixos/modules/virtualisation/lxc.nix b/nixos/modules/virtualisation/lxc.nix
index 83e8ce5118c6..3febb4b4f248 100644
--- a/nixos/modules/virtualisation/lxc.nix
+++ b/nixos/modules/virtualisation/lxc.nix
@@ -2,24 +2,19 @@
 
 { config, lib, pkgs, ... }:
 
-with lib;
-
 let
-
   cfg = config.virtualisation.lxc;
-
 in
 
 {
-  ###### interface
   meta = {
     maintainers = lib.teams.lxc.members;
   };
 
   options.virtualisation.lxc = {
     enable =
-      mkOption {
-        type = types.bool;
+      lib.mkOption {
+        type = lib.types.bool;
         default = false;
         description =
           lib.mdDoc ''
@@ -30,8 +25,8 @@ in
       };
 
     systemConfig =
-      mkOption {
-        type = types.lines;
+      lib.mkOption {
+        type = lib.types.lines;
         default = "";
         description =
           lib.mdDoc ''
@@ -41,8 +36,8 @@ in
       };
 
     defaultConfig =
-      mkOption {
-        type = types.lines;
+      lib.mkOption {
+        type = lib.types.lines;
         default = "";
         description =
           lib.mdDoc ''
@@ -52,8 +47,8 @@ in
       };
 
     usernetConfig =
-      mkOption {
-        type = types.lines;
+      lib.mkOption {
+        type = lib.types.lines;
         default = "";
         description =
           lib.mdDoc ''
@@ -65,7 +60,7 @@ in
 
   ###### implementation
 
-  config = mkIf cfg.enable {
+  config = lib.mkIf cfg.enable {
     environment.systemPackages = [ pkgs.lxc ];
     environment.etc."lxc/lxc.conf".text = cfg.systemConfig;
     environment.etc."lxc/lxc-usernet".text = cfg.usernetConfig;