mirror of
https://github.com/nix-community/disko.git
synced 2026-12-01 05:23:28 +01:00
feat: allow to declare disko-config relative to flake
This commit is contained in:
1 parent
a023d391a0
commit
0af2a7c206
2 files changed
+26
-4
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user