summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Paśnikowski <marekpasnikowski@protonmail.com>2023-02-11 21:46:09 +0100
committerMarek Paśnikowski <marekpasnikowski@protonmail.com>2023-02-11 23:05:25 +0100
commit29617c2e1fdf6cfe5f0076340a0e1b97480b7369 (patch)
tree9dd6011cd013d8a2699f502d5b7e0034a04ac684
parent257d4813a581fbfb238b4e27d16e3703c2f6aff4 (diff)
Configure the Guix Daemon to keep all live derivations and outputs
-rw-r--r--aisaka.org37
-rw-r--r--system-configuration.scm17
2 files changed, 48 insertions, 6 deletions
diff --git a/aisaka.org b/aisaka.org
index b60be9f..d6cac55 100644
--- a/aisaka.org
+++ b/aisaka.org
@@ -7,6 +7,19 @@
https://guix.gnu.org/en/manual/en/html_node/
+** TODO Installation
+
+https://guix.gnu.org/en/manual/en/html_node/Installation.html
+
+*** TODO Invoking guix-daemon
+
+https://guix.gnu.org/en/manual/en/html_node/Invoking-guix_002ddaemon.html
+
+#+begin_src scheme :noweb-ref guix-options
+ "--gc-keep-derivations=yes"
+ "--gc-keep-outputs=yes"
+#+end_src
+
** TODO System configuration
https://guix.gnu.org/en/manual/en/html_node/System-Configuration.html
@@ -76,6 +89,7 @@ https://guix.gnu.org/en/manual/en/html_node/Services.html
#+begin_src scheme :noweb-ref system-services
(services
(append
+ <<system-base-services>>
(list
<<ssh-system-service>>
<<trezor-system-packages>>
@@ -92,15 +106,32 @@ https://guix.gnu.org/en/manual/en/html_node/Services.html
(service
tor-service-type
(tor-configuration
- (control-socket? #t)))
- <<trezor-udev-rules>>)
+ (control-socket? #t))))
(modify-services
%desktop-services
(elogind-service-type
configuration =>
(elogind-configuration
(inherit configuration)
- (handle-lid-switch 'ignore))))))
+ (handle-lid-switch 'ignore)))
+ (delete guix-service-type))))
+#+end_src
+
+**** TODO Base Services
+
+https://guix.gnu.org/en/manual/en/html_node/Base-Services.html
+
+#+begin_src scheme :noweb-ref system-base-services
+ (append
+ (list
+ <<trezor-udev-rules>>)
+ (list
+ (service
+ guix-service-type
+ (guix-configuration
+ (extra-options
+ (list
+ <<guix-options>>))))))
#+end_src
** TODO Home configuration
diff --git a/system-configuration.scm b/system-configuration.scm
index 57394ac..4dff289 100644
--- a/system-configuration.scm
+++ b/system-configuration.scm
@@ -41,6 +41,17 @@
%base-packages))
(services
(append
+ (append
+ (list
+ (udev-rules-service 'trezord trezord-udev-rules))
+ (list
+ (service
+ guix-service-type
+ (guix-configuration
+ (extra-options
+ (list
+ "--gc-keep-derivations=yes"
+ "--gc-keep-outputs=yes"))))))
(list
(service openssh-service-type)
(service
@@ -69,15 +80,15 @@
(service
tor-service-type
(tor-configuration
- (control-socket? #t)))
- (udev-rules-service 'trezord trezord-udev-rules))
+ (control-socket? #t))))
(modify-services
%desktop-services
(elogind-service-type
configuration =>
(elogind-configuration
(inherit configuration)
- (handle-lid-switch 'ignore))))))
+ (handle-lid-switch 'ignore)))
+ (delete guix-service-type))))
(bootloader (bootloader-configuration (bootloader grub-bootloader)
(targets '("/dev/sda"))
(keyboard-layout keyboard-layout)))