Compare commits

..

No commits in common. "a1d30ad8f36c54115c25ccb730748bfc6046d727" and "fdd6c7cce0cff70bb08d2036799f5ec5a844e259" have entirely different histories.

9 changed files with 268 additions and 472 deletions

View file

@ -89,7 +89,7 @@ while true; do
"h") "h")
echo "Launching Hyprland..." echo "Launching Hyprland..."
export XDG_CURRENT_DESKTOP=Hyprland export XDG_CURRENT_DESKTOP=Hyprland
exec dbus-run-session Hyprland &> $HOME/.log/Hyprland exec Hyprland &> $HOME/.log/Hyprland
;; ;;
"t") "t")
exec cage -s kitty -- -o font_size=14 &> $HOME/.log/kitty exec cage -s kitty -- -o font_size=14 &> $HOME/.log/kitty

View file

@ -124,7 +124,6 @@
easyeffects easyeffects
firefox-wayland-new firefox-wayland-new
librewolf-new librewolf-new
gamescope
; gtk ; gtk
lavanda-gtk-theme lavanda-gtk-theme

View file

@ -1,30 +1,12 @@
(define-module (freya packages wm) (define-module (freya packages wm)
#:use-module ((guix licenses) #:prefix license:) #:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages) #:use-module (gnu packages)
#:use-module (gnu packages gl)
#:use-module (gnu packages wm) #:use-module (gnu packages wm)
#:use-module (gnu packages stb)
#:use-module (gnu packages gcc)
#:use-module (gnu packages sdl)
#:use-module (gnu packages xorg)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages maths)
#:use-module (gnu packages image)
#:use-module (gnu packages cmake)
#:use-module (gnu packages linux)
#:use-module (gnu packages vulkan)
#:use-module (gnu packages python)
#:use-module (gnu packages pciutils)
#:use-module (gnu packages benchmark)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages version-control)
#:use-module (guix download) #:use-module (guix download)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix gexp) #:use-module (guix gexp)
#:use-module (guix git-download) #:use-module (guix git-download)
#:use-module (guix build utils) #:use-module (guix build utils)
#:use-module (guix build-system meson)
#:use-module (guix utils)) #:use-module (guix utils))
@ -62,163 +44,23 @@
#:configure-flags #~(list "--wrap-mode=nodownload" "-Dexperimental=true"))))) #:configure-flags #~(list "--wrap-mode=nodownload" "-Dexperimental=true")))))
(define-public vkroots ;(define-public libliftoff
(let ((commit "d5ef31abc7cb5c69aee4bcb67b10dd543c1ff7ac")) ; (package
(package ; (name "libliftoff")
(name "vkroots") ; (version "0.1.0")
(version (git-version "" "0" commit)) ; (source (origin
(source ; (method url-fetch)
(origin ; (uri (string-append "https://github.com/emersion/libliftoff"
(method git-fetch) ; "/archive/refs/tags/v" version ".tar.gz"))
(uri (git-reference ; (sha256
(url "https://github.com/misyltoad/vkroots") ; (base32
(commit commit))) ; "17ssbjbv8njgvfha8zsx4nixpi5xxl1rwvk0lcacgqk0nmjyb23s"))))
(sha256 ; (build-system meson-build-system)
(base32 ; (native-inputs (list gcc-13
"0g2mh8l0xzxzr4yjyafzv76n7jk9043dcbf5mpqwpwmjx88m5nc0")) ; pkg-config
(file-name (git-file-name name version)))) ; cmake-minimal-3.30.0
(arguments (list ; libdrm))
#:phases #~(modify-phases %standard-phases ; (home-page "https://github.com/emersion/libliftoff")
(add-after 'unpack 'patch-vulkan ; (synopsis "Lightweight KMS plane library")
(lambda _ ; (description "")
(substitute* "gen/make_vkroots" ; (license license:expat)))
(("\\.\\.") (getcwd)))))
(add-before 'install 'gen-vkroots
(lambda _
(invoke "python3"
"../source/gen/make_vkroots"
"-x"
(string-append
#$(this-package-native-input "vulkan-headers")
"/share/vulkan/registry/vk.xml")))))))
(build-system meson-build-system)
(native-inputs (list python vulkan-headers))
(home-page "https://github.com/misyltoad/vkroots")
(description "A stupid simple method of making Vulkan layers, at home! ")
(synopsis "A stupid simple method of making Vulkan layers, at home! ")
(license license:expat))))
(define-public libliftoff-0.4
(package
(inherit libliftoff)
(name "libliftoff")
(version "0.4.1")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://gitlab.freedesktop.org/emersion/libliftoff")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"1ikjp638d655ycaqkdnzhb12d29kkbb3a46lqhbhsfc8vsqj3z1l"))))))
(define reshade-for-gamescope
(let ((commit "4245743a8c41abbe3dc73980c1810fe449359bf1"))
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/Joshua-Ashton/reshade")
(commit commit)))
(file-name (git-file-name "reshade" commit))
(sha256
(base32 "1bb5392dfiri8nrxvck1w2jxva8m9xzrgi16rvnvg96l493a538y")))))
(define-public gamescope
(package
(name "gamescope")
(version "3.14.2")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/ValveSoftware/gamescope")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32 "0x7gh1rr2ismqfkaa4wm7025acjpgmims41iwzdcps5pg8nxmmhh"))))
(build-system meson-build-system)
(arguments
(list #:configure-flags #~(list "-Dpipewire=enabled"
"-Denable_openvr_support=false"
"-Dforce_fallback_for=[]"
(string-append "-Dc_args=-DHWDATA_PNP_IDS=\""
#$(this-package-native-input "hwdata")
"/share/hwdata/pnp.ids\""))
#:tests? #f
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'patch-deps
(lambda _
; copy reshade
(delete-file-recursively "src/reshade")
(copy-recursively #$reshade-for-gamescope "src/reshade")
; path /usr
(substitute* "src/reshade_effect_manager.cpp"
(("/usr") #$output))
; path meson.build
(substitute* "src/meson.build"
;; patch stb
(("dependency\\('stb'\\)")
(format #f "declare_dependency(include_directories: ['~a'])"
(string-join
'#$(map (lambda (label) (this-package-native-input label))
(list "stb-image"
"stb-image-resize"
"stb-image-write"))
"','")))
;; patch libdisplay-info
(("< 0.2.0")
(string-append "<= " #$(package-version (this-package-input "libdisplay-info"))))
;(("reshade/") (string-append #$reshade-for-gamescope "/"))
(("../thirdparty/SPIRV-Headers") #$(this-package-native-input "spirv-headers")))
;; include <limits> and <cstdint>
(substitute* (find-files "src" "\\.hpp$")
(("#pragma once" pragma)
(string-append pragma
"\n#include <limits>"
"\n#include <cstdint>")))
)))))
(native-inputs (list gcc-13
benchmark
glslang
hwdata
pkg-config
stb-image
stb-image-resize
stb-image-write
spirv-headers
vkroots
vulkan-headers
wayland-protocols))
(inputs (list gcc-13
glm
libavif
libcap
libdisplay-info
libdrm
libinput
libliftoff-0.4
libx11
libxcomposite
libxcursor
libxdamage
libxext
libxkbcommon
libxmu
libxrender
libxres
libxt
libxtst
pipewire
sdl2
vulkan-loader
wayland
wlroots))
(home-page "https://github.com/ValveSoftware/gamescope")
(description "SteamOS session compositing window manager")
(synopsis "SteamOS session compositing window manager")
(license license:bsd-2)))

View file

@ -1,62 +0,0 @@
(define-module (freya services cow)
#:use-module (gnu services shepherd)
#:use-module (guix modules)
#:use-module (gnu))
; guix doesnt export the cow store
; bruch >:(
(define %backing-directory
;; Sub-directory used as the backing store for copy-on-write.
"/tmp/guix-inst")
(define cow-store-service-type
(shepherd-service-type
'cow-store
(lambda _
(define (import-module? module)
;; Since we don't use deduplication support in 'populate-store', don't
;; import (guix store deduplication) and its dependencies, which
;; includes Guile-Gcrypt.
(and (guix-module-name? module)
(not (equal? module '(guix store deduplication)))))
(shepherd-service
(requirement '(root-file-system user-processes))
(provision '(cow-store))
(documentation
"Make the store copy-on-write, with writes going to \
the given target.")
;; This is meant to be explicitly started by the user.
(auto-start? #f)
(modules `((gnu build install)
,@%default-modules))
(start
(with-imported-modules (source-module-closure
'((gnu build install))
#:select? import-module?)
#~(case-lambda
((target)
(mount-cow-store target #$%backing-directory)
target)
(else
;; Do nothing, and mark the service as stopped.
#f))))
(stop #~(lambda (target)
;; Delete the temporary directory, but leave everything
;; mounted as there may still be processes using it since
;; 'user-processes' doesn't depend on us. The 'user-file-systems'
;; service will unmount TARGET eventually.
(delete-file-recursively
(string-append target #$%backing-directory))))))
(description "Make the store copy-on-write, with writes going to \
the given target.")))
(define-public (cow-store-service)
"Return a service that makes the store copy-on-write, such that writes go to
the user's target storage device rather than on the RAM disk."
;; See <http://bugs.gnu.org/18061> for the initial report.
(service cow-store-service-type 'mooooh!))

View file

@ -1,109 +1,82 @@
(define-module (freya system) (define-module (freya system)
#:use-module (srfi srfi-1)
#:use-module (gnu) #:use-module (gnu)
#:use-module (gnu system setuid)
#:use-module (gnu packages) #:use-module (gnu packages)
#:use-module (gnu packages linux) #:use-module (gnu packages admin)
#:use-module (gnu packages libusb) #:use-module (gnu packages avahi)
#:use-module (gnu packages shells) #:use-module (gnu packages shells)
#:use-module (gnu packages tls)
#:use-module (gnu packages gtk)
#:use-module (gnu packages gl)
#:use-module (gnu packages vpn)
#:use-module (gnu packages security-token) #:use-module (gnu packages security-token)
#:use-module (gnu packages virtualization)
#:use-module (gnu services) #:use-module (gnu services)
#:use-module (gnu services ssh)
#:use-module (gnu services nix)
#:use-module (gnu services cups)
#:use-module (gnu services dbus)
#:use-module (gnu services avahi)
#:use-module (gnu services linux) #:use-module (gnu services linux)
#:use-module (gnu services spice) #:use-module (gnu services authentication)
#:use-module (gnu services docker) #:use-module (gnu services security-token)
#:use-module (gnu services cups)
#:use-module (gnu services desktop) #:use-module (gnu services desktop)
#:use-module (gnu services networking) #:use-module (gnu services networking)
#:use-module (gnu services security-token) #:use-module (gnu services xorg)
#:use-module (gnu services ssh)
#:use-module (gnu services nix)
#:use-module (gnu services sound)
#:use-module (gnu services docker)
#:use-module (gnu services avahi)
#:use-module (gnu services spice)
#:use-module (gnu services virtualization) #:use-module (gnu services virtualization)
#:use-module (gnu system locale)
#:use-module (gnu system setuid)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (nongnu packages linux) #:use-module (nongnu packages linux)
#:use-module (freya packages qt) #:use-module (srfi srfi-1)
#:use-module (freya bootloader uki)
#:use-module (freya packages certs) #:use-module (freya packages certs)
#:use-module (freya packages linux) #:use-module (freya packages linux)
#:use-module (freya packages qt)
#:use-module (freya packages wm)
#:use-module (freya packages pulseaudio) #:use-module (freya packages pulseaudio)
#:use-module (freya packages virtualization) #:use-module (freya packages networking)
#:use-module (freya bootloader uki)) #:use-module (freya packages virtualization))
;; locale
(define-public %base-freya-locale
(list (locale-definition
(name "en_US.utf8")
(source "en_US")
(charset "UTF-8"))
(locale-definition
(name "ja_JP.utf8")
(source "ja_JP")
(charset "UTF-8"))))
;; user groups
(define %base-freya-user-groups (list "wheel"
"audio"
"video"
"netdev"
"tty"))
(define %desktop-freya-user-groups (define-public %freya-user-accounts
(cons* (user-account
(name "freya")
(comment "Freya Murphy")
(group "users")
(home-directory "/home/freya")
(shell (file-append zsh "/bin/zsh"))
(supplementary-groups '("wheel"
"audio"
"lp"
"docker"
"plugdev"
"libvirt"
"kvm"
"netdev"
"video"
"tty")))
%base-user-accounts))
(define-public %freya-base-packages
(append (append
;; append desktop freya groups
(list "lp"
"docker"
"plugdev"
"libvirt"
"kvm")
;; append base freya groups
%base-freya-user-groups))
;; user accounts ;; append guix and nonguix base packages
(define freya-user-accounts
(lambda (groups)
(cons* (user-account
(name "freya")
(comment "Freya Murphy")
(uid 1000)
(group "users")
(shell (file-append zsh "/bin/zsh"))
(home-directory "/home/freya")
(create-home-directory? #t)
(supplementary-groups groups))
%base-user-accounts)))
(define-public %base-freya-user-accounts
(freya-user-accounts %base-freya-user-groups))
(define-public %desktop-freya-user-accounts
(freya-user-accounts %desktop-freya-user-groups))
;; packages
(define-public %virt-freya-packages
(append
;; append needed virt packages
(specifications->packages (list ; video audio (specifications->packages (list ; video audio
"mesa" "mesa"
"mesa-utils" "mesa-utils"
; firmware
"sof-firmware"
"amd-microcode"
"v4l2loopback-linux-module"
; terrminal ; terrminal
"alsa-utils" "alsa-utils"
"vim" "vim"
"neovim" "neovim"
; file sys
"parted"
"gptfdisk"
"ddrescue"
"cryptsetup"
"dosfstools"
"btrfs-progs"
"e2fsprogs"
"f2fs-tools"
; basic utils ; basic utils
"curl" "curl"
"htop" "htop"
@ -122,26 +95,18 @@
"ncurses" "ncurses"
"jq" "jq"
"openssl")) "openssl"))
;; append freyanet certs
;; append certs
(list freya-ca-certs) (list freya-ca-certs)
;; append guix base packages ;; append guix base packages
%base-packages)) %base-packages))
(define-public %base-freya-packages (define-public %freya-packages
(append (append
;; append needed base packages
(specifications->packages (list ; firmware
"sof-firmware"
"amd-microcode"
"v4l2loopback-linux-module"))
;; apend virt freya packages
%virt-freya-packages))
;; append guix and nonguix packages
(define-public %desktop-freya-packages
(append
;; append needed desktop packages
(specifications->packages (list ; gtk (specifications->packages (list ; gtk
"wxwidgets" "wxwidgets"
"gtk+" "gtk+"
@ -149,11 +114,13 @@
"gnome-themes-extra" "gnome-themes-extra"
"adwaita-icon-theme" "adwaita-icon-theme"
"hicolor-icon-theme" "hicolor-icon-theme"
; wayland x11 ; wayland x11
"wl-clipboard" "wl-clipboard"
"libx11" "libx11"
"xorg-server-xwayland" "xorg-server-xwayland"
"xf86-video-qxl" "xf86-video-qxl"
; video audio ; video audio
"glu" "glu"
"libglvnd" "libglvnd"
@ -166,9 +133,11 @@
"sdl2" "sdl2"
"openal" "openal"
"freealut" "freealut"
; xdg ; xdg
"xdg-utils" "xdg-utils"
"xdg-desktop-portal" "xdg-desktop-portal"
; system daemons ; system daemons
"docker" "docker"
"containerd" "containerd"
@ -178,63 +147,74 @@
"brightnessctl" "brightnessctl"
"wireguard-tools" "wireguard-tools"
"libpcap" "libpcap"
; fonts ; fonts
"font-fira-mono" "font-fira-mono"
"font-google-noto-sans-cjk" "font-google-noto-sans-cjk"
"font-jetbrains-mono" "font-jetbrains-mono"
"font-dejavu" "font-dejavu"
; misc ; misc
"qemu")) "qemu"))
;; append custom packages ;; append custom packages
(list ; qt (list ; qt
qt5-styleplugins qt5-styleplugins
qt6gtk2 qt6gtk2
; bluetooth
bluez-new
; pactl
pulseaudio-new
; system
virt-manager-ovmf)
;; append base freya backages
%base-freya-packages))
;; services ; bluetooth
bluez-new
(define-public %base-freya-services ; pactl
pulseaudio-new
; system
virt-manager-ovmf)
;; append freya base backages
%freya-base-packages))
(define-public %freya-base-services
(append (append
;; append needed base services
(list ; mtp (list ; pam
(simple-service 'mtp udev-service-type (list libmtp))
; polkit
polkit-wheel-service
; font config
fontconfig-file-system-service
; networking
(service ntp-service-type)
(service network-manager-service-type)
(service wpa-supplicant-service-type)
(service modem-manager-service-type)
(service usb-modeswitch-service-type)
; dbus
(service upower-service-type)
(service polkit-service-type)
(service pam-limits-service-type) (service pam-limits-service-type)
(service elogind-service-type)
(service dbus-root-service-type)
; openssh ; openssh
(service openssh-service-type)) (service openssh-service-type))
;; append guix base services
%base-services))
(define-public %desktop-freya-services ; base guix desktop services
(modify-services %desktop-services
(guix-service-type config =>
(guix-configuration
(inherit config)
(substitute-urls
(append (list "https://substitutes.nonguix.org")
%default-substitute-urls))
(authorized-keys
(append (list (local-file "../../certs/non-guix.pub"))
%default-authorized-guix-keys))))
(udev-service-type config =>
(udev-configuration
(inherit config)))
(delete pulseaudio-service-type)
(delete gdm-service-type)
(delete avahi-service-type)
(delete alsa-service-type)
(delete screen-locker-service-type))))
(define-public %freya-services
(append (append
;; append needed desktop services %freya-base-services
(list ; nix (list ; nix
(service nix-service-type) (service nix-service-type)
; wirerguard ; wirerguard
(simple-service 'wireguard-module (simple-service 'wireguard-module
kernel-module-loader-service-type kernel-module-loader-service-type
'("wireguard")) '("wireguard"))
; printing ; printing
(service cups-service-type (service cups-service-type
(cups-configuration (cups-configuration
@ -243,9 +223,11 @@
(avahi-configuration (avahi-configuration
(publish? #f) (publish? #f)
(publish-workstation? #f))) (publish-workstation? #f)))
; docker ; docker
(service docker-service-type) (service docker-service-type)
(service containerd-service-type) (service containerd-service-type)
; libvirt ; libvirt
(service libvirt-service-type (service libvirt-service-type
(libvirt-configuration (libvirt-configuration
@ -254,89 +236,57 @@
(tls-port "16555"))) (tls-port "16555")))
(service virtlog-service-type) (service virtlog-service-type)
(service spice-vdagent-service-type) (service spice-vdagent-service-type)
; bluetooth
; audio
(service bluetooth-service-type (service bluetooth-service-type
(bluetooth-configuration (bluetooth-configuration
(bluez bluez-new) (bluez bluez-new)
(experimental #t) (experimental #t)
(fast-connectable? #t))) (fast-connectable? #t)))
; yubikey ; yubikey
(service pcscd-service-type) (service pcscd-service-type)
(udev-rules-service 'fido2 libfido2 #:groups '("plugdev"))) (udev-rules-service 'fido2 libfido2 #:groups '("plugdev")))))
;; append freya base services
%base-freya-services))
;; setuid programs
(define-public %base-freya-setuid-programs (define-public %freya-setuid-programs
(append (append (list ; doas
;; append needed setuid programs (file-like->setuid-program
(list ; doas (file-append
(file-like->setuid-program (specification->package "opendoas")
(file-append "/bin/doas")))
(specification->package "opendoas") ; base setuid programs
"/bin/doas"))) %setuid-programs))
;; append guix setuid programs
%setuid-programs))
;; file systems
(define-public %base-freya-file-systems (define-public %freya-file-systems
(cons* (cons*
;; /tmp ; /tmp
(file-system (file-system
(mount-point "/tmp") (mount-point "/tmp")
(device "none") (device "none")
(type "tmpfs") (type "tmpfs")
(check? #f)) (check? #f))
;; append guix base file systems
%base-file-systems)) %base-file-systems))
;; firmware
(define-public %base-freya-firmware (define-public base-operating-system
(append (operating-system
;; append needed base firmware (kernel linux-6.11)
(list linux-firmware (firmware (list linux-firmware
sof-firmware amd-microcode
amd-microcode) sof-firmware))
;; append guix base firmware (locale "en_US.utf8")
%base-firmware)) (timezone "America/New_York")
(keyboard-layout (keyboard-layout "us"))
;; operating system (host-name "ThisWillChange")
(users %freya-user-accounts)
(define-public %base-freya-operating-system (packages %freya-packages)
(operating-system (services %freya-services)
(kernel linux-6.11) (name-service-switch %mdns-host-lookup-nss)
(firmware %base-freya-firmware) (setuid-programs %freya-setuid-programs)
(locale "en_US.UTF-8") (file-systems %freya-file-systems)
(locale-definitions %base-freya-locale) (bootloader (bootloader-configuration
(timezone "America/New_York") (bootloader uefi-uki-bootloader)
(keyboard-layout (keyboard-layout "us")) (targets (list "/boot/efi"))
(host-name "guix") (keyboard-layout keyboard-layout)))))
(users %base-freya-user-accounts)
(packages %base-freya-packages)
(services %base-freya-services)
(name-service-switch %mdns-host-lookup-nss)
(setuid-programs %base-freya-setuid-programs)
(file-systems %base-freya-file-systems)
(bootloader (bootloader-configuration
(bootloader uefi-uki-bootloader)
(targets (list "/boot/efi"))
(keyboard-layout keyboard-layout)))))
(define-public %virt-freya-operating-system
(operating-system
(inherit %base-freya-operating-system)
(kernel linux-libre-lts)
(firmware %base-firmware)
(packages %virt-freya-packages)))
(define-public %desktop-freya-operating-system
(operating-system
(inherit %base-freya-operating-system)
(users %desktop-freya-user-accounts)
(packages %desktop-freya-packages)
(services %desktop-freya-services)))

View file

@ -1,24 +0,0 @@
(use-modules (freya system)
(gnu))
(operating-system
(inherit %virt-freya-operating-system)
(host-name "curiass")
(initrd-modules (cons* "virtio_scsi"
"mptspi"
(operating-system-initrd-modules
%virt-freya-operating-system)))
(file-systems (cons* (file-system
(mount-point "/")
(device (uuid "be5f9a76-8295-4710-95b1-370ae3eb0d95"))
(type "btrfs"))
(file-system
(mount-point "/boot")
(device (uuid "ACB1-EE58"
'fat32))
(type "vfat"))
(operating-system-file-systems
%virt-freya-operating-system)))
(bootloader (bootloader-configuration
(bootloader grub-bootloader)
(target "/dev/sda"))))

View file

@ -1,22 +1,110 @@
; base system for creating installer images ; base system for creating installer images
(use-modules (freya system) (use-modules (freya system)
(freya services cow) (gnu packages disk)
(gnu packages linux)
(gnu packages cryptsetup)
(gnu packages file-systems)
(gnu services shepherd)
(guix modules)
(gnu)) (gnu))
; copy over installer disk utilites
(define %installer-disk-utilities
(list parted gptfdisk ddrescue
lvm2-static
cryptsetup mdadm
dosfstools
btrfs-progs
e2fsprogs
f2fs-tools
jfsutils
xfsprogs))
; copy over cow store
(define %backing-directory
;; Sub-directory used as the backing store for copy-on-write.
"/tmp/guix-inst")
(define cow-store-service-type
(shepherd-service-type
'cow-store
(lambda _
(define (import-module? module)
;; Since we don't use deduplication support in 'populate-store', don't
;; import (guix store deduplication) and its dependencies, which
;; includes Guile-Gcrypt.
(and (guix-module-name? module)
(not (equal? module '(guix store deduplication)))))
(shepherd-service
(requirement '(root-file-system user-processes))
(provision '(cow-store))
(documentation
"Make the store copy-on-write, with writes going to \
the given target.")
;; This is meant to be explicitly started by the user.
(auto-start? #f)
(modules `((gnu build install)
,@%default-modules))
(start
(with-imported-modules (source-module-closure
'((gnu build install))
#:select? import-module?)
#~(case-lambda
((target)
(mount-cow-store target #$%backing-directory)
target)
(else
;; Do nothing, and mark the service as stopped.
#f))))
(stop #~(lambda (target)
;; Delete the temporary directory, but leave everything
;; mounted as there may still be processes using it since
;; 'user-processes' doesn't depend on us. The 'user-file-systems'
;; service will unmount TARGET eventually.
(delete-file-recursively
(string-append target #$%backing-directory))))))
(description "Make the store copy-on-write, with writes going to \
the given target.")))
(define (cow-store-service)
"Return a service that makes the store copy-on-write, such that writes go to
the user's target storage device rather than on the RAM disk."
;; See <http://bugs.gnu.org/18061> for the initial report.
(service cow-store-service-type 'mooooh!))
; installer system ; installer system
(operating-system (operating-system
(inherit %base-freya-operating-system) (inherit base-operating-system)
(host-name "installer") (host-name "installer")
(file-systems (append %base-live-file-systems
%base-file-systems)) (file-systems
(append %base-live-file-systems
%base-file-systems))
(users (list (user-account
(name "root")
(group "root")
(supplementary-groups '("wheel")) ; allow use of sudo
(password "")
(comment "root"))))
(pam-services (pam-services
;; Explicitly allow for empty passwords. ;; Explicitly allow for empty passwords.
(base-pam-services #:allow-empty-passwords? #t)) (base-pam-services #:allow-empty-passwords? #t))
(services (cons* (cow-store-service)
(operating-system-services (packages (append %installer-disk-utilities
%base-freya-operating-system))) %freya-base-packages))
(services (append %freya-base-services
(list (cow-store-service))))
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader grub-bootloader) (bootloader grub-bootloader)
(targets '("/dev/sda"))))) (targets '("/dev/sda")))))

View file

@ -2,13 +2,15 @@
(gnu)) (gnu))
(operating-system (operating-system
(inherit %desktop-freya-operating-system) (inherit base-operating-system)
(host-name "kaworu") (host-name "kaworu")
(mapped-devices (list (mapped-device (mapped-devices (list (mapped-device
(source (uuid (source (uuid
"89257280-202b-4565-b832-89f160d5e4e2")) "89257280-202b-4565-b832-89f160d5e4e2"))
(target "cryptroot") (target "cryptroot")
(type luks-device-mapping)))) (type luks-device-mapping))))
(file-systems (cons* (file-system (file-systems (cons* (file-system
(mount-point "/") (mount-point "/")
(device "/dev/mapper/cryptroot") (device "/dev/mapper/cryptroot")
@ -19,5 +21,4 @@
(device (uuid "099A-D668" (device (uuid "099A-D668"
'fat32)) 'fat32))
(type "vfat")) (type "vfat"))
(operating-system-file-systems %freya-file-systems)))
%desktop-freya-operating-system))))

View file

@ -2,16 +2,19 @@
(gnu)) (gnu))
(operating-system (operating-system
(inherit %desktop-freya-operating-system) (inherit base-operating-system)
(host-name "shinji") (host-name "shinji")
(mapped-devices (list (mapped-device (mapped-devices (list (mapped-device
(source (uuid (source (uuid
"ad489bfa-4280-44ea-8ad2-60347b516d60")) "ad489bfa-4280-44ea-8ad2-60347b516d60"))
(target "root") (target "root")
(type luks-device-mapping)))) (type luks-device-mapping))))
(swap-devices (list (swap-space (swap-devices (list (swap-space
(target (uuid (target (uuid
"57caa02d-8569-43e3-8bf9-09dd6f02b191"))))) "57caa02d-8569-43e3-8bf9-09dd6f02b191")))))
(file-systems (cons* (file-system (file-systems (cons* (file-system
(mount-point "/") (mount-point "/")
(device "/dev/mapper/root") (device "/dev/mapper/root")
@ -22,5 +25,4 @@
(device (uuid "6F93-6A0B" (device (uuid "6F93-6A0B"
'fat32)) 'fat32))
(type "vfat")) (type "vfat"))
(operating-system-file-systems %freya-file-systems)))
%desktop-freya-operating-system))))