Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wifi systemd-udev-trigger workaround - investigate #17

Open
colemickens opened this issue Sep 14, 2023 · 0 comments
Open

wifi systemd-udev-trigger workaround - investigate #17

colemickens opened this issue Sep 14, 2023 · 0 comments

Comments

@colemickens
Copy link
Owner

is this really needed still ?

nixcfg/mixins/common.nix

Lines 172 to 194 in b8accd1

workaroundWifi = {
# dude, bash and linux are just real pieces of shit sometimes
# uptime is unparseable garbage
# well, so is /proc/uptime too, fucking returning floats that I have to cut apart
# seriously, I know some of this is old stuff but were they even thinking?
# then again lots of unix types seem to love "cutting" everywhere instead of real, explicit safe CLI APIs
# UGGGGGGGGGGGGGH
# it'd be cool to see a nulib stdlib that alleviated some of this bullshit
text = ''
(
set -x
uptime_ms="$(cat /proc/uptime | cut -d ' ' -f 1)"
uptime_ms="$(echo $uptime_ms | cut -d '.' -f 1)"
if [[ ''${uptime_ms} -gt ${ toString (60 * 2) } ]]; then
echo "workaround_wifi_issue: trigger"
${pkgs.systemd}/bin/systemctl restart systemd-udev-trigger
else
echo "workaround_wifi_issue: skip"
fi
)
'';
deps = [ ];
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant