This commit is contained in:
Daniel Ziltener 2023-12-12 09:48:38 +01:00
parent 68ecfc7c41
commit 4ebcbe3171
Signed by: zilti
GPG key ID: B38976E82C9DAE42
4 changed files with 18 additions and 16 deletions

View file

@ -26,11 +26,13 @@ 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
herd start cow-store /mnt herd start cow-store /mnt
mkdir -p ~/.config/guix mkdir -p /mnt/etc/guix/
cp channels.scm ~/.config/guix/channels.scm cp channels.scm /mnt/etc/guix/
mkdir -p /etc/guix
cp channels.scm /etc/guix
guix pull 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 guix system 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
@ -103,7 +105,7 @@ The variable ~%local-filesystem~ extracts the file system definitions from the i
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
(define %local-swap #;(define %local-swap
(call-with-input-file "/etc/config.scm" (call-with-input-file "/etc/config.scm"
(lambda (port) (lambda (port)
(read port) (read port)
@ -281,7 +283,7 @@ This is the full operating system specification.
'("/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)
(users (users
(cons* (cons*
(user-account (user-account

View file

@ -18,7 +18,7 @@
;; [[file:config.org::*Modules][Modules:1]] ;; [[file:config.org::*Modules][Modules: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)) nil
;; Modules:1 ends here ;; Modules:1 ends here
;; Service Modules ;; Service Modules
@ -29,7 +29,7 @@
;; [[file:config.org::*Service Modules][Service Modules:1]] ;; [[file:config.org::*Service Modules][Service Modules:1]]
(use-service-modules desktop xorg) nil
;; Service Modules:1 ends here ;; Service Modules:1 ends here
;; Package Modules ;; Package Modules
@ -48,7 +48,7 @@
;; [[file:config.org::*Package Modules][Package Modules:1]] ;; [[file:config.org::*Package Modules][Package Modules:1]]
(use-package-modules bootloaders certs emacs emacs-xyz fonts readline terminals version-control wm xorg) nil
;; Package Modules:1 ends here ;; Package Modules:1 ends here
;; File System ;; File System
@ -59,7 +59,7 @@
;; [[file:config.org::*File System][File System:1]] ;; [[file:config.org::*File System][File System:1]]
(define %local-filesystem (define %local-filesystem
(call-with-input-file "/mnt/mnt/mnt/etc/config.scm" (call-with-input-file "/etc/config.scm"
(lambda (port) (lambda (port)
(read port) (read port)
(read port) (read port)
@ -74,7 +74,7 @@
;; [[file:config.org::*File System][File System:2]] ;; [[file:config.org::*File System][File System:2]]
#;(define %local-swap #;(define %local-swap
(call-with-input-file "/mnt/mnt/mnt/etc/config.scm" (call-with-input-file "/etc/config.scm"
(lambda (port) (lambda (port)
(read port) (read port)
(read port) (read port)
@ -120,7 +120,7 @@
%base-user-accounts)) %base-user-accounts))
(packages (packages
(append (append
(list emacs emacs-desktop-environment font-terminus git nss-certs readline) nil
%base-packages)) %base-packages))
(services (services
(append (append
@ -137,7 +137,7 @@
(authorized-keys (authorized-keys
(append (list (plain-file "non-guix.pub" (append (list (plain-file "non-guix.pub"
"<<nonguix-pubkey>>"))))))) "<<nonguix-pubkey>>")))))))
(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))) nil
(list (list
(service greetd-service-type (service greetd-service-type
(greetd-configuration (greetd-configuration

View file

@ -40,6 +40,7 @@
"emacs-direnv" "emacs-direnv"
"diff-so-fancy" "diff-so-fancy"
"firefox" "firefox"
"flatpak"
"fuzzel" "fuzzel"
"gammastep" "gammastep"
"grim" "grim"
@ -58,13 +59,15 @@
"rust" "rust"
"rust-cargo" "rust-cargo"
"senpai" "senpai"
"sideload"
"slurp" "slurp"
"swappy" "swappy"
"swayfx" "swayfx"
"swayidle" "swayidle"
"swaylock-effects" "swaylock-effects"
"waybar" "waybar"
"wlogout"))) "wlogout"
"xdg-desktop-portal")))
;; Below is the list of Home services. To search for available ;; Below is the list of Home services. To search for available
;; services, run 'guix home search KEYWORD' in a terminal. ;; services, run 'guix home search KEYWORD' in a terminal.
(services (services

View file

@ -1,7 +1,5 @@
#!/bin/sh #!/bin/sh
herd start cow-store /mnt herd start cow-store /mnt
mkdir -p ~/.config/guix
cp channels.scm ~/.config/guix/channels.scm
mkdir -p /mnt/etc/guix/ mkdir -p /mnt/etc/guix/
cp channels.scm /mnt/etc/guix/ cp channels.scm /mnt/etc/guix/
mkdir -p /etc/guix mkdir -p /etc/guix
@ -9,4 +7,3 @@ cp channels.scm /etc/guix
guix pull 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 init ./config.scm /mnt --substitute-urls="https://ci.guix.gnu.org https://bordeaux.guix.gnu.org https://substitutes.nonguix.org"