diff options
Diffstat (limited to 'gnu/system')
-rw-r--r-- | gnu/system/accounts.scm | 3 | ||||
-rw-r--r-- | gnu/system/examples/plasma.tmpl | 72 | ||||
-rw-r--r-- | gnu/system/image.scm | 19 |
3 files changed, 92 insertions, 2 deletions
diff --git a/gnu/system/accounts.scm b/gnu/system/accounts.scm index e37b733c6d..15b2afe266 100644 --- a/gnu/system/accounts.scm +++ b/gnu/system/accounts.scm @@ -29,6 +29,7 @@ user-account-supplementary-groups user-account-comment user-account-home-directory + user-account-home-directory-permissions user-account-create-home-directory? user-account-shell user-account-system? @@ -70,6 +71,8 @@ (comment user-account-comment (default "")) (home-directory user-account-home-directory (thunked) (default (default-home-directory this-record))) + (home-directory-permissions user-account-home-directory-permissions + (default #o700)) (create-home-directory? user-account-create-home-directory? ;Boolean (default #t)) (shell user-account-shell ; gexp diff --git a/gnu/system/examples/plasma.tmpl b/gnu/system/examples/plasma.tmpl new file mode 100644 index 0000000000..6395991125 --- /dev/null +++ b/gnu/system/examples/plasma.tmpl @@ -0,0 +1,72 @@ +;; This is an operating system configuration template +;; for a "desktop" setup with Plasma. + +(use-modules (gnu) (gnu system nss) (srfi srfi-1)) +(use-service-modules desktop sddm xorg ssh) +(use-package-modules certs gnome ssh admin fonts) +(use-package-modules qt xorg tmux linux) + +(operating-system + (host-name "plasma") + (timezone "Asia/Shanghai") + (locale "en_US.utf8") + + ;; Assuming /dev/sdX is the target hard disk, and "my-root" + ;; is the label of the target root file system. + (bootloader (bootloader-configuration + (bootloader grub-bootloader) + (targets (list "/dev/sdX")))) + + (file-systems (cons (file-system + (device "my-root") + (mount-point "/") + (type "ext4")) + %base-file-systems)) + + (users (cons (user-account + (name "plasma") + (password (crypt "plasma" "$6$abc")) + (group "users") + (supplementary-groups '("wheel" "netdev" + "audio" "video"))) + %base-user-accounts)) + + ;; This is where we specify system-wide packages. + (packages (cons* nss-certs ;for HTTPS access + neofetch + htop + tmux + xprop + strace + %base-packages)) + + (services (cons* + ;; for debug + ;; (simple-service + ;; 'add-qt-debug-env + ;; session-environment-service-type + ;; '(("QT_MESSAGE_PATTERN" + ;; . "[[%{time process} %{type}] %{appname}: %{category} %{function} - %{message}]") + ;; ("QT_DEBUG_PLUGINS" . "1") + ;; ("QML_IMPORT_TRACE" . "1"))) + (service openssh-service-type + (openssh-configuration + (openssh openssh-sans-x) + (port-number 2222))) + (service plasma-desktop-service-type) + (service sddm-service-type + (sddm-configuration + (theme "breeze"))) + + ;; Remove GDM if it's among %DESKTOP-SERVICES; on other + ;; architectures, %DESKTOP-SERVICES contains SDDM instead. + (remove (lambda (service) + (memq (service-kind service) + (list gdm-service-type sddm-service-type))) + %desktop-services))) + ;; Allow resolution of '.local' host names with mDNS. + (name-service-switch %mdns-host-lookup-nss)) + +;; Local Variables: +;; mode: scheme +;; End: diff --git a/gnu/system/image.scm b/gnu/system/image.scm index 841e7e0c7e..5b8da2f896 100644 --- a/gnu/system/image.scm +++ b/gnu/system/image.scm @@ -76,6 +76,7 @@ esp32-partition root-partition + mbr-disk-image efi-disk-image iso9660-image docker-image @@ -84,6 +85,7 @@ raw-with-offset-disk-image image-with-os + mbr-raw-image-type efi-raw-image-type efi32-raw-image-type qcow2-image-type @@ -145,6 +147,15 @@ parent image record." (flags '(boot)) (initializer (gexp initialize-root-partition)))) +(define mbr-disk-image + (image-without-os + (format 'disk-image) + (partition-table-type 'mbr) + (partitions + (list (partition + (inherit root-partition) + (offset root-offset)))))) + (define efi-disk-image (image-without-os (format 'disk-image) @@ -201,6 +212,11 @@ set to the given OS." (inherit base-image) (operating-system os))) +(define mbr-raw-image-type + (image-type + (name 'mbr-raw) + (constructor (cut image-with-os mbr-disk-image <>)))) + (define efi-raw-image-type (image-type (name 'efi-raw) @@ -216,8 +232,7 @@ set to the given OS." (name 'qcow2) (constructor (cut image-with-os (image - (inherit efi-disk-image) - (partition-table-type 'mbr) + (inherit mbr-disk-image) (name 'image.qcow2) (format 'compressed-qcow2)) <>)))) |