feat(guix): typos, wrap aw-watcher-afk

This commit is contained in:
Pavel Korytov 2021-06-29 13:59:38 +03:00
parent 27301786da
commit 9b2179110d
6 changed files with 30 additions and 15 deletions

View file

@ -1,6 +1,7 @@
(specifications->manifest (specifications->manifest
'( '(
"fontconfig" "fontconfig"
"qbittorrent"
"gnome-font-viewer" "gnome-font-viewer"
"xdg-utils" "xdg-utils"
"telegram-desktop" "telegram-desktop"
@ -18,6 +19,7 @@
"xrandr" "xrandr"
"megacmd-1.4" "megacmd-1.4"
"activitywatch-bin" "activitywatch-bin"
"xdg-desktop-portal"
"flatpak" "flatpak"
"zathura-djvu" "zathura-djvu"
"zathura-pdf-poppler" "zathura-pdf-poppler"

View file

@ -32,7 +32,7 @@
#:provides '(aw-watcher-afk) #:provides '(aw-watcher-afk)
#:requires '(aw-server) #:requires '(aw-server)
#:respawn? #t #:respawn? #t
#:start (make-forkexec-constructor '("aw-watcher-afk")) #:start (make-forkexec-constructor '("/home/pavel/bin/scripts/aw-watcher-afk-wrapper"))
#:stop (make-kill-destructor))) #:stop (make-kill-destructor)))
(define aw-watcher-window (define aw-watcher-window

View file

@ -2129,9 +2129,10 @@ LaTeX
** Flatpak ** Flatpak
A lot of proprietary desktop applications can be installed most easily with flatpak & flathub. A lot of proprietary desktop applications can be installed most easily with flatpak & flathub.
| Guix dependency | | Guix dependency |
|-----------------| |--------------------|
| flatpak | | flatpak |
| xdg-desktop-portal |
After installation, add the following repositories: After installation, add the following repositories:
#+begin_example #+begin_example
@ -2252,6 +2253,13 @@ aw-server
#:stop (make-kill-destructor))) #:stop (make-kill-destructor)))
#+end_src #+end_src
=aw-watcher-afk= has some problems with statup, so there is a wrapper script
#+begin_src sh :tangle ~/bin/scripts/aw-watcher-afk-wrapper
sleep 5
aw-watcher-afk
#+end_src
aw-watcher-afk aw-watcher-afk
#+begin_src scheme #+begin_src scheme
(define aw-watcher-afk (define aw-watcher-afk
@ -2259,7 +2267,7 @@ aw-watcher-afk
#:provides '(aw-watcher-afk) #:provides '(aw-watcher-afk)
#:requires '(aw-server) #:requires '(aw-server)
#:respawn? #t #:respawn? #t
#:start (make-forkexec-constructor '("aw-watcher-afk")) #:start (make-forkexec-constructor '("/home/pavel/bin/scripts/aw-watcher-afk-wrapper"))
#:stop (make-kill-destructor))) #:stop (make-kill-destructor)))
#+end_src #+end_src
@ -2351,6 +2359,7 @@ Other desktop programs I use are listed below.
| telegram-desktop | telegram client | | telegram-desktop | telegram client |
| xdg-utils | gives xdg-open and stuff | | xdg-utils | gives xdg-open and stuff |
| gnome-font-viewer | view fonts | | gnome-font-viewer | view fonts |
| qbittorrent | torrent client |
| fontconfig | | | fontconfig | |
#+NAME: packages #+NAME: packages

View file

@ -436,7 +436,7 @@ Don't forget to install =JetBrainsMono Nerd Font=.
| system | patchelf | A program to modify existsing ELF executables | | system | patchelf | A program to modify existsing ELF executables |
| system | glibc | A lot of stuff, including ELF interpeter and ~ldd~ | | system | glibc | A lot of stuff, including ELF interpeter and ~ldd~ |
** TODO VPN ** VPN
| Category | Guix dependency | | Category | Guix dependency |
|----------+-----------------------------| |----------+-----------------------------|
| system | openvpn | | system | openvpn |
@ -444,7 +444,7 @@ Don't forget to install =JetBrainsMono Nerd Font=.
I'm not sure how to properly spin up VPN on Guix, so here is what I'm doing now, after some trial and error. I'm not sure how to properly spin up VPN on Guix, so here is what I'm doing now, after some trial and error.
I'm currently using CyberGhost VPN. =~/.vpn= folder stores its OpenVPN config, modified as follows: I'm currently using CyberGhost VPN. =~/.vpn= folder stores its OpenVPN config (=openvpn.ovpn=), modified as follows:
- paths to =ca=, =cert= and =key= are made absolute - paths to =ca=, =cert= and =key= are made absolute
#+begin_src conf-space :tangle no #+begin_src conf-space :tangle no
ca /home/pavel/.vpn/ca.crt ca /home/pavel/.vpn/ca.crt
@ -455,7 +455,12 @@ I'm currently using CyberGhost VPN. =~/.vpn= folder stores its OpenVPN config, m
#+begin_src conf-space :tangle no #+begin_src conf-space :tangle no
auth-user-pass /home/pavel/.vpn/auth.conf auth-user-pass /home/pavel/.vpn/auth.conf
#+end_src #+end_src
- run [[https://github.com/alfredopalhares/openvpn-update-resolv-conf][openvpn-update-resolv-conf]] script to fix DNS =auth.conf= looks like this:
#+begin_src text
login
password
#+end_src
- run [[https://github.com/alfredopalhares/openvpn-update-resolv-conf][openvpn-update-resolv-conf]] script to fix DNS. =openvpn-update-resolve-conf= originates in my [[https://github.com/SqrtMinusOne/channel-q][channel-q]].
#+begin_src conf-space :tangle no #+begin_src conf-space :tangle no
setenv PATH /home/pavel/.guix-extra-profiles/system/system/bin:/home/pavel/.guix-extra-profiles/system/system/sbin:/home/pavel/.guix-extra-profiles/console/console/bin:/run/current-system/profile/bi:n/run/current-system/profile/sbin setenv PATH /home/pavel/.guix-extra-profiles/system/system/bin:/home/pavel/.guix-extra-profiles/system/system/sbin:/home/pavel/.guix-extra-profiles/console/console/bin:/run/current-system/profile/bi:n/run/current-system/profile/sbin
@ -463,7 +468,7 @@ I'm currently using CyberGhost VPN. =~/.vpn= folder stores its OpenVPN config, m
down /home/pavel/.guix-extra-profiles/system/system/bin/update-resolv-conf.sh down /home/pavel/.guix-extra-profiles/system/system/bin/update-resolv-conf.sh
#+end_src #+end_src
=setenv PATH= is necessary because both =resolvconf= is a shell script which need GNU coreutils and stuff, and OpenVPN clear PATH by default. =setenv PATH= is necessary because both =resolvconf= (openresolve) and =update-resolv-conf.sh= are shell scripts which need GNU coreutils and stuff, and OpenVPN clears PATH by default.
- run a script to fix Docker routes - run a script to fix Docker routes
#+begin_src conf-space :tangle no #+begin_src conf-space :tangle no
route-up /home/pavel/bin/scripts/vpn-fix-routes route-up /home/pavel/bin/scripts/vpn-fix-routes

View file

@ -1,6 +0,0 @@
#!/usr/bin/env bash
# [[file:../Guix.org::*ActivityWatch][ActivityWatch:3]]
~/bin/activitywatch/aw-server/aw-server &
~/bin/activitywatch/aw-watcher-afk/aw-watcher-afk &
~/bin/activitywatch/aw-watcher-window/aw-watcher-window &
# ActivityWatch:3 ends here

View file

@ -0,0 +1,5 @@
#!/usr/bin/env bash
# [[file:../../Desktop.org::*ActivityWatch][ActivityWatch:2]]
sleep 5
aw-watcher-afk
# ActivityWatch:2 ends here