mirror of
https://github.com/nix-community/disko.git
synced 2026-11-30 21:13:28 +01:00
disko2: Add flake-output and package
This allows running `nix run .#disko2` for testing
This commit is contained in:
1 parent
62581f38f5
commit
f34c39ec45
5 files changed
+48
-1
No files matched your search
+3
-1
@@ -1,8 +1,10 @@
|
||||
use libexec-dir.nu
|
||||
|
||||
alias nix = ^nix --extra-experimental-features nix-command --extra-experimental-features flakes
|
||||
alias nix-eval-expr = nix eval --impure --json --expr
|
||||
|
||||
def eval-config [args: record]: nothing -> record {
|
||||
let eval_config_nix = $env.FILE_PWD + "/lib/eval-config.nix"
|
||||
let eval_config_nix = (libexec-dir) + "/lib/eval-config.nix"
|
||||
|
||||
do { nix-eval-expr $"import ($eval_config_nix) \(builtins.fromJSON ''($args | to json -r)'')" }
|
||||
| complete
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
export def main []: nothing -> path {
|
||||
# $env.FILE_PWD contains the file of the script (disko.nu), not this module
|
||||
let libexec_dir = $env.FILE_PWD
|
||||
$libexec_dir
|
||||
}
|
||||
Reference in new issue
Block a user