about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2022-11-01 12:33:12 +0900
committerNguyễn Gia Phong <mcsinyx@disroot.org>2022-11-01 12:33:12 +0900
commitb53f96565b8c4e8f8aaf6333c40c8e90e0c34677 (patch)
tree10f79b6151402d66405621e55a7eb58c87d759a6
parentab9e499e8a6ad578af4cefef79268649685f9510 (diff)
downloaddotfiles-b53f96565b8c4e8f8aaf6333c40c8e90e0c34677.tar.gz
Use Guix home
-rw-r--r--guix/bashrc0
-rw-r--r--guix/home.scm40
-rw-r--r--guix/system.scm (renamed from guix.scm)20
3 files changed, 45 insertions, 15 deletions
diff --git a/guix/bashrc b/guix/bashrc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/guix/bashrc
diff --git a/guix/home.scm b/guix/home.scm
new file mode 100644
index 0000000..fb750ab
--- /dev/null
+++ b/guix/home.scm
@@ -0,0 +1,40 @@
+(use-modules (gnu home)
+             (gnu home services)
+             (gnu home services desktop)
+             (gnu home services mcron)
+             (gnu home services shells)
+             (gnu packages)
+             (gnu services)
+             (guix gexp))
+
+(home-environment
+  (packages
+    (specifications->packages
+      '("arandr" "libreoffice" "rxvt-unicode"
+        "audacious" "ffmpeg" "mediainfo" "mpv" "simplescreenrecorder" "yt-dlp"
+        "awesome" "copyq" "dbus" "keynav" "scrot" "sx" "xrdb"
+        "bastet" "hedgewars"
+        "icecat" "isync" "liferea" "mu" "nheko" "transmission:gui" "w3m"
+        "git" "git:send-email" "git-lfs" "rsync" "sshfs" "stow"
+        "font-google-noto" "font-latin-modern"
+        "gcc" "python" "gnupg" "pinentry" "oath-toolkit"
+        "imv" "imagemagick" "zathura" "zathura-pdf-poppler"
+        "pavucontrol" "playerctl" "pulsemixer")))
+  (services
+    (list (service home-bash-service-type
+                   (home-bash-configuration
+                     (bashrc (list (local-file "bashrc" "bashrc")))))
+          (simple-service 'more-home-environment-variables-service
+                          home-environment-variables-service-type
+                          `(("SHELL" . #t)
+                            ("PATH" . "$HOME/.local/bin:$PATH")
+                            ("NIX_PATH" . "$HOME/Sauces")
+                            ("EDITOR" . "vim")
+                            ("GPG_TTY" . "$(tty)")
+                            ("QT_QPA_PLATFORMTHEME" . "qt5ct")))
+          (service home-dbus-service-type)
+          (service home-mcron-service-type
+                   (home-mcron-configuration
+                     (jobs (list #~(job '(next-minute (range 0 60 1))
+                                        (lambda ()
+                                          (system* "mbsync" "--all"))))))))))
diff --git a/guix.scm b/guix/system.scm
index 6542e05..069f001 100644
--- a/guix.scm
+++ b/guix/system.scm
@@ -4,9 +4,9 @@
 (use-modules (gnu))
 (use-service-modules
   avahi
-  dbus
   desktop
   networking
+  nix
   sound
   ssh
   xorg)
@@ -14,7 +14,8 @@
 (operating-system
   (locale "en_DK.utf8")
   (timezone "Asia/Seoul")
-  (keyboard-layout (keyboard-layout "us"))
+  (keyboard-layout (keyboard-layout "us" #:options '("ctrl:nocaps"
+                                                     "compose:menu")))
   (host-name "guix")
   (users (cons* (user-account
                   (name "cnx")
@@ -26,16 +27,7 @@
   (packages
     (append
       (specifications->packages
-        '("arandr" "font-google-noto" "libreoffice" "qt5ct" "rxvt-unicode"
-          "audacious" "ffmpeg" "mediainfo" "mpv"
-          "awesome" "barrier" "copyq" "dbus" "keynav" "scrot" "sx" "xrdb"
-          "bastet" "hedgewars"
-          "curl" "icecat" "isync" "liferea" "mblaze" "nheko" "transmission:gui"
-          "fd" "git" "git:send-email" "git-lfs" "ranger" "ripgrep" "vim"
-          "file" "htop" "rsync" "stow"
-          "gnupg" "pinentry" "nss-certs" "oath-toolkit"
-          "imv" "imagemagick"
-          "pavucontrol" "playerctl" "pulsemixer"))
+        '("curl" "fd" "file" "htop" "nss-certs" "ranger" "ripgrep" "vim-full"))
       %base-packages))
   (services
     (cons* (service openssh-service-type
@@ -47,18 +39,16 @@
                (keyboard-layout keyboard-layout)))
            (screen-locker-service (specification->package "slock"))
            polkit-wheel-service
-           fontconfig-file-system-service
            (service network-manager-service-type)
            (service wpa-supplicant-service-type)
            (service avahi-service-type)
            (udisks-service)
-           (service polkit-service-type)
            (elogind-service)
-           (dbus-service)
            (service ntp-service-type)
            x11-socket-directory-service
            (service pulseaudio-service-type)
            (service alsa-service-type)
+           (service nix-service-type)
            %base-services))
   (kernel-arguments (cons "modprobe.blacklist=pcspkr"
                           %default-kernel-arguments))