adding a base system file and properly linking it to syl and kaladin

This commit is contained in:
Chris Cochru 2023-06-27 16:36:48 -05:00
parent d6a539885e
commit e432241a74
4 changed files with 285 additions and 567 deletions

View file

@ -7,6 +7,7 @@
;; ;;
(define-module (base) (define-module (base)
#:use-module (srfi srfi-1)
#:use-module (gnu) #:use-module (gnu)
#:use-module (gnu services) #:use-module (gnu services)
#:use-module (gnu services shepherd) #:use-module (gnu services shepherd)
@ -35,7 +36,7 @@ root ALL=(ALL) ALL
YOUR-USER-NAME ALL=(ALL) NOPASSWD:/run/current-system/profile/bin/chvt,/run/current-system/profile/bin/loginctl")) YOUR-USER-NAME ALL=(ALL) NOPASSWD:/run/current-system/profile/bin/chvt,/run/current-system/profile/bin/loginctl"))
(define-public base-system-packages (define-public base-system-packages
(packages (append (map specification->package (append (map specification->package
'( "nss-certs" '( "nss-certs"
"sway" "sway"
"dbus-glib" "dbus-glib"
@ -52,10 +53,9 @@ YOUR-USER-NAME ALL=(ALL) NOPASSWD:/run/current-system/profile/bin/chvt,/run/cur
"libvdpau" "libvdpau"
"libvdpau-va-gl" "libvdpau-va-gl"
"emacs-next-pgtk")) "emacs-next-pgtk"))
%base-packages))) %base-packages))
(define-public base-system-services (define-public base-system-services
(services
(append (append
(list ;; To configure OpenSSH, pass an 'openssh-configuration' (list ;; To configure OpenSSH, pass an 'openssh-configuration'
;; record as a second argument to 'service' below. ;; record as a second argument to 'service' below.
@ -85,7 +85,7 @@ YOUR-USER-NAME ALL=(ALL) NOPASSWD:/run/current-system/profile/bin/chvt,/run/cur
(using-setuid? #f))) (using-setuid? #f)))
(set-xorg-configuration (set-xorg-configuration
(xorg-configuration (keyboard-layout keyboard-layout))) (xorg-configuration (keyboard-layout (keyboard-layout "us"))))
(service console-font-service-type (service console-font-service-type
(map (lambda (tty) (map (lambda (tty)
@ -162,7 +162,7 @@ YOUR-USER-NAME ALL=(ALL) NOPASSWD:/run/current-system/profile/bin/chvt,/run/cur
(delete mingetty-service-type) (delete mingetty-service-type)
(delete mingetty-service-type) (delete mingetty-service-type)
(delete mingetty-service-type) (delete mingetty-service-type)
(delete mingetty-service-type))) )) (delete mingetty-service-type))))
(define-public base-operating-system (define-public base-operating-system
(operating-system (operating-system
@ -175,7 +175,7 @@ YOUR-USER-NAME ALL=(ALL) NOPASSWD:/run/current-system/profile/bin/chvt,/run/cur
(host-name "narnia") (host-name "narnia")
;; Additional kernel modules ;; Additional kernel modules
(kernel-loadable-modules (list v4l2loopback-linux-module)) ;; (kernel-loadable-modules (list v4l2loopback-linux-module))
;; The list of user accounts ('root' is implicit). ;; The list of user accounts ('root' is implicit).
(users (cons* (user-account (users (cons* (user-account

View file

@ -1,8 +1,8 @@
;; This "home-environment" file can be passed to 'guix home reconfigure' ;; This is my home environment
;; to reproduce the content of your profile. This is "symbolic": it only ;;
;; specifies package names. To reproduce the exact same profile, you also ;;
;; need to capture the channels being used, as returned by "guix describe". ;;
;; See the "Replicating Guix" section in the manual. ;;
(define-module (home) (define-module (home)
#:use-module (home-services pipewire) #:use-module (home-services pipewire)
@ -35,6 +35,185 @@
;; `(#:install-plan ;; `(#:install-plan
;; '(()))))) ;; '(())))))
(define home-packages
(list "vim"
"exa"
"unzip"
"rsync"
"openssh"
"gcc-toolchain"
"make"
"git"
"curl"
"mpv"
"mpv-mpris"
"yt-dlp"
"playerctl"
"gstreamer"
"gst-plugins-base"
"gst-plugins-good"
"gst-plugins-bad"
"gst-plugins-ugly"
"gst-libav"
"alsa-utils"
"pavucontrol"
"v4l-utils"
"tmux"
"direnv"
"dutree"
"btop"
"htop"
"ripgrep"
"bat"
"alacritty"
"libnotify"
"nextcloud-client"
"rofi-wayland"
"waybar"
"qt5ct"
"fd"
"bc"
"sysstat"
"ffmpeg"
"pandoc"
"grim"
"slurp"
"imv"
"firefox"
"openjdk"
"kwallet"
"kwallet-pam"
"breeze"
"breeze-icons"
"kdeconnect"
"qtwayland@5.15.8"
;; "qtwayland"
"egl-wayland"
"pinentry"
"pinentry-qt"
"pinentry-gnome3"
"pinentry-rofi"
"pulsemixer"
"pamixer"
"python-pulsectl"
"dunst"
"rbw"
"aspell"
"aspell-dict-en"
"alsa-utils"
"lightly"
"swaylock-effects"
"swayidle"
"wtype"
"brightnessctl"
"flatpak"
"flatpak-xdg-utils"
"sound-theme-freedesktop"
"xdg-utils"
"xdg-desktop-portal"
"xdg-desktop-portal-kde"
"papirus-icon-theme"
"font-google-noto"
"font-google-noto-emoji"
"enchant"
"blesh"
"ncurses"
"transmission"
;; Emacs and packages
"emacs-next-pgtk"
"emacs-dired-rsync"
"emacs-all-the-icons"
"emacs-org-roam"
"emacs-paredit"
"emacs-evil-paredit"
"emacs-doom-modeline"
"emacs-doom-themes"
"emacs-org"
"emacs-elfeed"
"emacs-elfeed-org"
"emacs-esh-autosuggest"
"emacs-use-package"
"emacs-exec-path-from-shell"
"emacs-langtool"
"emacs-general"
"emacs-evil"
"emacs-evil-collection"
"emacs-no-littering"
"emacs-evil-escape"
"emacs-smartparens"
"emacs-evil-org"
"emacs-evil-smartparens"
"emacs-aggressive-indent"
"emacs-adaptive-wrap"
"emacs-which-key"
"emacs-evil-surround"
"emacs-websocket"
"emacs-org-modern"
"emacs-org-web-tools"
"emacs-org-re-reveal"
"emacs-org-ql"
"emacs-org-msg"
"emacs-calfw"
"emacs-transmission"
"emacs-emojify"
"emacs-pulsar"
"emacs-vertico"
"emacs-consult"
"emacs-consult-eglot"
"emacs-consult-org-roam"
"emacs-tempel"
"emacs-tempel-collection"
"emacs-marginalia"
"emacs-embark"
"emacs-wgrep"
"emacs-corfu"
"emacs-cape"
"emacs-rainbow-delimiters"
"emacs-orderless"
"emacs-kind-icon"
"emacs-projectile"
"emacs-simple-httpd"
"emacs-direnv"
"emacs-diredfl"
"emacs-pdf-tools"
"emacs-vterm"
"emacs-plz"
"emacs-ement"
"emacs-bongo"
"emacs-emms"
"emacs-gcmh"
"emacs-visual-fill-column"
"emacs-eat"
"emacs-mpv"
"emacs-all-the-icons-dired"
"emacs-all-the-icons-completion"
"emacs-org-super-agenda"
"emacs-toc-org"
"emacs-ox-reveal"
"emacs-ox-pandoc"
"emacs-ox-hugo"
"emacs-dired-sidebar"
"emacs-dired-du"
"emacs-ledger-mode"
"emacs-rustic"
"emacs-lua-mode"
"emacs-fennel-mode"
"emacs-web-mode"
"emacs-yaml-mode"
"emacs-cmake-mode"
"emacs-typescript-mode"
"emacs-fish-mode"
"emacs-markdown-mode"
"emacs-restclient"
"emacs-ob-restclient"
"emacs-guix"
"emacs-nix-mode"
"emacs-helpful"
;; "emacs-mu4e"
"isync"
"mu"))
(define emacs-dired-rsync (define emacs-dired-rsync
(let ((commit "c4f484bff94ed2ddfe0fa45f1e695a1637e1a35a") (let ((commit "c4f484bff94ed2ddfe0fa45f1e695a1637e1a35a")
(revision "0")) (revision "0"))
@ -61,195 +240,15 @@ This package adds the command dired-rsync which allows the user to copy
marked files in a dired buffer via rsync.")))) marked files in a dired buffer via rsync."))))
(home-environment (home-environment
;; Below is the list of packages that will show up in your (packages (specifications->packages home-packages))
;; Home profile, under ~/.guix-home/profile.
(packages (specifications->packages (list "vim"
"exa"
"unzip"
"rsync"
"openssh"
"gcc-toolchain"
"make"
"git"
"curl"
"mpv"
"mpv-mpris"
"yt-dlp"
"playerctl"
"gstreamer"
"gst-plugins-base"
"gst-plugins-good"
"gst-plugins-bad"
"gst-plugins-ugly"
"gst-libav"
"alsa-utils"
"pavucontrol"
"v4l-utils"
"tmux"
"direnv"
"dutree"
"btop"
"htop"
"ripgrep"
"bat"
"alacritty"
"libnotify"
"nextcloud-client"
"rofi-wayland"
"waybar"
"qt5ct"
"fd"
"bc"
"sysstat"
"ffmpeg"
"pandoc"
"grim"
"slurp"
"imv"
"openjdk"
"kwallet"
"kwallet-pam"
"breeze"
"breeze-icons"
"kdeconnect"
"qtwayland@5.15.8"
;; "qtwayland"
"egl-wayland"
"pinentry"
"pinentry-qt"
"pinentry-gnome3"
"pinentry-rofi"
"pulsemixer"
"pamixer"
"python-pulsectl"
"dunst"
"rbw"
"aspell"
"aspell-dict-en"
"alsa-utils"
"lightly"
"swaylock-effects"
"swayidle"
"wtype"
"brightnessctl"
"flatpak"
"flatpak-xdg-utils"
"sound-theme-freedesktop"
"xdg-utils"
"xdg-desktop-portal"
"xdg-desktop-portal-kde"
"papirus-icon-theme"
"font-google-noto"
"font-google-noto-emoji"
"enchant"
"blesh"
"ncurses"
"transmission"
;; Emacs and packages
"emacs-next-pgtk"
"emacs-dired-rsync"
"emacs-all-the-icons"
"emacs-org-roam"
"emacs-paredit"
"emacs-evil-paredit"
"emacs-doom-modeline"
"emacs-doom-themes"
"emacs-org"
"emacs-elfeed"
"emacs-elfeed-org"
"emacs-esh-autosuggest"
"emacs-use-package"
"emacs-exec-path-from-shell"
"emacs-langtool"
"emacs-general"
"emacs-evil"
"emacs-evil-collection"
"emacs-no-littering"
"emacs-evil-escape"
"emacs-smartparens"
"emacs-evil-org"
"emacs-evil-smartparens"
"emacs-aggressive-indent"
"emacs-adaptive-wrap"
"emacs-which-key"
"emacs-evil-surround"
"emacs-websocket"
"emacs-org-modern"
"emacs-org-web-tools"
"emacs-org-re-reveal"
"emacs-org-ql"
"emacs-org-msg"
"emacs-calfw"
"emacs-transmission"
"emacs-emojify"
"emacs-pulsar"
"emacs-vertico"
"emacs-consult"
"emacs-consult-eglot"
"emacs-consult-org-roam"
"emacs-tempel"
"emacs-tempel-collection"
"emacs-marginalia"
"emacs-embark"
"emacs-wgrep"
"emacs-corfu"
"emacs-cape"
"emacs-rainbow-delimiters"
"emacs-orderless"
"emacs-kind-icon"
"emacs-projectile"
"emacs-simple-httpd"
"emacs-direnv"
"emacs-diredfl"
"emacs-pdf-tools"
"emacs-vterm"
"emacs-plz"
"emacs-ement"
"emacs-bongo"
"emacs-emms"
"emacs-gcmh"
"emacs-visual-fill-column"
"emacs-eat"
"emacs-mpv"
"emacs-all-the-icons-dired"
"emacs-all-the-icons-completion"
"emacs-org-super-agenda"
"emacs-toc-org"
"emacs-ox-reveal"
"emacs-ox-pandoc"
"emacs-ox-hugo"
"emacs-dired-sidebar"
"emacs-dired-du"
"emacs-ledger-mode"
"emacs-rustic"
"emacs-lua-mode"
"emacs-fennel-mode"
"emacs-web-mode"
"emacs-yaml-mode"
"emacs-cmake-mode"
"emacs-typescript-mode"
"emacs-fish-mode"
"emacs-markdown-mode"
"emacs-restclient"
"emacs-ob-restclient"
"emacs-guix"
"emacs-nix-mode"
"emacs-helpful"
;; "emacs-mu4e"
"isync"
"mu"
)))
;; Below is the list of Home services. To search for available
;; services, run 'guix home search KEYWORD' in a terminal.
(services (services
(list (service home-bash-service-type (list (service home-bash-service-type
(home-bash-configuration (home-bash-configuration
(guix-defaults? #t) (guix-defaults? #t)
(aliases '(("grep" . "grep --color=auto") (aliases '(("grep" . "grep --color=auto")
("gh" . "guix home -L ~/dotfiles/guix reconfigure ~/dotfiles/guix/home.scm") ("gh" . "guix home -L ~/dotfiles/guix reconfigure ~/dotfiles/guix/home.scm")
("gs" . "sudo guix system -L /home/chris/dotfiles/guix reconfigure /home/chris/dotfiles/guix/syl.scm"))) ("gs" . "sudo guix system -L /home/chris/dotfiles/guix reconfigure /home/chris/dotfiles/guix/$(hostname).scm")))
(environment-variables (environment-variables
'(("QT_QPA_PLATFORM" . "wayland") '(("QT_QPA_PLATFORM" . "wayland")
("QT_QPA_PLATFORMTHEME" . "qt5ct") ("QT_QPA_PLATFORMTHEME" . "qt5ct")
@ -288,7 +287,7 @@ marked files in a dired buffer via rsync."))))
(home-fish-configuration (home-fish-configuration
(aliases '(("ls" . "exa -l") (aliases '(("ls" . "exa -l")
("gh" . "guix home -L ~/dotfiles/guix reconfigure ~/dotfiles/guix/home.scm") ("gh" . "guix home -L ~/dotfiles/guix reconfigure ~/dotfiles/guix/home.scm")
("gs" . "sudo guix system -L /home/chris/dotfiles/guix reconfigure /home/chris/dotfiles/guix/syl.scm"))))) ("gs" . "sudo guix system -L /home/chris/dotfiles/guix reconfigure /home/chris/dotfiles/guix/$(hostname).scm")))))
(simple-service 'config (simple-service 'config
home-xdg-configuration-files-service-type home-xdg-configuration-files-service-type
`(("hypr" ,(local-file "../.config/hypr" #:recursive? #t)) `(("hypr" ,(local-file "../.config/hypr" #:recursive? #t))
@ -338,13 +337,60 @@ marked files in a dired buffer via rsync."))))
("video/x-matroska" . "mpv.destop") ("video/x-matroska" . "mpv.destop")
("video/mkv" . "mpv.destop") ("video/mkv" . "mpv.destop")
("video/quicktime" . "mpv.destop") ("video/quicktime" . "mpv.destop")
("video/mpeg" . "mpv.desktop")
("video/ogg" . "mpv.desktop")
("video/VP9" . "mpv.desktop")
("video/VP8" . "mpv.desktop")
("video/AV1" . "mpv.desktop")
("video/H264" . "mpv.desktop")
("video/H265" . "mpv.desktop")
("video/H266" . "mpv.desktop")
("video/vnd.youtube.yt" . "mpv.desktop")
("application/x-extension-htm" . "firefox.desktop")
("application/x-extension-html" . "firefox.desktop")
("application/x-extension-shtml" . "firefox.desktop")
("application/x-extension-xht" . "firefox.desktop")
("application/x-extension-xhtml" . "firefox.desktop")
("application/xhtml+xml" . "firefox.desktop")
("inode/directory" . "dolphin.desktop")
("image/gif" . "imv.desktop")
("image/jpeg" . "imv.desktop")
("image/heif" . "imv.desktop")
("image/png" . "imv.desktop")
("audio/vorbis" . "mpv-slow.desktop")
("audio/mp3" . "mpv-slow.desktop")
("audio/flac" . "mpv-slow.desktop")
("audio/wav" . "mpv-slow.desktop")
("audio/opus" . "mpv-slow.desktop"))) ("audio/opus" . "mpv-slow.desktop")))
(added '(("video/mp4" . "mpv.desktop") (added '(("video/mp4" . "mpv.desktop")
("video/webm" . "mpv.desktop") ("video/webm" . "mpv.desktop")
("video/x-matroska" . "mpv.destop") ("video/mpeg" . "mpv.desktop")
("video/mkv" . "mpv.destop") ("video/ogg" . "mpv.desktop")
("video/quicktime" . "mpv.destop") ("video/VP9" . "mpv.desktop")
("audio/opus" . "mpv-slow.desktop"))) ("video/VP8" . "mpv.desktop")
("video/AV1" . "mpv.desktop")
("video/H264" . "mpv.desktop")
("video/H265" . "mpv.desktop")
("video/H266" . "mpv.desktop")
("video/vnd.youtube.yt" . "mpv.desktop")
("video/x-matroska" . "mpv.destop")
("video/mkv" . "mpv.destop")
("video/quicktime" . "mpv.destop")
("application/x-extension-htm" . "firefox.desktop")
("application/x-extension-html" . "firefox.desktop")
("application/x-extension-shtml" . "firefox.desktop")
("application/x-extension-xht" . "firefox.desktop")
("application/x-extension-xhtml" . "firefox.desktop")
("application/xhtml+xml" . "firefox.desktop")
("image/gif" . "imv.desktop")
("image/jpeg" . "imv.desktop")
("image/heif" . "imv.desktop")
("image/png" . "imv.desktop")
("audio/vorbis" . "mpv-slow.desktop")
("audio/mp3" . "mpv-slow.desktop")
("audio/flac" . "mpv-slow.desktop")
("audio/wav" . "mpv-slow.desktop")
("audio/opus" . "mpv-slow.desktop")))
(desktop-entries (desktop-entries
(list (xdg-desktop-entry (list (xdg-desktop-entry
(file "mpv-slow") (file "mpv-slow")

View file

@ -9,16 +9,21 @@
;; Indicate which modules to import to access the variables ;; Indicate which modules to import to access the variables
;; used in this configuration. ;; used in this configuration.
(use-modules (gnu)
(gnu services) (define-module (kaladin)
(gnu services shepherd) #:use-module (gnu)
(gnu services dbus) #:use-module (base)
(gnu system) #:use-module (gnu services)
(gnu system setuid) #:use-module (gnu services shepherd)
(gnu system nss) #:use-module (gnu services dbus)
(rosenthal packages wm) #:use-module (gnu system)
(nongnu packages linux) #:use-module (gnu system setuid)
(nongnu system linux-initrd)) #:use-module (gnu system nss)
#:use-module (gnu system shadow)
#:use-module (gnu packages android)
#:use-module (rosenthal packages wm)
#:use-module (nongnu packages linux)
#:use-module (nongnu system linux-initrd))
(use-service-modules cups desktop networking ssh xorg avahi (use-service-modules cups desktop networking ssh xorg avahi
admin base nix dbus pm audio virtualization sysctl) admin base nix dbus pm audio virtualization sysctl)
@ -26,177 +31,22 @@
(use-package-modules nfs certs shells ssh linux bash emacs gnome networking wm fonts glib libusb (use-package-modules nfs certs shells ssh linux bash emacs gnome networking wm fonts glib libusb
cups freedesktop file-systems version-control package-management) cups freedesktop file-systems version-control package-management)
(define etc-sudoers-config
(plain-file "etc-sudoers-config"
"Defaults timestamp_timeout=480
root ALL=(ALL) ALL
%wheel ALL=(ALL) ALL
YOUR-USER-NAME ALL=(ALL) NOPASSWD:/run/current-system/profile/bin/chvt,/run/current-system/profile/bin/loginctl"))
(define my-desktop-services
(modify-services %base-services
(guix-service-type config => (guix-configuration
(inherit config)
(substitute-urls
(append (list "https://substitutes.nonguix.org")
%default-substitute-urls))
(authorized-keys
(append (list (plain-file "nonguix.pub" "(public-key (ecc (curve Ed25519) (q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)))"))
%default-authorized-guix-keys))))
;; greetd-service-type provides "greetd" PAM service
(delete login-service-type)
(delete console-font-service-type)
;; and can be used in place of mingetty-service-type
(delete mingetty-service-type)
(delete mingetty-service-type)
(delete mingetty-service-type)
(delete mingetty-service-type)
(delete mingetty-service-type)
(delete mingetty-service-type)))
(operating-system (operating-system
(kernel linux) (inherit base-operating-system)
(initrd microcode-initrd) (host-name "kaladin")
(firmware (list linux-firmware))
(locale "en_US.utf8")
(timezone "America/Chicago")
(keyboard-layout (keyboard-layout "us"))
(host-name "kaladin")
;; The list of user accounts ('root' is implicit). (packages (append (map specification->package
(users (cons* (user-account '("xf86-video-amdgpu"))
(name "chris") base-system-packages))
(comment "Chris")
(group "users")
(home-directory "/home/chris")
(supplementary-groups '("wheel" "netdev" "tty" "audio" "video")))
%base-user-accounts))
(sudoers-file etc-sudoers-config) (file-systems (cons* (file-system
(mount-point "/boot/efi")
;; Packages installed system-wide. Users can also install packages (device (uuid "35A0-C1F1"
;; under their own account: use 'guix search KEYWORD' to search 'fat32))
;; for packages and 'guix install PACKAGE' to install a package. (type "vfat"))
(packages (append (list (specification->package "nss-certs") (file-system
(specification->package "sway") (mount-point "/")
(specification->package "dbus-glib") (device (uuid
(specification->package "hyprland") "9b5a1a62-0de6-4e07-a541-634736980d10"
(specification->package "emacs-next-pgtk")) 'btrfs))
%base-packages)) (type "btrfs")) %base-file-systems)))
;; 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)
fontconfig-file-system-service
(service sane-service-type)
(service cups-service-type
(cups-configuration
(web-interface? #t)
(extensions
(list cups-filters))))
(simple-service 'mtp udev-service-type (list libmtp))
(udev-rules-service 'pipewire-add-udev-rules pipewire)
(udev-rules-service 'brightnessctl-udev-rules brightnessctl)
(service nix-service-type)
(service thermald-service-type)
(service tlp-service-type
(tlp-configuration
(cpu-boost-on-ac? #t)
(wifi-pwr-on-bat? #t)))
(service screen-locker-service-type
(screen-locker-configuration
(name "swaylock")
(program (file-append 'swaylock-effects "/home/chris/.guix-home/profile/bin/swaylock"))
(allow-empty-password? #f)
(using-pam? #t)
(using-setuid? #f)))
(set-xorg-configuration
(xorg-configuration (keyboard-layout keyboard-layout)))
(service console-font-service-type
(map (lambda (tty)
;; Use a larger font for HIDPI screens
(cons tty (file-append
font-terminus
"/share/consolefonts/ter-132n")))
'("tty1" "tty2" "tty3" "tty4" "tty5" "tty6")))
(service greetd-service-type
(greetd-configuration
(greeter-supplementary-groups
(list "input" "video"))
(terminals
(list
(greetd-terminal-configuration
(terminal-vt "1")
(terminal-switch #t)
(default-session-command
(greetd-agreety-session
(command
(file-append dbus "/bin/dbus-run-session"))
(command-args (list "Hyprland")))))
(greetd-terminal-configuration (terminal-vt "2"))
(greetd-terminal-configuration (terminal-vt "3"))
(greetd-terminal-configuration (terminal-vt "4"))
(greetd-terminal-configuration (terminal-vt "5"))
(greetd-terminal-configuration (terminal-vt "6"))))))
;; NetworkManager and its applet.
(service network-manager-service-type)
(service wpa-supplicant-service-type) ;needed by NetworkManager
(simple-service 'network-manager-applet
profile-service-type
(list network-manager-applet))
(service modem-manager-service-type)
(service usb-modeswitch-service-type)
(service bluetooth-service-type
(bluetooth-configuration
(auto-enable? #t)))
;; The D-Bus clique.
polkit-wheel-service
(service avahi-service-type)
(service udisks-service-type)
(service upower-service-type)
;; (service accountsservice-service-type)
(service cups-pk-helper-service-type)
(service colord-service-type)
(service geoclue-service-type)
(service polkit-service-type)
(service elogind-service-type)
(service dbus-root-service-type)
(service ntp-service-type)
(service x11-socket-directory-service-type))
my-desktop-services))
(bootloader (bootloader-configuration
(bootloader grub-efi-bootloader)
(targets (list "/boot/efi"))
(keyboard-layout keyboard-layout)))
;; The list of file systems that get "mounted". The unique
;; file system identifiers there ("UUIDs") can be obtained
;; by running 'blkid' in a terminal.
(file-systems (cons* (file-system
(mount-point "/boot/efi")
(device (uuid "35A0-C1F1"
'fat32))
(type "vfat"))
(file-system
(mount-point "/")
(device (uuid
"9b5a1a62-0de6-4e07-a541-634736980d10"
'btrfs))
(type "btrfs")) %base-file-systems)))

View file

@ -1,15 +1,13 @@
;; This is an operating system configuration generated ;; This file is my laptop OS
;; by the graphical installer. ;;
;; ;; Author: Chris Cochrun
;; Once installation is complete, you can learn and modify ;; Email: chris@cochrun.xyz
;; this file to tweak the system configuration, and pass it ;;
;; to the 'guix system reconfigure' command to effect your ;; License: GPLv3
;; changes. ;;
;; Indicate which modules to import to access the variables
;; used in this configuration.
(define-module (syl) (define-module (syl)
#:use-module (base)
#:use-module (gnu) #:use-module (gnu)
#:use-module (gnu services) #:use-module (gnu services)
#:use-module (gnu services shepherd) #:use-module (gnu services shepherd)
@ -28,185 +26,9 @@
(use-package-modules nfs certs shells ssh linux bash emacs gnome networking wm fonts glib libusb (use-package-modules nfs certs shells ssh linux bash emacs gnome networking wm fonts glib libusb
cups freedesktop file-systems version-control package-management) cups freedesktop file-systems version-control package-management)
(define etc-sudoers-config
(plain-file "etc-sudoers-config"
"Defaults timestamp_timeout=480
root ALL=(ALL) ALL
%wheel ALL=(ALL) ALL
YOUR-USER-NAME ALL=(ALL) NOPASSWD:/run/current-system/profile/bin/chvt,/run/current-system/profile/bin/loginctl"))
(define my-desktop-services
(modify-services %base-services
(guix-service-type config => (guix-configuration
(inherit config)
(substitute-urls
(append (list "https://substitutes.nonguix.org")
%default-substitute-urls))
(authorized-keys
(append (list (plain-file "nonguix.pub" "(public-key (ecc (curve Ed25519) (q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)))"))
%default-authorized-guix-keys))))
;; greetd-service-type provides "greetd" PAM service
(delete login-service-type)
(delete console-font-service-type)
;; and can be used in place of mingetty-service-type
(delete mingetty-service-type)
(delete mingetty-service-type)
(delete mingetty-service-type)
(delete mingetty-service-type)
(delete mingetty-service-type)
(delete mingetty-service-type)))
(operating-system (operating-system
(kernel linux) (inherit base-operating-system)
(initrd microcode-initrd)
(firmware (list linux-firmware))
(locale "en_US.utf8")
(timezone "America/Chicago")
(keyboard-layout (keyboard-layout "us"))
(host-name "syl") (host-name "syl")
;; The list of user accounts ('root' is implicit).
(users (cons* (user-account
(name "chris")
(comment "Chris")
(group "users")
(home-directory "/home/chris")
(supplementary-groups '("wheel" "netdev" "tty" "audio" "video" "adbusers")))
%base-user-accounts))
(sudoers-file etc-sudoers-config)
;; 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 (list (specification->package "nss-certs")
(specification->package "sway")
(specification->package "dbus-glib")
(specification->package "hyprland")
(specification->package "libvdpau")
(specification->package "android-udev-rules")
(specification->package "adb")
(specification->package "fastboot")
(specification->package "vulkan-tools")
(specification->package "vulkan-headers")
(specification->package "libva")
(specification->package "libva-utils")
(specification->package "intel-vaapi-driver")
(specification->package "libvdpau")
(specification->package "libvdpau-va-gl")
(specification->package "emacs-next-pgtk"))
%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 ;; To configure OpenSSH, pass an 'openssh-configuration'
;; record as a second argument to 'service' below.
(service openssh-service-type)
fontconfig-file-system-service
(service sane-service-type)
(service cups-service-type
(cups-configuration
(web-interface? #t)
(extensions
(list cups-filters))))
(simple-service 'mtp udev-service-type (list libmtp))
(udev-rules-service 'pipewire-add-udev-rules pipewire)
(udev-rules-service 'brightnessctl-udev-rules brightnessctl)
(udev-rules-service 'android android-udev-rules
#:groups '("adbusers"))
(service nix-service-type)
(service thermald-service-type)
(service tlp-service-type
(tlp-configuration
(cpu-boost-on-ac? #t)
(wifi-pwr-on-bat? #t)))
(service screen-locker-service-type
(screen-locker-configuration
(name "swaylock")
(program (file-append 'swaylock-effects "/home/chris/.guix-home/profile/bin/swaylock"))
(allow-empty-password? #f)
(using-pam? #t)
(using-setuid? #f)))
(set-xorg-configuration
(xorg-configuration (keyboard-layout keyboard-layout)))
(service console-font-service-type
(map (lambda (tty)
;; Use a larger font for HIDPI screens
(cons tty (file-append
font-terminus
"/share/consolefonts/ter-132n")))
'("tty1" "tty2" "tty3" "tty4" "tty5" "tty6")))
(service greetd-service-type
(greetd-configuration
(greeter-supplementary-groups
(list "input" "video"))
(terminals
(list
(greetd-terminal-configuration
(terminal-vt "1")
(terminal-switch #t)
(default-session-command
(greetd-agreety-session
(command
(file-append dbus "/bin/dbus-run-session"))
(command-args (list "Hyprland")))))
(greetd-terminal-configuration (terminal-vt "2"))
(greetd-terminal-configuration (terminal-vt "3"))
(greetd-terminal-configuration (terminal-vt "4"))
(greetd-terminal-configuration (terminal-vt "5"))
(greetd-terminal-configuration (terminal-vt "6"))))))
;; NetworkManager and its applet.
(service network-manager-service-type)
(service wpa-supplicant-service-type) ;needed by NetworkManager
(simple-service 'network-manager-applet
profile-service-type
(list network-manager-applet))
(service modem-manager-service-type)
(service usb-modeswitch-service-type)
(service bluetooth-service-type
(bluetooth-configuration
(auto-enable? #t)))
;; The D-Bus clique.
polkit-wheel-service
(service avahi-service-type)
(service udisks-service-type)
(service upower-service-type)
;; (service accountsservice-service-type)
(service cups-pk-helper-service-type)
(service colord-service-type)
(service geoclue-service-type)
(service polkit-service-type)
(service elogind-service-type)
(service dbus-root-service-type)
(service ntp-service-type)
(service x11-socket-directory-service-type))
my-desktop-services))
(bootloader (bootloader-configuration
(bootloader grub-efi-bootloader)
(targets (list "/boot/efi"))
(keyboard-layout keyboard-layout)))
;; The list of file systems that get "mounted". The unique
;; file system identifiers there ("UUIDs") can be obtained
;; by running 'blkid' in a terminal.
(file-systems (cons* (file-system (file-systems (cons* (file-system
(mount-point "/boot/efi") (mount-point "/boot/efi")
(device (uuid "BA76-3723" (device (uuid "BA76-3723"