mirror of
https://github.com/SqrtMinusOne/dotfiles.git
synced 2025-12-10 19:23:03 +03:00
feat(guix): xsettings, indigo, discord RPC, slack
This commit is contained in:
parent
b887ae0c7d
commit
02664b08f7
11 changed files with 267 additions and 30 deletions
|
|
@ -1,5 +1,6 @@
|
|||
(specifications->manifest
|
||||
'(
|
||||
"neofetch"
|
||||
"osync"
|
||||
"nethogs"
|
||||
"htop"
|
||||
|
|
@ -8,7 +9,7 @@
|
|||
"ncurses"
|
||||
"alacritty"
|
||||
"xclip"
|
||||
"tmuxp"
|
||||
"python-tmuxp"
|
||||
"tmux"
|
||||
"rust-starship"
|
||||
"dt-colorscripts"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
(specifications->manifest
|
||||
'(
|
||||
"telegram-desktop"
|
||||
"keepassxc"
|
||||
"thunar"
|
||||
"xmodmap"
|
||||
|
|
@ -13,6 +14,7 @@
|
|||
"xprop"
|
||||
"xrandr"
|
||||
"megacmd-1.4"
|
||||
"xsettingsd"
|
||||
"activitywatch-bin"
|
||||
"flatpak"
|
||||
"zathura-djvu"
|
||||
|
|
|
|||
113
.config/guix/systems/indigo.scm
Normal file
113
.config/guix/systems/indigo.scm
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
;; [[file:../../../Guix.org::*indigo][indigo:1]]
|
||||
(use-modules (gnu))
|
||||
(use-modules (gnu system nss))
|
||||
(use-modules (gnu packages bash))
|
||||
(use-modules ((gnu packages base) #:select (coreutils glibc)))
|
||||
(use-modules (gnu packages certs))
|
||||
(use-modules (gnu packages version-control))
|
||||
(use-modules (gnu packages vim))
|
||||
(use-modules (gnu packages gnome))
|
||||
(use-modules (gnu packages xorg))
|
||||
(use-modules (gnu packages wm))
|
||||
(use-modules (gnu packages openbox))
|
||||
(use-modules (gnu services docker))
|
||||
(use-modules (gnu services cups))
|
||||
(use-modules (srfi srfi-1))
|
||||
(use-modules (guix channels))
|
||||
(use-modules (guix inferior))
|
||||
(use-modules (nongnu packages linux))
|
||||
(use-modules (nongnu system linux-initrd))
|
||||
|
||||
(use-service-modules desktop networking ssh xorg nix)
|
||||
(use-package-modules ssh)
|
||||
(define %my-base-services
|
||||
(cons*
|
||||
(service openssh-service-type)
|
||||
(extra-special-file "/lib64/ld-linux-x86-64.so.2" (file-append glibc "/lib/ld-linux-x86-64.so.2"))
|
||||
(service nix-service-type)
|
||||
(service cups-service-type
|
||||
(cups-configuration
|
||||
(web-interface? #t)))
|
||||
(service docker-service-type)
|
||||
(modify-services %desktop-services
|
||||
(network-manager-service-type config =>
|
||||
(network-manager-configuration (inherit config)
|
||||
(vpn-plugins (list network-manager-openvpn)))))))
|
||||
|
||||
|
||||
(operating-system
|
||||
(kernel
|
||||
(let*
|
||||
((channels
|
||||
(list (channel
|
||||
(name 'nonguix)
|
||||
(url "https://gitlab.com/nonguix/nonguix")
|
||||
(commit "46c1d8bcca674d3a71cd077c52dde9552a89873d"))
|
||||
(channel
|
||||
(name 'guix)
|
||||
(url "https://git.savannah.gnu.org/git/guix.git")
|
||||
(commit "f463f376e91ccc1fe4ab68d5e822b5d71a1234f5"))))
|
||||
(inferior
|
||||
(inferior-for-channels channels)))
|
||||
(first (lookup-inferior-packages inferior "linux" "5.12.8"))))
|
||||
;; (kernel linux)
|
||||
(initrd microcode-initrd)
|
||||
(firmware (list linux-firmware))
|
||||
(locale "en_US.utf8")
|
||||
(timezone "Europe/Moscow")
|
||||
(keyboard-layout (keyboard-layout "us,ru" #:options '("grp:alt_shift_toggle")))
|
||||
(users (cons* (user-account
|
||||
(name "pavel")
|
||||
(comment "Pavel")
|
||||
(group "users")
|
||||
(home-directory "/home/pavel")
|
||||
(supplementary-groups
|
||||
'("wheel" ;; sudo
|
||||
"netdev" ;; network devices
|
||||
"audio"
|
||||
"video"
|
||||
"input"
|
||||
"tty"
|
||||
"docker"
|
||||
"scanner"
|
||||
"lp")))
|
||||
%base-user-accounts))
|
||||
|
||||
(packages
|
||||
(append
|
||||
(list nss-certs
|
||||
git
|
||||
i3-gaps
|
||||
i3lock
|
||||
openbox
|
||||
xterm
|
||||
vim)
|
||||
%base-packages))
|
||||
|
||||
(host-name "indigo")
|
||||
(services (cons*
|
||||
(set-xorg-configuration
|
||||
(xorg-configuration
|
||||
(keyboard-layout keyboard-layout)))
|
||||
%my-base-services))
|
||||
|
||||
(bootloader
|
||||
(bootloader-configuration
|
||||
(bootloader grub-efi-bootloader)
|
||||
(target "/boot/efi")
|
||||
(keyboard-layout keyboard-layout)))
|
||||
|
||||
(swap-devices
|
||||
(list (uuid "059a2c26-8f70-4986-adf0-1a2e7b511404")))
|
||||
|
||||
(file-systems
|
||||
(cons* (file-system
|
||||
(mount-point "/")
|
||||
(device (file-system-label "my-root"))
|
||||
(type "ext4"))
|
||||
(file-system
|
||||
(mount-point "/boot/efi")
|
||||
(device "/dev/sda1")
|
||||
(type "vfat"))
|
||||
%base-file-systems)))
|
||||
;; indigo:1 ends here
|
||||
|
|
@ -43,14 +43,37 @@
|
|||
#:start (make-forkexec-constructor '("aw-watcher-window"))
|
||||
#:stop (make-kill-destructor)))
|
||||
|
||||
(define pulseeffects
|
||||
(make <service>
|
||||
#:provides '(pulseeffects)
|
||||
#:respawn? #t
|
||||
#:start (make-forkexec-constructor '("flatpak" "run" "com.github.wwmm.pulseeffects" "--gapplication-service"))
|
||||
#:stop (make-kill-destructor)))
|
||||
|
||||
(define xsettingsd
|
||||
(make <service>
|
||||
#:provides '(xsettingsd)
|
||||
#:respawn? #t
|
||||
#:start (make-forkexec-constructor '("xsettingsd"))
|
||||
#:stop (make-kill-destructor)))
|
||||
|
||||
(define discord-rich-presence
|
||||
(make <service>
|
||||
#:provides '(discord-rich-presence)
|
||||
#:one-shot? #t
|
||||
#:start (make-system-constructor "ln -sf {app/com.discordapp.Discord,$XDG_RUNTIME_DIR}/discord-ipc-0")))
|
||||
|
||||
(register-services
|
||||
mpd
|
||||
mpd-watcher
|
||||
mcron
|
||||
aw-server
|
||||
aw-watcher-afk
|
||||
aw-watcher-window)
|
||||
aw-watcher-window
|
||||
pulseeffects
|
||||
xsettingsd
|
||||
discord-rich-presence)
|
||||
|
||||
(action 'shepherd 'daemonize)
|
||||
|
||||
(for-each start '(mpd mpd-watcher mcron aw-server aw-watcher-afk aw-watcher-window))
|
||||
(for-each start '(mpd mpd-watcher mcron aw-server aw-watcher-afk aw-watcher-window pulseeffects xsettingsd discord-rich-presence))
|
||||
|
|
|
|||
|
|
@ -472,7 +472,7 @@ symbol = " "
|
|||
| Guix dependency |
|
||||
|-----------------|
|
||||
| tmux |
|
||||
| tmuxp |
|
||||
| python-tmuxp |
|
||||
|
||||
[[https://github.com/tmux/tmux][tmux]] is my terminal multiplexer of choice.
|
||||
|
||||
|
|
@ -667,6 +667,7 @@ key_bindings:
|
|||
| htop | Interactive process viewer |
|
||||
| nethogs | A tool to group processed by used bandwidth |
|
||||
| osync | rsync wrapper |
|
||||
| neofetch | Fetch system info |
|
||||
|
||||
| Note | Description |
|
||||
|------+-----------------|
|
||||
|
|
|
|||
76
Desktop.org
76
Desktop.org
|
|
@ -168,13 +168,25 @@ Xft.dpi: <<get-dpi()>>
|
|||
A few programs I use to customize the apperance are listed below.
|
||||
|
||||
| Guix dependency | Description |
|
||||
|--------------------+-------------------------------------------|
|
||||
| lxappearance | A program to customize GTK+ themes |
|
||||
|--------------------+-------------------------|
|
||||
| matcha-theme | My preferred GTK theme |
|
||||
| papirus-icon-theme | My preferred Icon theme |
|
||||
| hicolor-icon-theme | For some reason required for lxappearance |
|
||||
| xsettingsd | X11 settings daemon |
|
||||
|
||||
[[https://github.com/derat/xsettingsd][xsettingsd]] is a lightweight daemon which configures X11 applications. It is launched with shepherd in the sevices config below.
|
||||
|
||||
#+begin_src conf-space :tangle ~/.config/xsettingsd/xsettingsd.conf
|
||||
Net/ThemeName "Matcha-dark-azul"
|
||||
Net/IconThemeName "Papirus-Dark"
|
||||
Gtk/DecorationLayout "menu:minimize,maximize,close"
|
||||
Gtk/FontName "Sans 12"
|
||||
Gtk/MonospaceFontName "JetbrainsMono Nerd Mono 12"
|
||||
Gtk/CursorThemeName "Adwaita"
|
||||
Xft/Antialias 1
|
||||
Xft/Hinting 0
|
||||
Xft/HintStyle "hintnone"
|
||||
#+end_src
|
||||
|
||||
IIRC the only thing =lxapparance= does is edit GTK config files.
|
||||
* i3wm
|
||||
:PROPERTIES:
|
||||
:header-args+: :tangle ./.config/i3/config
|
||||
|
|
@ -753,8 +765,8 @@ declare -A BAR_HEIGHT=(
|
|||
["HDMI-A-0"]="29"
|
||||
)
|
||||
declare -A BLOCKS=(
|
||||
["DVI-D-0"]="pulseaudio SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP weather SEP sun aw-afk date TSEP"
|
||||
["HDMI-A-0"]="pulseaudio mpd SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP weather SEP sun aw-afk date TSEP"
|
||||
["DVI-D-0"]="pulseaudio SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP weather SEP sun date TSEP"
|
||||
["HDMI-A-0"]="pulseaudio mpd SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP weather SEP sun date TSEP"
|
||||
["eDP-1"]="pulseaudio mpd SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP battery SEP sun date TSEP"
|
||||
)
|
||||
|
||||
|
|
@ -2100,8 +2112,8 @@ flatpak install --user <remote> <package>
|
|||
Packages to install:
|
||||
#+NAME: flatpak-deps
|
||||
| Flatpak dependency | Channel |
|
||||
|------------------------+---------|
|
||||
| org.mozilla.firefox | flathub |
|
||||
|------------------------------+---------|
|
||||
| com.github.wwmm.pulseeffects | flathub |
|
||||
| com.discordapp.Discord | flathub |
|
||||
| us.zoom.Zoom | flathub |
|
||||
| com.slack.Slack | flathub |
|
||||
|
|
@ -2115,7 +2127,7 @@ Packages to install:
|
|||
|
||||
#+RESULTS:
|
||||
#+begin_example
|
||||
flatpak install --user flathub org.mozilla.firefox
|
||||
flatpak install --user flathub com.github.wwmm.pulseeffects
|
||||
flatpak install --user flathub com.discordapp.Discord
|
||||
flatpak install --user flathub us.zoom.Zoom
|
||||
flatpak install --user flathub com.slack.Slack
|
||||
|
|
@ -2222,10 +2234,36 @@ aw-watcher-window
|
|||
#:start (make-forkexec-constructor '("aw-watcher-window"))
|
||||
#:stop (make-kill-destructor)))
|
||||
#+end_src
|
||||
** Sync
|
||||
| Guix dependency |
|
||||
|-----------------|
|
||||
| megacmd-1.4 |
|
||||
** PulseEffects
|
||||
#+begin_src scheme
|
||||
(define pulseeffects
|
||||
(make <service>
|
||||
#:provides '(pulseeffects)
|
||||
#:respawn? #t
|
||||
#:start (make-forkexec-constructor '("flatpak" "run" "com.github.wwmm.pulseeffects" "--gapplication-service"))
|
||||
#:stop (make-kill-destructor)))
|
||||
#+end_src
|
||||
** xsettingsd
|
||||
#+begin_src scheme
|
||||
(define xsettingsd
|
||||
(make <service>
|
||||
#:provides '(xsettingsd)
|
||||
#:respawn? #t
|
||||
#:start (make-forkexec-constructor '("xsettingsd"))
|
||||
#:stop (make-kill-destructor)))
|
||||
#+end_src
|
||||
** Discord rich presence
|
||||
|
||||
References:
|
||||
- [[https://github.com/flathub/com.discordapp.Discord/wiki/Rich-Precense-(discord-rpc)][Rich Precense (discord rpc)]]
|
||||
|
||||
#+begin_src scheme
|
||||
(define discord-rich-presence
|
||||
(make <service>
|
||||
#:provides '(discord-rich-presence)
|
||||
#:one-shot? #t
|
||||
#:start (make-system-constructor "ln -sf {app/com.discordapp.Discord,$XDG_RUNTIME_DIR}/discord-ipc-0")))
|
||||
#+end_src
|
||||
** Shepherd config
|
||||
Register services
|
||||
#+begin_src scheme
|
||||
|
|
@ -2235,7 +2273,10 @@ Register services
|
|||
mcron
|
||||
aw-server
|
||||
aw-watcher-afk
|
||||
aw-watcher-window)
|
||||
aw-watcher-window
|
||||
pulseeffects
|
||||
xsettingsd
|
||||
discord-rich-presence)
|
||||
#+end_src
|
||||
|
||||
Daemonize shepherd
|
||||
|
|
@ -2245,8 +2286,12 @@ Daemonize shepherd
|
|||
|
||||
Run services
|
||||
#+begin_src scheme
|
||||
(for-each start '(mpd mpd-watcher mcron aw-server aw-watcher-afk aw-watcher-window))
|
||||
(for-each start '(mpd mpd-watcher mcron aw-server aw-watcher-afk aw-watcher-window pulseeffects xsettingsd discord-rich-presence))
|
||||
#+end_src
|
||||
** Sync
|
||||
| Guix dependency |
|
||||
|-----------------|
|
||||
| megacmd-1.4 |
|
||||
* Guix settings
|
||||
Other desktop programs I use are listed below.
|
||||
|
||||
|
|
@ -2264,6 +2309,7 @@ Other desktop programs I use are listed below.
|
|||
| xmodmap | Program to modify keybindings on X server |
|
||||
| thunar | My preferred GUI file manager |
|
||||
| keepassxc | My preferred password manager |
|
||||
| telegram-desktop | telegram client |
|
||||
|
||||
#+NAME: packages
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
|
|
|
|||
|
|
@ -3870,7 +3870,7 @@ Shows which file is being edited in Emacs.
|
|||
#+begin_src emacs-lisp
|
||||
(use-package elcord
|
||||
:straight t
|
||||
:if (and (string= (system-name) "pdsk") (not my/slow-ssh))
|
||||
:if (and (string= (system-name) "indigo") (not my/slow-ssh))
|
||||
:config
|
||||
(elcord-mode))
|
||||
#+end_src
|
||||
|
|
|
|||
39
Guix.org
39
Guix.org
|
|
@ -317,6 +317,42 @@ Default services for each machine:
|
|||
%base-file-systems)))
|
||||
#+end_src
|
||||
|
||||
** indigo
|
||||
=indigo= is my desktop PC.
|
||||
|
||||
#+begin_src scheme :noweb yes :tangle ~/.config/guix/systems/indigo.scm
|
||||
<<system-common>>
|
||||
|
||||
(operating-system
|
||||
<<system-base>>
|
||||
|
||||
(host-name "indigo")
|
||||
(services (cons*
|
||||
(set-xorg-configuration
|
||||
(xorg-configuration
|
||||
(keyboard-layout keyboard-layout)))
|
||||
%my-base-services))
|
||||
|
||||
(bootloader
|
||||
(bootloader-configuration
|
||||
(bootloader grub-efi-bootloader)
|
||||
(target "/boot/efi")
|
||||
(keyboard-layout keyboard-layout)))
|
||||
|
||||
(swap-devices
|
||||
(list (uuid "059a2c26-8f70-4986-adf0-1a2e7b511404")))
|
||||
|
||||
(file-systems
|
||||
(cons* (file-system
|
||||
(mount-point "/")
|
||||
(device (file-system-label "my-root"))
|
||||
(type "ext4"))
|
||||
(file-system
|
||||
(mount-point "/boot/efi")
|
||||
(device "/dev/sda1")
|
||||
(type "vfat"))
|
||||
%base-file-systems)))
|
||||
#+end_src
|
||||
** blue
|
||||
A VM on which I test Guix. Will probably be deleted sooner or later.
|
||||
|
||||
|
|
@ -495,12 +531,13 @@ What a nonsense of a program.
|
|||
|
||||
I was able to launch the nix version with the following wrapper script:
|
||||
#+begin_src bash :tangle ~/bin/slack-wrapper
|
||||
export PATH="$HOME/bin/dummies:$PATH"
|
||||
mkdir -p ~/.cache/slack
|
||||
slack -r ~/.cache/slack
|
||||
#+end_src
|
||||
|
||||
Also, it requires a =lsb_release= in the PATH, so here is one:
|
||||
#+begin_src bash :tangle ~/bin/lsb_release
|
||||
#+begin_src bash :tangle ~/bin/dummies/lsb_release
|
||||
echo "LSB Version: Hey. I spent an hour figuring out why Slack doesn't launch."
|
||||
echo "Distributor ID: It seems like it requires an lsb_release."
|
||||
echo "Description: But GNU Guix doesn't have one."
|
||||
|
|
|
|||
8
bin/dummies/lsb_release
Executable file
8
bin/dummies/lsb_release
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
# [[file:../../Guix.org::*Slack][Slack:2]]
|
||||
echo "LSB Version: Hey. I spent an hour figuring out why Slack doesn't launch."
|
||||
echo "Distributor ID: It seems like it requires an lsb_release."
|
||||
echo "Description: But GNU Guix doesn't have one."
|
||||
echo "Release: 42.2"
|
||||
echo "Codename: n/a"
|
||||
# Slack:2 ends here
|
||||
|
|
@ -27,8 +27,8 @@ declare -A BAR_HEIGHT=(
|
|||
["HDMI-A-0"]="29"
|
||||
)
|
||||
declare -A BLOCKS=(
|
||||
["DVI-D-0"]="pulseaudio SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP weather SEP sun aw-afk date TSEP"
|
||||
["HDMI-A-0"]="pulseaudio mpd SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP weather SEP sun aw-afk date TSEP"
|
||||
["DVI-D-0"]="pulseaudio SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP weather SEP sun date TSEP"
|
||||
["HDMI-A-0"]="pulseaudio mpd SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP weather SEP sun date TSEP"
|
||||
["eDP-1"]="pulseaudio mpd SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP battery SEP sun date TSEP"
|
||||
)
|
||||
|
||||
|
|
|
|||
6
bin/slack-wrapper
Executable file
6
bin/slack-wrapper
Executable file
|
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
# [[file:../Guix.org::*Slack][Slack:1]]
|
||||
export PATH="$HOME/bin/dummies:$PATH"
|
||||
mkdir -p ~/.cache/slack
|
||||
slack -r ~/.cache/slack
|
||||
# Slack:1 ends here
|
||||
Loading…
Add table
Reference in a new issue