disko2: Add flake-output and package

This allows running `nix run .#disko2` for testing
This commit is contained in:
Felix Uhl committed 2024-10-25 11:37:47 +02:00
1 parent 62581f38f5
commit f34c39ec45
5 files changed
+48 -1

No files matched your search

+3 -1
View File
@@ -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
+5
View File
@@ -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
}