feat(guix): systems & manifests

This commit is contained in:
Pavel Korytov 2021-05-30 17:37:05 +03:00
parent 762ae0e5bc
commit 5d006c082c
5 changed files with 170 additions and 0 deletions

View file

@ -0,0 +1,12 @@
(specifications->manifest
'(
"bat"
"exa"
"ncurses"
"alacritty"
"xclip"
"tmux"
"rust-starship"
"dt-colorscripts"
"fish"
"xrdb"))

View file

@ -0,0 +1,16 @@
(specifications->manifest
'(
"zathura-djvu"
"zathura-pdf-poppler"
"zathura-ps"
"zathura"
"picom"
"keynav"
"dunst"
"flameshot"
"rofi"
"sunwait"
"curl"
"bind"
"polybar"
"i3-gaps"))

View file

@ -0,0 +1,5 @@
(specifications->manifest
'("emacs"
"the-silver-searcher"
"ripgrep"
"emacs-vterm"))

View file

@ -0,0 +1,80 @@
;; [[file:../../../Guix.org::*blue][blue:1]]
(use-modules (gnu))
(use-modules (gnu system nss))
(use-modules (gnu packages certs))
(use-modules (gnu packages version-control))
(use-modules (gnu packages vim))
(use-modules (gnu packages wm))
(use-modules (gnu packages openbox))
(use-modules (nongnu packages linux))
(use-modules (nongnu system linux-initrd))
(use-service-modules desktop networking ssh xorg)
(use-package-modules ssh)
(operating-system
;; Use the full Linux kernel
(kernel linux)
(initrd microcode-initrd)
(firmware (list linux-firmware))
(locale "en_US.utf8")
(timezone "Europe/Moscow")
;; US/RU keyboard layout
(keyboard-layout (keyboard-layout "us,ru" #:options '("grp:alt_shift_toggle")))
;; User accounts
(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"
"lp")))
%base-user-accounts))
;; Base packages
(packages
(append
(list nss-certs
git
i3-gaps
openbox
vim)
%base-packages))
;; Services
(services
(append
(list (service openssh-service-type)
(set-xorg-configuration
(xorg-configuration
(keyboard-layout keyboard-layout))))
%desktop-services))
(host-name "blue")
(bootloader
(bootloader-configuration
(bootloader grub-bootloader)
(target "/dev/sda")
(keyboard-layout keyboard-layout)))
(swap-devices
(list (uuid "d9ca4f8b-4bb1-420e-9371-3558731bada1")))
(file-systems
(cons* (file-system
(mount-point "/")
(device
(uuid "179fbd75-3c7f-4de2-8c4f-4c30939b8a3f"
'ext4))
(type "ext4"))
%base-file-systems)))
;; blue:1 ends here

View file

@ -155,6 +155,10 @@ However, I'd rather use the =Xresources= file wherever possible. Here is the cod
:header-args+: :tangle ./.config/i3/config
:END:
| Guix dependency |
|-----------------|
| i3-gaps |
[[https://i3wm.org/][i3wm]] is a manual tiling window manager, which is currently my window manager of choice. I've tried several alternatives, including [[https://xmonad.org/][xmonad]] & [[https://github.com/ch11ng/exwm][EXWM]], but i3 seems to fit my workflow best.
[[https://github.com/Airblader/i3][i3-gaps]] is an i3 fork with a few features like window gaps. I like to enable inner gaps when there is at least one container in a workspace.
@ -674,6 +678,10 @@ exec "bash ~/bin/autostart.sh"
:header-args+: :tangle ./.config/polybar/config
:END:
| Guix dependency |
|-----------------|
| polybar |
[[https://github.com/polybar/polybar][Polybar]] is a nice-looking, WM-agnostic statusbar program.
I switched to polybar because I wanted to try out some WMs other than i3, but decided to stick with i3 for now.
@ -832,7 +840,13 @@ margin-bottom = 0
Some of the custom modules below use Org mode noweb to evaluate colors, because it's faster than querying =xrdb= at runtime. I wish I could reference polybar values there, but [[https://github.com/polybar/polybar/issues/615][it looks like this is impossible]].
If you want to copy something, you can go to the [[file:bin/polybar/][bin/polybar]] folder.
*** ipstack-vpn
| Guix dependency | Description |
|-----------------+--------------|
| bind | Provides dig |
| curl | |
A module to get a country of the current IP and openvpn status. Uses [[https://ipstack.com/][ipstack]] API.
#+begin_src bash :tangle ./bin/polybar/ipstack-vpn.sh :noweb yes
@ -914,6 +928,10 @@ exec = /home/pavel/bin/polybar/aw_afk.sh
interval = 60
#+end_src
*** sun
| Guix dependency |
|-----------------|
| sunwait |
Prints out the time of sunrise/sunset. Uses [[https://github.com/risacher/sunwait][sunwait]]
#+begin_src bash :tangle ./bin/polybar/sun.sh :noweb yes
@ -1199,6 +1217,10 @@ ramp-capacity-4 = 
#+end_src
* Rofi
| Guix dependency |
|-----------------|
| rofi |
[[https://github.com/davatorium/rofi][rofi]] is another dynamic menu generator. It can act as dmenu replacement but offers a superset of dmenu's features.
** Theme
@ -1404,6 +1426,10 @@ if [[ ! -z $SELECTED ]]; then
fi
#+end_src
* Flameshot
| Guix dependency |
|-----------------|
| flameshot |
[[https://github.com/flameshot-org/flameshot][flameshot]] is my program of choice to make screenshots.
As it overwrites its own config all the time, I do not keep the file in VC.
@ -1453,6 +1479,10 @@ TYPE_TOGGLE_PANEL=Space
TYPE_UNDO=Ctrl+Z
#+end_src
* dunst
| Guix dependency |
|-----------------|
| dunst |
| Type | Note |
|------+---------------------------------|
| TODO | Cleanup default config comments |
@ -1752,6 +1782,10 @@ References:
#icon = /path/to/icon
#+end_src
* keynav
| Guix dependency |
|-----------------|
| keynav |
| Type | Note |
|---------+--------------------------------|
| SYMLINK | ./config/keynavrc -> .keynavrc |
@ -1830,6 +1864,11 @@ fade-exclude = [
:PROPERTIES:
:header-args+: :tangle ./.config/picom.conf
:END:
| Guix dependency |
|-----------------|
| picom |
[[https://github.com/yshui/picom][picom]] is a compositor for X11. It allows effects such as transparency, blurring, etc.
Sample configuration is a good resource for getting an overview of the available settings. I have only a bunch of necessary settings in mine.
@ -1917,6 +1956,13 @@ wintypes:
};
#+end_src
* Zathura
| Guix dependency |
|---------------------|
| zathura |
| zathura-ps |
| zathura-pdf-poppler |
| zathura-djvu |
[[https://pwmt.org/projects/zathura/][Zathura]] is a pdf viewer with vim-like keybindings. One of my favorite features is an ability to invert the document colors.
#+begin_src conf-space :noweb yes :tangle .config/zathura/zathurarc
@ -1930,3 +1976,14 @@ set recolor true
map <C-r> set recolor false
map <C-R> set recolor true
#+end_src
* Guix settings
#+NAME: packages
#+begin_src emacs-lisp :tangle no
(my/format-guix-dependencies)
#+end_src
#+begin_src scheme :tangle .config/guix/manifests/desktop.scm :noweb yes
(specifications->manifest
'(
<<packages()>>))
#+end_src