Compare commits
17 Commits
fd6b2f0508
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
| ca7a254a45 | |||
| b887dcf9a2 | |||
| 752c69d313 | |||
| 3cdef5f330 | |||
| 515519d8e3 | |||
| 2f77549285 | |||
| 4aa6aa5f1c | |||
| 3bd14b4479 | |||
| 51b9d97cd1 | |||
| f5646aa790 | |||
| d74ff3fb05 | |||
| 5bfb471047 | |||
| 5e21664124 | |||
| 6f4e3d6444 | |||
| 6efa23d145 | |||
| 2ebdafd916 | |||
| 0a625747e5 |
@@ -1,20 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
: "${BRANCH:?BRANCH is required}"
|
|
||||||
: "${FILE:?FILE is required}"
|
|
||||||
: "${COMMIT_MESSAGE:?COMMIT_MESSAGE is required}"
|
|
||||||
|
|
||||||
git config user.name "gitea actions"
|
|
||||||
git config user.email "actions@localhost"
|
|
||||||
|
|
||||||
git checkout -B "$BRANCH"
|
|
||||||
git add "$FILE"
|
|
||||||
|
|
||||||
if git diff --cached --quiet; then
|
|
||||||
echo "No staged changes for ${FILE}; skipping commit"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
git commit -m "$COMMIT_MESSAGE"
|
|
||||||
git push --force origin "$BRANCH"
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
: "${GITEA_API:?GITEA_API is required}"
|
|
||||||
: "${GITEA_TOKEN:?GITEA_TOKEN is required}"
|
|
||||||
: "${BRANCH:?BRANCH is required}"
|
|
||||||
: "${TITLE:?TITLE is required}"
|
|
||||||
: "${BODY:?BODY is required}"
|
|
||||||
|
|
||||||
owner_prefix="${HEAD_OWNER_PREFIX:-thomas}"
|
|
||||||
|
|
||||||
existing=$(curl -fsS \
|
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
|
||||||
"${GITEA_API}/pulls?state=open" \
|
|
||||||
| python -c 'import json,sys,os; d=json.load(sys.stdin); b=os.environ["BRANCH"]; print(next((str(pr["number"]) for pr in d if isinstance(pr,dict) and pr.get("head",{}).get("ref")==b), ""))')
|
|
||||||
|
|
||||||
if [ -n "$existing" ]; then
|
|
||||||
echo "PR already exists: #$existing"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Creating PR..."
|
|
||||||
created="false"
|
|
||||||
for head in "${BRANCH}" "${owner_prefix}:${BRANCH}"; do
|
|
||||||
echo "Trying head=${head}"
|
|
||||||
payload=$(HEAD_REF="$head" TITLE="$TITLE" BODY="$BODY" python -c 'import json,os; print(json.dumps({"title": os.environ["TITLE"], "head": os.environ["HEAD_REF"], "base": "main", "body": os.environ["BODY"]}))')
|
|
||||||
response=$(curl -sS -w '\n%{http_code}' -X POST \
|
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
"${GITEA_API}/pulls" \
|
|
||||||
-d "$payload")
|
|
||||||
|
|
||||||
body=$(printf '%s\n' "$response" | sed '$d')
|
|
||||||
code=$(printf '%s\n' "$response" | tail -n1)
|
|
||||||
|
|
||||||
echo "Create PR status: $code"
|
|
||||||
echo "$body"
|
|
||||||
|
|
||||||
if [ "$code" -ge 200 ] && [ "$code" -lt 300 ]; then
|
|
||||||
created="true"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ "$created" != "true" ]; then
|
|
||||||
echo "PR creation failed"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
: "${FILE:?FILE is required}"
|
|
||||||
: "${LATEST_RELEASE_URL:?LATEST_RELEASE_URL is required}"
|
|
||||||
: "${DOWNLOAD_URL_TEMPLATE:?DOWNLOAD_URL_TEMPLATE is required}"
|
|
||||||
|
|
||||||
if command -v python >/dev/null 2>&1; then
|
|
||||||
PYTHON_BIN=python
|
|
||||||
elif command -v python3 >/dev/null 2>&1; then
|
|
||||||
PYTHON_BIN=python3
|
|
||||||
else
|
|
||||||
echo "python is required but was not found"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
version_strip_prefix="${LATEST_VERSION_STRIP_PREFIX:-v}"
|
|
||||||
release_tag_template="${RELEASE_TAG_TEMPLATE:-{version}}"
|
|
||||||
release_tag_template="${release_tag_template//$'\r'/}"
|
|
||||||
|
|
||||||
current_version=$($PYTHON_BIN - <<'PY'
|
|
||||||
import re
|
|
||||||
import os
|
|
||||||
p=os.environ["FILE"]
|
|
||||||
s=open(p).read()
|
|
||||||
m=re.search(r'version\s*=\s*"([^"]+)";', s)
|
|
||||||
print(m.group(1) if m else "")
|
|
||||||
PY
|
|
||||||
)
|
|
||||||
|
|
||||||
latest_version=$(curl -fsSLI -o /dev/null -w '%{url_effective}' "$LATEST_RELEASE_URL" \
|
|
||||||
| sed -E 's#.*/##')
|
|
||||||
|
|
||||||
if [ -n "$version_strip_prefix" ]; then
|
|
||||||
latest_version="${latest_version#${version_strip_prefix}}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "current=$current_version"
|
|
||||||
echo "latest=$latest_version"
|
|
||||||
|
|
||||||
if [ -z "$latest_version" ] || [ "$latest_version" = "$current_version" ]; then
|
|
||||||
echo "updated=false" >> "$GITHUB_OUTPUT"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
download_url="${DOWNLOAD_URL_TEMPLATE//\{version\}/$latest_version}"
|
|
||||||
new_hash=$(nix store prefetch-file --json "$download_url" | "$PYTHON_BIN" -c 'import json,sys; print(json.load(sys.stdin)["hash"])')
|
|
||||||
|
|
||||||
export LATEST_VERSION="$latest_version"
|
|
||||||
export NEW_HASH="$new_hash"
|
|
||||||
|
|
||||||
"$PYTHON_BIN" - <<'PY'
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
p=os.environ["FILE"]
|
|
||||||
s=open(p).read()
|
|
||||||
s=re.sub(r'version\s*=\s*"[^"]+"', f'version = "{os.environ["LATEST_VERSION"]}"', s, count=1)
|
|
||||||
s=re.sub(r'hash\s*=\s*"[^"]+"', f'hash = "{os.environ["NEW_HASH"]}"', s, count=1)
|
|
||||||
open(p,"w").write(s)
|
|
||||||
PY
|
|
||||||
|
|
||||||
release_tag="${release_tag_template//\{version\}/$latest_version}"
|
|
||||||
release_tag="${release_tag#\{}"
|
|
||||||
release_tag="${release_tag%\}}"
|
|
||||||
release_tag="${release_tag#\'}"
|
|
||||||
release_tag="${release_tag%\'}"
|
|
||||||
release_url="${LATEST_RELEASE_URL%/latest}/tag/${release_tag}"
|
|
||||||
|
|
||||||
echo "updated=true" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "version=$latest_version" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "previous_version=$current_version" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "release_url=$release_url" >> "$GITHUB_OUTPUT"
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
name: handy update
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: "40 6 * * *"
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update-handy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: install nix
|
|
||||||
uses: cachix/install-nix-action@v27
|
|
||||||
with:
|
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
|
||||||
|
|
||||||
- name: check latest handy release and update file
|
|
||||||
id: update
|
|
||||||
env:
|
|
||||||
FILE: modules/pkgs/handy.nix
|
|
||||||
LATEST_RELEASE_URL: https://github.com/cjpais/Handy/releases/latest
|
|
||||||
DOWNLOAD_URL_TEMPLATE: https://github.com/cjpais/Handy/releases/download/v{version}/Handy_{version}_amd64.AppImage
|
|
||||||
RELEASE_TAG_TEMPLATE: v{version}
|
|
||||||
shell: bash
|
|
||||||
run: bash .gitea/scripts/update-appimage-nix.sh
|
|
||||||
|
|
||||||
- name: create branch and commit
|
|
||||||
if: steps.update.outputs.updated == 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
version="${{ steps.update.outputs.version }}"
|
|
||||||
|
|
||||||
BRANCH="bot/handy-${version}" \
|
|
||||||
FILE="modules/pkgs/handy.nix" \
|
|
||||||
COMMIT_MESSAGE="update handy to ${version}" \
|
|
||||||
bash .gitea/scripts/commit-update.sh
|
|
||||||
|
|
||||||
- name: open pull request
|
|
||||||
if: steps.update.outputs.updated == 'true'
|
|
||||||
env:
|
|
||||||
GITEA_TOKEN: ${{ secrets.tea_token || secrets.TEA_TOKEN }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
version="${{ steps.update.outputs.version }}"
|
|
||||||
previous_version="${{ steps.update.outputs.previous_version }}"
|
|
||||||
release_url="${{ steps.update.outputs.release_url }}"
|
|
||||||
|
|
||||||
pr_body=$(cat <<EOF
|
|
||||||
automated update of handy appimage version and hash
|
|
||||||
|
|
||||||
## changelog
|
|
||||||
from \`${previous_version}\` to \`${version}\`
|
|
||||||
|
|
||||||
upstream release: ${release_url}
|
|
||||||
EOF
|
|
||||||
)
|
|
||||||
|
|
||||||
GITEA_API="https://gitea.unrail.xyz/api/v1/repos/thomas/nixos-config" \
|
|
||||||
BRANCH="bot/handy-${version}" \
|
|
||||||
TITLE="update handy to ${version}" \
|
|
||||||
BODY="$pr_body" \
|
|
||||||
bash .gitea/scripts/create-gitea-pr.sh
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
name: helium update
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: "0 6 * * *"
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update-helium:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: install nix
|
|
||||||
uses: cachix/install-nix-action@v27
|
|
||||||
with:
|
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
|
||||||
|
|
||||||
- name: check latest helium release and update file
|
|
||||||
id: update
|
|
||||||
env:
|
|
||||||
FILE: modules/pkgs/helium.nix
|
|
||||||
LATEST_RELEASE_URL: https://github.com/imputnet/helium-linux/releases/latest
|
|
||||||
DOWNLOAD_URL_TEMPLATE: https://github.com/imputnet/helium-linux/releases/download/{version}/helium-{version}-x86_64.AppImage
|
|
||||||
RELEASE_TAG_TEMPLATE: '{version}'
|
|
||||||
shell: bash
|
|
||||||
run: bash .gitea/scripts/update-appimage-nix.sh
|
|
||||||
|
|
||||||
- name: create branch and commit
|
|
||||||
if: steps.update.outputs.updated == 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
version="${{ steps.update.outputs.version }}"
|
|
||||||
|
|
||||||
BRANCH="bot/helium-${version}" \
|
|
||||||
FILE="modules/pkgs/helium.nix" \
|
|
||||||
COMMIT_MESSAGE="update helium to ${version}" \
|
|
||||||
bash .gitea/scripts/commit-update.sh
|
|
||||||
|
|
||||||
- name: open pull request
|
|
||||||
if: steps.update.outputs.updated == 'true'
|
|
||||||
env:
|
|
||||||
GITEA_TOKEN: ${{ secrets.tea_token || secrets.TEA_TOKEN }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
version="${{ steps.update.outputs.version }}"
|
|
||||||
previous_version="${{ steps.update.outputs.previous_version }}"
|
|
||||||
release_url="${{ steps.update.outputs.release_url }}"
|
|
||||||
|
|
||||||
pr_body=$(cat <<EOF
|
|
||||||
automated update of helium appimage version and hash
|
|
||||||
|
|
||||||
## changelog
|
|
||||||
from \`${previous_version}\` to \`${version}\`
|
|
||||||
|
|
||||||
upstream release: ${release_url}
|
|
||||||
EOF
|
|
||||||
)
|
|
||||||
|
|
||||||
GITEA_API="https://gitea.unrail.xyz/api/v1/repos/thomas/nixos-config" \
|
|
||||||
BRANCH="bot/helium-${version}" \
|
|
||||||
TITLE="update helium to ${version}" \
|
|
||||||
BODY="$pr_body" \
|
|
||||||
bash .gitea/scripts/create-gitea-pr.sh
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
name: t3code update
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: "50 6 * * *"
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update-t3code:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: install nix
|
|
||||||
uses: cachix/install-nix-action@v27
|
|
||||||
with:
|
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
|
||||||
|
|
||||||
- name: check latest t3code release and update file
|
|
||||||
id: update
|
|
||||||
env:
|
|
||||||
FILE: modules/pkgs/t3code.nix
|
|
||||||
LATEST_RELEASE_URL: https://github.com/pingdotgg/t3code/releases/latest
|
|
||||||
DOWNLOAD_URL_TEMPLATE: https://github.com/pingdotgg/t3code/releases/download/v{version}/T3-Code-{version}-x86_64.AppImage
|
|
||||||
RELEASE_TAG_TEMPLATE: v{version}
|
|
||||||
shell: bash
|
|
||||||
run: bash .gitea/scripts/update-appimage-nix.sh
|
|
||||||
|
|
||||||
- name: create branch and commit
|
|
||||||
if: steps.update.outputs.updated == 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
version="${{ steps.update.outputs.version }}"
|
|
||||||
|
|
||||||
BRANCH="bot/t3code-${version}" \
|
|
||||||
FILE="modules/pkgs/t3code.nix" \
|
|
||||||
COMMIT_MESSAGE="update t3code to ${version}" \
|
|
||||||
bash .gitea/scripts/commit-update.sh
|
|
||||||
|
|
||||||
- name: open pull request
|
|
||||||
if: steps.update.outputs.updated == 'true'
|
|
||||||
env:
|
|
||||||
GITEA_TOKEN: ${{ secrets.tea_token || secrets.TEA_TOKEN }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
version="${{ steps.update.outputs.version }}"
|
|
||||||
previous_version="${{ steps.update.outputs.previous_version }}"
|
|
||||||
release_url="${{ steps.update.outputs.release_url }}"
|
|
||||||
|
|
||||||
pr_body=$(cat <<EOF
|
|
||||||
automated update of t3code appimage version and hash
|
|
||||||
|
|
||||||
## changelog
|
|
||||||
from \`${previous_version}\` to \`${version}\`
|
|
||||||
|
|
||||||
upstream release: ${release_url}
|
|
||||||
EOF
|
|
||||||
)
|
|
||||||
|
|
||||||
GITEA_API="https://gitea.unrail.xyz/api/v1/repos/thomas/nixos-config" \
|
|
||||||
BRANCH="bot/t3code-${version}" \
|
|
||||||
TITLE="update t3code to ${version}" \
|
|
||||||
BODY="$pr_body" \
|
|
||||||
bash .gitea/scripts/create-gitea-pr.sh
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
name: zen browser update
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: "20 6 * * *"
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update-zen-browser:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: install nix
|
|
||||||
uses: cachix/install-nix-action@v27
|
|
||||||
with:
|
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
|
||||||
|
|
||||||
- name: check latest zen browser release and update file
|
|
||||||
id: update
|
|
||||||
env:
|
|
||||||
FILE: modules/pkgs/zen-browser.nix
|
|
||||||
LATEST_RELEASE_URL: https://github.com/zen-browser/desktop/releases/latest
|
|
||||||
DOWNLOAD_URL_TEMPLATE: https://github.com/zen-browser/desktop/releases/download/{version}/zen-x86_64.AppImage
|
|
||||||
RELEASE_TAG_TEMPLATE: '{version}'
|
|
||||||
shell: bash
|
|
||||||
run: bash .gitea/scripts/update-appimage-nix.sh
|
|
||||||
|
|
||||||
- name: create branch and commit
|
|
||||||
if: steps.update.outputs.updated == 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
version="${{ steps.update.outputs.version }}"
|
|
||||||
|
|
||||||
BRANCH="bot/zen-browser-${version}" \
|
|
||||||
FILE="modules/pkgs/zen-browser.nix" \
|
|
||||||
COMMIT_MESSAGE="update zen browser to ${version}" \
|
|
||||||
bash .gitea/scripts/commit-update.sh
|
|
||||||
|
|
||||||
- name: open pull request
|
|
||||||
if: steps.update.outputs.updated == 'true'
|
|
||||||
env:
|
|
||||||
GITEA_TOKEN: ${{ secrets.tea_token || secrets.TEA_TOKEN }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
version="${{ steps.update.outputs.version }}"
|
|
||||||
previous_version="${{ steps.update.outputs.previous_version }}"
|
|
||||||
release_url="${{ steps.update.outputs.release_url }}"
|
|
||||||
|
|
||||||
pr_body=$(cat <<EOF
|
|
||||||
automated update of zen browser appimage version and hash
|
|
||||||
|
|
||||||
## changelog
|
|
||||||
from \`${previous_version}\` to \`${version}\`
|
|
||||||
|
|
||||||
upstream release: ${release_url}
|
|
||||||
EOF
|
|
||||||
)
|
|
||||||
|
|
||||||
GITEA_API="https://gitea.unrail.xyz/api/v1/repos/thomas/nixos-config" \
|
|
||||||
BRANCH="bot/zen-browser-${version}" \
|
|
||||||
TITLE="update zen browser to ${version}" \
|
|
||||||
BODY="$pr_body" \
|
|
||||||
bash .gitea/scripts/create-gitea-pr.sh
|
|
||||||
Generated
+34
-7
@@ -50,11 +50,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772408722,
|
"lastModified": 1775087534,
|
||||||
"narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=",
|
"narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3",
|
"rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -185,11 +185,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1774106199,
|
"lastModified": 1775710090,
|
||||||
"narHash": "sha256-US5Tda2sKmjrg2lNHQL3jRQ6p96cgfWh3J1QBliQ8Ws=",
|
"narHash": "sha256-ar3rofg+awPB8QXDaFJhJ2jJhu+KqN/PRCXeyuXR76E=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "6c9a78c09ff4d6c21d0319114873508a6ec01655",
|
"rev": "4c1018dae018162ec878d42fec712642d214fdfa",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -206,7 +206,8 @@
|
|||||||
"gsf": "gsf",
|
"gsf": "gsf",
|
||||||
"import-tree": "import-tree",
|
"import-tree": "import-tree",
|
||||||
"maccel": "maccel",
|
"maccel": "maccel",
|
||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_3",
|
||||||
|
"thomas-pkgs": "thomas-pkgs"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
@@ -238,6 +239,32 @@
|
|||||||
"repo": "default",
|
"repo": "default",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"thomas-pkgs": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-parts": [
|
||||||
|
"flake-parts"
|
||||||
|
],
|
||||||
|
"import-tree": [
|
||||||
|
"import-tree"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1776256561,
|
||||||
|
"narHash": "sha256-Nd4NEBweLpk9xhw6YT97moPRw72TqUkYLkqF3Q6EdPU=",
|
||||||
|
"ref": "refs/heads/main",
|
||||||
|
"rev": "a7195da8e85f8b965f81e082b243f8f038482de2",
|
||||||
|
"revCount": 7,
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://gitea.unrail.xyz/thomas/thomas-likes-nix-pkgs"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://gitea.unrail.xyz/thomas/thomas-likes-nix-pkgs"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|||||||
@@ -12,6 +12,13 @@
|
|||||||
agenix.url = "github:ryantm/agenix";
|
agenix.url = "github:ryantm/agenix";
|
||||||
maccel.url = "github:Gnarus-G/maccel";
|
maccel.url = "github:Gnarus-G/maccel";
|
||||||
gsf.url = "git+https://gitea.unrail.xyz/thomas/gotta-scroll-fast";
|
gsf.url = "git+https://gitea.unrail.xyz/thomas/gotta-scroll-fast";
|
||||||
|
|
||||||
|
thomas-pkgs = {
|
||||||
|
url = "git+https://gitea.unrail.xyz/thomas/thomas-likes-nix-pkgs";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
inputs.flake-parts.follows = "flake-parts";
|
||||||
|
inputs.import-tree.follows = "import-tree";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
{
|
{
|
||||||
inputs,
|
inputs,
|
||||||
self,
|
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
flake.nixosModules.browsers = {pkgs, ...}: {
|
flake.nixosModules.browsers = {pkgs, ...}: {
|
||||||
programs.firefox.enable = true;
|
programs.firefox.enable = true;
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
self.packages.${pkgs.stdenv.hostPlatform.system}.zen-browser
|
inputs.thomas-pkgs.packages.${pkgs.stdenv.hostPlatform.system}.zen-browser
|
||||||
self.packages.${pkgs.stdenv.hostPlatform.system}.helium
|
inputs.thomas-pkgs.packages.${pkgs.stdenv.hostPlatform.system}.helium
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,8 +18,11 @@ in {
|
|||||||
lazygit
|
lazygit
|
||||||
pnpm
|
pnpm
|
||||||
ni
|
ni
|
||||||
|
|
||||||
|
# AI
|
||||||
code-cursor-fhs
|
code-cursor-fhs
|
||||||
codex
|
codex
|
||||||
|
cursor-cli
|
||||||
|
|
||||||
# LSPs and formatters (previously via Mason)
|
# LSPs and formatters (previously via Mason)
|
||||||
stylua
|
stylua
|
||||||
|
|||||||
+10
-9
@@ -1,10 +1,11 @@
|
|||||||
{ inputs, ... }: {
|
{...}: {
|
||||||
flake.nixosModules.fonts = {pkgs, ...}: {
|
flake.nixosModules.fonts = {pkgs, ...}: {
|
||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
nerd-fonts.iosevka-term-slab
|
nerd-fonts.iosevka-term-slab
|
||||||
nerd-fonts.iosevka
|
nerd-fonts.iosevka
|
||||||
nerd-fonts.fira-mono
|
nerd-fonts.fira-mono
|
||||||
nerd-fonts.fira-code
|
nerd-fonts.fira-code
|
||||||
];
|
nerd-fonts.proggy-clean-tt
|
||||||
};
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
+45
-4
@@ -32,7 +32,18 @@ in {
|
|||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
# Custom EDID override for Samsung 240Hz on DP-1
|
# Custom EDID override for Samsung 240Hz on DP-1
|
||||||
boot.kernelParams = ["drm.edid_firmware=DP-1:edid/g80.bin"];
|
# Extreme mt7921e fallback: disable PCIe ASPM globally
|
||||||
|
boot.kernelParams = [
|
||||||
|
"drm.edid_firmware=DP-1:edid/g80.bin"
|
||||||
|
"pcie_aspm=off"
|
||||||
|
];
|
||||||
|
|
||||||
|
# mt7921e stability tweaks
|
||||||
|
boot.extraModprobeConfig = ''
|
||||||
|
options mt7921e disable_aspm=Y
|
||||||
|
options mt7921e disable_clc=Y
|
||||||
|
'';
|
||||||
|
|
||||||
hardware.firmware = [
|
hardware.firmware = [
|
||||||
(pkgs.runCommand "g80-edid-firmware" {} ''
|
(pkgs.runCommand "g80-edid-firmware" {} ''
|
||||||
install -Dm444 ${../assets/edid/g80.bin} $out/lib/firmware/edid/g80.bin
|
install -Dm444 ${../assets/edid/g80.bin} $out/lib/firmware/edid/g80.bin
|
||||||
@@ -43,7 +54,31 @@ in {
|
|||||||
networking.hostName = "nixos";
|
networking.hostName = "nixos";
|
||||||
|
|
||||||
# Networking
|
# Networking
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager = {
|
||||||
|
enable = true;
|
||||||
|
wifi.powersave = false;
|
||||||
|
settings.device."wifi.scan-rand-mac-address" = "no";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Work around mt7921e getting stuck after suspend/resume
|
||||||
|
environment.etc."systemd/system-sleep/99-mt7921e-reset" = {
|
||||||
|
text = ''
|
||||||
|
#!/bin/sh
|
||||||
|
case "$1" in
|
||||||
|
post)
|
||||||
|
${pkgs.kmod}/bin/modprobe -r mt7921e || true
|
||||||
|
${pkgs.kmod}/bin/modprobe mt7921e
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
'';
|
||||||
|
mode = "0755";
|
||||||
|
};
|
||||||
|
|
||||||
|
# LocalSend
|
||||||
|
networking.firewall = {
|
||||||
|
allowedTCPPorts = [53317];
|
||||||
|
allowedUDPPorts = [53317];
|
||||||
|
};
|
||||||
|
|
||||||
# WebHID/VIA access on Linux (VIA needs hidraw access)
|
# WebHID/VIA access on Linux (VIA needs hidraw access)
|
||||||
services.udev.extraRules = ''
|
services.udev.extraRules = ''
|
||||||
@@ -126,8 +161,14 @@ in {
|
|||||||
# Allow unfree
|
# Allow unfree
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
# Enable flakes
|
# Use Lix as the system Nix implementation
|
||||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
nix.package = pkgs.lixPackageSets.stable.lix;
|
||||||
|
|
||||||
|
# Enable flakes + restrict who can submit builds to the daemon
|
||||||
|
nix.settings = {
|
||||||
|
experimental-features = ["nix-command" "flakes"];
|
||||||
|
allowed-users = ["root" flakeConfig.username];
|
||||||
|
};
|
||||||
|
|
||||||
# Auto-unlock gnome-keyring on login
|
# Auto-unlock gnome-keyring on login
|
||||||
security.pam.services.login.enableGnomeKeyring = true;
|
security.pam.services.login.enableGnomeKeyring = true;
|
||||||
|
|||||||
+14
-4
@@ -1,4 +1,4 @@
|
|||||||
{self, ...}: {
|
{inputs, ...}: {
|
||||||
flake.nixosModules.packages = {pkgs, ...}: {
|
flake.nixosModules.packages = {pkgs, ...}: {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
fd
|
fd
|
||||||
@@ -6,6 +6,8 @@
|
|||||||
nerdfetch
|
nerdfetch
|
||||||
libnotify
|
libnotify
|
||||||
alacritty
|
alacritty
|
||||||
|
ghostty
|
||||||
|
foot
|
||||||
fzf
|
fzf
|
||||||
autojump
|
autojump
|
||||||
yazi
|
yazi
|
||||||
@@ -20,14 +22,22 @@
|
|||||||
feishin
|
feishin
|
||||||
obsidian
|
obsidian
|
||||||
nextcloud-client
|
nextcloud-client
|
||||||
self.packages.${pkgs.stdenv.hostPlatform.system}.handy
|
inputs.thomas-pkgs.packages.${pkgs.stdenv.hostPlatform.system}.handy
|
||||||
self.packages.${pkgs.stdenv.hostPlatform.system}.t3code
|
inputs.thomas-pkgs.packages.${pkgs.stdenv.hostPlatform.system}.t3code
|
||||||
mpv
|
mpv
|
||||||
ffmpeg
|
ffmpeg
|
||||||
tmux
|
tmux
|
||||||
obs-studio
|
obs-studio
|
||||||
jjui
|
jjui
|
||||||
bat
|
bat
|
||||||
|
localsend
|
||||||
|
# postman
|
||||||
|
bruno
|
||||||
|
bruno-cli
|
||||||
|
tenacity
|
||||||
|
inputs.thomas-pkgs.packages.${pkgs.stdenv.hostPlatform.system}.ocenaudio
|
||||||
|
jq
|
||||||
|
tldr
|
||||||
];
|
];
|
||||||
|
|
||||||
systemd.user.services.handy = {
|
systemd.user.services.handy = {
|
||||||
@@ -36,7 +46,7 @@
|
|||||||
partOf = ["graphical-session.target"];
|
partOf = ["graphical-session.target"];
|
||||||
after = ["graphical-session.target"];
|
after = ["graphical-session.target"];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${self.packages.${pkgs.stdenv.hostPlatform.system}.handy}/bin/handy";
|
ExecStart = "${inputs.thomas-pkgs.packages.${pkgs.stdenv.hostPlatform.system}.handy}/bin/handy";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = 5;
|
RestartSec = 5;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
{...}: {
|
|
||||||
perSystem = {pkgs, ...}: {
|
|
||||||
packages.handy = pkgs.appimageTools.wrapType2 rec {
|
|
||||||
pname = "handy";
|
|
||||||
version = "0.8.1";
|
|
||||||
|
|
||||||
src = pkgs.fetchurl {
|
|
||||||
url = "https://github.com/cjpais/Handy/releases/download/v${version}/Handy_${version}_amd64.AppImage";
|
|
||||||
hash = "sha256-6MTD0eQqqHuWt+njUaXrc9eYIrpMIkUEMIrRTYwGXuw=";
|
|
||||||
};
|
|
||||||
|
|
||||||
extraInstallCommands = let
|
|
||||||
contents = pkgs.appimageTools.extract {inherit pname version src;};
|
|
||||||
in ''
|
|
||||||
desktop_file=$(find ${contents} -name "*.desktop" | head -n1)
|
|
||||||
if [ -n "$desktop_file" ]; then
|
|
||||||
install -m 444 -D "$desktop_file" "$out/share/applications/${pname}.desktop"
|
|
||||||
substituteInPlace "$out/share/applications/${pname}.desktop" \
|
|
||||||
--replace 'Exec=AppRun' 'Exec=${pname}' || true
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d ${contents}/usr/share/icons ]; then
|
|
||||||
cp -r ${contents}/usr/share/icons $out/share
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
{ ... }: {
|
|
||||||
perSystem = { pkgs, ... }: {
|
|
||||||
packages.helium = pkgs.appimageTools.wrapType2 rec {
|
|
||||||
pname = "helium";
|
|
||||||
version = "0.10.6.1";
|
|
||||||
|
|
||||||
src = pkgs.fetchurl {
|
|
||||||
url = "https://github.com/imputnet/helium-linux/releases/download/${version}/${pname}-${version}-x86_64.AppImage";
|
|
||||||
hash = "sha256-6xqNRaP3aqitEseexRVEEjKkJClC0j1HHZoRGQanhSk=";
|
|
||||||
};
|
|
||||||
|
|
||||||
extraInstallCommands = let
|
|
||||||
contents = pkgs.appimageTools.extract { inherit pname version src; };
|
|
||||||
in ''
|
|
||||||
install -m 444 -D ${contents}/${pname}.desktop -t $out/share/applications
|
|
||||||
substituteInPlace $out/share/applications/${pname}.desktop \
|
|
||||||
--replace 'Exec=AppRun' 'Exec=${pname}'
|
|
||||||
cp -r ${contents}/usr/share/icons $out/share
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
{lib, ...}: {
|
|
||||||
perSystem = {pkgs, ...}: {
|
|
||||||
packages.t3code = pkgs.appimageTools.wrapType2 rec {
|
|
||||||
pname = "t3code";
|
|
||||||
version = "0.0.13";
|
|
||||||
|
|
||||||
src = pkgs.fetchurl {
|
|
||||||
url = "https://github.com/pingdotgg/t3code/releases/download/v${version}/T3-Code-${version}-x86_64.AppImage";
|
|
||||||
hash = "sha256-oHKIh+aHsbGVHEoLLjItl6AbVRwvWVlZaIWyHKiekVc=";
|
|
||||||
};
|
|
||||||
|
|
||||||
extraInstallCommands = let
|
|
||||||
contents = pkgs.appimageTools.extract {inherit pname version src;};
|
|
||||||
in ''
|
|
||||||
desktop_file=$(find ${contents} -name "*.desktop" | head -n1)
|
|
||||||
if [ -n "$desktop_file" ]; then
|
|
||||||
install -m 444 -D "$desktop_file" "$out/share/applications/${pname}.desktop"
|
|
||||||
substituteInPlace "$out/share/applications/${pname}.desktop" \
|
|
||||||
--replace 'Exec=AppRun' 'Exec=${pname}' \
|
|
||||||
--replace 'Exec=T3-Code' 'Exec=${pname}' \
|
|
||||||
--replace 'Exec=t3-code' 'Exec=${pname}' || true
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d ${contents}/usr/share/icons ]; then
|
|
||||||
cp -r ${contents}/usr/share/icons $out/share
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "T3 Chat Desktop";
|
|
||||||
homepage = "https://t3.codes";
|
|
||||||
license = lib.licenses.mit;
|
|
||||||
platforms = ["x86_64-linux"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
{lib, ...}: {
|
|
||||||
perSystem = {pkgs, ...}: let
|
|
||||||
pname = "zen-browser";
|
|
||||||
version = "1.19.3b";
|
|
||||||
|
|
||||||
src = pkgs.fetchurl {
|
|
||||||
url = "https://github.com/zen-browser/desktop/releases/download/${version}/zen-x86_64.AppImage";
|
|
||||||
hash = "sha256-p00Irv2z6brDXMx3cr0234lOZZ2a7FmJMDzN494nzMw=";
|
|
||||||
};
|
|
||||||
|
|
||||||
appimageContents = pkgs.appimageTools.extract {inherit pname version src;};
|
|
||||||
in {
|
|
||||||
packages.zen-browser = pkgs.appimageTools.wrapType2 {
|
|
||||||
inherit pname version src;
|
|
||||||
|
|
||||||
extraPkgs = pkgs: [pkgs.ffmpeg-full];
|
|
||||||
|
|
||||||
extraInstallCommands = ''
|
|
||||||
desktop_file=$(find ${appimageContents} -name "*.desktop" | head -n1)
|
|
||||||
if [ -n "$desktop_file" ]; then
|
|
||||||
install -m 444 -D "$desktop_file" "$out/share/applications/${pname}.desktop"
|
|
||||||
substituteInPlace "$out/share/applications/${pname}.desktop" \
|
|
||||||
--replace 'Exec=zen' 'Exec=${pname}'
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d ${appimageContents}/usr/share/icons ]; then
|
|
||||||
cp -r ${appimageContents}/usr/share/icons $out/share
|
|
||||||
fi
|
|
||||||
|
|
||||||
ln -s $out/bin/${pname} $out/bin/zen
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "Experience tranquillity while browsing the web without people tracking you!";
|
|
||||||
homepage = "https://zen-browser.app";
|
|
||||||
license = lib.licenses.mpl20;
|
|
||||||
platforms = ["x86_64-linux"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user