-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main'
- Loading branch information
Showing
18 changed files
with
210 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
# if nh-home is in the PATH then use it | ||
# Build home-manager, using the best available command | ||
if command -v nh-home &> /dev/null; then | ||
nh-home build | ||
elif command -v nh &> /dev/null; then | ||
nh home build "${HOME}/Zero/nix-config/" | ||
elif command -v home-manager &> /dev/null; then | ||
home-manager build --flake "$HOME/Zero/nix-config" -L | ||
else | ||
nix run nixpkgs#home-manager -- build --flake "$HOME/Zero/nix-config" -L | ||
nix run nixpkgs#home-manager -- build "$HOME/Zero/nix-config" -L | ||
fi | ||
build-host |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
# if nh-home is in the PATH then use it | ||
STAMP=$(date +%Y%m%d-%H%M%S) | ||
|
||
# Switch home-manager, using the best available command | ||
if command -v nh-home &> /dev/null; then | ||
nh-home build | ||
nh-home switch | ||
elif command -v nh &> /dev/null; then | ||
nh home switch --backup-extension "${STAMP}" "${HOME}/Zero/nix-config/" | ||
elif command -v home-manager &> /dev/null; then | ||
home-manager switch --backup-extension "${STAMP}" --flake "$HOME/Zero/nix-config" -L | ||
else | ||
nix run nixpkgs#home-manager -- switch --flake "$HOME/Zero/nix-config" -L | ||
nix run nixpkgs#home-manager -- switch --backup-extension "${STAMP}" --flake "$HOME/Zero/nix-config" -L | ||
fi | ||
switch-host |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
home-manager/_mixins/scripts/mwprocapture-hunter/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ pkgs, ... }: | ||
let | ||
name = builtins.baseNameOf (builtins.toString ./.); | ||
shellApplication = pkgs.writeShellApplication { | ||
inherit name; | ||
runtimeInputs = with pkgs; [ | ||
coreutils-full | ||
curl | ||
]; | ||
text = builtins.readFile ./${name}.sh; | ||
}; | ||
in | ||
{ | ||
home.packages = with pkgs; [ shellApplication ]; | ||
} |
44 changes: 44 additions & 0 deletions
44
home-manager/_mixins/scripts/mwprocapture-hunter/mwprocapture-hunter.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/usr/bin/env bash | ||
|
||
set +e # Disable errexit | ||
set +u # Disable nounset | ||
set +o pipefail # Disable pipefail | ||
|
||
# Base URL for Magewell downloads | ||
BASE_URL="https://www.magewell.com/files/drivers/ProCaptureForLinux_" | ||
#START_VERSION=4390 | ||
START_VERSION=4407 | ||
END_VERSION=$((START_VERSION + 100)) | ||
|
||
# Function to check if URL exists using curl | ||
check_url() { | ||
local url=$1 | ||
local version=$2 | ||
local http_code="" | ||
|
||
# Use curl with --head to only get headers | ||
# -s for silent mode, -L to follow redirects, -w for custom output format | ||
# -o /dev/null to discard the actual content | ||
http_code=$(curl -s -L -w "%{http_code}" --head "$url" -o /dev/null) | ||
|
||
if [ "$http_code" = "200" ]; then | ||
echo "✅ Version $version is available at: $url" | ||
else | ||
echo "❌ Version $version not found (HTTP $http_code)" | ||
fi | ||
# Add a small delay to be nice to the server | ||
sleep 0.5 | ||
} | ||
|
||
echo "Starting version check from $START_VERSION to $END_VERSION" | ||
echo "Results will be saved to found_versions.txt" | ||
echo "----------------------------------------" | ||
|
||
# Main loop | ||
for version in $(seq $START_VERSION $END_VERSION); do | ||
url="${BASE_URL}${version}.tar.gz" | ||
check_url "$url" "$version" | ||
done | ||
|
||
echo "----------------------------------------" | ||
echo "Scan complete! Available versions have been saved to found_versions.txt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.