9037474d22
- /system/Applications/Firefox.app/Contents/Resources/distribution/policies.json - /system/etc/cups/cupsd.conf - /system/etc/cups/modify_cupsd.conf - /system/etc/fonts/local.conf - /system/etc/grub.d/31-hold-shift - /system/etc/opt/chrome/policies/managed/policies.json - /system/etc/qubes/repo-templates/qubes-templates.repo - /system/etc/yum.repos.d/qubes-dom0.repo - /system/etc/timeshift/timeshift.json - /system/usr/lib/firefox-esr/distribution/policies.json - /system/usr/lib/firefox/distribution/policies.json - /system/var/cache/rclone/remove_dot_gitkeep - /system/mnt/private_r2-docker/remove_dot_gitkeep - /system/etc/sddm.conf - /home/.chezmoiscripts/universal/run_onchange_after_57-netdata.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_20-font.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_14-timeshift.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_50-rclone.tmpl - /home/.chezmoiscripts/qubes/run_onchange_before_12-update-dom0.tmpl - /home/dot_config/rclone/merge_rclone.conf - /home/dot_config/cups/cupsd.conf - /home/dot_config/qubes/qubes-templates.repo - /home/dot_config/qubes/qubes-dom0.repo - /home/dot_config/timeshift/timeshift.json - /home/Cloud/Private/remove_dot_gitkeep - /home/Cloud/Public/remove_dot_gitkeep - /home/dot_local/share/firefox/distribution/policies.json - /home/dot_local/bin/executable_rclone-mount - /home/dot_local/grub.d/31-hold-shift
34 lines
1.8 KiB
Cheetah
34 lines
1.8 KiB
Cheetah
{{- if and (ne .host.distro.family "windows") (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "key-netdata-token")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "key-netdata-room")) -}}
|
|
#!/usr/bin/env bash
|
|
|
|
{{ includeTemplate "universal/profile" }}
|
|
{{ includeTemplate "universal/logg" }}
|
|
|
|
### Claim the instance with Netdata Cloud
|
|
if command -v netdata-claim.sh > /dev/null; then
|
|
NETDATA_TOKEN="$(cat "{{ .chezmoi.sourceDir }}/.chezmoitemplates/secrets/key-netdata-token" | chezmoi decrypt)"
|
|
NETDATA_ROOM="$(cat "{{ .chezmoi.sourceDir }}/.chezmoitemplates/secrets/key-netdata-room" | chezmoi decrypt)"
|
|
netdata-claim.sh -token="$NETDATA_TOKEN" -rooms="$NETDATA_ROOM" -url="{{ .netdataClaimURL }}"
|
|
|
|
# Kernel optimizations
|
|
# These are mentioned while installing via the kickstart.sh script method. We are using Homebrew for the installation though.
|
|
# Assuming these optimizations do not cause any harm.
|
|
if [ -d /Applications ] && [ -d /System ]; then
|
|
# macOS
|
|
logg info 'System is macOS so Netdata kernel optimizations are not required'
|
|
else
|
|
# Linux
|
|
if [ -d /sys/kernel/mm/ksm ]; then
|
|
logg info 'Adding Netdata kernel optimization for `/sys/kernel/mm/ksm/run`'
|
|
echo 1 | sudo tee /sys/kernel/mm/ksm/run
|
|
logg info 'Adding Netdata kernel optimization for `/sys/kernel/mm/ksm/sleep_millisecs`'
|
|
echo 1000 | sudo tee /sys/kernel/mm/ksm/sleep_millisecs
|
|
else
|
|
logg info 'The `/sys/kernel/mm/ksm` directory does not exist so Netdata kernel optimizations are not being applied'
|
|
fi
|
|
fi
|
|
else
|
|
logg warn '`netdata-claim.sh` is not available in the PATH'
|
|
fi
|
|
|
|
{{ end - }}
|