Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;; Indicate which modules to import to access the variables
- ;; used in this configuration.
- (define-module (config systems base-system)
- #:use-module (gnu)
- #:use-module (gnu services)
- #:use-module (gnu services audio)
- #:use-module (gnu services dbus)
- #:use-module (gnu services desktop)
- #:use-module (gnu services databases)
- #:use-module (gnu packages lisp)
- #:use-module (gnu system)
- #:use-module (gnu system nss)
- #:use-module (gnu system pam)
- #:use-module (guix)
- #:use-module (rnrs lists)
- #:use-module (ice-9 popen)
- #:use-module (ice-9 rdelim)
- #:use-module (ice-9 format)
- #:use-module (nongnu packages linux)
- #:use-module (nongnu system linux-initrd)
- #:use-module (rosenthal packages wm)
- #:export (base-system))
- (use-service-modules admin dbus desktop networking docker ssh xorg mcron cups sysctl virtualization sound authentication nix)
- (use-package-modules admin android base bash bootloaders ccache certs compression cross-base cups databases emacs emacs-xyz firmware fonts gawk geo ghostscript gnome gnupg guile guile-xyz hurd less linux text-editors man nvi ntp pciutils python python-xyz ratpoison scanner screen ssh suckless texinfo tex version-control vim wget wm xfce xorg gnuzilla package-management)
- (define base-system
- (operating-system
- (kernel linux)
- (initrd microcode-initrd)
- (firmware (list linux-firmware))
- (locale "pt_BR.utf8")
- (timezone "America/Sao_Paulo")
- (keyboard-layout (keyboard-layout "br"))
- (host-name "felux")
- ;; Use the UEFI variant of GRUB with the EFI System
- ;; Partition mounted on /boot/efi.
- (bootloader (bootloader-configuration
- (bootloader grub-efi-bootloader)
- (targets (list "/boot/efi"))
- (keyboard-layout keyboard-layout))) ;; for grub
- (swap-devices (list (swap-space
- (target (uuid
- "xxx")))))
- (mapped-devices (list (mapped-device
- (source (uuid
- "xxx"))
- (target "guix")
- (type luks-device-mapping))))
- ;; 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 "/")
- (device "/dev/mapper/guix")
- (type "ext4")
- (dependencies mapped-devices))
- (file-system
- (mount-point "/boot/efi")
- (device (uuid "xxx"
- 'fat32))
- (type "vfat")) %base-file-systems))
- ;; The list of user accounts ('root' is implicit).
- (users (cons* (user-account
- (name "felux")
- (comment "xxx")
- (group "users")
- (home-directory "/home/felux")
- (supplementary-groups '("wheel" "netdev" "audio" "video" "docker")))
- %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 (list (specification->package "emacs")
- (specification->package "emacs-exwm")
- (specification->package
- "emacs-desktop-environment")
- awesome
- hyprland
- nix sbcl stumpwm)
- ;; guix-icons procps psmisc which shadow e2fsprogs guile-3.0-latest bash coreutils findutils grep sed diffutils patch gawk tar gzip bzip2 xz lzip pciutils usbutils util-linux+udev kmod eudev less mg nano nvi info-reader bash-completion kbd sudo guile-readline guile-colorized inetutils isc-dhcp iproute wget nss-certs iw wireless-tools
- %base-packages))
- ;; Setup services
- (services (append
- (list
- ;; Set up my home configuration
- (service guix-home-service-type
- `(("felux" ,home)))
- ;; Seat management (can't use seatd because Wireplumber depends on elogind)
- (service elogind-service-type)
- ;; Set up Polkit to allow `wheel' users to run admin tasks
- polkit-wheel-service
- (service gnome-desktop-service-type)
- (service openssh-service-type)
- (service containerd-service-type)
- (service docker-service-type)
- ;; Networking services
- (service network-manager-service-type)
- (service wpa-supplicant-service-type) ;; Needed by NetworkManager
- (service modem-manager-service-type) ;; For cellular modems
- (service bluetooth-service-type
- (bluetooth-configuration
- (auto-enable? #t)))
- (service usb-modeswitch-service-type)
- ;; Basic desktop system services (copied from %desktop-services)
- (service avahi-service-type)
- (service udisks-service-type)
- (service upower-service-type)
- (service cups-pk-helper-service-type)
- (service geoclue-service-type)
- (service polkit-service-type)
- (service dbus-root-service-type)
- fontconfig-file-system-service ;; Manage the fontconfig cache
- ;; Adiciona o serviço MPD
- (service mpd-service-type
- (mpd-configuration
- (music-directory "~/Music")
- (state-file "~/.config/mpd/mpd.state")
- (playlist-directory "~/.config/mpd/playlists")
- (log-file "/var/log/mpd.log")
- (default-port 6600)))
- (service nix-service-type)
- ;; (service mcron-service-type
- ;; (mcron-configuration
- ;; (jobs (list cpupower-powersave-job
- ;; lift-nofile-limit-job
- ;; renice-guix-daemon-job
- ;; ;;guix-reconfigure-job
- ;; guix-release-throttle-job))))
- ;; TODO: add /usr/bin/env
- ;; (service special-files-service-type
- ;; `(("/usr/bin/env" ,(file-append (canonical-package coreutils) "/bin/env"))))
- ;; Schedule cron jobs for system tasks
- (simple-service 'system-cron-jobs
- mcron-service-type
- (list
- ;; Run `guix gc' 5 minutes after midnight every day.
- ;; Clean up generations older than 2 months and free
- ;; at least 10G of space.
- #~(job "5 0 * * *" "guix gc -d 2m -F 5G")))
- (service cups-service-type
- (cups-configuration
- (web-interface? #t)
- (extensions
- (list cups-filters))))
- (set-xorg-configuration
- (xorg-configuration ;set keyboard-layout for Xorg
- (keyboard-layout keyboard-layout)))
- ;; (simple-service 'custom-udev-rules udev-service-type (list sane-backends android-udev-rules)))
- (modify-services %desktop-services
- (ntp-service-type config =>
- (ntp-configuration
- (allow-large-adjustment? #t)))
- (alsa-service-type config => ;disable routing alsa over pulse, because that broke audacity.
- (alsa-configuration
- (pulseaudio? #f)))
- (sysctl-service-type config =>
- (sysctl-configuration
- (settings (append '(("fs.file-max" . "500000")
- ("fs.inotify.max_user_watches" . "524288"))
- %default-sysctl-settings))))
- (guix-service-type config => (guix-configuration
- (inherit config)
- (substitute-urls
- (append (list "https://substitutes.nonguix.org"
- "https://ci.guix.gnu.org"
- "https://bordeaux.guix.gnu.org")
- %default-substitute-urls))
- (authorized-keys
- (append (list (local-file "/home/felux/signing-key.pub")
- (local-file "/home/felux/ci-key.pub")
- (local-file "/home/felux/bordeaux-key.pub"))
- %default-authorized-guix-keys))))
- ;; (delete dbus-root-service-type)
- ;; (delete udev-service-type)
- ;; (delete polkit-service-type)
- ;; (delete gdm-service-type)
- ;; (delete nscd-service-type)
- ;; (delete rottlog-service-type)
- ;; (delete syslog-service-type)
- ;; (delete sysctl-service-type)
- ;; (delete guix-service-type)
- ;; (delete urandom-seed-service-type)
- ;; (delete static-networking-service-type)
- ;; (delete mingetty-service-type)
- ))
- %base-services))
- ;; Allow resolution of '.local' host names with mDNS.
- (name-service-switch %mdns-host-lookup-nss)))
Advertisement
Add Comment
Please, Sign In to add comment