From 0a2dd279027547fc4494d9b2931298bc2b35024e Mon Sep 17 00:00:00 2001 From: Jeeves Date: Mon, 24 Jun 2024 14:08:21 -0600 Subject: [PATCH] make mkFlake per-system --- flake.nix | 32 ++++++++++++++------------- server/flakes/windows/test/flake.lock | 8 +++---- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/flake.nix b/flake.nix index a5ef404..a4accef 100644 --- a/flake.nix +++ b/flake.nix @@ -33,21 +33,23 @@ # ]; # }; in { - mkFlake = config: let - vm = oslib.mkVM { - inherit (config) name uuid; - beforeInstall = [ - { index = 1; file = "${osdb.${config.os.name}.${config.os.version}.${config.os.edition}.${config.os.arch}.installer}/out.iso"; } - { index = 2; file = "${osdb.${config.os.name}.${config.os.version}.${config.os.edition}.${config.os.arch}.unattend}/out.iso"; } - ]; - }; - in { - packages.volume = vm.volume; - packages.beforeInstall = vm.beforeInstallDrv; - packages.afterInstall = vm.afterInstallDrv; - packages.beforeBoot = vm.beforeBootDrv; - packages.afterBoot = vm.afterBootDrv; - }; + mkFlake = config: + flake-utils.lib.eachDefaultSystem(system: + let + vm = oslib.mkVM { + inherit (config) name uuid; + beforeInstall = [ + { index = 1; file = "${osdb.${config.os.name}.${config.os.version}.${config.os.edition}.${config.os.arch}.installer}/out.iso"; } + { index = 2; file = "${osdb.${config.os.name}.${config.os.version}.${config.os.edition}.${config.os.arch}.unattend}/out.iso"; } + ]; + }; + in { + packages.volume = vm.volume; + packages.beforeInstall = vm.beforeInstallDrv; + packages.afterInstall = vm.afterInstallDrv; + packages.beforeBoot = vm.beforeBootDrv; + packages.afterBoot = vm.afterBootDrv; + }); apps = { # hello-start-vm = flake-utils.lib.mkApp { diff --git a/server/flakes/windows/test/flake.lock b/server/flakes/windows/test/flake.lock index d5a52c2..e373d7d 100644 --- a/server/flakes/windows/test/flake.lock +++ b/server/flakes/windows/test/flake.lock @@ -126,11 +126,11 @@ "zig2nix": "zig2nix" }, "locked": { - "lastModified": 1719258655, - "narHash": "sha256-bzoB79jZjBrdSk6cRf3OdUUdMmutij9Tl3uvLj3zzFY=", + "lastModified": 1719259537, + "narHash": "sha256-oHrDpHmZCZY+i3FT3NGPqeQCBoAFu5kLJMe2mRSofDc=", "ref": "refs/heads/master", - "rev": "1531a79212f5ad05439c89ab463aa037f02da4c1", - "revCount": 2, + "rev": "70dd3a104a3d42c18586cc8e687f760ab77714e1", + "revCount": 3, "type": "git", "url": "https://git.jeevio.xyz/jeeves/oslib" },