about summary refs log tree commit diff stats
path: root/bootstrap/default.nix
blob: 1f727cd8831c8f2ab51194385c43e9e845fdca67 (plain) (blame)
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
34
35
36
37
38
39
40
{
  pkgs,
  sysLib,
  ...
}: let
  ensure_config_variables_dependencies = builtins.attrValues {inherit (pkgs) systemd jq dash gnugrep curl;};
  replacementStrings = {SCRIPT_ENSURE_CONFIG_VARIABLES = "${ensure_config_variables}/bin/ensure_config_variables";};
  activate = sysLib.writeShellScript {
    dependencies = with pkgs; [jq gawk curl coreutils libuuid nixVersions.latest git] ++ ensure_config_variables_dependencies;
    name = "activate";
    src = ./01_activate.sh;
    inherit replacementStrings;
  };
  install = sysLib.writeShellScript {
    dependencies = with pkgs; [jq dash curl gawk btrfs-progs coreutils libuuid gptfdisk dosfstools toybox nixVersions.latest git] ++ ensure_config_variables_dependencies;
    name = "install";
    src = ./01_install.sh;
    inherit replacementStrings;
  };
  setup = sysLib.writeShellScript {
    dependencies = with pkgs; [dash gawk curl git nixVersions.latest gnugrep nixos-install-tools coreutils libuuid] ++ ensure_config_variables_dependencies;
    name = "setup";
    src = ./02_setup.sh;
    inherit replacementStrings;
  };
  config_setup = sysLib.writeShellScript {
    dependencies = builtins.attrValues {inherit (pkgs) git neovim;} ++ ensure_config_variables_dependencies;
    name = "config_setup";
    src = ./03_config_setup.sh;
    keepPath = true;
    inherit replacementStrings;
  };
  ensure_config_variables = sysLib.writeShellScript {
    name = "ensure_config_variables";
    src = ./99_ensure_config_variables.sh;
    wrap = false;
  };
  output = {inherit activate install setup config_setup ensure_config_variables;};
in
  output