updated source code to include config files from installer/msg image
This commit is contained in:
parent
cc478d4d72
commit
400cc82679
6 changed files with 204 additions and 2 deletions
94
doc/msg-config.scm
Normal file
94
doc/msg-config.scm
Normal file
|
@ -0,0 +1,94 @@
|
|||
(use-modules (gnu)
|
||||
(gnu packages)
|
||||
(guix)
|
||||
(guix download))
|
||||
(use-service-modules avahi networking ssh shepherd)
|
||||
;;(use-package-modules certs
|
||||
;; screen
|
||||
;; ssh
|
||||
;; tmux
|
||||
;; vim
|
||||
;; wget)
|
||||
|
||||
(define this-file
|
||||
(local-file
|
||||
"/etc/config.scm"))
|
||||
|
||||
(define pub-file
|
||||
(local-file
|
||||
"/etc/msg_rsa.pub"))
|
||||
|
||||
|
||||
(operating-system
|
||||
(host-name "msg")
|
||||
(timezone "America/Denver")
|
||||
(locale "en_US.utf8")
|
||||
|
||||
(bootloader (bootloader-configuration
|
||||
(bootloader grub-efi-bootloader)
|
||||
(targets '("/boot/efi"))
|
||||
(terminal-outputs '(console))))
|
||||
(file-systems (append
|
||||
(list (file-system
|
||||
(device "/dev/vda2")
|
||||
(mount-point "/")
|
||||
(type "ext4"))
|
||||
(file-system
|
||||
(device "/dev/vda1")
|
||||
(create-mount-point? #t)
|
||||
(mount-point "/boot/efi")
|
||||
(type "vfat")))
|
||||
%base-file-systems))
|
||||
(users (cons (user-account
|
||||
(name "admin")
|
||||
(group "users")
|
||||
(supplementary-groups '("wheel" "audio" "video")))
|
||||
%base-user-accounts))
|
||||
|
||||
(sudoers-file (plain-file "sudoers"
|
||||
"root ALL=(ALL) ALL\n%wheel ALL=NOPASSWD: ALL\n"))
|
||||
|
||||
(packages (append (map specification->package
|
||||
'("tmux" "nss-certs" "vim" "wget" "cmake" "make" "gcc-toolchain")) %base-packages))
|
||||
|
||||
(services
|
||||
(append
|
||||
(list (service openssh-service-type
|
||||
(openssh-configuration
|
||||
(password-authentication? #f)
|
||||
(x11-forwarding? #t)
|
||||
(authorized-keys
|
||||
`(("admin" ,(local-file "/etc/msg_rsa.pub"))))
|
||||
))
|
||||
(service network-manager-service-type)
|
||||
(service wpa-supplicant-service-type)
|
||||
(simple-service 'config-file etc-service-type
|
||||
`(("config.scm" ,this-file)))
|
||||
(simple-service 'pub-file etc-service-type
|
||||
`(("msg_rsa.pub" , pub-file)))
|
||||
|
||||
(service avahi-service-type)
|
||||
(simple-service
|
||||
'mount-macos-overlayfs
|
||||
shepherd-root-service-type
|
||||
(list
|
||||
(shepherd-service
|
||||
(provision '(virtiofs-macos))
|
||||
(documentation "Mount macos 9p")
|
||||
(one-shot? #t)
|
||||
(start (let ((util-linux (@ (gnu packages linux) util-linux)))
|
||||
#~(lambda _
|
||||
(system*
|
||||
#$(file-append util-linux "/bin/mount")
|
||||
"-t" "9p"
|
||||
"-o" "trans=virtio"
|
||||
"macos" "/mnt/macos"
|
||||
"-oversion=9p2000.L")
|
||||
#f)))
|
||||
)))
|
||||
|
||||
(service ntp-service-type))
|
||||
%base-services))
|
||||
(name-service-switch %mdns-host-lookup-nss))
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue