mirror of
https://github.com/TECHNOFAB11/disko.git
synced 2025-12-11 23:50:05 +01:00
feat: allow to declare disko-config relative to flake
This commit is contained in:
parent
a023d391a0
commit
0af2a7c206
2 changed files with 26 additions and 4 deletions
8
cli.nix
8
cli.nix
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue