From f76562c546d523e58853769f182a8e6f41f2e3c9 Mon Sep 17 00:00:00 2001 From: ryan77627 Date: Fri, 19 May 2023 01:24:44 -0400 Subject: [PATCH] working base configuration --- modules/ryan-config/base-system.scm | 225 ++++++++++++++-------------- 1 file changed, 116 insertions(+), 109 deletions(-) diff --git a/modules/ryan-config/base-system.scm b/modules/ryan-config/base-system.scm index cdb28fd..0c22182 100644 --- a/modules/ryan-config/base-system.scm +++ b/modules/ryan-config/base-system.scm @@ -82,117 +82,124 @@ "RUN+=\"/run/current-system/profile/bin/chmod g+w /sys/class/backlight/%k/brightness\""))) (define-public base-operating-system -(operating-system - (kernel linux) - (firmware (list linux-firmware)) - (locale "en_US.utf8") - (timezone "America/New_York") - (keyboard-layout (keyboard-layout "us")) - (host-name "ThisWillChange") + (operating-system + (kernel linux) + (firmware (list linux-firmware)) + (locale "en_US.utf8") + (timezone "America/New_York") + (keyboard-layout (keyboard-layout "us")) + (host-name "ThisWillChange") - ;; The list of user accounts ('root' is implicit). - (users (cons* (user-account - (name "ryan") - (comment "Ryan") - (group "users") - ;(shell (file-append zsh "/bin/zsh")) - (home-directory "/home/ryan") - (supplementary-groups '("wheel" "netdev" "audio" "video" "lp" "plugdev" "docker" "libvirt" "kvm"))) - %base-user-accounts)) + ;; The list of user accounts ('root' is implicit). + (users (cons* (user-account + (name "ryan") + (comment "Ryan") + (group "users") + ;(shell (file-append zsh "/bin/zsh")) + (home-directory "/home/ryan") + (supplementary-groups '("wheel" "netdev" "audio" "video" "lp" "plugdev" "docker" "libvirt" "kvm"))) + %base-user-accounts)) - ;; Packages installed system-wide. Users can also install packages - ;; under their own account: use 'guix search KEYWORD' to search - ;; for packages and 'guix install PACKAGE' to install a package. - (packages (append (map specification->package (list "sway" - "swaybg" - "swayidle" - ;"swaylock-effects" - "fuzzel" - "alacritty" - "pinentry-qt" - "adwaita-icon-theme" - "hicolor-icon-theme" - "git" - "nss-certs" - "waybar" - "gnupg" - "light" - "mako" - "grim" - "slurp" - "wl-clipboard" - "bluez" - "blueman" - "ldacbt" - "libfreeaptx" - "libfdk" - "opendoas" - ;"xdg-desktop-portal-wlr" - "xdg-desktop-portal" - "pipewire" - "docker" - "libvirt" - "virt-manager" - "wireplumber" - "zsh")) - (list my-ca-certs xdg-desktop-portal-wlr-new swaylock-effects-new) - %my-base-packages )) + ;; Packages installed system-wide. Users can also install packages + ;; under their own account: use 'guix search KEYWORD' to search + ;; for packages and 'guix install PACKAGE' to install a package. + (packages (append (map specification->package (list "sway" + "swaybg" + "swayidle" + ;"swaylock-effects" + "fuzzel" + "alacritty" + "pinentry-qt" + "adwaita-icon-theme" + "hicolor-icon-theme" + "git" + "nss-certs" + "waybar" + "gnupg" + "light" + "mako" + "grim" + "slurp" + "wl-clipboard" + "bluez" + "blueman" + "ldacbt" + "libfreeaptx" + "libfdk" + "opendoas" + ;"xdg-desktop-portal-wlr" + "xdg-desktop-portal" + "pipewire" + "docker" + "libvirt" + "virt-manager" + "wireplumber" + "zsh")) + (list my-ca-certs xdg-desktop-portal-wlr-new swaylock-effects-new) + %my-base-packages )) - ;; Below is the list of system services. To search for available - ;; services, run 'guix system search KEYWORD' in a terminal. - (services - (append (list + ;; Below is the list of system services. To search for available + ;; services, run 'guix system search KEYWORD' in a terminal. + (services + (append (list - ;; To configure OpenSSH, pass an 'openssh-configuration' - ;; record as a second argument to 'service' below. - (service openssh-service-type) - (service pcscd-service-type) - (service docker-service-type) - (service nix-service-type) - (service libvirt-service-type - (libvirt-configuration - (unix-sock-group "libvirt"))) - (service bluetooth-service-type) - (udev-rules-service 'fido2 libfido2 #:groups '("plugdev"))) + ;; To configure OpenSSH, pass an 'openssh-configuration' + ;; record as a second argument to 'service' below. + (service openssh-service-type) + (service pcscd-service-type) + (service docker-service-type) + (service nix-service-type) + (service libvirt-service-type + (libvirt-configuration + (unix-sock-group "libvirt"))) + (service bluetooth-service-type) + (udev-rules-service 'fido2 libfido2 #:groups '("plugdev"))) - ;; This is the default list of services we - ;; are appending to. - (modify-services %desktop-services - (guix-service-type config => - (guix-configuration - (inherit config) - (substitute-urls - (append (list "https://substitutes.nonguix.org") - %default-substitute-urls)) - (authorized-keys - (cons* (plain-file "non-guix.pub" - "(public-key - (ecc - (curve Ed25519) - (q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#) - ) - )" ) %default-authorized-guix-keys)))) - (udev-service-type config => - (udev-configuration - (inherit config) - (rules (cons %backlight-udev-rule - (udev-configuration-rules config))))) - (delete pulseaudio-service-type) - (delete gdm-service-type) - (delete xorg-server-service-type) - (delete alsa-service-type) ))) - (setuid-programs - (append (list (file-like->setuid-program - (file-append - ;(specification->package "swaylock-effects") - swaylock-effects-new - "/bin/swaylock")) - (file-like->setuid-program - (file-append - (specification->package "opendoas") - "/bin/doas"))) - (delete sudo %setuid-programs))) - (bootloader (bootloader-configuration - (bootloader grub-efi-bootloader) - (targets (list "/boot/efi")) - (keyboard-layout keyboard-layout))))))))) + ;; This is the default list of services we + ;; are appending to. + (modify-services %desktop-services + (guix-service-type config => + (guix-configuration + (inherit config) + (substitute-urls + (append (list "https://substitutes.nonguix.org") + %default-substitute-urls)) + (authorized-keys + (cons* (plain-file "non-guix.pub" + "(public-key + (ecc + (curve Ed25519) + (q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#) + ) + )" ) %default-authorized-guix-keys)))) + (udev-service-type config => + (udev-configuration + (inherit config) + (rules (cons %backlight-udev-rule + (udev-configuration-rules config))))) + (delete pulseaudio-service-type) + (delete gdm-service-type) + (delete xorg-server-service-type) + (delete alsa-service-type) ))) + (setuid-programs + (append (list (file-like->setuid-program + (file-append + ;(specification->package "swaylock-effects") + swaylock-effects-new + "/bin/swaylock")) + (file-like->setuid-program + (file-append + (specification->package "opendoas") + "/bin/doas"))) + (delete sudo %setuid-programs))) + (file-systems (cons* + (file-system + (mount-point "/tmp") + (device "none") + (type "tmpfs") + (check? #f)) + %base-file-systems)) + (bootloader (bootloader-configuration + (bootloader grub-efi-bootloader) + (targets (list "/boot/efi")) + (keyboard-layout keyboard-layout))))) \ No newline at end of file