blob: d7d5861fc6bac721ead3a598e15852b5523edd2e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
{ modulesPath, pkgs, ... }: {
imports = [
(modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix")
(modulesPath + "/installer/cd-dvd/channel.nix")
];
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
};
environment.systemPackages = with pkgs; [
bash
git
gum
jq
(writeShellScriptBin "xinstall" ''
set -euo pipefail
FLAKE="github:kbujari/depot/scaffolding"
TARGET=$(
nix flake show "$FLAKE" --json 2>/dev/null \
| jq -r '.["nixosConfigurations"] | keys[] | select(. != "iso")' \
| gum choose
)
gum confirm --default=false "This will erase the selected disk, confirm:"
echo selected "$FLAKE"#"$TARGET"
'')
];
}
|