]> git.ekhem.eu.org Git - guix.git/commitdiff
[system] Initialize configuration.
authorJakub Czajka <jakub@ekhem.eu.org>
Mon, 11 Jul 2022 18:07:57 +0000 (20:07 +0200)
committerJakub Czajka <jczajka@google.com>
Sun, 24 Dec 2023 18:53:07 +0000 (19:53 +0100)
`guix system` installs a whole GNU/Linux system configuration. This
commit adds a basic configuration with the GNOME desktop.

Makefile
README
system.scm [new file with mode: 0644]

index 76cc09063479bc751f8b46d1b5ae954ee662cd1f..80bc1afb8a4874c982fd4c67f21a1be7291d1f10 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,11 @@ home:
        GUIX_PACKAGE_PATH=`pwd` guix home reconfigure home.scm
        . $(guix-profile)/etc/profile
 
+system:
+       sudo GUIX_PACKAGE_PATH=`pwd` guix system reconfigure system.scm
+
 tags:
        find $(guix-store) -wholename "*guix-$(guix-version)*.scm" -or \
-               -wholename "*guix-module-union*.scm" | xargs etags
+               -wholename "*guix-module-union*.scm" -or \
+                -wholename "*guix-system-source*.scm" | xargs etags
        find `pwd` -name "*.scm" | xargs etags --append
diff --git a/README b/README
index f0c139b97c3d2d3bf59ddfa2b4822c50cfe8006d..2c0b177c98828f4520384f600e6dfffad3e11fa5 100644 (file)
--- a/README
+++ b/README
@@ -9,5 +9,6 @@ Files
 -----
 
 * home.scm   - home directory configuration for the GNU Guix operating system.
+* system.scm - system configuration for the GNU Guix operating system.
 * conf/home/ - custom GNU Guix programs and services for the home directory.
 * <program>/ - program-specific dotfiles.
diff --git a/system.scm b/system.scm
new file mode 100644 (file)
index 0000000..ca9f2be
--- /dev/null
@@ -0,0 +1,70 @@
+;; Copyright (c) 2022 Jakub Czajka <jakub@ekhem.eu.org>
+;; License: GPL-3.0 or later.
+;;
+;; system.scm - system configuration for GNU Guix.
+
+(use-modules (gnu)
+             (gnu system nss))
+
+(use-package-modules certs
+                    gnome
+                    linux)
+
+(use-service-modules desktop
+                     xorg)
+
+(operating-system
+ (kernel linux-libre)
+ (keyboard-layout
+  (keyboard-layout "us"))
+ (bootloader
+  (bootloader-configuration
+   (bootloader
+    (bootloader
+     (inherit grub-bootloader)
+     (installer #~(const #t))))
+   (keyboard-layout keyboard-layout)))
+ (host-name "machine")
+ (mapped-devices
+  (list (mapped-device
+        (source
+         (uuid "565d174f-3d96-45a1-8bef-fdab38e4d35a"))
+        (target "fde")
+        (type luks-device-mapping))
+       (mapped-device
+        (source "matrix")
+        (targets
+         (list "matrix-rootvol" "matrix-swapvol"))
+        (type lvm-device-mapping))))
+ (file-systems
+  (append
+   (list (file-system
+         (type "ext4")
+         (mount-point "/")
+         (device (file-system-label "root"))
+         (flags '(no-atime))
+         (needed-for-boot? #t)
+         (dependencies mapped-devices)))
+   %base-file-systems))
+ (swap-devices
+  (list (file-system-label "swap")))
+ (users
+  (append
+   (list (user-account
+         (name "dak")
+         (group "users")
+         (supplementary-groups
+          (list "audio" "cdrom" "lp" "netdev" "tape" "video" "wheel"))))
+   %base-user-accounts))
+ (packages
+  (append
+   (list gnu-make
+        nss-certs)
+   %base-packages))
+ (timezone "Europe/Warsaw")
+ (locale "en_US.UTF-8")
+ (name-service-switch %mdns-host-lookup-nss)
+ (services
+  (append
+   (list (service gnome-desktop-service-type))
+   %desktop-services)))