feature/waybar #15
69
.github/settings.yml
vendored
69
.github/settings.yml
vendored
@ -4,60 +4,44 @@ repository:
|
||||
|
||||
# The name of the repository. Changing this will rename the repository
|
||||
name: nix-dotfiles
|
||||
|
||||
# A short description of the repository that will show up on GitHub
|
||||
description: RAD-Dev Infra
|
||||
|
||||
# A URL with more information about the repository
|
||||
# homepage: "https://nix-community.org"
|
||||
|
||||
# A comma-separated list of topics to set on the repository
|
||||
topics: "nixos"
|
||||
|
||||
# Either `true` to make the repository private, or `false` to make it public.
|
||||
private: false
|
||||
|
||||
# Either `true` to enable issues for this repository, `false` to disable them.
|
||||
has_issues: true
|
||||
|
||||
# Either `true` to enable projects for this repository, or `false` to disable them.
|
||||
# If projects are disabled for the organization, passing `true` will cause an API error.
|
||||
has_projects: true
|
||||
|
||||
# Either `true` to enable the wiki for this repository, `false` to disable it.
|
||||
has_wiki: false
|
||||
|
||||
# Either `true` to enable downloads for this repository, `false` to disable them.
|
||||
has_downloads: false
|
||||
|
||||
# Updates the default branch for this repository.
|
||||
default_branch: main
|
||||
|
||||
# Either `true` to allow squash-merging pull requests, or `false` to prevent
|
||||
# squash-merging.
|
||||
allow_squash_merge: true
|
||||
|
||||
# Either `true` to allow merging pull requests with a merge commit, or `false`
|
||||
# to prevent merging pull requests with merge commits.
|
||||
allow_merge_commit: false
|
||||
|
||||
# Either `true` to allow rebase-merging pull requests, or `false` to prevent
|
||||
# rebase-merging.
|
||||
allow_rebase_merge: true
|
||||
|
||||
# Either `true` to enable automatic deletion of branches on merge, or `false` to disable
|
||||
delete_branch_on_merge: true
|
||||
|
||||
# Either `true` to enable automated security fixes, or `false` to disable
|
||||
# automated security fixes.
|
||||
enable_automated_security_fixes: true
|
||||
|
||||
# Either `true` to enable vulnerability alerts, or `false` to disable
|
||||
# vulnerability alerts.
|
||||
enable_vulnerability_alerts: true
|
||||
|
||||
allow_auto_merge: true
|
||||
|
||||
# Labels: define labels for Issues and Pull Requests
|
||||
#
|
||||
labels:
|
||||
@ -104,53 +88,39 @@ labels:
|
||||
- name: automated
|
||||
color: '#42b528'
|
||||
description: PR was automatically generated (through a bot or CI/CD)
|
||||
|
||||
# Milestones: define milestones for Issues and Pull Requests
|
||||
milestones:
|
||||
- title: Go-Live
|
||||
description: >-
|
||||
All requirements for official go-live:
|
||||
- Automated testing via Hydra/Actions
|
||||
- Automated deployments via Hydra/Actions
|
||||
- 90+% testing coverage
|
||||
- Functional formatter with custom rules
|
||||
- palatine-hill is fully stable, enough so that jeeves can be migrated
|
||||
All requirements for official go-live: - Automated testing via Hydra/Actions - Automated deployments via Hydra/Actions - 90+% testing coverage - Functional formatter with custom rules - palatine-hill is fully stable, enough so that jeeves can be migrated
|
||||
# The state of the milestone. Either `open` or `closed`
|
||||
state: open
|
||||
- title: Jeeves Migration
|
||||
description: >-
|
||||
Test common use-cases for Jeeves
|
||||
- Quadro GPU support
|
||||
- Multi-GPU support
|
||||
- Plex support
|
||||
- Docker support
|
||||
- ZFS support
|
||||
|
||||
|
||||
Test common use-cases for Jeeves - Quadro GPU support - Multi-GPU support - Plex support - Docker support - ZFS support
|
||||
# Collaborators: give specific users access to this repository.
|
||||
# See https://docs.github.com/en/rest/reference/repos#add-a-repository-collaborator for available options
|
||||
collaborators:
|
||||
# - username: numtide-bot
|
||||
# Note: `permission` is only valid on organization-owned repositories.
|
||||
# The permission to grant the collaborator. Can be one of:
|
||||
# * `pull` - can pull, but not push to or administer this repository.
|
||||
# * `push` - can pull and push, but not administer this repository.
|
||||
# * `admin` - can pull, push and administer this repository.
|
||||
# * `maintain` - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions.
|
||||
# * `triage` - Recommended for contributors who need to proactively manage issues and pull requests without write access.
|
||||
# permission: push
|
||||
# - username: numtide-bot
|
||||
# Note: `permission` is only valid on organization-owned repositories.
|
||||
# The permission to grant the collaborator. Can be one of:
|
||||
# * `pull` - can pull, but not push to or administer this repository.
|
||||
# * `push` - can pull and push, but not administer this repository.
|
||||
# * `admin` - can pull, push and administer this repository.
|
||||
# * `maintain` - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions.
|
||||
# * `triage` - Recommended for contributors who need to proactively manage issues and pull requests without write access.
|
||||
# permission: push
|
||||
|
||||
# See https://docs.github.com/en/rest/reference/teams#add-or-update-team-repository-permissions for available options
|
||||
teams:
|
||||
# - name: admin
|
||||
# The permission to grant the team. Can be one of:
|
||||
# * `pull` - can pull, but not push to or administer this repository.
|
||||
# * `push` - can pull and push, but not administer this repository.
|
||||
# * `admin` - can pull, push and administer this repository.
|
||||
# * `maintain` - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions.
|
||||
# * `triage` - Recommended for contributors who need to proactively manage issues and pull requests without write access.
|
||||
# permission: admin
|
||||
|
||||
# - name: admin
|
||||
# The permission to grant the team. Can be one of:
|
||||
# * `pull` - can pull, but not push to or administer this repository.
|
||||
# * `push` - can pull and push, but not administer this repository.
|
||||
# * `admin` - can pull, push and administer this repository.
|
||||
# * `maintain` - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions.
|
||||
# * `triage` - Recommended for contributors who need to proactively manage issues and pull requests without write access.
|
||||
# permission: admin
|
||||
branches:
|
||||
# gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /repos/nix-community/infra/branches/master/protection
|
||||
|
||||
@ -165,7 +135,6 @@ branches:
|
||||
# `Maximum pull requests to merge`: 5
|
||||
# `Only merge non-failing pull requests`: true
|
||||
# `Consider check failed after`: 60 minutes
|
||||
|
||||
- name: main
|
||||
# https://docs.github.com/en/rest/reference/repos#update-branch-protection
|
||||
# Branch Protection settings. Set to null to disable
|
||||
|
1
.github/workflows/flake-health-checks.yml
vendored
1
.github/workflows/flake-health-checks.yml
vendored
@ -5,7 +5,6 @@ on:
|
||||
pull_request:
|
||||
branches: ["main"]
|
||||
merge_group:
|
||||
|
||||
jobs:
|
||||
health-check:
|
||||
name: "Perform Nix flake checks"
|
||||
|
4
.github/workflows/flake-update.yml
vendored
4
.github/workflows/flake-update.yml
vendored
@ -65,7 +65,6 @@ jobs:
|
||||
|
||||
[1]: https://nayeonie.com/ahuston-0/nix-dotfiles/src/branch/main/.github/workflows/flake-update.yml
|
||||
[2]: https://forgejo.stefka.eu/jiriks74/create-pull-request
|
||||
|
||||
- name: Generate PR body
|
||||
uses: pedrolamas/handlebars-action@v2.4.0 # v2.4.0
|
||||
with:
|
||||
@ -76,7 +75,6 @@ jobs:
|
||||
uses: juliangruber/read-file-action@v1
|
||||
with:
|
||||
path: "pr_body.md"
|
||||
|
||||
- name: Remove temporary files
|
||||
run: |
|
||||
rm pr_body.template
|
||||
@ -84,7 +82,6 @@ jobs:
|
||||
rm pre.json
|
||||
rm post.json
|
||||
rm post-diff
|
||||
|
||||
- name: Create Pull Request
|
||||
id: create-pull-request
|
||||
# uses: https://forgejo.stefka.eu/jiriks74/create-pull-request@7174d368c2e4450dea17b297819eb28ae93ee645
|
||||
@ -98,7 +95,6 @@ jobs:
|
||||
automated: Update `flake.lock`
|
||||
|
||||
${{ steps.pr_body.outputs.content }}
|
||||
|
||||
branch: update-flake-lock
|
||||
delete-branch: true
|
||||
pr-labels: | # Labels to be set on the PR
|
||||
|
1
.github/workflows/lock-health-checks.yml
vendored
1
.github/workflows/lock-health-checks.yml
vendored
@ -5,7 +5,6 @@ on:
|
||||
pull_request:
|
||||
branches: ["main"]
|
||||
merge_group:
|
||||
|
||||
jobs:
|
||||
health-check:
|
||||
name: "Check health of `flake.lock`"
|
||||
|
1
.github/workflows/nix-fmt.yml
vendored
1
.github/workflows/nix-fmt.yml
vendored
@ -5,7 +5,6 @@ on:
|
||||
pull_request:
|
||||
branches: ["main"]
|
||||
merge_group:
|
||||
|
||||
jobs:
|
||||
health-check:
|
||||
name: "Perform Nix format checks"
|
||||
|
@ -1,7 +1,6 @@
|
||||
keys:
|
||||
# The PGP keys in keys/
|
||||
- &admin_alice 5EFFB75F7C9B74EAA5C4637547940175096C1330
|
||||
|
||||
# Generate AGE keys from SSH keys with:
|
||||
# ssh-keygen -A
|
||||
# nix-shell -p ssh-to-age --run 'cat /etc/ssh/ssh_host_ed25519_key.pub | ssh-to-age'
|
||||
@ -11,10 +10,8 @@ keys:
|
||||
#- &palatine-hill age1z8q02wdp0a2ep5uuffgfeqlfam4ztl95frhw5qhnn6knn0rrmcnqk5evej
|
||||
- &palatine-hill age1qw5k8h72k3fjg5gmlxx8q8gwlc2k6n6u08d8hdzpm2pk9r0fnfxsmw33nh
|
||||
# cspell:enable
|
||||
|
||||
servers: &servers
|
||||
- *palatine-hill
|
||||
|
||||
# add new users by executing: sops users/<user>/secrets.yaml
|
||||
# then have someone already in the repo run the below
|
||||
#
|
||||
@ -29,14 +26,12 @@ creation_rules:
|
||||
- *palatine-hill
|
||||
- *artemision
|
||||
- *artemision-home
|
||||
|
||||
- path_regex: systems/palatine-hill/secrets.*\.yaml$
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *admin_alice
|
||||
age:
|
||||
- *palatine-hill
|
||||
|
||||
- path_regex: systems/artemision/secrets.*\.yaml$
|
||||
key_groups:
|
||||
- pgp:
|
||||
|
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
@ -1,5 +1,7 @@
|
||||
{
|
||||
"cSpell.enableFiletypes": ["nix"],
|
||||
"cSpell.enableFiletypes": [
|
||||
"nix"
|
||||
],
|
||||
"cSpell.words": [
|
||||
"aarch",
|
||||
"abmlevel",
|
||||
|
@ -40,12 +40,12 @@ and will eventually trip a check when merging to main.
|
||||
| Branch Name | Use Case |
|
||||
|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| main | protected branch which all machines pull from, do not try to push directly |
|
||||
| feature/\<item\> | \<item\> is a new feature added to the repo, for personal or common use |
|
||||
| fixup/\<item\> | \<item\> is a non-urgent bug, PRs merging from these branches should be merged when possible, but are not considered mission-critical |
|
||||
| hotfix/\<item\> | \<item\> is a mission-critical bug, either affecting all users or a breaking change on a user's machines. These PRs should be reviewed ASAP. This is automatically subject to the [Critical Issues](#critical-issues) process |
|
||||
| urgent/\<item\> | Accepted as an alias for the above, due to dev's coming from multiple standards and the criticality of these issues |
|
||||
| exp/\<item\> | \<item\> is a non-critical experiment. This is used for shipping around potential new features or fixes to multiple branches |
|
||||
| merge/\<item\> | \<item\> is a temporary branch and should never be merged directly to main. This is solely used for addressing merge conflicts which are too complex to be merged directly on branch |
|
||||
| feature/\<item> | \<item> is a new feature added to the repo, for personal or common use |
|
||||
| fixup/\<item> | \<item> is a non-urgent bug, PRs merging from these branches should be merged when possible, but are not considered mission-critical |
|
||||
| hotfix/\<item> | \<item> is a mission-critical bug, either affecting all users or a breaking change on a user's machines. These PRs should be reviewed ASAP. This is automatically subject to the [Critical Issues](#critical-issues) process |
|
||||
| urgent/\<item> | Accepted as an alias for the above, due to dev's coming from multiple standards and the criticality of these issues |
|
||||
| exp/\<item> | \<item> is a non-critical experiment. This is used for shipping around potential new features or fixes to multiple branches |
|
||||
| merge/\<item> | \<item> is a temporary branch and should never be merged directly to main. This is solely used for addressing merge conflicts which are too complex to be merged directly on branch |
|
||||
|
||||
### Review Process
|
||||
|
||||
|
@ -54,8 +54,6 @@ if [ $PROCEED != "Y" ]; then
|
||||
lsblk -ao NAME,FSTYPE,FSSIZE,FSUSED,SIZE,MOUNTPOINT
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [ $CREATEPARTS = "Y" ]; then
|
||||
# Create partition table
|
||||
sudo parted "/dev/$DRIVE" -- mklabel gpt
|
||||
|
@ -6,7 +6,7 @@ outdated_msg="Project code is out of date and needs to be upgraded. To remedy th
|
||||
label="$1"
|
||||
label_val="$2"
|
||||
|
||||
if (( $# != 2 )); then
|
||||
if (($# != 2)); then
|
||||
echo "usage: $0 label label_value"
|
||||
fi
|
||||
|
||||
|
18
treefmt.toml
18
treefmt.toml
@ -12,3 +12,21 @@ command = "nixfmt"
|
||||
#options = []
|
||||
# Glob pattern of files to include
|
||||
includes = [ "*.nix" ]
|
||||
|
||||
[formatter.jsonfmt]
|
||||
command = "jsonfmt"
|
||||
excludes = []
|
||||
includes = ["*.json"]
|
||||
options = ["-w"]
|
||||
|
||||
[formatter.shfmt]
|
||||
command = "shfmt"
|
||||
excludes = []
|
||||
includes = ["*.sh", "*.bash", "*.envrc", "*.envrc.*"]
|
||||
options = ["-i", "2", "-s", "-w"]
|
||||
|
||||
[formatter.yamlfmt]
|
||||
command = "yamlfmt"
|
||||
excludes = []
|
||||
includes = ["*.yaml", "*.yml"]
|
||||
options = ["-formatter","indent=4"]
|
||||
|
@ -11,18 +11,16 @@ set -e
|
||||
# | jq 'map(.key) | join("\n")' | sed -E -e 's/\\n/\n/g;s/^"//g;s/"$//g')
|
||||
|
||||
# retrieve all paths
|
||||
nix_paths=$(nix path-info --json --all --closure-size \
|
||||
| jq 'map_values(.closureSize | select(true)) | to_entries | sort_by(.value)' \
|
||||
| jq 'map(.key) | join("\n")' | sed -E -e 's/\\n/\n/g;s/^"//g;s/"$//g')
|
||||
|
||||
nix_paths=$(nix path-info --json --all --closure-size |
|
||||
jq 'map_values(.closureSize | select(true)) | to_entries | sort_by(.value)' |
|
||||
jq 'map(.key) | join("\n")' | sed -E -e 's/\\n/\n/g;s/^"//g;s/"$//g')
|
||||
|
||||
readarray -t nix_path_array < <(echo "$nix_paths")
|
||||
|
||||
batchsize=1000
|
||||
|
||||
for((i=0; i < ${#nix_path_array[@]}; i+=batchsize))
|
||||
do
|
||||
part=( "${nix_path_array[@]:i:batchsize}" )
|
||||
for ((i = 0; i < ${#nix_path_array[@]}; i += batchsize)); do
|
||||
part=("${nix_path_array[@]:i:batchsize}")
|
||||
|
||||
attic push nix-cache "${part[@]}"
|
||||
done
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if (( $# != 3 )); then
|
||||
if (($# != 3)); then
|
||||
echo "usage: $0 <cache/cache group> <cache pattern> <token type>"
|
||||
exit 1
|
||||
fi
|
||||
@ -10,25 +10,25 @@ cache_pattern="$2"
|
||||
token_type="$3"
|
||||
|
||||
case $token_type in
|
||||
"cache-creator")
|
||||
"cache-creator")
|
||||
atticd-atticadm make-token --sub "$cache-cache-creator" --validity "1y" \
|
||||
--pull "$cache_pattern" --push "$cache_pattern" --delete "$cache_pattern" \
|
||||
--create-cache "$cache_pattern" --configure-cache "$cache_pattern" \
|
||||
--configure-cache-retention "$cache_pattern" --destroy-cache "$cache_pattern"
|
||||
;;
|
||||
"admin")
|
||||
"admin")
|
||||
atticd-atticadm make-token --sub "$cache-admin" --validity "1y" --pull "$cache_pattern" \
|
||||
--push "$cache_pattern" --configure-cache "$cache_pattern" \
|
||||
--configure-cache-retention "$cache_pattern"
|
||||
;;
|
||||
"writer")
|
||||
"writer")
|
||||
atticd-atticadm make-token --sub "$cache-writer" --validity "1y" --pull "$cache_pattern" \
|
||||
--push "$cache_pattern"
|
||||
;;
|
||||
"reader")
|
||||
"reader")
|
||||
atticd-atticadm make-token --sub "$cache-reader" --validity "1y" --pull "$cache_pattern"
|
||||
;;
|
||||
*)
|
||||
*)
|
||||
echo "invalid token type: $token_type"
|
||||
echo "available options: cache-creator, admin, writer, reader"
|
||||
exit 1
|
||||
|
@ -18,6 +18,6 @@ images=(
|
||||
)
|
||||
IFS=","
|
||||
while read -r name tag arch os relpath; do
|
||||
nix-prefetch-docker --image-name "$name" --image-tag "$tag" --arch "$arch" --os "$os" --quiet > "$parent_path/$relpath"
|
||||
nix-prefetch-docker --image-name "$name" --image-tag "$tag" --arch "$arch" --os "$os" --quiet >"$parent_path/$relpath"
|
||||
git --no-pager diff "$parent_path/$relpath"
|
||||
done<<< "${images[@]}"
|
||||
done <<<"${images[@]}"
|
||||
|
@ -2,7 +2,10 @@
|
||||
|
||||
# Rename CLI parameters to friendlier names
|
||||
# https://git-scm.com/docs/gitattributes#_defining_a_custom_merge_driver
|
||||
base="$1"; local_="$2"; remote="$3"; merged="$4"
|
||||
base="$1"
|
||||
local_="$2"
|
||||
remote="$3"
|
||||
merged="$4"
|
||||
|
||||
# Load the mergetool scripts
|
||||
TOOL_MODE=merge
|
||||
@ -20,7 +23,7 @@ merged_decrypted="${base_decrypted/_BASE_/_MERGED_}"
|
||||
backup_decrypted="${base_decrypted/_BASE_/_BACKUP_}"
|
||||
|
||||
# If anything goes wrong, then delete our decrypted files
|
||||
handle_trap_exit () {
|
||||
handle_trap_exit() {
|
||||
rm $base_decrypted || true
|
||||
rm $local_decrypted || true
|
||||
rm $remote_decrypted || true
|
||||
@ -30,12 +33,12 @@ handle_trap_exit () {
|
||||
trap handle_trap_exit EXIT
|
||||
|
||||
# Decrypt our file contents
|
||||
sops --decrypt --show-master-keys "$base" > "$base_decrypted"
|
||||
sops --decrypt --show-master-keys "$local_" > "$local_decrypted"
|
||||
sops --decrypt --show-master-keys "$remote" > "$remote_decrypted"
|
||||
sops --decrypt --show-master-keys "$base" >"$base_decrypted"
|
||||
sops --decrypt --show-master-keys "$local_" >"$local_decrypted"
|
||||
sops --decrypt --show-master-keys "$remote" >"$remote_decrypted"
|
||||
|
||||
# Create a merge-diff to compare against
|
||||
git merge-file -p "$local_decrypted" "$base_decrypted" "$remote_decrypted" > "$merged_decrypted"
|
||||
git merge-file -p "$local_decrypted" "$base_decrypted" "$remote_decrypted" >"$merged_decrypted"
|
||||
cp "$merged_decrypted" "$backup_decrypted"
|
||||
|
||||
# Set up variables for the mergetool
|
||||
@ -48,7 +51,7 @@ MERGED="$merged_decrypted"
|
||||
BACKUP="$backup_decrypted"
|
||||
|
||||
# Override `check_unchanged` with a custom script
|
||||
check_unchanged () {
|
||||
check_unchanged() {
|
||||
# If the contents haven't changed, then fail
|
||||
if test "$MERGED" -nt "$BACKUP"; then
|
||||
return 0
|
||||
@ -61,5 +64,4 @@ check_unchanged () {
|
||||
run_merge_tool "${mergetool}" true
|
||||
|
||||
# Re-encrypt content
|
||||
sops --encrypt "$merged_decrypted" > "$merged"
|
||||
|
||||
sops --encrypt "$merged_decrypted" >"$merged"
|
||||
|
@ -6,7 +6,10 @@ set -x
|
||||
|
||||
# Rename our variables to friendlier equivalents
|
||||
# https://git-scm.com/docs/gitattributes#_defining_a_custom_merge_driver
|
||||
base="$1"; local_="$2"; remote="$3"; merged="$4"
|
||||
base="$1"
|
||||
local_="$2"
|
||||
remote="$3"
|
||||
merged="$4"
|
||||
|
||||
echo "$base"
|
||||
echo "$local_"
|
||||
@ -18,7 +21,7 @@ echo "$merged"
|
||||
mergetool="$(git config --get merge.tool)"
|
||||
GIT_DIR="$(git --exec-path)"
|
||||
if test "$mergetool" = ""; then
|
||||
echo "No default \`merge.tool\` was set for \`git\`. Please set one via \`git config --set merge.tool <tool>\`" 1>&2
|
||||
echo 'No default `merge.tool` was set for `git`. Please set one via `git config --set merge.tool <tool>`' 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -32,7 +35,7 @@ merged_decrypted="${base_decrypted/_BASE_/_MERGED_}"
|
||||
backup_decrypted="${base_decrypted/_BASE_/_BACKUP_}"
|
||||
|
||||
# If anything goes wrong, then delete our decrypted files
|
||||
handle_trap_exit () {
|
||||
handle_trap_exit() {
|
||||
rm $base_decrypted || true
|
||||
rm $local_decrypted || true
|
||||
rm $remote_decrypted || true
|
||||
@ -42,13 +45,13 @@ handle_trap_exit () {
|
||||
trap handle_trap_exit EXIT
|
||||
|
||||
# Decrypt our file contents
|
||||
sops --decrypt --show-master-keys "$base" > "$base_decrypted"
|
||||
sops --decrypt --show-master-keys "$local_" > "$local_decrypted"
|
||||
sops --decrypt --show-master-keys "$remote" > "$remote_decrypted"
|
||||
sops --decrypt --show-master-keys "$base" >"$base_decrypted"
|
||||
sops --decrypt --show-master-keys "$local_" >"$local_decrypted"
|
||||
sops --decrypt --show-master-keys "$remote" >"$remote_decrypted"
|
||||
|
||||
# Create a merge-diff to compare against
|
||||
set +e
|
||||
git merge-file -p "$local_decrypted" "$base_decrypted" "$remote_decrypted" > "$merged_decrypted"
|
||||
git merge-file -p "$local_decrypted" "$base_decrypted" "$remote_decrypted" >"$merged_decrypted"
|
||||
set -e
|
||||
cp "$merged_decrypted" "$backup_decrypted"
|
||||
|
||||
@ -66,7 +69,7 @@ source "$GIT_DIR/git-mergetool--lib"
|
||||
source "$GIT_DIR/mergetools/$mergetool"
|
||||
|
||||
# Override `check_unchanged` with a custom script
|
||||
check_unchanged () {
|
||||
check_unchanged() {
|
||||
# If the contents haven't changed, then fail
|
||||
if test "$MERGED" -nt "$BACKUP"; then
|
||||
return 0
|
||||
@ -82,5 +85,4 @@ merge_cmd
|
||||
set -eu
|
||||
|
||||
# Re-encrypt content
|
||||
sops --encrypt "$merged_decrypted" > "$merged"
|
||||
|
||||
sops --encrypt "$merged_decrypted" >"$merged"
|
||||
|
Loading…
x
Reference in New Issue
Block a user