From 400cc826795fd38b0f48c8ecaf494661f3668a0f Mon Sep 17 00:00:00 2001 From: Chad Nelson Date: Sun, 16 Mar 2025 12:41:03 -0600 Subject: [PATCH] updated source code to include config files from installer/msg image --- .DS_Store | Bin 0 -> 6148 bytes Makefile.am | 4 +- doc/installer-config.scm | 101 ++++++++++++++++++++++++++++ doc/msg-config.scm | 94 ++++++++++++++++++++++++++ doc/{config.scm => qemu-config.scm} | 0 hall.scm | 7 +- 6 files changed, 204 insertions(+), 2 deletions(-) create mode 100644 .DS_Store create mode 100644 doc/installer-config.scm create mode 100644 doc/msg-config.scm rename doc/{config.scm => qemu-config.scm} (100%) diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..327ad093d45367cd51175ccd87e158b557b7bc16 GIT binary patch literal 6148 zcmeHK-AcnS6i(c98AIrW!Y%{e4&0nS3~$PuFJMJ4RAy_37Hc!s&R&c`ul0p|5}(I& zk`x^FTEv|L$#;H}=7Z*kF~*1Uu*aCg7!%MCIVu%`?#j@HO-AH6Mmh~*6@c{-Ol|D1 z1Acprg-o%BApidTag=7=?kC@<)i<{qq9I!1&U;e1m-*Q|9s08yv@Vs3gHrc{t7wvs zot-n4WPX%PX1X8>Cy;V`9VMa4hiaaLsjl@*Kr}^j?6en)qu!t+d;ODTM=k~j-Htr$ zA1{|pvAef_dNF>EUlR3Z=;Xk*mTikAyn|v_^Xko#SS63(DYMHgLSldzAO?tm^=81H z3!=5&G|=ja0b-zn0o)%XG(^{8VNh=!(BbtN<8?$7(D5ySC@s1c3xf~=;ieSOlydvT z;HDh>(&o7q3xlSdaXmAPV`nZOFI>+KeyP(LcMVcc3=jjW4AhM2;Q4)WEN7_1Q;u3Ypb1fDIaTN6H QazMHWXhNtX27ZBoFD|4>V*mgE literal 0 HcmV?d00001 diff --git a/Makefile.am b/Makefile.am index 59624ff..4154097 100644 --- a/Makefile.am +++ b/Makefile.am @@ -53,7 +53,9 @@ EXTRA_DIST = README.org \ HACKING \ LICENSE \ COPYING \ - doc/config.scm \ + doc/installer-config.scm \ + doc/qemu-config.scm \ + doc/msg-config.scm \ NEWS \ AUTHORS \ ChangeLog \ diff --git a/doc/installer-config.scm b/doc/installer-config.scm new file mode 100644 index 0000000..dc4de12 --- /dev/null +++ b/doc/installer-config.scm @@ -0,0 +1,101 @@ +(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 installer-file + (local-file + "/etc/installer-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) + (permit-root-login 'prohibit-password) + (x11-forwarding? #t) + (authorized-keys + `(("root" ,(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))) + (simple-service 'install-config-file etc-service-type + `(("installer-config.scm" , installer-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)) + + diff --git a/doc/msg-config.scm b/doc/msg-config.scm new file mode 100644 index 0000000..7d5d098 --- /dev/null +++ b/doc/msg-config.scm @@ -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)) + + diff --git a/doc/config.scm b/doc/qemu-config.scm similarity index 100% rename from doc/config.scm rename to doc/qemu-config.scm diff --git a/hall.scm b/hall.scm index 6fbddb4..bafe8de 100644 --- a/hall.scm +++ b/hall.scm @@ -33,7 +33,12 @@ (text-file "HACKING") (text-file "LICENSE") (text-file "COPYING") - (directory "doc" ((texi-file "msg") (scheme-file "config"))) + (directory + "doc" + ((texi-file "msg") + (scheme-file "installer-config") + (scheme-file "qemu-config") + (scheme-file "msg-config"))) (text-file "NEWS") (text-file "AUTHORS") (text-file "ChangeLog")))