Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;; ~/.system/nls/systems/base-system.scm
- (define-module (nls systems base-system)
- #:use-module (srfi srfi-1)
- ;;#:use-module (nls packages)
- ;; #:use-module (nls services)
- #:use-module (gnu)
- #:use-module (gnu system)
- #:use-module (gnu system nss)
- #:use-module (gnu system setuid)
- #:use-module (gnu packages linux)
- #:use-module (gnu services)
- )
- (use-service-modules
- ;; guix
- ;; admin
- ;; sysctl
- pm
- authentication
- avahi
- ;; dbus
- cups
- mcron
- networking
- ;; xorg
- ssh
- docker
- ;; audio
- virtualization
- desktop
- ;;base
- )
- (use-package-modules nfs certs shells ssh linux
- bash emacs gnome networking
- wm fonts libusb cups freedesktop
- file-systems version-control package-management)
- ;; Indicate which modules to import to access the variables
- ;; used in this configuration.
- (use-modules (gnu)
- (nls packages)
- (gnu services sddm)
- (gnu services)
- (gnu services xorg)
- ;; (gnu home services)
- (gnu packages linux)
- (gnu system nss)
- (gnu packages cups))
- (define-public base-operating-system
- (operating-system
- (kernel linux-libre)
- (host-name "nls-base")
- (locale "en_US.utf8")
- (timezone "America/Chicago")
- (keyboard-layout (keyboard-layout "us" #:options '("ctrl:swapcaps")))
- ;;;; 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 my-packages %base-packages))
- (packages %base-packages)
- ;;;; SERVICES
- ;; Below is the list of system services. To search for available
- ;; services, run 'guix system search KEYWORD' in a terminal.
- (services
- (append
- (list
- (networking-services)
- ;; (auth-services)
- ;; (dbus-services)
- ;; (power-services)
- ;; (printing-services)
- ;; (file-services)
- ;; (display-services)
- ;; (audio-services)
- ;; ;; The global fontconfig cache directory can sometimes contain
- ;; ;; stale entries, possibly referencing fonts that have been GC'd,
- ;; ;; so mount it read-only.
- ;; fontconfig-file-system-service
- ;; ;; Add udev rules to give non-root access to MTP devices
- ;; (simple-service 'mtp udev-service-type (list libmtp))
- ;; ;; Sync system clock with time servers
- ;; (service ntp-service-type)
- ;; (service usb-modeswitch-service-type)
- )
- %base-services
- ))
- ;; Allow resolution of '.local' host names with mDNS
- (name-service-switch %mdns-host-lookup-nss)
- ;;;; FILE-SYSTEMS
- ;; Guix doesn't like it when there isn't a file-systems
- ;; entry, so add one that is meant to be overridden
- (file-systems (cons*
- (file-system
- (mount-point "/tmp")
- (device "none")
- (type "tmpfs")
- (needed-for-boot? #t)
- (check? #f))
- %base-file-systems))
- ;;;; BOOT
- (bootloader (bootloader-configuration
- (bootloader grub-efi-bootloader)
- (targets (list "/boot/efi"))
- (keyboard-layout keyboard-layout)))
- ;;;; USERS
- ;; The list of user accounts ('root' is implicit).
- (users (cons* (user-account
- (name "nathan")
- (comment "Nathan Spaeth")
- (group "users")
- (home-directory "/home/nathan")
- (supplementary-groups
- '(
- ;; see https://wiki.debian.org/SystemGroups
- "wheel" ;; sudo
- "netdev" ;; network devices
- "audio" ;; audio devices
- "video" ;; video devices
- "lp" ;; printers
- "scanner" ;; scanners
- ;; "input" ;; full control over /dev/input devices
- ;; see: https://www.reddit.com/r/linuxquestions/comments/bh4ex1/is_adding_a_user_to_input_group_secure/
- ;; "tty" ;; ability to write to terminals not owned by user
- "realtime" ;; realtime scheduling
- "kvm"
- ;; "libvirt"
- ;; "bluetooth"
- ;; "docker"
- )))
- %base-user-accounts))
- ;; Add the 'realtime' group
- (groups (cons (user-group (system? #t) (name "realtime"))
- %base-groups))
- )
- )
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;; ~/.system/nls/systems/laptop.scm
- (define-module (nls systems laptop)
- ;; #:use-module (nls systems base-system)
- #:use-module (gnu home)
- #:use-module (gnu packages file-systems)
- #:use-module (gnu services)
- #:use-module (gnu system)
- #:use-module (gnu system uuid)
- #:use-module (gnu system file-systems)
- #:use-module (gnu system mapped-devices)
- )
- ;; (use-modules (nls systems base-system))
- ;; (define home
- ;; (home-environment
- ;; (packages (gather-manifest-packages '('mail video games)))
- ;; (services (cons* (service home-pipewire-service-type)
- ;; common-home-services))))
- (define system
- (operating-system
- (inherit base-operating-system)
- (host-name "deck")
- (swap-devices (list (swap-space
- (target (uuid
- "6f9983af-e5c2-4d73-917b-8d81ad4afd2b")))))
- ;; 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 (uuid
- "ce8a8c01-27e4-41a4-8537-b644fa1a296c"
- 'ext4))
- (type "ext4"))
- (file-system
- (mount-point "/boot/efi")
- (device (uuid "8056-FAF7"
- 'fat32))
- (type "vfat"))
- (file-system
- (mount-point "/home")
- (device (uuid
- "c8a963fe-24d1-41b8-8b8a-8dcc06af1e4c"
- 'ext4))
- (type "ext4")) %base-file-systems))
- ))
- ;; Return home or system config based on environment variable
- ;; (if (getenv "RUNNING_GUIX_HOME") home system)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement