This commit is contained in:
Daniel Ziltener 2023-12-14 22:49:12 +01:00
parent 7cfc00fd43
commit 8eddd92c42
Signed by: zilti
GPG key ID: B38976E82C9DAE42
8 changed files with 118 additions and 63 deletions

View file

@ -1,4 +1,3 @@
((nil . ((geiser-scheme-implementation . guile) ((nil . ((geiser-scheme-implementation . guile)
;;(geiser-guile-binary . ("guix" "repl")) (geiser-guile-binary . ("guix" "repl"))))
))
(org-mode . ((org-confirm-babel-evaluate . nil)))) (org-mode . ((org-confirm-babel-evaluate . nil))))

View file

@ -1,9 +1,7 @@
~/.config/guix/channels.scm:
mkdir -p ~/.config/guix
cp channels.scm ~/.config/guix/channels.scm
reconfigure: reconfigure:
guix archive --authorize < signing-key.pub mkdir -p ~/.config/guix
guix system reconfigure ./config.scm --substitute-urls='https://ci.guix.gnu.org https://bordeaux.guix.gnu.org https://substitutes.nonguix.org' cp channels.scm ~/.config/guix/channels.scm
make -C /home/zilti/.guix-home/profile/lib/browserpass make hosts-firefox-user guix archive --authorize < signing-key.pub
flatpak --user remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo guix system reconfigure ./config.scm --substitute-urls='https://ci.guix.gnu.org https://bordeaux.guix.gnu.org https://substitutes.nonguix.org'
make -C /home/zilti/.guix-home/profile/lib/browserpass make hosts-firefox-user
flatpak --user remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo

View file

@ -25,14 +25,11 @@ This is to be run after setting up the partitions.
#+begin_src sh :tangle sysinst.sh #+begin_src sh :tangle sysinst.sh
#!/bin/sh #!/bin/sh
set euxo -pipefail
herd start cow-store /mnt herd start cow-store /mnt
mkdir -p /mnt/etc/guix/ guix pull -L.
cp channels.scm /mnt/etc/guix/
mkdir -p /etc/guix
cp channels.scm /etc/guix
guix pull
sed -i 's|/etc/config.scm|/mnt/etc/config.scm|g' ./config.scm sed -i 's|/etc/config.scm|/mnt/etc/config.scm|g' ./config.scm
guix system init ./config.scm /mnt --substitute-urls="https://ci.guix.gnu.org https://bordeaux.guix.gnu.org https://substitutes.nonguix.org" guix system -L. init ./config.scm /mnt --substitute-urls="https://ci.guix.gnu.org https://bordeaux.guix.gnu.org https://substitutes.nonguix.org"
#+end_src #+end_src
* Modules * Modules
@ -58,12 +55,6 @@ This is to be run after setting up the partitions.
#+end_src #+end_src
#+RESULTS: #+RESULTS:
: ice-9/boot-9.scm:1685:16: In procedure raise-exception:
: Syntax error:
: unknown file:13:51: source expression failed to match any pattern in form or
:
: Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
: scheme@(guile-user) [1]>
** Service Modules ** Service Modules
@ -75,8 +66,6 @@ This is to be run after setting up the partitions.
<<list-to-use(use-call="use-service-modules",entries=service-module-list)>> <<list-to-use(use-call="use-service-modules",entries=service-module-list)>>
#+end_src #+end_src
#+RESULTS:
** Package Modules ** Package Modules
#+NAME: package-module-list #+NAME: package-module-list
@ -113,8 +102,6 @@ The variable ~%local-filesystem~ extracts the file system definitions from the i
(interaction-environment))))) (interaction-environment)))))
#+end_src #+end_src
#+RESULTS:
As a sibling to the former, the variable ~%local-swap~ does the same with the swap partition. As a sibling to the former, the variable ~%local-swap~ does the same with the swap partition.
#+begin_src scheme :tangle config.scm #+begin_src scheme :tangle config.scm
@ -132,6 +119,25 @@ As a sibling to the former, the variable ~%local-swap~ does the same with the sw
(interaction-environment)))))) (interaction-environment))))))
#+end_src #+end_src
#+NAME: config-filesystems
#+begin_src scheme :noweb yes
(file-systems (append (list
(file-system
(device (file-system-label "EFI")
(mount-point "/boot/efi")
(type "vfat"))
(device (file-system-label "guix")
(mount-point "/")
(type "xfs"))))
%base-file-systems))
#+end_src
#+NAME: config-swap
#+begin_src scheme :noweb yes
(swap-devices
(list (swap-space (target (file-system-label "swap")))))
#+end_src
** Channels ** Channels
This adds the Nonguix channel. This adds the Nonguix channel.
@ -296,8 +302,10 @@ This is the full operating system specification.
(targets (targets
'("/boot/efi")) '("/boot/efi"))
(keyboard-layout keyboard-layout))) (keyboard-layout keyboard-layout)))
(file-systems %local-filesystem) #;(file-systems %local-filesystem)
(swap-devices %local-swap) #;(swap-devices %local-swap)
<<config-filesystems>>
<<config-swap>>
(users (users
(cons* (cons*
(user-account (user-account

View file

@ -18,11 +18,21 @@
;; [[file:config.org::*Modules][Modules:1]] ;; [[file:config.org::*Modules][Modules:1]]
ice-9/boot-9.scm:1685:16: In procedure raise-exception: (use-modules
Wrong type to apply: "gnu" (gnu)
(gnu image)
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. (gnu services authentication)
scheme@(guile-user) [1]> (gnu services base)
(gnu services dbus)
(gnu services desktop)
(gnu services linux)
(gnu services networking)
(gnu services pm)
(gnu services virtualization)
(gnu services xorg)
(gnu system nss)
(nongnu packages linux)
(nongnu system linux-initrd))
;; Modules:1 ends here ;; Modules:1 ends here
;; Service Modules ;; Service Modules
@ -33,11 +43,7 @@ scheme@(guile-user) [1]>
;; [[file:config.org::*Service Modules][Service Modules:1]] ;; [[file:config.org::*Service Modules][Service Modules:1]]
ice-9/boot-9.scm:1685:16: In procedure raise-exception: (use-service-modules desktop xorg)
Wrong type to apply: "desktop"
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]>
;; Service Modules:1 ends here ;; Service Modules:1 ends here
;; Package Modules ;; Package Modules
@ -57,11 +63,18 @@ scheme@(guile-user) [1]>
;; [[file:config.org::*Package Modules][Package Modules:1]] ;; [[file:config.org::*Package Modules][Package Modules:1]]
ice-9/boot-9.scm:1685:16: In procedure raise-exception: (use-package-modules
Wrong type to apply: "bootloaders" bootloaders
certs
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. emacs
scheme@(guile-user) [1]> emacs-xyz
fonts
pciutils
readline
terminals
version-control
wm
xorg)
;; Package Modules:1 ends here ;; Package Modules:1 ends here
;; File System ;; File System
@ -82,8 +95,6 @@ scheme@(guile-user) [1]>
;; #+RESULTS:
;; As a sibling to the former, the variable ~%local-swap~ does the same with the swap partition. ;; As a sibling to the former, the variable ~%local-swap~ does the same with the swap partition.
@ -123,8 +134,19 @@ scheme@(guile-user) [1]>
(targets (targets
'("/boot/efi")) '("/boot/efi"))
(keyboard-layout keyboard-layout))) (keyboard-layout keyboard-layout)))
(file-systems %local-filesystem) #;(file-systems %local-filesystem)
(swap-devices %local-swap) #;(swap-devices %local-swap)
(file-systems (append (list
(file-system
(device (file-system-label "EFI")
(mount-point "/boot/efi")
(type "vfat"))
(device (file-system-label "guix")
(mount-point "/")
(type "xfs"))))
%base-file-systems))
(swap-devices
(list (swap-space (target (file-system-label "swap")))))
(users (users
(cons* (cons*
(user-account (user-account
@ -135,11 +157,14 @@ scheme@(guile-user) [1]>
%base-user-accounts)) %base-user-accounts))
(packages (packages
(append (append
ice-9/boot-9.scm:1685:16: In procedure raise-exception: (list emacs
Wrong type to apply: "emacs" emacs-desktop-environment
font-terminus
git
hwdata
nss-certs
readline)
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]>
%base-packages)) %base-packages))
(services (services
(append (append
@ -156,7 +181,32 @@ scheme@(guile-user) [1]>
(authorized-keys (authorized-keys
(append (list (plain-file "non-guix.pub" (append (list (plain-file "non-guix.pub"
"<<nonguix-pubkey>>"))))))) "<<nonguix-pubkey>>")))))))
nil (list (service tlp-service-type (tlp-configuration))
(service
thermald-service-type
(thermald-configuration (adaptive? #t)))
(service
bluetooth-service-type
(bluetooth-configuration))
(service
earlyoom-service-type
(earlyoom-configuration
(minimum-available-memory 5)
(minimum-free-swap 5)))
(service
inputattach-service-type
(inputattach-configuration))
(service
libvirt-service-type
(libvirt-configuration
(unix-sock-group "libvirt")))
(service
fstrim-service-type
(fstrim-configuration))
(service
fprintd-service-type
(fprintd-configuration)))
(list (list
(service greetd-service-type (service greetd-service-type
(greetd-configuration (greetd-configuration

0
guix-install.sh Executable file
View file

View file

@ -1 +1,2 @@
(setq package-enable-at-startup nil) (setq package-enable-at-startup nil)
(setq package-install-upgrade-built-in t)

View file

@ -1,5 +1,5 @@
#+TITLE: Babel Library #+TITLE: Babel Library
#+PROPERTY: header-args:scheme: :session *guile* :prologue "(use-modules (ice-9 pretty-print))" #+PROPERTY: header-args:scheme :session *guile* :prologue "(use-modules (ice-9 pretty-print))"
This library contains code blocks to be used by other files in this repository. This library contains code blocks to be used by other files in this repository.
@ -28,16 +28,18 @@ Converting Org lists into Scheme symbol lists.
- Entry 2 - Entry 2
#+NAME: org-to-scheme-sym-list #+NAME: org-to-scheme-sym-list
#+begin_src scheme :var data=list-sample #+begin_src scheme :var input=list-sample :results output
(pretty-print (pretty-print
(cons 'list `(list ,@(map string->symbol input)))
(map string->symbol input)))
#+end_src #+end_src
#+RESULTS: org-to-scheme-sym-list
: (list #{Entry 1}# #{Entry 2}#)
* Converting Tables * Converting Tables
#+NAME: service-converter #+NAME: service-converter
#+begin_src scheme :var input='() :colnames yes :results code #+begin_src scheme :var input='() :colnames yes :results output
(pretty-print (pretty-print
`(list `(list
,@(map ,@(map

View file

@ -1,9 +1,6 @@
#!/bin/sh #!/bin/sh
set euxo -pipefail
herd start cow-store /mnt herd start cow-store /mnt
mkdir -p /mnt/etc/guix/ guix pull -L.
cp channels.scm /mnt/etc/guix/
mkdir -p /etc/guix
cp channels.scm /etc/guix
guix pull
sed -i 's|/etc/config.scm|/mnt/etc/config.scm|g' ./config.scm sed -i 's|/etc/config.scm|/mnt/etc/config.scm|g' ./config.scm
guix system init ./config.scm /mnt --substitute-urls="https://ci.guix.gnu.org https://bordeaux.guix.gnu.org https://substitutes.nonguix.org" guix system -L. init ./config.scm /mnt --substitute-urls="https://ci.guix.gnu.org https://bordeaux.guix.gnu.org https://substitutes.nonguix.org"