mirror of
https://github.com/SqrtMinusOne/dotfiles.git
synced 2025-12-10 19:23:03 +03:00
feat(guix): libvirt & virt-manager
This commit is contained in:
parent
00141e7dca
commit
c138635f6a
4 changed files with 41 additions and 12 deletions
6
.config/guix/manifests/dev.scm
Normal file
6
.config/guix/manifests/dev.scm
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
(specifications->manifest
|
||||||
|
'(
|
||||||
|
"virt-manager"
|
||||||
|
"postgresql"
|
||||||
|
"docker-compose"
|
||||||
|
"conda"))
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
(use-modules (gnu packages openbox))
|
(use-modules (gnu packages openbox))
|
||||||
(use-modules (gnu services docker))
|
(use-modules (gnu services docker))
|
||||||
(use-modules (gnu services cups))
|
(use-modules (gnu services cups))
|
||||||
|
(use-modules (gnu services virtualization))
|
||||||
(use-modules (srfi srfi-1))
|
(use-modules (srfi srfi-1))
|
||||||
(use-modules (guix channels))
|
(use-modules (guix channels))
|
||||||
(use-modules (guix inferior))
|
(use-modules (guix inferior))
|
||||||
|
|
@ -30,10 +31,17 @@
|
||||||
(cups-configuration
|
(cups-configuration
|
||||||
(web-interface? #t)))
|
(web-interface? #t)))
|
||||||
(service docker-service-type)
|
(service docker-service-type)
|
||||||
|
(service libvirt-service-type
|
||||||
|
(libvirt-configuration
|
||||||
|
(unix-sock-group "libvirt")
|
||||||
|
(tls-port "16555")))
|
||||||
|
(service virtlog-service-type)
|
||||||
(modify-services %desktop-services
|
(modify-services %desktop-services
|
||||||
(network-manager-service-type config =>
|
(network-manager-service-type
|
||||||
(network-manager-configuration (inherit config)
|
config =>
|
||||||
(vpn-plugins (list network-manager-openvpn)))))))
|
(network-manager-configuration
|
||||||
|
(inherit config)
|
||||||
|
(vpn-plugins (list network-manager-openvpn)))))))
|
||||||
|
|
||||||
|
|
||||||
(define %backlight-udev-rule
|
(define %backlight-udev-rule
|
||||||
|
|
@ -80,6 +88,7 @@
|
||||||
"tty"
|
"tty"
|
||||||
"docker"
|
"docker"
|
||||||
"scanner"
|
"scanner"
|
||||||
|
"libvirt"
|
||||||
"lp")))
|
"lp")))
|
||||||
%base-user-accounts))
|
%base-user-accounts))
|
||||||
|
|
||||||
|
|
@ -132,5 +141,5 @@
|
||||||
(mount-point "/boot/efi")
|
(mount-point "/boot/efi")
|
||||||
(device (uuid "0031-3784" 'fat32))
|
(device (uuid "0031-3784" 'fat32))
|
||||||
(type "vfat"))
|
(type "vfat"))
|
||||||
%base-file-systems))
|
%base-file-systems)))
|
||||||
;; eminence:1 ends here
|
;; eminence:1 ends here
|
||||||
|
|
|
||||||
|
|
@ -1002,10 +1002,6 @@ Prints out a current uptime and non-AFK time from [[https://github.com/ActivityW
|
||||||
|-----------------|
|
|-----------------|
|
||||||
| dateutils |
|
| dateutils |
|
||||||
|
|
||||||
| Type | Note |
|
|
||||||
|------+--------------------------------------------|
|
|
||||||
| TODO | Fix crash on uptime > 99h |
|
|
||||||
|
|
||||||
#+begin_src bash :tangle ./bin/polybar/aw_afk.sh :noweb yes
|
#+begin_src bash :tangle ./bin/polybar/aw_afk.sh :noweb yes
|
||||||
afk_event=$(curl -s -X GET "http://localhost:5600/api/0/buckets/aw-watcher-afk_$(hostname)/events?limit=1" -H "accept: application/json")
|
afk_event=$(curl -s -X GET "http://localhost:5600/api/0/buckets/aw-watcher-afk_$(hostname)/events?limit=1" -H "accept: application/json")
|
||||||
status=$(echo ${afk_event} | jq -r '.[0].data.status')
|
status=$(echo ${afk_event} | jq -r '.[0].data.status')
|
||||||
|
|
@ -2100,6 +2096,7 @@ This section generates manifests for various desktop software that I'm using.
|
||||||
| dev | conda |
|
| dev | conda |
|
||||||
| dev | docker-compose |
|
| dev | docker-compose |
|
||||||
| dev | postgresql |
|
| dev | postgresql |
|
||||||
|
| dev | virt-manager |
|
||||||
** Manifests
|
** Manifests
|
||||||
#+NAME: packages
|
#+NAME: packages
|
||||||
#+begin_src emacs-lisp :tangle no :var category=""
|
#+begin_src emacs-lisp :tangle no :var category=""
|
||||||
|
|
|
||||||
25
Guix.org
25
Guix.org
|
|
@ -192,6 +192,7 @@ Common modules:
|
||||||
(use-modules (gnu packages openbox))
|
(use-modules (gnu packages openbox))
|
||||||
(use-modules (gnu services docker))
|
(use-modules (gnu services docker))
|
||||||
(use-modules (gnu services cups))
|
(use-modules (gnu services cups))
|
||||||
|
(use-modules (gnu services virtualization))
|
||||||
(use-modules (srfi srfi-1))
|
(use-modules (srfi srfi-1))
|
||||||
(use-modules (guix channels))
|
(use-modules (guix channels))
|
||||||
(use-modules (guix inferior))
|
(use-modules (guix inferior))
|
||||||
|
|
@ -252,6 +253,7 @@ User accounts.
|
||||||
"tty"
|
"tty"
|
||||||
"docker"
|
"docker"
|
||||||
"scanner"
|
"scanner"
|
||||||
|
"libvirt"
|
||||||
"lp")))
|
"lp")))
|
||||||
%base-user-accounts))
|
%base-user-accounts))
|
||||||
|
|
||||||
|
|
@ -276,6 +278,7 @@ Default services for each machine:
|
||||||
- add nix service
|
- add nix service
|
||||||
- add docker service
|
- add docker service
|
||||||
- add CUPS service
|
- add CUPS service
|
||||||
|
- add libvirt service
|
||||||
- add a symlink to ELF interpreter to where most Linux binaries expect it
|
- add a symlink to ELF interpreter to where most Linux binaries expect it
|
||||||
#+begin_src scheme :tangle no :noweb-ref system-common
|
#+begin_src scheme :tangle no :noweb-ref system-common
|
||||||
(define %my-base-services
|
(define %my-base-services
|
||||||
|
|
@ -288,10 +291,17 @@ Default services for each machine:
|
||||||
(cups-configuration
|
(cups-configuration
|
||||||
(web-interface? #t)))
|
(web-interface? #t)))
|
||||||
(service docker-service-type)
|
(service docker-service-type)
|
||||||
|
(service libvirt-service-type
|
||||||
|
(libvirt-configuration
|
||||||
|
(unix-sock-group "libvirt")
|
||||||
|
(tls-port "16555")))
|
||||||
|
(service virtlog-service-type)
|
||||||
(modify-services %desktop-services
|
(modify-services %desktop-services
|
||||||
(network-manager-service-type config =>
|
(network-manager-service-type
|
||||||
(network-manager-configuration (inherit config)
|
config =>
|
||||||
(vpn-plugins (list network-manager-openvpn)))))))
|
(network-manager-configuration
|
||||||
|
(inherit config)
|
||||||
|
(vpn-plugins (list network-manager-openvpn)))))))
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
@ -389,7 +399,7 @@ Default services for each machine:
|
||||||
(mount-point "/boot/efi")
|
(mount-point "/boot/efi")
|
||||||
(device (uuid "0031-3784" 'fat32))
|
(device (uuid "0031-3784" 'fat32))
|
||||||
(type "vfat"))
|
(type "vfat"))
|
||||||
%base-file-systems))
|
%base-file-systems)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** azure
|
** azure
|
||||||
|
|
@ -609,6 +619,13 @@ echo "Description: But GNU Guix doesn't have one."
|
||||||
echo "Release: 42.2"
|
echo "Release: 42.2"
|
||||||
echo "Codename: n/a"
|
echo "Codename: n/a"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
** virt-manager
|
||||||
|
Run the following to fix the network:
|
||||||
|
#+begin_src sh :tangle no
|
||||||
|
sudo virsh net-define /run/current-system/profile/etc/libvirt/qemu/networks/default.xml
|
||||||
|
sudo virsh net-start default
|
||||||
|
sudo herd restart libvirtd
|
||||||
|
#+end_src
|
||||||
** wakatime-cli
|
** wakatime-cli
|
||||||
| Note | Description |
|
| Note | Description |
|
||||||
|------+-----------------------|
|
|------+-----------------------|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue