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)
;;(geiser-guile-binary . ("guix" "repl"))
))
(geiser-guile-binary . ("guix" "repl"))))
(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:
guix archive --authorize < signing-key.pub
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
mkdir -p ~/.config/guix
cp channels.scm ~/.config/guix/channels.scm
guix archive --authorize < signing-key.pub
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
#!/bin/sh
set euxo -pipefail
herd start cow-store /mnt
mkdir -p /mnt/etc/guix/
cp channels.scm /mnt/etc/guix/
mkdir -p /etc/guix
cp channels.scm /etc/guix
guix pull
guix pull -L.
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
* Modules
@ -58,12 +55,6 @@ This is to be run after setting up the partitions.
#+end_src
#+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
@ -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)>>
#+end_src
#+RESULTS:
** Package Modules
#+NAME: package-module-list
@ -113,8 +102,6 @@ The variable ~%local-filesystem~ extracts the file system definitions from the i
(interaction-environment)))))
#+end_src
#+RESULTS:
As a sibling to the former, the variable ~%local-swap~ does the same with the swap partition.
#+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))))))
#+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
This adds the Nonguix channel.
@ -296,8 +302,10 @@ This is the full operating system specification.
(targets
'("/boot/efi"))
(keyboard-layout keyboard-layout)))
(file-systems %local-filesystem)
(swap-devices %local-swap)
#;(file-systems %local-filesystem)
#;(swap-devices %local-swap)
<<config-filesystems>>
<<config-swap>>
(users
(cons*
(user-account

View File

@ -18,11 +18,21 @@
;; [[file:config.org::*Modules][Modules:1]]
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Wrong type to apply: "gnu"
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]>
(use-modules
(gnu)
(gnu image)
(gnu services authentication)
(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
;; Service Modules
@ -33,11 +43,7 @@ scheme@(guile-user) [1]>
;; [[file:config.org::*Service Modules][Service Modules:1]]
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Wrong type to apply: "desktop"
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]>
(use-service-modules desktop xorg)
;; Service Modules:1 ends here
;; Package Modules
@ -57,11 +63,18 @@ scheme@(guile-user) [1]>
;; [[file:config.org::*Package Modules][Package Modules:1]]
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Wrong type to apply: "bootloaders"
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]>
(use-package-modules
bootloaders
certs
emacs
emacs-xyz
fonts
pciutils
readline
terminals
version-control
wm
xorg)
;; Package Modules:1 ends here
;; 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.
@ -123,8 +134,19 @@ scheme@(guile-user) [1]>
(targets
'("/boot/efi"))
(keyboard-layout keyboard-layout)))
(file-systems %local-filesystem)
(swap-devices %local-swap)
#;(file-systems %local-filesystem)
#;(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
(cons*
(user-account
@ -135,11 +157,14 @@ scheme@(guile-user) [1]>
%base-user-accounts))
(packages
(append
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Wrong type to apply: "emacs"
(list 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))
(services
(append
@ -156,7 +181,32 @@ scheme@(guile-user) [1]>
(authorized-keys
(append (list (plain-file "non-guix.pub"
"<<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
(service greetd-service-type
(greetd-configuration

0
guix-install.sh Executable file
View File

View File

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

View File

@ -1,5 +1,5 @@
#+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.
@ -28,16 +28,18 @@ Converting Org lists into Scheme symbol lists.
- Entry 2
#+NAME: org-to-scheme-sym-list
#+begin_src scheme :var data=list-sample
#+begin_src scheme :var input=list-sample :results output
(pretty-print
(cons 'list
(map string->symbol input)))
`(list ,@(map string->symbol input)))
#+end_src
#+RESULTS: org-to-scheme-sym-list
: (list #{Entry 1}# #{Entry 2}#)
* Converting Tables
#+NAME: service-converter
#+begin_src scheme :var input='() :colnames yes :results code
#+begin_src scheme :var input='() :colnames yes :results output
(pretty-print
`(list
,@(map

View File

@ -1,9 +1,6 @@
#!/bin/sh
set euxo -pipefail
herd start cow-store /mnt
mkdir -p /mnt/etc/guix/
cp channels.scm /mnt/etc/guix/
mkdir -p /etc/guix
cp channels.scm /etc/guix
guix pull
guix pull -L.
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"