diff options
author | David Arnold <david.arnold@iohk.io> | 2022-11-06 01:46:48 -0500 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2022-11-09 12:30:06 +0100 |
commit | 0af2a7c206bd69ecdc01361e12c7cb0ec9820911 (patch) | |
tree | d4efbdf4713aa4428a4922c0389ca4c61c808b9e /cli.nix | |
parent | a023d391a08f8c8b1b7c26fcbb8d06edd5ceb203 (diff) |
feat: allow to declare disko-config relative to flake
Diffstat (limited to 'cli.nix')
-rw-r--r-- | cli.nix | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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 |