mirror of
https://github.com/opdavies/build-configs.git
synced 2025-02-02 05:47:32 +00:00
Manage Build Configs with Build Configs
This commit is contained in:
parent
ed36ac2e28
commit
8818baed58
11
.tmux
11
.tmux
|
@ -7,21 +7,18 @@ session_name="${1:-'build-configs'}"
|
|||
session_path="${2:-$(pwd)}"
|
||||
|
||||
if tmux has-session -t="${session_name}" 2> /dev/null; then
|
||||
tmux attach -t "${session_name}"
|
||||
tmux switch-client -t "${session_name}" 2> /dev/null ||
|
||||
tmux attach -t "${session_name}"
|
||||
exit
|
||||
fi
|
||||
|
||||
tmux new-session -d -s "${session_name}" -n vim -c "${session_path}"
|
||||
|
||||
# 1. Main window: Vim.
|
||||
tmux send-keys -t "${session_name}:vim" "nvim +GoToFile" Enter
|
||||
tmux send-keys -t "${session_name}:vim" "nvim" Enter
|
||||
|
||||
# 2. General shell use.
|
||||
tmux new-window -t "${session_name}" -c "${session_path}"
|
||||
|
||||
if [[ -n "${TMUX:-}" ]]; then
|
||||
tmux switch-client -t "${session_name}"
|
||||
tmux select-window -t "${session_name}:vim.left"
|
||||
else
|
||||
tmux switch-client -t "${session_name}:vim.left" ||
|
||||
tmux attach -t "${session_name}:vim.left"
|
||||
fi
|
||||
|
|
9
build.yaml
Normal file
9
build.yaml
Normal file
|
@ -0,0 +1,9 @@
|
|||
name: build-configs
|
||||
type: symfony
|
||||
language: php
|
||||
|
||||
flake:
|
||||
devshell:
|
||||
packages:
|
||||
- php81
|
||||
- php81Packages.composer
|
79
flake.lock
79
flake.lock
|
@ -1,5 +1,24 @@
|
|||
{
|
||||
"nodes": {
|
||||
"devshell": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1705332421,
|
||||
"narHash": "sha256-USpGLPme1IuqG78JNqSaRabilwkCyHmVWY0M9vYyqEA=",
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"rev": "83cb93d6d063ad290beee669f4badf9914cc16ec",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
|
@ -17,18 +36,36 @@
|
|||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701680307,
|
||||
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1696374741,
|
||||
"narHash": "sha256-gt8B3G0ryizT9HSB4cCO8QoxdbsHnrQH+/BdKxOwqF0=",
|
||||
"lastModified": 1704161960,
|
||||
"narHash": "sha256-QGua89Pmq+FBAro8NriTuoO/wNaUtugt29/qqA8zeeM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8a4c17493e5c39769f79117937c79e1c88de6729",
|
||||
"rev": "63143ac2c9186be6d9da6035fa22620018c85932",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-23.05",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
@ -51,10 +88,42 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1705856552,
|
||||
"narHash": "sha256-JXfnuEf5Yd6bhMs/uvM67/joxYKoysyE3M2k6T3eWbg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "612f97239e2cc474c13c9dafa0df378058c5ad8d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"devshell": "devshell",
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
21
flake.nix
21
flake.nix
|
@ -1,19 +1,24 @@
|
|||
# Do not edit this file. It is automatically generated by https://www.oliverdavies.uk/build-configs.
|
||||
|
||||
{
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
|
||||
inputs = {
|
||||
devshell.url = "github:numtide/devshell";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = inputs@{ flake-parts, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
imports = [ inputs.devshell.flakeModule ];
|
||||
|
||||
systems = [ "x86_64-linux" ];
|
||||
|
||||
perSystem = { config, self', inputs', pkgs, system, ... }: {
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [ php82 php82Packages.composer ];
|
||||
devshells.default = {
|
||||
packages = with pkgs; [
|
||||
"php81"
|
||||
"php81Packages.composer"
|
||||
];
|
||||
};
|
||||
|
||||
packages.default = pkgs.runCommand "default" { src = "./."; } ''
|
||||
mkdir -p $out
|
||||
cp ./build-configs $out
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue