From b53f96565b8c4e8f8aaf6333c40c8e90e0c34677 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Tue, 1 Nov 2022 12:33:12 +0900 Subject: Use Guix home --- guix.scm | 81 --------------------------------------------------------- guix/bashrc | 0 guix/home.scm | 40 ++++++++++++++++++++++++++++ guix/system.scm | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 111 insertions(+), 81 deletions(-) delete mode 100644 guix.scm create mode 100644 guix/bashrc create mode 100644 guix/home.scm create mode 100644 guix/system.scm diff --git a/guix.scm b/guix.scm deleted file mode 100644 index 6542e05..0000000 --- a/guix.scm +++ /dev/null @@ -1,81 +0,0 @@ -;; This is an operating system configuration generated -;; by the graphical installer. - -(use-modules (gnu)) -(use-service-modules - avahi - dbus - desktop - networking - sound - ssh - xorg) - -(operating-system - (locale "en_DK.utf8") - (timezone "Asia/Seoul") - (keyboard-layout (keyboard-layout "us")) - (host-name "guix") - (users (cons* (user-account - (name "cnx") - (comment "McSinyx") - (group "users") - (home-directory "/home/cnx") - (supplementary-groups '("wheel" "netdev" "audio" "video"))) - %base-user-accounts)) - (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")) - %base-packages)) - (services - (cons* (service openssh-service-type - (openssh-configuration - (password-authentication? #f))) - (service xorg-server-service-type) - (set-xorg-configuration - (xorg-configuration - (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) - %base-services)) - (kernel-arguments (cons "modprobe.blacklist=pcspkr" - %default-kernel-arguments)) - (bootloader - (bootloader-configuration - (bootloader grub-efi-bootloader) - (targets (list "/boot/efi")) - (keyboard-layout keyboard-layout))) - (swap-devices - (list (swap-space (target (uuid "2e1d6b10-ef93-47f0-8eb0-b0ebf406e99b"))))) - (file-systems - (cons* (file-system - (mount-point "/") - (device (uuid "f2cc88e7-55d3-4fce-9bc0-68a38c9671f5" 'btrfs)) - (type "btrfs")) - (file-system - (mount-point "/boot/efi") - (device (uuid "09F6-ABE3" 'fat32)) - (type "vfat")) - %base-file-systems))) diff --git a/guix/bashrc b/guix/bashrc new file mode 100644 index 0000000..e69de29 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/system.scm b/guix/system.scm new file mode 100644 index 0000000..069f001 --- /dev/null +++ b/guix/system.scm @@ -0,0 +1,71 @@ +;; This is an operating system configuration generated +;; by the graphical installer. + +(use-modules (gnu)) +(use-service-modules + avahi + desktop + networking + nix + sound + ssh + xorg) + +(operating-system + (locale "en_DK.utf8") + (timezone "Asia/Seoul") + (keyboard-layout (keyboard-layout "us" #:options '("ctrl:nocaps" + "compose:menu"))) + (host-name "guix") + (users (cons* (user-account + (name "cnx") + (comment "McSinyx") + (group "users") + (home-directory "/home/cnx") + (supplementary-groups '("wheel" "netdev" "audio" "video"))) + %base-user-accounts)) + (packages + (append + (specifications->packages + '("curl" "fd" "file" "htop" "nss-certs" "ranger" "ripgrep" "vim-full")) + %base-packages)) + (services + (cons* (service openssh-service-type + (openssh-configuration + (password-authentication? #f))) + (service xorg-server-service-type) + (set-xorg-configuration + (xorg-configuration + (keyboard-layout keyboard-layout))) + (screen-locker-service (specification->package "slock")) + polkit-wheel-service + (service network-manager-service-type) + (service wpa-supplicant-service-type) + (service avahi-service-type) + (udisks-service) + (elogind-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)) + (bootloader + (bootloader-configuration + (bootloader grub-efi-bootloader) + (targets (list "/boot/efi")) + (keyboard-layout keyboard-layout))) + (swap-devices + (list (swap-space (target (uuid "2e1d6b10-ef93-47f0-8eb0-b0ebf406e99b"))))) + (file-systems + (cons* (file-system + (mount-point "/") + (device (uuid "f2cc88e7-55d3-4fce-9bc0-68a38c9671f5" 'btrfs)) + (type "btrfs")) + (file-system + (mount-point "/boot/efi") + (device (uuid "09F6-ABE3" 'fat32)) + (type "vfat")) + %base-file-systems))) -- cgit 1.4.1