From a3f937cd44640831db2183b81473037b83fedfa2 Mon Sep 17 00:00:00 2001 From: SqrtMinusOne Date: Fri, 11 Jun 2021 19:13:03 +0300 Subject: [PATCH] refactor(guix): move manifests to Desktop.org --- .config/guix/manifests/browsers.scm | 2 - .config/guix/manifests/desktop.scm | 2 +- .config/guix/manifests/latex.scm | 2 - .config/guix/manifests/music.scm | 6 +++ .config/guix/manifests/office.scm | 2 - .config/guix/manifests/system.scm | 8 +-- .config/guix/systems/azure.scm | 18 ++++--- Desktop.org | 77 +++++++++++++++++++++++++++-- Guix.org | 71 +++++--------------------- 9 files changed, 103 insertions(+), 85 deletions(-) create mode 100644 .config/guix/manifests/music.scm diff --git a/.config/guix/manifests/browsers.scm b/.config/guix/manifests/browsers.scm index 6c8b51c..a8c8048 100644 --- a/.config/guix/manifests/browsers.scm +++ b/.config/guix/manifests/browsers.scm @@ -1,6 +1,4 @@ -;; [[file:../../../Guix.org::*Manifests][Manifests:2]] (specifications->manifest '( "firefox" "ungoogled-chromium")) -;; Manifests:2 ends here diff --git a/.config/guix/manifests/desktop.scm b/.config/guix/manifests/desktop.scm index 0873967..fbdb44d 100644 --- a/.config/guix/manifests/desktop.scm +++ b/.config/guix/manifests/desktop.scm @@ -8,6 +8,7 @@ "network-manager-applet" "light" "arandr" + "xprop" "xrandr" "flatpak" "zathura-djvu" @@ -25,7 +26,6 @@ "curl" "bind" "polybar" - "i3lock" "i3-gaps" "hicolor-icon-theme" "papirus-icon-theme" diff --git a/.config/guix/manifests/latex.scm b/.config/guix/manifests/latex.scm index cb2e27d..b82e81d 100644 --- a/.config/guix/manifests/latex.scm +++ b/.config/guix/manifests/latex.scm @@ -1,5 +1,3 @@ -;; [[file:../../../Guix.org::*Manifests][Manifests:5]] (specifications->manifest '( "texlive")) -;; Manifests:5 ends here diff --git a/.config/guix/manifests/music.scm b/.config/guix/manifests/music.scm new file mode 100644 index 0000000..791e28e --- /dev/null +++ b/.config/guix/manifests/music.scm @@ -0,0 +1,6 @@ +(specifications->manifest + '( + "mpd-watcher" + "picard" + "ncmpcpp" + "mpd")) diff --git a/.config/guix/manifests/office.scm b/.config/guix/manifests/office.scm index e2ed1a5..8c3afa1 100644 --- a/.config/guix/manifests/office.scm +++ b/.config/guix/manifests/office.scm @@ -1,6 +1,4 @@ -;; [[file:../../../Guix.org::*Manifests][Manifests:4]] (specifications->manifest '( "gimp" "libreoffice")) -;; Manifests:4 ends here diff --git a/.config/guix/manifests/system.scm b/.config/guix/manifests/system.scm index 5e2ac2f..f14351d 100644 --- a/.config/guix/manifests/system.scm +++ b/.config/guix/manifests/system.scm @@ -1,9 +1,3 @@ -;; [[file:../../../Guix.org::*Manifests][Manifests:3]] (specifications->manifest '( - "zlib" - "glibc" - "patchelf" - "python" - "openvpn")) -;; Manifests:3 ends here + )) diff --git a/.config/guix/systems/azure.scm b/.config/guix/systems/azure.scm index 551ef76..e06e655 100644 --- a/.config/guix/systems/azure.scm +++ b/.config/guix/systems/azure.scm @@ -18,11 +18,14 @@ (use-service-modules desktop networking ssh xorg) (use-package-modules ssh) -(define %my-desktop-services - (modify-services %desktop-services - (network-manager-service-type config => - (network-manager-configuration (inherit config) - (vpn-plugins (list network-manager-openvpn)))))) +(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")) + (modify-services %desktop-services + (network-manager-service-type config => + (network-manager-configuration (inherit config) + (vpn-plugins (list network-manager-openvpn))))))) (define %backlight-udev-rule @@ -76,6 +79,7 @@ (list nss-certs git i3-gaps + i3lock openbox xterm vim) @@ -83,12 +87,10 @@ (host-name "azure") (services (cons* - (service openssh-service-type) (set-xorg-configuration (xorg-configuration (keyboard-layout keyboard-layout))) - (extra-special-file "/lib64/ld-linux-x86-64.so.2" (file-append glibc "/lib/ld-linux-x86-64.so.2")) - (modify-services %my-desktop-services + (modify-services %my-base-services (elogind-service-type config => (elogind-configuration (inherit config) (handle-lid-switch-external-power 'suspend))) diff --git a/Desktop.org b/Desktop.org index de1379c..7c14414 100644 --- a/Desktop.org +++ b/Desktop.org @@ -180,10 +180,12 @@ IIRC the only thing =lxapparance= does is edit GTK config files. :header-args+: :tangle ./.config/i3/config :END: -| Guix dependency | -|-----------------| -| i3-gaps | -| i3lock | +| Guix dependency | Disabled | +|-----------------+----------| +| i3-gaps | | +| i3lock | true | + +=i3lock= is disabled because the global one has to be used. [[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. @@ -2013,7 +2015,71 @@ set recolor true map set recolor false map set recolor true #+end_src -* Flatpak +* Various software +This section generates manifests for various desktop software that I'm using. + +** Browsers +| Category | Guix dependency | +|----------+--------------------| +| browsers | ungoogled-chromium | +| browsers | firefox | +** Office +| Category | Guix dependency | +|----------+-----------------| +| office | libreoffice | +| office | gimp | +** Music +| Category | Guix dependency | +|----------+-----------------| +| music | mpd | +| music | ncmpcpp | +| music | picard | +| music | mpd-watcher | +** LaTeX +| Category | Guix dependency | +|----------+-----------------| +| latex | texlive | +** Manifests +#+NAME: packages +#+begin_src emacs-lisp :tangle no :var category="" +(my/format-guix-dependencies category) +#+end_src + +Browsers +#+begin_src scheme :tangle .config/guix/manifests/browsers.scm :noweb yes +(specifications->manifest + '( + <>)) +#+end_src + +System +#+begin_src scheme :tangle .config/guix/manifests/system.scm :noweb yes +(specifications->manifest + '( + <>)) +#+end_src + +Music +#+begin_src scheme :tangle .config/guix/manifests/music.scm :noweb yes +(specifications->manifest + '( + <>)) +#+end_src + +Office +#+begin_src scheme :tangle .config/guix/manifests/office.scm :noweb yes +(specifications->manifest + '( + <>)) +#+end_src + +LaTeX +#+begin_src scheme :tangle .config/guix/manifests/latex.scm :noweb yes +(specifications->manifest + '( + <>)) +#+end_src +** Flatpak A lot of proprietary desktop applications can be installed most easily with flatpak & flathub. | Guix dependency | @@ -2061,6 +2127,7 @@ Other desktop programs I use are listed below. | Guix dependency | Description | |------------------------+-------------------------------------------| | xrandr | X11 CLI to RandR | +| xprop | Tool to display properties of X windows | | arandr | GUI to xrandr | | light | Control screen brightness | | network-manager-applet | Applet to manage network connections | diff --git a/Guix.org b/Guix.org index 59dcc7e..1b719e8 100644 --- a/Guix.org +++ b/Guix.org @@ -229,6 +229,7 @@ Base packages, necessary right after the installation. (list nss-certs git i3-gaps + i3lock openbox xterm vim) @@ -236,13 +237,17 @@ Base packages, necessary right after the installation. #+end_src Default services for each machine: -- overrides the default =%desktop-services= to add OpenVPN support +- override the default =%desktop-services= to add OpenVPN support +- add a symlink to ELF interpeter to where most Linux binaries expect it #+begin_src scheme :tangle no :noweb-ref system-common -(define %my-desktop-services - (modify-services %desktop-services - (network-manager-service-type config => - (network-manager-configuration (inherit config) - (vpn-plugins (list network-manager-openvpn)))))) +(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")) + (modify-services %desktop-services + (network-manager-service-type config => + (network-manager-configuration (inherit config) + (vpn-plugins (list network-manager-openvpn))))))) #+end_src @@ -268,12 +273,10 @@ Default services for each machine: (host-name "azure") (services (cons* - (service openssh-service-type) (set-xorg-configuration (xorg-configuration (keyboard-layout keyboard-layout))) - (extra-special-file "/lib64/ld-linux-x86-64.so.2" (file-append glibc "/lib/ld-linux-x86-64.so.2")) - (modify-services %my-desktop-services + (modify-services %my-base-services (elogind-service-type config => (elogind-configuration (inherit config) (handle-lid-switch-external-power 'suspend))) @@ -376,59 +379,11 @@ guix clone https://github.com/SqrtMinusOne/dotfiles.git And activate the required profiles. Again, downloading & building Emacs, Starship and stuff will take a while. Don't forget to install =JetBrainsMono Nerd Font=. -* Various software -** Browsers -| Category | Guix dependency | -|----------+--------------------| -| browsers | ungoogled-chromium | -| browsers | firefox | -** Office -| Category | Guix dependency | -|----------+-----------------| -| office | libreoffice | -| office | gimp | -** LaTeX -| Category | Guix dependency | -|----------+-----------------| -| latex | texlive | -** System +* Misc software | Category | Guix dependency | |----------+-------------------------| | system | openvpn | | system | python | -** Manifests -#+NAME: packages -#+begin_src emacs-lisp :tangle no :var category="" -(my/format-guix-dependencies category) -#+end_src - -Browsers -#+begin_src scheme :tangle .config/guix/manifests/browsers.scm :noweb yes -(specifications->manifest - '( - <>)) -#+end_src - -System -#+begin_src scheme :tangle .config/guix/manifests/system.scm :noweb yes -(specifications->manifest - '( - <>)) -#+end_src - -Office -#+begin_src scheme :tangle .config/guix/manifests/office.scm :noweb yes -(specifications->manifest - '( - <>)) -#+end_src - -LaTeX -#+begin_src scheme :tangle .config/guix/manifests/latex.scm :noweb yes -(specifications->manifest - '( - <>)) -#+end_src * Notes on installing software | Category | Guix dependency | Description | |----------+-----------------+----------------------------------------------------|