diff options
-rw-r--r-- | system-configuration.scm | 204 |
1 files changed, 53 insertions, 151 deletions
diff --git a/system-configuration.scm b/system-configuration.scm index 1b9099e..c319e80 100644 --- a/system-configuration.scm +++ b/system-configuration.scm @@ -7,158 +7,60 @@ #:use-module (gnu services ssh) #:use-module (gnu services xorg)) -(define locale - "pl_PL.utf8") - -(define timezone - "Europe/Warsaw") - (define keyboard-layout (keyboard-layout "pl")) -(define host-name - "aisaka") - -(define marek-name - "marek") - -(define marek-comment - "Marek Paśnikowski") - -(define marek-group - "users") - -(define marek-home - "/home/marek") - -(define marek-groups - '("wheel" - "netdev" - "audio" - "video")) - -(define marek-record - (user-account (name marek-name) - (comment marek-comment) - (group marek-group) - (home-directory marek-home) - (supplementary-groups marek-groups))) - -(define users - (cons* marek-record - %base-user-accounts)) - -(define list-to-package-output - (compose list - specification->package+output)) - -(define system-packages - '("netcat-openbsd" - "nss-certs" - "trezord" - "trezord-udev-rules")) - -(define system-packages' - (map list-to-package-output - system-packages)) - -(define packages - (append system-packages' - %base-packages)) - -(define cups-extensions - `(,cups-filters - ,epson-inkjet-printer-escpr)) - -(define cups-configuration-pattern - (cups-configuration (extensions cups-extensions) - (web-interface? #t))) - -(define cups-service - (service cups-service-type - cups-configuration-pattern)) - -(define openssh-service - (service openssh-service-type)) - -(define gnome-desktop-service - (service gnome-desktop-service-type)) - -(define tor-service - (service tor-service-type)) - -(define xorg-configuration-record - (xorg-configuration (keyboard-layout keyboard-layout))) - -(define xorg-configuration-service - (set-xorg-configuration xorg-configuration-record)) - -(define system-services - `(,cups-service - ,openssh-service - ,gnome-desktop-service - ,tor-service - ,xorg-configuration-service)) - -(define services - (append system-services - %desktop-services)) - -(define bootloader-targets - '("/dev/sda")) - -(define bootloader-record - (bootloader-configuration (bootloader grub-bootloader) - (targets bootloader-targets) - (keyboard-layout keyboard-layout))) - -(define sda3-uuid - (uuid "73bed3f9-be07-40ad-a228-577cd24f2e1d")) - -(define swap-sda3-record - (swap-space (target sda3-uuid))) - -(define swap-devices - `(,swap-sda3-record)) - -(define sda2-uuid - (uuid "887ac37f-2919-41a0-a62a-e1ff5ea2d6cc")) - -(define mapped-sda2-record - (mapped-device (source sda2-uuid) - (target "aisaka-root") - (type luks-device-mapping))) - (define mapped-devices - `(,mapped-sda2-record)) - -(define file-system-root - (file-system (mount-point "/") - (device "/dev/mapper/aisaka-root") - (type "btrfs") - (dependencies mapped-devices))) - -(define sda1-uuid - (uuid "4f77b5fc-56ad-43ae-b6ec-e5adc8c48587")) - -(define file-system-boot - (file-system (mount-point "/boot") - (device sda1-uuid) - (type "ext4"))) - -(define file-systems - (cons* file-system-root - file-system-boot - %base-file-systems)) - -(operating-system (locale locale) - (timezone timezone) - (keyboard-layout keyboard-layout) - (host-name host-name) - (users users) - (packages packages) - (services services) - (bootloader bootloader-record) - (swap-devices swap-devices) - (mapped-devices mapped-devices) - (file-systems file-systems)) + `(,(mapped-device (source (uuid "887ac37f-2919-41a0-a62a-e1ff5ea2d6cc")) + (target "aisaka-root") + (type luks-device-mapping)))) + +(operating-system + (locale "pl_PL.utf8") + (timezone "Europe/Warsaw") + (keyboard-layout keyboard-layout) + (host-name "aisaka") + (users (cons* (user-account (name "marek") + (comment "Marek Paśnikowski") + (group "users") + (home-directory "/home/marek") + (supplementary-groups '("wheel" + "netdev" + "audio" + "video"))) + %base-user-accounts)) + (packages (append (map (compose list + specification->package+output) + '("netcat-openbsd" + "nss-certs" + "trezord" + "trezord-udev-rules")) + %base-packages)) + (services + (append + `(,(service cups-service-type + (cups-configuration (extensions `(,cups-filters + ,epson-inkjet-printer-escpr)) + (web-interface? #t))) + ,(service openssh-service-type) + ,(service gnome-desktop-service-type) + ,(service tor-service-type) + ,(set-xorg-configuration + (xorg-configuration (keyboard-layout keyboard-layout)))) + %desktop-services)) + (bootloader (bootloader-configuration (bootloader grub-bootloader) + (targets '("/dev/sda")) + (keyboard-layout keyboard-layout))) + (swap-devices + `(,(swap-space (target (uuid "73bed3f9-be07-40ad-a228-577cd24f2e1d"))))) + (mapped-devices mapped-devices) + (file-systems + (cons* (file-system + (mount-point "/") + (device "/dev/mapper/aisaka-root") + (type "btrfs") + (dependencies mapped-devices)) + (file-system (mount-point "/boot") + (device (uuid "4f77b5fc-56ad-43ae-b6ec-e5adc8c48587")) + (type "ext4")) + %base-file-systems))) |