blob: d3ca9927274f2c15b2a04a74475d9f32003e1382 (
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
33
|
{ modulesPath, pkgs, ... }: {
imports = [
(modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix")
(modulesPath + "/installer/cd-dvd/channel.nix")
];
nixpkgs.hostPlatform.system = "x86_64-linux";
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
};
environment.systemPackages = with pkgs; [
bash
git
gum
jq
(writeShellScriptBin "xinstall" ''
set -euo pipefail
FLAKE="github:kbujari/depot/xnet"
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"
'')
];
}
|