mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2025-08-16 03:07:26 +02:00
Compare commits
8 Commits
af1f376f18
...
0b5ffef8fe
Author | SHA1 | Date | |
---|---|---|---|
0b5ffef8fe | |||
dfd77069ac | |||
e453a0d65b | |||
a01db66cc1 | |||
79f666eb1d | |||
b4967b4c06 | |||
04f360bea5 | |||
8b3247df17 |
@ -1,3 +1,10 @@
|
|||||||
|
# This configuration comes from
|
||||||
|
# https://wiki.alpinelinux.org/wiki/Chrony_and_GPSD with socket address
|
||||||
|
# corrected since I had difficulties understanding the manual in a hurry.
|
||||||
|
# My hardware: ALTHA G-Mouse GPS \n Model GGM308
|
||||||
|
# Untested suspicion due to rain: it will not announce itself to computer
|
||||||
|
# or lsusb until it has GPS fix?
|
||||||
|
|
||||||
refclock SHM 0 poll 3 refid GPS1
|
refclock SHM 0 poll 3 refid GPS1
|
||||||
# unlikely to work with usb
|
# unlikely to work with usb
|
||||||
refclock SHM 1 refid GPS2
|
refclock SHM 1 refid GPS2
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
# Attempt to use beacondb.net with geoclue. However as I use Sway and I
|
# https://beacondb.net & https://beacondb.net/map
|
||||||
# don't use .desktop files, nothing has permission to access geoclue and I
|
|
||||||
# have thus disabled it, but maybe on Plasma, family PC, or just in case this
|
|
||||||
# should be noted.
|
|
||||||
[wifi]
|
[wifi]
|
||||||
enable=true
|
enable=true
|
||||||
url=https://beacondb.net/v1/geolocate
|
url=https://beacondb.net/v1/geolocate
|
||||||
|
# Contributing back
|
||||||
|
submit-data=true
|
||||||
|
submission-url=https://beacondb.net/v2/geosubmit
|
||||||
|
# I doubt this is used, but explicitly set just in case of it suddenly
|
||||||
|
# becoming $(whoami)
|
||||||
|
submission-nick=geoclue
|
||||||
|
4
etc/geoclue/conf.d/gpsd.conf
Normal file
4
etc/geoclue/conf.d/gpsd.conf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[network-nmea]
|
||||||
|
enable=true
|
||||||
|
# Refer to ../../systemd/system/gpsd.service.d/aminda-additions.conf
|
||||||
|
nmea-socket=/var/run/gps-share.sock
|
@ -1,4 +1,12 @@
|
|||||||
|
# https://positon.xyz
|
||||||
|
# WARNING: Not held in high regard by GrapheneOS.
|
||||||
|
# https://grapheneos.org/articles/positon-location-service
|
||||||
[wifi]
|
[wifi]
|
||||||
enable=true
|
enable=true
|
||||||
# https://github.com/microg/GmsCore/issues/2237#issuecomment-2169193229
|
# https://github.com/microg/GmsCore/issues/2237#issuecomment-2169193229
|
||||||
url=https://api.positon.xyz/?key=74600654-2aec-11ef-aa95-3b7218da6865
|
url=https://api.positon.xyz/?key=74600654-2aec-11ef-aa95-3b7218da6865
|
||||||
|
# Contributing back
|
||||||
|
submit-data=true
|
||||||
|
submission-url=https://api.positon.xyz/v2/geosubmit?key=74600654-2aec-11ef-aa95-3b7218da6865
|
||||||
|
# Explicitly set just in case of it suddenly becoming $(whoami)
|
||||||
|
submission-nick=geoclue
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
# Remember https://wiki.openstreetmap.org/wiki/Precision_of_coordinates
|
# Remember https://wiki.openstreetmap.org/wiki/Precision_of_coordinates
|
||||||
# and https://m.xkcd.com/2170/ !
|
# and https://m.xkcd.com/2170/ !
|
||||||
|
|
||||||
|
# Finland: 4 decimal points with radius of 20 metres circles buildings.
|
||||||
|
|
||||||
# Kotka
|
# Kotka
|
||||||
60.45 # Latitude (positive values mean north, negative south)
|
60.45 # Latitude (positive values mean north, negative south)
|
||||||
26.94 # Longitude (positive values mean east, negative west)
|
26.94 # Longitude (positive values mean east, negative west)
|
||||||
@ -15,5 +17,4 @@
|
|||||||
#2000 # Accuracy radius in metres
|
#2000 # Accuracy radius in metres
|
||||||
|
|
||||||
# For extra security:
|
# For extra security:
|
||||||
# sudo chown geoclue /etc/geolocation
|
# sudo chown geoclue:geoclue /etc/geolocation;sudo chmod 600 /etc/geolocation
|
||||||
# sudo chmod 600 /etc/geolocation
|
|
||||||
|
@ -1 +1,3 @@
|
|||||||
|
# This is an EnvironmentFile for gpsd.service specified in
|
||||||
|
# $PWD/systemd/system/gpsd.service.d/aminda-additions.conf
|
||||||
#AMINDAGPSD=""
|
#AMINDAGPSD=""
|
||||||
|
@ -1,10 +1,25 @@
|
|||||||
|
# As usual this is a systemd drop-in, so I can adjust what gpsd.service does
|
||||||
|
# without having to fight with package management.
|
||||||
[Service]
|
[Service]
|
||||||
Type=exec
|
Type=exec
|
||||||
|
# In case the file exists, I can throw my own additional options there
|
||||||
EnvironmentFile=-/etc/gpsd.aminda.conf
|
EnvironmentFile=-/etc/gpsd.aminda.conf
|
||||||
ExecStart=
|
# Kernel module possibly required for USB GPS devices especially with Chrony?
|
||||||
# PRIVACY WARNING! --listenany happily allows anyone to ask where the host is
|
|
||||||
ExecStartPre=-/usr/sbin/modprobe pps_ldisc
|
ExecStartPre=-/usr/sbin/modprobe pps_ldisc
|
||||||
ExecStart=/usr/sbin/gpsd /dev/gps0 --listenany --nowait --foreground $AMINDAGPSD
|
# Handle failure situation of the socket not going away (ExecStartPost=)
|
||||||
|
ExecStartPre=-/usr/bin/rm -vf /var/run/gps-share.sock
|
||||||
|
# Empty ExecStart= before the actual ExecStart= removes the original
|
||||||
|
# ExecStart= line
|
||||||
|
ExecStart=
|
||||||
|
ExecStart=/usr/sbin/gpsd /dev/gps0 --nowait --foreground $AMINDAGPSD
|
||||||
|
# Creating a socket for geoclue to connect to
|
||||||
|
# Credit: @schnell at https://gitlab.freedesktop.org/geoclue/geoclue/-/issues/145#note_1772702
|
||||||
|
ExecStartPost=/bin/sh -c "(sleep 5 && gpspipe --nmea | ( read; read; read; cat ) | ncat --verbose --keep-open --listen --unixsock /var/run/gps-share.sock&)"
|
||||||
|
# In case of clean shutdown, remove the socket for restart
|
||||||
|
ExecStopPost=-/usr/bin/rm -vf /var/run/gps-share.sock
|
||||||
|
# Missing from the original unit, will reconnect all GPS says man gpsd
|
||||||
ExecReload=/usr/bin/killall -HUP gpsd
|
ExecReload=/usr/bin/killall -HUP gpsd
|
||||||
|
# Avoiding systemd considering the unit as failed.
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=5s
|
RestartSec=5s
|
||||||
|
# vim: filetype=systemd
|
||||||
|
Loading…
x
Reference in New Issue
Block a user