feat: allow to declare disko-config relative to flake

This commit is contained in:
David Arnold authored and lassulus committed 2022-11-09 12:30:06 +01:00
1 parent a023d391a0
commit 0af2a7c206
2 files changed
+26 -4

No files matched your search

+6 -2
View File
@@ -1,10 +1,14 @@
{ pkgs ? import <nixpkgs> {}
, mode ? "mount"
, fromFlake ? null
, diskoFile
, ... }@args:
let
disko = import ./. { inherit (pkgs) lib; };
diskFormat = import diskoFile;
disko = import ./. { };
diskFormat =
if fromFlake != null
then (builtins.getFlake fromFlake) + "/${diskoFile}"
else import diskoFile;
diskoEval = if (mode == "create") then
disko.createScript diskFormat pkgs
else if (mode == "mount") then