summary refs log tree commit diff
path: root/nixos/modules/system
diff options
context:
space:
mode:
authorEric Sagnes <eric.sagnes@gmail.com>2016-11-16 22:37:36 +0900
committerEric Sagnes <eric.sagnes@gmail.com>2016-11-16 22:37:36 +0900
commit4a600b0437ab3933d189fdc99208cd1b88db9575 (patch)
treef194d35b94f7e06ea9224f0210e0fe97fc9e7471 /nixos/modules/system
parent15d25df6987bdc781f3fd67a00995d6cca86936d (diff)
downloadnixlib-4a600b0437ab3933d189fdc99208cd1b88db9575.tar
nixlib-4a600b0437ab3933d189fdc99208cd1b88db9575.tar.gz
nixlib-4a600b0437ab3933d189fdc99208cd1b88db9575.tar.bz2
nixlib-4a600b0437ab3933d189fdc99208cd1b88db9575.tar.lz
nixlib-4a600b0437ab3933d189fdc99208cd1b88db9575.tar.xz
nixlib-4a600b0437ab3933d189fdc99208cd1b88db9575.tar.zst
nixlib-4a600b0437ab3933d189fdc99208cd1b88db9575.zip
raspberrypi module: use enum
Diffstat (limited to 'nixos/modules/system')
-rw-r--r--nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix7
1 files changed, 1 insertions, 6 deletions
diff --git a/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix b/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix
index b7400e333e21..eb8ea6130972 100644
--- a/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix
+++ b/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix
@@ -33,7 +33,7 @@ in
 
     boot.loader.raspberryPi.version = mkOption {
       default = 2;
-      type = types.int;
+      type = types.enum [ 1 2 ];
       description = ''
       '';
     };
@@ -44,10 +44,5 @@ in
     system.build.installBootLoader = builder;
     system.boot.loader.id = "raspberrypi";
     system.boot.loader.kernelFile = platform.kernelTarget;
-    assertions = [
-      { assertion = (cfg.version == 1 || cfg.version == 2);
-        message = "loader.raspberryPi.version should be 1 or 2";
-      }
-    ];
   };
 }