mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 20:39:18 -08:00
Moving to modules. Structural changes.
This commit is contained in:
parent
3903bc1766
commit
060d4c6d1e
258 changed files with 621 additions and 407 deletions
20
shell.nix
20
shell.nix
|
|
@ -1,8 +1,8 @@
|
|||
{ }: let
|
||||
config = import ./default.nix;
|
||||
tf = config.deploy.tf {};
|
||||
inherit (config) pkgs;
|
||||
nf-actions = config.pkgs.writeShellScriptBin "nf-actions" ''
|
||||
meta = import ./default.nix;
|
||||
config = meta;
|
||||
inherit (meta) pkgs;
|
||||
nf-actions = pkgs.writeShellScriptBin "nf-actions" ''
|
||||
export START_DIR="$PWD"
|
||||
cd ${toString ./.}
|
||||
export NF_CONFIG_ROOT=${toString ./.}/ci
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
done
|
||||
cd $START_DIR
|
||||
'';
|
||||
nf-test = config.pkgs.writeShellScriptBin "nf-test" ''
|
||||
nf-test = pkgs.writeShellScriptBin "nf-test" ''
|
||||
export START_DIR="$PWD"
|
||||
cd ${toString ./.}
|
||||
export NF_CONFIG_ROOT=${toString ./.}/ci
|
||||
|
|
@ -39,16 +39,18 @@
|
|||
cd $START_DIR
|
||||
'';
|
||||
in pkgs.mkShell {
|
||||
nativeBuildInputs = [
|
||||
nativeBuildInputs = with pkgs; [
|
||||
inetutils
|
||||
nf-actions
|
||||
nf-test
|
||||
] ++ config.runners.lazy.nativeBuildInputs;
|
||||
|
||||
HISTFILE = toString (tf.terraform.baseDir + "/.history");
|
||||
CI_PLATFORM = "impure"; # use host's nixpkgs for more convenient testing
|
||||
HISTFILE = toString (config.deploy.dataDir + "/.history");
|
||||
|
||||
shellHook = ''
|
||||
export HOME_HOSTNAME=$(hostname -s)
|
||||
export NIX_PATH="$NIX_PATH:nixfiles=${toString ./.}"
|
||||
export HOME_UID=$(id -u)
|
||||
export NIX_PATH="$NIX_PATH:home=${toString ./.}"
|
||||
'';
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue