From 5aa6ca3ae63fa0d9021873101ce40424c624e927 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=E2=80=9CNiols=E2=80=9D=20Jeannerod?= Date: Mon, 27 Jan 2025 11:56:19 +0100 Subject: [PATCH] Small clean up around VM ids --- deployment/flake-part.nix | 7 +------ deployment/procolixVm.nix | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/deployment/flake-part.nix b/deployment/flake-part.nix index 2d6626d1..f1822985 100644 --- a/deployment/flake-part.nix +++ b/deployment/flake-part.nix @@ -1,12 +1,7 @@ { inputs, self, ... }: let - allVmIds = # 100 -- 255 - let - allVmIdsFrom = x: if x > 255 then [ ] else [ x ] ++ allVmIdsFrom (x + 1); - in - allVmIdsFrom 100; - + allVmIds = builtins.genList (x: 100 + x) 156; # 100 -- 255 makeInstaller = import ./makeInstaller.nix; in diff --git a/deployment/procolixVm.nix b/deployment/procolixVm.nix index 5862de36..094bab37 100644 --- a/deployment/procolixVm.nix +++ b/deployment/procolixVm.nix @@ -16,7 +16,7 @@ in options = { procolix = { vmid = mkOption { - type = types.int; + type = types.ints.between 100 255; description = '' Identifier of the machine. This is a number between 100 and 255. '';