Compare commits
9 Commits
e218eb25f3
...
restic
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2803b8e5c | ||
|
|
d11d6d7f78 | ||
|
|
ebfe340cf0 | ||
|
|
af26a2db8b | ||
|
|
34eaffdd65 | ||
|
|
fc66147173 | ||
|
|
3a84c99877 | ||
|
|
09dee82f8d | ||
|
|
0c4d651098 |
@@ -7,7 +7,7 @@
|
|||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
_1password-shell-plugins.url = "github:1Password/shell-plugins";
|
# _1password-shell-plugins.url = "github:1Password/shell-plugins";
|
||||||
nixgl = {
|
nixgl = {
|
||||||
url = "github:nix-community/nixGL";
|
url = "github:nix-community/nixGL";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|||||||
@@ -5,9 +5,11 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# nixGL is now provided as a flake input
|
# nixGL is now provided as a flake input
|
||||||
nixGL.packages = nixgl.packages.${pkgs.system};
|
targets.genericLinux.nixGL = {
|
||||||
nixGL.defaultWrapper = "mesa";
|
packages = nixgl.packages.${pkgs.system};
|
||||||
nixGL.installScripts = [ "mesa" ];
|
defaultWrapper = "mesa";
|
||||||
|
installScripts = [ "mesa" ];
|
||||||
|
};
|
||||||
|
|
||||||
programs.ghostty = lib.mkIf (config.enableShell && config.graphical.ghostty) {
|
programs.ghostty = lib.mkIf (config.enableShell && config.graphical.ghostty) {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -19,7 +21,7 @@
|
|||||||
font-family = "Source Code Pro";
|
font-family = "Source Code Pro";
|
||||||
# theme = "idleToes";
|
# theme = "idleToes";
|
||||||
# theme = "CGA";
|
# theme = "CGA";
|
||||||
theme = "catppuccin-mocha";
|
theme = "Catppuccin Mocha";
|
||||||
# theme = "CobaltNext";
|
# theme = "CobaltNext";
|
||||||
# clipboard-read = "allow";
|
# clipboard-read = "allow";
|
||||||
copy-on-select = true;
|
copy-on-select = true;
|
||||||
|
|||||||
@@ -3,19 +3,19 @@
|
|||||||
programs.git = lib.mkMerge [
|
programs.git = lib.mkMerge [
|
||||||
{
|
{
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = {
|
settings = {
|
||||||
credential.helper = "store --file ~/.git-credentials";
|
credential.helper = "store --file ~/.git-credentials";
|
||||||
init.defaultBranch = "main";
|
init.defaultBranch = "main";
|
||||||
push.autoSetupRemote = true;
|
push.autoSetupRemote = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
(lib.mkIf (config.profile == "personal") {
|
(lib.mkIf (config.profile == "personal") {
|
||||||
userName = "John Lancaster";
|
settings.user.name = "John Lancaster";
|
||||||
userEmail = "32917998+jsl12@users.noreply.github.com";
|
settings.user.email = "32917998+jsl12@users.noreply.github.com";
|
||||||
})
|
})
|
||||||
(lib.mkIf (config.profile == "work") {
|
(lib.mkIf (config.profile == "work") {
|
||||||
userName = "John Lancaster";
|
settings.user.name = "John Lancaster";
|
||||||
userEmail = "john.lancaster@crowncastle.com";
|
settings.user.email = "john.lancaster@crowncastle.com";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -59,6 +59,7 @@ in {
|
|||||||
rp schedule --all
|
rp schedule --all
|
||||||
'')
|
'')
|
||||||
(pkgs.writeShellScriptBin "rp-test" "rp run-schedule backup@default --dry-run")
|
(pkgs.writeShellScriptBin "rp-test" "rp run-schedule backup@default --dry-run")
|
||||||
|
(pkgs.writeShellScriptBin "rp-test" "rp run-schedule backup@default --dry-run")
|
||||||
];
|
];
|
||||||
xdg.configFile."resticprofile/profiles.yaml".source = yamlFormat.generate "profiles" {
|
xdg.configFile."resticprofile/profiles.yaml".source = yamlFormat.generate "profiles" {
|
||||||
version = "2";
|
version = "2";
|
||||||
|
|||||||
@@ -16,10 +16,18 @@
|
|||||||
hostname = "192.168.1.110";
|
hostname = "192.168.1.110";
|
||||||
user = "root";
|
user = "root";
|
||||||
};
|
};
|
||||||
|
"hermes" = {
|
||||||
|
hostname = "192.168.1.150";
|
||||||
|
user = "root";
|
||||||
|
};
|
||||||
"panoptes" = {
|
"panoptes" = {
|
||||||
hostname = "192.168.1.107";
|
hostname = "192.168.1.107";
|
||||||
user = "panoptes";
|
user = "panoptes";
|
||||||
};
|
};
|
||||||
|
"panoptes-root" = {
|
||||||
|
hostname = "192.168.1.107";
|
||||||
|
user = "root";
|
||||||
|
};
|
||||||
"pve5070" = {
|
"pve5070" = {
|
||||||
hostname = "192.168.1.130";
|
hostname = "192.168.1.130";
|
||||||
user = "root";
|
user = "root";
|
||||||
|
|||||||
@@ -12,5 +12,6 @@ in
|
|||||||
nix flake update --flake $FLAKE --impure
|
nix flake update --flake $FLAKE --impure
|
||||||
sudo nixos-rebuild switch --flake $FLAKE#${hostName} --impure
|
sudo nixos-rebuild switch --flake $FLAKE#${hostName} --impure
|
||||||
'')
|
'')
|
||||||
|
(pkgs.writeShellScriptBin "test-dns" (builtins.readFile ../scripts/test-dns.sh))
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
110
scripts/test-dns.sh
Normal file
110
scripts/test-dns.sh
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Function to test DNS resolution for a subdomain
|
||||||
|
test_subdomain() {
|
||||||
|
local subdomain="$1"
|
||||||
|
local fqdn="${subdomain}.john-stream.com"
|
||||||
|
|
||||||
|
echo "========================================"
|
||||||
|
echo "Testing DNS for: $fqdn"
|
||||||
|
echo "========================================"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Test panoptes
|
||||||
|
echo "📍 Testing: panoptes"
|
||||||
|
result=$(dig @panoptes "$fqdn" +short +time=2 +tries=1 2>&1)
|
||||||
|
if [ -n "$result" ]; then
|
||||||
|
echo " ✅ Resolved to: $result"
|
||||||
|
dig @panoptes "$fqdn" +noall +answer +time=2 +tries=1 | sed 's/^/ /'
|
||||||
|
else
|
||||||
|
echo " ❌ Failed to resolve"
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Test CoreDNS (192.168.1.107)
|
||||||
|
echo "📍 Testing: 192.168.1.107 (CoreDNS)"
|
||||||
|
result=$(dig @192.168.1.107 "$fqdn" +short +time=2 +tries=1 2>&1)
|
||||||
|
if [ -n "$result" ]; then
|
||||||
|
echo " ✅ Resolved to: $result"
|
||||||
|
dig @192.168.1.107 "$fqdn" +noall +answer +time=2 +tries=1 | sed 's/^/ /'
|
||||||
|
else
|
||||||
|
echo " ❌ Failed to resolve"
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Test Cloudflare DNS (1.1.1.1)
|
||||||
|
echo "📍 Testing: 1.1.1.1 (Cloudflare DNS)"
|
||||||
|
result=$(dig @1.1.1.1 "$fqdn" +short +time=2 +tries=1 2>&1)
|
||||||
|
if [ -n "$result" ]; then
|
||||||
|
echo " ✅ Resolved to: $result"
|
||||||
|
dig @1.1.1.1 "$fqdn" +noall +answer +time=2 +tries=1 | sed 's/^/ /'
|
||||||
|
else
|
||||||
|
echo " ❌ Failed to resolve"
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
}
|
||||||
|
|
||||||
|
# Function to check SSL certificate for the domain
|
||||||
|
check_ssl_cert() {
|
||||||
|
local subdomain="$1"
|
||||||
|
local fqdn="${subdomain}.john-stream.com"
|
||||||
|
|
||||||
|
echo "========================================"
|
||||||
|
echo "SSL Certificate Check for: $fqdn"
|
||||||
|
echo "========================================"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Check if openssl is available
|
||||||
|
if ! command -v openssl &> /dev/null; then
|
||||||
|
echo "❌ openssl command not found. Please install openssl to check SSL certificates."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Try to fetch SSL certificate information
|
||||||
|
echo "📍 Fetching SSL certificate information..."
|
||||||
|
cert_info=$(echo | openssl s_client -servername "$fqdn" -connect "$fqdn:443" 2>/dev/null | openssl x509 -noout -text 2>/dev/null)
|
||||||
|
|
||||||
|
if [ -z "$cert_info" ]; then
|
||||||
|
echo " ❌ Failed to retrieve SSL certificate. The domain may not be accessible via HTTPS."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Extract and display key certificate information
|
||||||
|
echo " ✅ SSL certificate found!"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Get certificate details
|
||||||
|
cert_details=$(echo | openssl s_client -servername "$fqdn" -connect "$fqdn:443" 2>/dev/null | openssl x509 -noout -subject -issuer -dates 2>/dev/null)
|
||||||
|
|
||||||
|
echo "📋 Certificate Details:"
|
||||||
|
echo "$cert_details" | sed 's/^/ /'
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Check certificate expiration
|
||||||
|
expiry_date=$(echo | openssl s_client -servername "$fqdn" -connect "$fqdn:443" 2>/dev/null | openssl x509 -noout -enddate 2>/dev/null | cut -d= -f2)
|
||||||
|
|
||||||
|
if [ -n "$expiry_date" ]; then
|
||||||
|
expiry_epoch=$(date -d "$expiry_date" +%s 2>/dev/null)
|
||||||
|
current_epoch=$(date +%s)
|
||||||
|
days_until_expiry=$(( ($expiry_epoch - $current_epoch) / 86400 ))
|
||||||
|
|
||||||
|
if [ $days_until_expiry -lt 0 ]; then
|
||||||
|
echo "⚠️ Certificate Status: EXPIRED ($days_until_expiry days ago)"
|
||||||
|
elif [ $days_until_expiry -lt 30 ]; then
|
||||||
|
echo "⚠️ Certificate Status: Expiring soon ($days_until_expiry days remaining)"
|
||||||
|
else
|
||||||
|
echo "✅ Certificate Status: Valid ($days_until_expiry days remaining)"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
}
|
||||||
|
|
||||||
|
# Test the subdomain
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
echo "Usage: $0 <subdomain>"
|
||||||
|
echo "Example: $0 appdaemon"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
test_subdomain "$1"
|
||||||
|
check_ssl_cert "$1"
|
||||||
Reference in New Issue
Block a user