summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/guix/channels.scm76
-rw-r--r--services/nonguix/substitute.scm32
-rw-r--r--suweren/home.scm47
-rw-r--r--suweren/home/services/fontutils.scm17
-rw-r--r--suweren/services.scm24
-rw-r--r--suweren/system.scm274
-rw-r--r--suweren/update.scm10
7 files changed, 205 insertions, 275 deletions
diff --git a/services/guix/channels.scm b/services/guix/channels.scm
deleted file mode 100644
index fcc3ba5..0000000
--- a/services/guix/channels.scm
+++ /dev/null
@@ -1,76 +0,0 @@
-(define-module (services guix channels)
- #:use-module (gnu packages package-management)
- #:use-module (gnu services)
- #:use-module (gnu services base)
- #:use-module (guix channels))
-
-;;; DATA
-
-(define deployment-commit
- "c24ce7cb11e74da13d491f9de3c4b7040a069f43")
-
-(define deployment-url
- "https://git.marekpasnikowski.pl/git/deployment.git")
-
-(define distribution-commit
- "7d17bded11ef1239592e6e5abd40ceee1e99cbb8")
-
-(define distribution-url
- "https://git.marekpasnikowski.pl/git/distribution.git")
-
-(define marekpasnikowski-fingerprint
- (openpgp-fingerprint "590E 500F E39D 26B3 E60B 743B 6D81 B120 7711 899F"))
-
-(define nonguix-commit
- "897c1a470da759236cc11798f4e0a5f7d4d59fbc")
-
-(define nonguix-url
- "https://gitlab.com/nonguix/nonguix")
-
-(define nonguix-fingerprint
- (openpgp-fingerprint "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5"))
-
-;;; ABSTRACTION 3
-
-(define deployment-introduction
- (make-channel-introduction deployment-commit
- marekpasnikowski-fingerprint))
-
-(define distribution-introduction
- (make-channel-introduction distribution-commit
- marekpasnikowski-fingerprint))
-
-(define nonguix-introduction
- (make-channel-introduction nonguix-commit
- nonguix-fingerprint))
-
-;;; ABSTRACTION 2
-
-(define deployment
- (channel (name 'deployment)
- (url deployment-url)
- (introduction deployment-introduction)))
-
-(define distribution
- (channel (name 'distribution)
- (url distribution-url)
- (introduction distribution-introduction)))
-
-(define nonguix
- (channel (name 'nonguix)
- (url nonguix-url)
- (introduction nonguix-introduction)))
-
-;;; ABSTRACTION 1
-
-(define distribution-channels
- (append %default-channels
- (list deployment
- distribution
- nonguix)))
-
-;;; PUBLIC
-
-(define-public (channels config)
- (guix-configuration (inherit config)
- (channels distribution-channels)))
diff --git a/services/nonguix/substitute.scm b/services/nonguix/substitute.scm
deleted file mode 100644
index 4cf866a..0000000
--- a/services/nonguix/substitute.scm
+++ /dev/null
@@ -1,32 +0,0 @@
-(define-module (services nonguix substitute)
- #:use-module (gnu services base)
- #:use-module (guix gexp))
-
-;; DATA
-
-(define nonguix-authorized-guix-key-content
- (string-append "(public-key \n"
- "(ecc \n"
- "(curve Ed25519) \n"
- "(q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#))) \n"))
-
-(define nonguix-authorized-guix-key-name
- "nonguix-authorized-guix-key")
-
-(define nonguix-substitute-urls
- (list "https://substitutes.nonguix.org"))
-
-;; ABSTRACTION 1
-
-(define nonguix-authorized-guix-keys
- (list (plain-file nonguix-authorized-guix-key-name
- nonguix-authorized-guix-key-content)))
-
-;; PUBLIC
-
-(define-public (nonguix-substitute config)
- (guix-configuration (inherit config)
- (substitute-urls (append %default-substitute-urls
- nonguix-substitute-urls))
- (authorized-keys (append %default-authorized-guix-keys
- nonguix-authorized-guix-keys))))
diff --git a/suweren/home.scm b/suweren/home.scm
index e51579c..5bc018f 100644
--- a/suweren/home.scm
+++ b/suweren/home.scm
@@ -1,4 +1,7 @@
(define-module (suweren home)
+ #:use-module ((gnu home services shells)
+ #:prefix gnu:home:services:shells:)
+
;; easyeffects
#:use-module (gnu packages audio)
@@ -40,6 +43,9 @@
;; service
;; simple-service
#:use-module (gnu services)
+
+ #:use-module ((guix gexp)
+ #:prefix guix:gexp:)
;; suweren-home-fontconfig-service-type
#:use-module (suweren home services fontutils)
@@ -47,8 +53,25 @@
;; update-commands
#:use-module (suweren update))
-;; string ->
-;; (record service)
+(define bash-prompt-configuration-core
+ " PS1='\\n\\n\\t $?\\n\\u@\\H \\w\\n\\! ")
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(define bash-prompt-configuration
+ (guix:gexp:mixed-text-file "bash-prompt"
+ "\n"
+ "if [ -n \"$GUIX_ENVIRONMENT\" ] \n"
+ "then\n"
+ bash-prompt-configuration-core
+ "[env] \\$ '\n"
+ "else\n"
+ bash-prompt-configuration-core
+ "\\$ '\n"
+ "fi"))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
(define-public (%suweren-home-services host-name*)
(let* ((packages (list easyeffects
font-google-noto
@@ -75,4 +98,22 @@
profile
shepherd
suweren-home-fontconfig-service-type
- update-commands*)))
+ update-commands*
+ (simple-service
+ 'environment-variables
+ home-environment-variables-service-type
+ `(("EDITOR" . "emacs")))
+ (simple-service
+ 'bash-aliases
+ home-bash-service-type
+ (home-bash-extension
+ (aliases
+ `(("edit" . "$EDITOR")))))
+ (simple-service
+ 'bash-prompt
+ gnu:home:services:shells:home-bash-service-type
+ (gnu:home:services:shells:home-bash-extension
+ (bash-profile
+ (list bash-prompt-configuration))
+ (bashrc
+ (list bash-prompt-configuration)))))))
diff --git a/suweren/home/services/fontutils.scm b/suweren/home/services/fontutils.scm
index 661667b..0bf67f8 100644
--- a/suweren/home/services/fontutils.scm
+++ b/suweren/home/services/fontutils.scm
@@ -14,21 +14,30 @@
(hinting '(match (@ (target "font"))
(edit (@ (mode "assign")
(name "hinting"))
- (bool "true"))))
+ (bool "false"))))
(hintstyle '(match (@ (target "font"))
(edit (@ (mode "assign")
(name "hintstyle"))
- (const "hintfull"))))
+ (const "hintnone"))))
+ (monospace '(alias (family "monospace")
+ (prefer (family "Unifont"))))
(rgba '(match (@ (target "font"))
(edit (@ (mode "assign")
(name "rgba"))
- (const "rgb"))))
+ (const "none"))))
+ (sans-serif '(alias (family "sans-serif")
+ (prefer (family "Unifont"))))
+ (serif '(alias (family "serif")
+ (prefer (family "Unifont"))))
;; TODO sxml -> (sxml)
(rules (list antialias
hinting
hintstyle
- rgba))
+ rgba
+ monospace
+ sans-serif
+ serif))
;; TODO Remove the hardcoded path by using an appropriate variable.
;; TODO string -> (sxml) -> fontconfig-extension
diff --git a/suweren/services.scm b/suweren/services.scm
index c067df8..2809da0 100644
--- a/suweren/services.scm
+++ b/suweren/services.scm
@@ -9,19 +9,13 @@
#:use-module (gnu services sound)
#:use-module (gnu services syncthing)
#:use-module (gnu services xorg)
- #:use-module (services guix channels)
- #:use-module (services nonguix substitute)
#:use-module (services plasma-desktop)
#:use-module (suweren services desktop)
+ #:use-module ((suweren system)
+ #:prefix suweren-system:)
#:use-module (suweren trezor) ; trezor-bridge
#:use-module (upstream services nbfc))
-(define (guix-options configuration-record)
- (let ((extra-options (list "--gc-keep-derivations=yes"
- "--gc-keep-outputs=yes")))
- (guix-configuration (inherit configuration-record)
- (extra-options extra-options))))
-
(define-public %distribution-services
(let* ((cups-configuration* (cups-configuration (web-interface? #t)))
(nbfc-configuration* (nbfc-configuration (model "Acer Nitro AN515-43")))
@@ -33,15 +27,9 @@
(%desktop-services* (modify-services %desktop-services
(delete gdm-service-type)
(delete pulseaudio-service-type)
- (guix-service-type configuration
- =>
- (guix-options configuration))
- (guix-service-type configuration
- =>
- (channels configuration))
- (guix-service-type configuration
- =>
- (nonguix-substitute configuration))))
+ (guix-service-type configuration
+ =>
+ (suweren-system:guix configuration))))
(nbfc-service (service nbfc-service-type
nbfc-configuration*))
(plasma-desktop-service (service plasma-desktop-service-type))
@@ -53,7 +41,7 @@
bluetooth-services
trezor-bridge
(list cups-service
- nbfc-service
+ ;; nbfc-service
plasma-desktop-service
sddm-service
syncthing-service))))
diff --git a/suweren/system.scm b/suweren/system.scm
index 9ee81b9..39ec3d2 100644
--- a/suweren/system.scm
+++ b/suweren/system.scm
@@ -1,26 +1,40 @@
(define-module (suweren system)
#:use-module (gnu packages kde-pim) ; kgpg
- #:use-module (gnu services) ; modify-services
+ #:use-module (gnu services) ; modify-services
; profile-service-type
- ; simple-service
- #:use-module (gnu services base) ; guix-configuration
- ; guix-service-type
- ; login-configuration
- ; login-service-type
+ ; simple-service
+ #:use-module (gnu services base) ; guix-configuration
+ ; guix-service-type
+ ; login-configuration
+ ; login-service-type
#:use-module (gnu services desktop) ; %desktop-services
- ; plasma-desktop-service-type
+ ; plasma-desktop-service-type
#:use-module (gnu services sddm) ; sddm-configuration
- ; sddm-service-type
+ ; sddm-service-type
#:use-module (gnu services syncthing) ; syncthing-configuration
; syncthing-service-type
#:use-module (gnu services xorg) ; gdm-service-type
- #:use-module (gnu system) ; operating-system
+ #:use-module (gnu system) ; operating-system
+ #:use-module (gnu system locale)
#:use-module (gnu system file-systems) ; %base-file-systems
- #:use-module (gnu system shadow) ; %base-user-accounts
- #:use-module (guix channels) ; %default-channels
- #:use-module (guix gexp) ; plain-file
+ #:use-module (gnu system shadow) ; %base-user-accounts
+ #:use-module (guix channels) ; %default-channels
+ #:use-module (guix gexp) ; plain-file
+ #:use-module (nongnu packages linux)
#:use-module (suweren commons sudoers) ; %sudoers-specification*
- )
+ #:use-module ((suweren trezor)
+ #:prefix suweren-trezor:))
+
+(define-public polish-locale-string
+ "pl_PL.utf8")
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(define polish-locale
+ (locale-definition (name polish-locale-string)
+ (source "pl_PL")))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; (list record* package)
(define packages
@@ -29,74 +43,86 @@
;; record* service
(define profile
(simple-service 'distribution-packages
- profile-service-type
- packages))
+ profile-service-type
+ packages))
;; record guix-configuration ->
;; record guix-configuration
-(define (guix configuration)
+(define-public (guix configuration)
(let* ((deployment-commit "c24ce7cb11e74da13d491f9de3c4b7040a069f43")
- (distribution-commit "7d17bded11ef1239592e6e5abd40ceee1e99cbb8")
- (marekpasnikowski-fingerprint
- (openpgp-fingerprint "590E 500F E39D 26B3 E60B 743B 6D81 B120 7711 899F"))
- (nonguix-commit "897c1a470da759236cc11798f4e0a5f7d4d59fbc")
- (nonguix-fingerprint
- (openpgp-fingerprint "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5"))
-
- (deployment-introduction (make-channel-introduction deployment-commit
- marekpasnikowski-fingerprint))
- (deployment-url "https://git.marekpasnikowski.pl/git/deployment.git")
- (distribution-introduction (make-channel-introduction distribution-commit
- marekpasnikowski-fingerprint))
- (distribution-url "https://git.marekpasnikowski.pl/git/distribution.git")
- (nonguix-authorized-guix-key-content
- (string-append
- "(public-key \n"
- "(ecc \n"
- "(curve Ed25519) \n"
- "(q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#))) \n"))
- (nonguix-authorized-guix-key-name "nonguix-authorized-guix-key")
- (nonguix-introduction (make-channel-introduction nonguix-commit
- nonguix-fingerprint))
- (nonguix-url "https://gitlab.com/nonguix/nonguix")
-
- (deployment (channel (name 'deployment)
- (url deployment-url)
- (introduction deployment-introduction)))
- (distribution (channel (name 'distribution)
- (url distribution-url)
- (introduction distribution-introduction)))
- (nonguix (channel (name 'nonguix)
- (url nonguix-url)
- (introduction nonguix-introduction)))
- (nonguix-key (plain-file nonguix-authorized-guix-key-name
- nonguix-authorized-guix-key-content))
-
- (nonguix-authorized-guix-keys (list nonguix-key))
- (nonguix-substitute-urls (list "https://substitutes.nonguix.org"))
- (suweren-channels (list deployment
- distribution
- nonguix))
-
- (%default-authorized-guix-keys* (append %default-authorized-guix-keys
- nonguix-authorized-guix-keys))
- (%default-channels* (append %default-channels
- suweren-channels))
- (%default-substitute-urls* (append %default-substitute-urls
- nonguix-substitute-urls))
- (extra-options* (list "--gc-keep-derivations=yes"
- "--gc-keep-outputs=yes")))
+ (distribution-commit "7d17bded11ef1239592e6e5abd40ceee1e99cbb8")
+ (marekpasnikowski-fingerprint
+ (openpgp-fingerprint "590E 500F E39D 26B3 E60B 743B 6D81 B120 7711 899F"))
+ (nonguix-commit "897c1a470da759236cc11798f4e0a5f7d4d59fbc")
+ (nonguix-fingerprint
+ (openpgp-fingerprint "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5"))
+ (sovereign-commit "44a44b4c3c645a878ab8920bf0d250541bf59af0")
+
+ (deployment-introduction (make-channel-introduction deployment-commit
+ marekpasnikowski-fingerprint))
+ (deployment-url "https://git.marekpasnikowski.pl/git/deployment.git")
+ (distribution-introduction (make-channel-introduction distribution-commit
+ marekpasnikowski-fingerprint))
+ (distribution-url "https://git.marekpasnikowski.pl/git/distribution.git")
+ (nonguix-authorized-guix-key-content
+ (string-append
+ "(public-key \n"
+ "(ecc \n"
+ "(curve Ed25519) \n"
+ "(q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#))) \n"))
+ (nonguix-authorized-guix-key-name "nonguix-authorized-guix-key")
+ (nonguix-introduction (make-channel-introduction nonguix-commit
+ nonguix-fingerprint))
+ (nonguix-url "https://gitlab.com/nonguix/nonguix")
+ (sovereign-introduction (make-channel-introduction sovereign-commit
+ marekpasnikowski-fingerprint))
+ (sovereign-url "https://git.marekpasnikowski.pl/git/sovereign.git")
+
+ (deployment (channel (name 'deployment)
+ (url deployment-url)
+ (introduction deployment-introduction)))
+ (distribution (channel (name 'distribution)
+ (url distribution-url)
+ (introduction distribution-introduction)))
+ (nonguix (channel (name 'nonguix)
+ (url nonguix-url)
+ (introduction nonguix-introduction)))
+ (nonguix-key (plain-file nonguix-authorized-guix-key-name
+ nonguix-authorized-guix-key-content))
+ (sovereign (channel (name 'sovereign)
+ (url sovereign-url)
+ (introduction sovereign-introduction)))
+
+ (nonguix-authorized-guix-keys (list nonguix-key))
+ (nonguix-substitute-urls (list "https://substitutes.nonguix.org"))
+ (suweren-channels (list deployment
+ distribution
+ nonguix
+ sovereign))
+
+ (%default-authorized-guix-keys* (append %default-authorized-guix-keys
+ nonguix-authorized-guix-keys))
+ (%default-channels* (append %default-channels
+ suweren-channels))
+ (%default-substitute-urls* (append %default-substitute-urls
+ nonguix-substitute-urls))
+ (extra-options* (list "--gc-keep-derivations=yes"
+ "--gc-keep-outputs=yes")))
(guix-configuration (inherit configuration)
- (channels %default-channels*)
- (authorized-keys %default-authorized-guix-keys*)
- (substitute-urls %default-substitute-urls*)
- (extra-options extra-options*))))
+ (channels %default-channels*)
+ (authorized-keys %default-authorized-guix-keys*)
+ (substitute-urls %default-substitute-urls*)
+ (extra-options extra-options*))))
+
+(define (locale-definitions*)
+ (append %default-locale-definitions
+ (list polish-locale)))
;; record login-configuration ->
;; record login-configuration
(define (login configuration)
(login-configuration (inherit configuration)
- (allow-empty-passwords? #f)))
+ (allow-empty-passwords? #f)))
;; record syncthing-configuration
(define syncthing-configuration*
@@ -105,70 +131,44 @@
;; record syncthing-service-type
(define syncthing
(service syncthing-service-type
- syncthing-configuration*))
-
-;; record package ->
-;; record bootloader-configuration ->
-;; bool | record keyboard-layout ->
-;; record package ->
-;; (record package) ->
-;; string ->
-;; (record file-system) ->
-;; (record swap-space) ->
-;; (record user-account) ->
-;; string ->
-;; string ->
-;; (record service) ->
-;; record operating-system
-(define-public (%suweren-operating-system kernel*
- bootloader-configuration*
- keyboard-layout*
- initrd*
- firmware*
- host-name*
- file-systems*
- swap-devices*
- users*
- timezone*
- locale*
- services*)
+ syncthing-configuration*))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(define-public %suweren-bootloader
+ #f)
+
+(define-public %suweren-file-systems
+ %base-file-systems)
+
+(define-public %suweren-kernel
+ linux)
+
+(define-public %suweren-locale-definitions
+ (locale-definitions*))
+
+(define-public %suweren-services
(let* ((sddm-configuration* (sddm-configuration (theme "breeze")
- (auto-login-user "lilia")))
-
- (plasma-desktop (service plasma-desktop-service-type))
- (sddm (service sddm-service-type
- sddm-configuration*))
-
- (%desktop-services* (modify-services %desktop-services
- (delete gdm-service-type)
- (guix-service-type configuration
- =>
- (guix configuration))
- (login-service-type configuration
- =>
- (login configuration))))
- (suweren-services (list plasma-desktop
- profile
- sddm
- syncthing))
-
- (file-systems* (append %base-file-systems
- file-systems*))
- (services* (append %desktop-services*
- suweren-services
- services*))
- (users* (append %base-user-accounts
- users*)))
- (operating-system (kernel kernel*)
- (bootloader bootloader-configuration*)
- (keyboard-layout keyboard-layout*)
- (initrd initrd*)
- (firmware firmware*)
- (host-name host-name*)
- (file-systems file-systems*)
- (swap-devices swap-devices*)
- (users users*)
- (timezone timezone*)
- (locale locale*)
- (services services*)
- (sudoers-file %sudoers-specification*))))
+ (auto-login-user "lilia")))
+
+ (plasma-desktop (service plasma-desktop-service-type))
+ (sddm (service sddm-service-type
+ sddm-configuration*))
+
+ (%desktop-services* (modify-services %desktop-services
+ (delete gdm-service-type)
+ (guix-service-type configuration
+ =>
+ (guix configuration))
+ (login-service-type configuration
+ =>
+ (login configuration)))))
+ (append %desktop-services*
+ suweren-trezor:trezor-bridge
+ (list plasma-desktop
+ profile
+ sddm
+ syncthing))))
+
+(define-public %suweren-users
+ %base-user-accounts)
diff --git a/suweren/update.scm b/suweren/update.scm
index 1381b2c..d6fa1ec 100644
--- a/suweren/update.scm
+++ b/suweren/update.scm
@@ -19,8 +19,8 @@
"sudo guix system delete-generations 7d")
;; string
-(define guile-load-path
- "GUILE_LOAD_PATH='$HOME/Szablony/distribution:$HOME/Szablony/deployment'")
+(define guix-test-switches
+ "-L ~/Szablony/sovereign -L ~/Szablony/distribution -L ~/Szablony/deployment -v 3")
;; string
(define pull-guix
@@ -50,9 +50,9 @@
;; string ->
;; string
(define (test-update reconfigure-system*)
- (string-append guile-load-path
- " "
- reconfigure-system*))
+ (string-append reconfigure-system*
+ " "
+ guix-test-switches))
;; string ->
;; string