Prepare config to become more modular

This commit is contained in:
Skylar Hill 2024-04-15 18:54:31 -05:00
parent e2aaa102c1
commit 2c9ca78162
3 changed files with 381 additions and 351 deletions

View file

@ -1,15 +1,23 @@
* Sanderson config
** Main system
#+begin_src scheme :tangle sanderson.scm
(use-modules (gnu)
:PROPERTIES:
:header-args:scheme: :tangle sanderson.scm
:END:
*** Module imports
#+begin_src scheme
(use-modules (gnu)
(nongnu packages linux)
(nongnu system linux-initrd)
(gnu packages cups)
(nongnu packages printers))
(use-service-modules cups desktop networking ssh syncthing xorg)
(operating-system
(use-service-modules cups desktop networking ssh syncthing xorg)
#+end_src
*** Main OS config
#+begin_src scheme
(operating-system
(kernel linux)
(initrd microcode-initrd)
(firmware (list linux-firmware))
@ -26,17 +34,22 @@
(home-directory "/home/skylar")
(supplementary-groups '("wheel" "netdev" "audio" "video")))
%base-user-accounts))
#+end_src
;; Packages installed system-wide. Users can also install packages
;; under their own account: use 'guix search KEYWORD' to search
;; for packages and 'guix install PACKAGE' to install a package.
(packages (append (specifications->packages (list "nss-certs"
"stumpwm"))
*** System packages
#+begin_src scheme
;; Packages installed system-wide. Users can also install packages
;; under their own account: use 'guix search KEYWORD' to search
;; for packages and 'guix install PACKAGE' to install a package.
(packages (append (specifications->packages (list "nss-certs"))
%base-packages))
#+end_src
;; Below is the list of system services. To search for available
;; services, run 'guix system search KEYWORD' in a terminal.
(services
*** Services
#+begin_src scheme
;; Below is the list of system services. To search for available
;; services, run 'guix system search KEYWORD' in a terminal.
(services
(append (list (service plasma-desktop-service-type)
;; To configure OpenSSH, pass an 'openssh-configuration'
@ -60,10 +73,13 @@
'("vtt.skylarhill.me"))
(host "192.168.254.167" "files"
'("files.skylarhill.me")))))
#+end_src
;; This is the default list of services we
;; are appending to.
(modify-services %desktop-services
*** nonguix substitutes
#+begin_src scheme
;; This is the default list of services we
;; are appending to.
(modify-services %desktop-services
(guix-service-type config => (guix-configuration
(inherit config)
(substitute-urls
@ -72,18 +88,22 @@
(authorized-keys
(append (list (local-file "./signing-key.pub"))
%default-authorized-guix-keys)))))))
(bootloader (bootloader-configuration
#+end_src
*** Filesystem and partition config
#+begin_src scheme
(bootloader (bootloader-configuration
(bootloader grub-bootloader)
(targets (list "/dev/sda"))
(keyboard-layout keyboard-layout)))
(swap-devices (list (swap-space
(swap-devices (list (swap-space
(target (uuid
"646006cb-84a4-46ea-a03c-78a343b2fd07")))))
;; The list of file systems that get "mounted". The unique
;; file system identifiers there ("UUIDs") can be obtained
;; by running 'blkid' in a terminal.
(file-systems (cons* (file-system
;; The list of file systems that get "mounted". The unique
;; file system identifiers there ("UUIDs") can be obtained
;; by running 'blkid' in a terminal.
(file-systems (cons* (file-system
(mount-point "/")
(device (uuid
"38be76dc-b7d8-4433-bab6-04c6c7f62733"
@ -92,9 +112,12 @@
#+end_src
** Home configuration
#+begin_src scheme :tangle home/sanderson.scm
(use-modules (gnu home)
:PROPERTIES:
:header-args:scheme: :tangle home/sanderson.scm
:END:
*** Module imports
#+begin_src scheme
(use-modules (gnu home)
(gnu home services)
(gnu packages)
(gnu packages emacs-xyz)
@ -109,8 +132,11 @@
(guix packages)
(gnu home services shells)
(gnu home services gnupg))
#+end_src
(home-environment
*** Home packages
#+begin_src scheme
(home-environment
;; Below is the list of packages that will show up in your
;; Home profile, under ~/.guix-home/profile.
(packages (specifications->packages
@ -159,10 +185,13 @@
"unzip"
"xclip"
"zoom")))
#+end_src
;; Below is the list of Home services. To search for available
;; services, run 'guix home search KEYWORD' in a terminal.
(services
*** Home services
#+begin_src scheme
;; Below is the list of Home services. To search for available
;; services, run 'guix home search KEYWORD' in a terminal.
(services
(list (service home-bash-service-type
(home-bash-configuration
(aliases '(("grep" . "grep --color=auto")

View file

@ -1,4 +1,4 @@
(use-modules (gnu home)
(use-modules (gnu home)
(gnu home services)
(gnu packages)
(gnu packages emacs-xyz)
@ -14,7 +14,7 @@
(gnu home services shells)
(gnu home services gnupg))
(home-environment
(home-environment
;; Below is the list of packages that will show up in your
;; Home profile, under ~/.guix-home/profile.
(packages (specifications->packages
@ -64,9 +64,9 @@
"xclip"
"zoom")))
;; Below is the list of Home services. To search for available
;; services, run 'guix home search KEYWORD' in a terminal.
(services
;; Below is the list of Home services. To search for available
;; services, run 'guix home search KEYWORD' in a terminal.
(services
(list (service home-bash-service-type
(home-bash-configuration
(aliases '(("grep" . "grep --color=auto")

View file

@ -1,10 +1,11 @@
(use-modules (gnu)
(use-modules (gnu)
(nongnu packages linux)
(nongnu system linux-initrd)
(gnu packages cups)
(nongnu packages printers))
(use-service-modules cups desktop networking ssh syncthing xorg)
(operating-system
(use-service-modules cups desktop networking ssh syncthing xorg)
(operating-system
(kernel linux)
(initrd microcode-initrd)
(firmware (list linux-firmware))
@ -22,16 +23,15 @@
(supplementary-groups '("wheel" "netdev" "audio" "video")))
%base-user-accounts))
;; Packages installed system-wide. Users can also install packages
;; under their own account: use 'guix search KEYWORD' to search
;; for packages and 'guix install PACKAGE' to install a package.
(packages (append (specifications->packages (list "nss-certs"
"stumpwm"))
;; Packages installed system-wide. Users can also install packages
;; under their own account: use 'guix search KEYWORD' to search
;; for packages and 'guix install PACKAGE' to install a package.
(packages (append (specifications->packages (list "nss-certs"))
%base-packages))
;; Below is the list of system services. To search for available
;; services, run 'guix system search KEYWORD' in a terminal.
(services
;; Below is the list of system services. To search for available
;; services, run 'guix system search KEYWORD' in a terminal.
(services
(append (list (service plasma-desktop-service-type)
;; To configure OpenSSH, pass an 'openssh-configuration'
@ -56,9 +56,9 @@
(host "192.168.254.167" "files"
'("files.skylarhill.me")))))
;; This is the default list of services we
;; are appending to.
(modify-services %desktop-services
;; This is the default list of services we
;; are appending to.
(modify-services %desktop-services
(guix-service-type config => (guix-configuration
(inherit config)
(substitute-urls
@ -67,18 +67,19 @@
(authorized-keys
(append (list (local-file "./signing-key.pub"))
%default-authorized-guix-keys)))))))
(bootloader (bootloader-configuration
(bootloader (bootloader-configuration
(bootloader grub-bootloader)
(targets (list "/dev/sda"))
(keyboard-layout keyboard-layout)))
(swap-devices (list (swap-space
(swap-devices (list (swap-space
(target (uuid
"646006cb-84a4-46ea-a03c-78a343b2fd07")))))
;; The list of file systems that get "mounted". The unique
;; file system identifiers there ("UUIDs") can be obtained
;; by running 'blkid' in a terminal.
(file-systems (cons* (file-system
;; The list of file systems that get "mounted". The unique
;; file system identifiers there ("UUIDs") can be obtained
;; by running 'blkid' in a terminal.
(file-systems (cons* (file-system
(mount-point "/")
(device (uuid
"38be76dc-b7d8-4433-bab6-04c6c7f62733"