mirror of
https://codeberg.org/hako/Rosenthal.git
synced 2026-03-25 19:24:22 +00:00
Compare commits
11 Commits
9d7be1f81c
...
9cb7193827
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9cb7193827 | ||
|
|
b6eb64b31d | ||
|
|
eab1e4b7b9 | ||
|
|
f536df13ce | ||
|
|
50d720a1de | ||
|
|
17af453b4c | ||
|
|
6a7e4c83f3 | ||
|
|
87828529f6 | ||
|
|
46231e67c1 | ||
|
|
f1310d37f2 | ||
|
|
8f16d58baa |
@ -42,6 +42,7 @@
|
||||
.
|
||||
((eval . (put 'computed-substitution-with-inputs 'scheme-indent-function 1))
|
||||
(eval . (put 'hidden-desktop-entry 'scheme-indent-function 1))
|
||||
(eval . (put 'modify-services/by-name 'scheme-indent-function 1))
|
||||
|
||||
(eval . (put 'btrbk-configuration 'scheme-indent-function 0))
|
||||
(eval . (put 'caddy-configuration 'scheme-indent-function 0))
|
||||
|
||||
@ -51,6 +51,11 @@
|
||||
{
|
||||
"action": "shutdown",
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"action": "rebootToUefi",
|
||||
"command": "loginctl reboot --firmware-setup",
|
||||
"enabled": true
|
||||
}
|
||||
],
|
||||
"showHeader": true,
|
||||
|
||||
@ -1,4 +1,8 @@
|
||||
#!/bin/sh
|
||||
dir="$(dirname "$(realpath "$0")")"
|
||||
[[ ! -e ~/.config/emacs/init.el ]] && cp --recursive "$dir/." ~/.config/emacs
|
||||
guix package --install --manifest="$dir/manifest.tmpl"
|
||||
if [[ ! -f ~/.config/emacs/init.el ]]
|
||||
then
|
||||
mkdir -p ~/.config/emacs
|
||||
cp "$dir/init"* ~/.config/emacs
|
||||
fi
|
||||
cat "$dir/packages.txt" | xargs guix package --install
|
||||
|
||||
@ -1,38 +1,36 @@
|
||||
;;; -*- mode: scheme -*-
|
||||
|
||||
(use-modules (gnu packages))
|
||||
;; What follows is a "manifest" equivalent to the command line you gave.
|
||||
;; You can store it in a file that you may then pass to any 'guix' command
|
||||
;; that accepts a '--manifest' (or '-m') option.
|
||||
|
||||
(specifications->manifest
|
||||
'("emacs-pgtk"
|
||||
"emacs-corfu"
|
||||
"emacs-doom-modeline"
|
||||
"emacs-edit-indirect" ;for emacs-markdown-mode.
|
||||
"emacs-envrc"
|
||||
"emacs-evil"
|
||||
"emacs-fish-mode"
|
||||
"emacs-flycheck"
|
||||
"emacs-flycheck-guile"
|
||||
"emacs-forge"
|
||||
"emacs-gcmh"
|
||||
"emacs-geiser"
|
||||
"emacs-geiser-guile"
|
||||
"emacs-helpful"
|
||||
"emacs-hl-todo"
|
||||
"emacs-json-mode"
|
||||
"emacs-macrostep"
|
||||
"emacs-macrostep-geiser"
|
||||
"emacs-magit"
|
||||
"emacs-markdown-mode"
|
||||
"emacs-mwim"
|
||||
"emacs-nftables-mode"
|
||||
"emacs-no-littering"
|
||||
"emacs-orderless"
|
||||
"emacs-puni"
|
||||
"emacs-rainbow-delimiters"
|
||||
"emacs-vertico"
|
||||
"fontconfig"
|
||||
"font-adobe-source-serif"
|
||||
"font-google-noto-emoji"
|
||||
"font-sarasa-gothic"
|
||||
"font-victor-mono"
|
||||
))
|
||||
(list "emacs-pgtk"
|
||||
"emacs-corfu"
|
||||
"emacs-doom-modeline"
|
||||
"emacs-edit-indirect"
|
||||
"emacs-envrc"
|
||||
"emacs-evil"
|
||||
"emacs-fish-mode"
|
||||
"emacs-flycheck"
|
||||
"emacs-flycheck-guile"
|
||||
"emacs-forge"
|
||||
"emacs-gcmh"
|
||||
"emacs-geiser"
|
||||
"emacs-geiser-guile"
|
||||
"emacs-helpful"
|
||||
"emacs-hl-todo"
|
||||
"emacs-json-mode"
|
||||
"emacs-macrostep"
|
||||
"emacs-macrostep-geiser"
|
||||
"emacs-magit"
|
||||
"emacs-markdown-mode"
|
||||
"emacs-mwim"
|
||||
"emacs-no-littering"
|
||||
"emacs-orderless"
|
||||
"emacs-puni"
|
||||
"emacs-rainbow-delimiters"
|
||||
"emacs-vertico"
|
||||
"fontconfig"
|
||||
"font-adobe-source-serif"
|
||||
"font-google-noto-emoji"
|
||||
"font-sarasa-gothic"
|
||||
"font-victor-mono"))
|
||||
|
||||
31
modules/rosenthal/examples/emacs/packages.txt
Normal file
31
modules/rosenthal/examples/emacs/packages.txt
Normal file
@ -0,0 +1,31 @@
|
||||
emacs-pgtk
|
||||
emacs-corfu
|
||||
emacs-doom-modeline
|
||||
emacs-edit-indirect
|
||||
emacs-envrc
|
||||
emacs-evil
|
||||
emacs-fish-mode
|
||||
emacs-flycheck
|
||||
emacs-flycheck-guile
|
||||
emacs-forge
|
||||
emacs-gcmh
|
||||
emacs-geiser
|
||||
emacs-geiser-guile
|
||||
emacs-helpful
|
||||
emacs-hl-todo
|
||||
emacs-json-mode
|
||||
emacs-macrostep
|
||||
emacs-macrostep-geiser
|
||||
emacs-magit
|
||||
emacs-markdown-mode
|
||||
emacs-mwim
|
||||
emacs-no-littering
|
||||
emacs-orderless
|
||||
emacs-puni
|
||||
emacs-rainbow-delimiters
|
||||
emacs-vertico
|
||||
fontconfig
|
||||
font-adobe-source-serif
|
||||
font-google-noto-emoji
|
||||
font-sarasa-gothic
|
||||
font-victor-mono
|
||||
@ -27,7 +27,18 @@
|
||||
(define %my-home
|
||||
(home-environment
|
||||
(packages (specifications->packages
|
||||
'(;; File manager.
|
||||
'(;; Desktop, see also `%rosenthal-skeletons'.
|
||||
"niri"
|
||||
"dconf"
|
||||
"wl-clipboard"
|
||||
"xdg-desktop-portal-gnome"
|
||||
"xdg-desktop-portal-gtk"
|
||||
"xdg-utils"
|
||||
"imv" ;image viewer
|
||||
"wezterm" ;terminal emulator
|
||||
"xwayland-satellite" ;rootless XWayland support
|
||||
|
||||
;; File manager.
|
||||
"exo"
|
||||
"file-roller"
|
||||
"thunar"
|
||||
@ -46,7 +57,7 @@
|
||||
|
||||
"emacs-corfu"
|
||||
"emacs-doom-modeline"
|
||||
"emacs-edit-indirect" ;for emacs-markdown-mode.
|
||||
"emacs-edit-indirect" ;for emacs-markdown-mode
|
||||
"emacs-envrc"
|
||||
"emacs-evil"
|
||||
"emacs-fish-mode"
|
||||
@ -64,21 +75,19 @@
|
||||
"emacs-magit"
|
||||
"emacs-markdown-mode"
|
||||
"emacs-mwim"
|
||||
"emacs-nftables-mode"
|
||||
"emacs-no-littering"
|
||||
"emacs-orderless"
|
||||
"emacs-puni"
|
||||
"emacs-rainbow-delimiters"
|
||||
"emacs-vertico"
|
||||
|
||||
;; Fonts, see also `home-fontconfig-service-type'.
|
||||
;; Fonts.
|
||||
"font-adobe-source-serif"
|
||||
"font-google-noto"
|
||||
"font-google-noto-emoji"
|
||||
"font-nerd-symbols"
|
||||
"font-sarasa-gothic"
|
||||
"font-victor-mono"
|
||||
)))
|
||||
"font-victor-mono")))
|
||||
(services
|
||||
(cons* (service home-fish-service-type)
|
||||
(service home-keyboard-service-type %my-keyboard-layout)
|
||||
@ -109,49 +118,6 @@
|
||||
fcitx5-skk
|
||||
fcitx5-unikey))))
|
||||
|
||||
;; Font config.
|
||||
(simple-service 'extend-fontconfig home-fontconfig-service-type
|
||||
(let ((sans "Noto Sans")
|
||||
(serif "Noto Serif")
|
||||
(mono "Victor Mono")
|
||||
(emoji "Noto Color Emoji"))
|
||||
`((alias
|
||||
(family "sans-serif")
|
||||
(prefer
|
||||
(family ,sans)
|
||||
(family ,emoji)))
|
||||
(alias
|
||||
(family "serif")
|
||||
(prefer
|
||||
(family ,serif)
|
||||
(family ,emoji)))
|
||||
(alias
|
||||
(family "monospace")
|
||||
(prefer
|
||||
(family ,mono)
|
||||
(family ,emoji)))
|
||||
|
||||
,@(map (lambda (name)
|
||||
`(alias
|
||||
(family ,name)
|
||||
(prefer
|
||||
(family ,sans)
|
||||
(family "sans-serif"))))
|
||||
'("BlinkMacSystemFont"
|
||||
"-apple-system"
|
||||
"system-ui"
|
||||
"ui-sans-serif"))
|
||||
(alias
|
||||
(family "ui-serif")
|
||||
(prefer
|
||||
(family ,serif)
|
||||
(family "serif")))
|
||||
(alias
|
||||
(family "ui-monospace")
|
||||
(prefer
|
||||
(family ,mono)
|
||||
(family "monospace"))))))
|
||||
|
||||
%rosenthal-desktop-home-services))))
|
||||
|
||||
(define %my-os
|
||||
@ -199,26 +165,15 @@
|
||||
(append (specifications->packages
|
||||
'(;; CLI utilities.
|
||||
"curl"
|
||||
"fd"
|
||||
"file"
|
||||
"git"
|
||||
"gnupg"
|
||||
"mosh"
|
||||
"ncurses"
|
||||
"ripgrep"
|
||||
"rsync"
|
||||
"unzip"
|
||||
|
||||
;; Desktop, see also `%rosenthal-skeletons'.
|
||||
"niri"
|
||||
"dconf"
|
||||
"wl-clipboard"
|
||||
"xdg-desktop-portal-gnome"
|
||||
"xdg-desktop-portal-gtk"
|
||||
"xdg-utils"
|
||||
"imv" ;image viewer
|
||||
"wezterm" ;terminal emulator
|
||||
"xwayland-satellite" ;rootless XWayland support
|
||||
))
|
||||
;; Provide Wayland session for the login manager.
|
||||
"niri"))
|
||||
%base-packages))
|
||||
|
||||
(services
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
From b6c1341082102ff4416186cca549b5f05efda162 Mon Sep 17 00:00:00 2001
|
||||
From f45f42fe17a0037ce3b8c4f22537f257338734e5 Mon Sep 17 00:00:00 2001
|
||||
From: Hilton Chain <hako@ultrarare.space>
|
||||
Date: Sun, 30 Nov 2025 12:13:36 +0800
|
||||
Subject: [PATCH] templates: Add more forges.
|
||||
|
||||
---
|
||||
src/cuirass/templates.scm | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
src/cuirass/templates.scm | 16 +++++++++++++---
|
||||
1 file changed, 13 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/cuirass/templates.scm b/src/cuirass/templates.scm
|
||||
index d591705..5518331 100644
|
||||
index 1cf7ebf..2ee29fa 100644
|
||||
--- a/src/cuirass/templates.scm
|
||||
+++ b/src/cuirass/templates.scm
|
||||
@@ -1526,7 +1526,9 @@ (define %vcs-web-views
|
||||
@ -22,6 +22,32 @@ index d591705..5518331 100644
|
||||
|
||||
(define %vcs-web-commit-range-views
|
||||
;; List of host names and corresponding URL to display a commit range.
|
||||
@@ -1541,7 +1543,13 @@ (define %vcs-web-commit-range-views
|
||||
(if (string-suffix? ".git" repository-url)
|
||||
(string-drop-right repository-url 4)
|
||||
repository-url)
|
||||
- "/compare/" commit1 ".." commit2))))
|
||||
+ "/compare/" commit1 ".." commit2)))
|
||||
+ (sourcehut-url (lambda (repository-url _ commit2)
|
||||
+ (string-append
|
||||
+ (if (string-suffix? ".git" repository-url)
|
||||
+ (string-drop-right repository-url 4)
|
||||
+ repository-url)
|
||||
+ "/log/?from=" commit2))))
|
||||
`(("git.savannah.gnu.org"
|
||||
,(lambda (repository-url commit1 commit2)
|
||||
(string-append (string-replace-substring repository-url
|
||||
@@ -1552,7 +1560,9 @@ (define %vcs-web-commit-range-views
|
||||
("git.guix.gnu.org" ,github-url) ;alias for codeberg.org
|
||||
("gitlab.com" ,gitlab-url)
|
||||
("gitlab.inria.fr" ,gitlab-url)
|
||||
- ("github.com" ,github-url))))
|
||||
+ ("github.com" ,github-url)
|
||||
+ ("git.sr.ht" ,sourcehut-url)
|
||||
+ ("git.urspace.moe" ,github-url))))
|
||||
|
||||
(define* (commit-hyperlink url commit
|
||||
#:optional (text commit))
|
||||
--
|
||||
2.51.2
|
||||
2.52.0
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
(define-public noctalia-shell
|
||||
(package
|
||||
(name "noctalia-shell")
|
||||
(version "4.4.3")
|
||||
(version "4.5.0")
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
@ -48,7 +48,7 @@
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"1bcllxzpc3viyxizv9qqckbzxgsgsdki8pp60cns4nwzk89q4yp4"))))
|
||||
"1syqsml49jfjpngi7b099jcggp66lrls0ha6w5daqd5xhd2z94v3"))))
|
||||
(build-system copy-build-system)
|
||||
(arguments
|
||||
(list
|
||||
@ -125,7 +125,7 @@ exec ~a --config ~a/etc/xdg/quickshell/noctalia-shell \"$@\"~%"
|
||||
coreutils-minimal
|
||||
ddcutil
|
||||
elogind
|
||||
fastfetch
|
||||
fastfetch-minimal
|
||||
findutils
|
||||
fontconfig
|
||||
git-minimal
|
||||
|
||||
@ -587,10 +587,7 @@ gtk-key-theme-name = ~a~%"
|
||||
(".config/xfce4/helpers.rc"
|
||||
,(local-file "../examples/dot-config/xfce4/helpers.rc"))
|
||||
|
||||
;; Selected from the default skeletons.
|
||||
(".config/gdb/gdbinit" ,%default-gdbinit)
|
||||
(".config/nano/nanorc" ,%default-nanorc)
|
||||
(".guile" ,%default-dotguile)))
|
||||
,@(default-skeletons)))
|
||||
|
||||
(define %rosenthal-skeletons-installer
|
||||
`((".config/noctalia/settings.json"
|
||||
@ -651,8 +648,7 @@ gtk-key-theme-name = ~a~%"
|
||||
(using-setuid? #f)))
|
||||
|
||||
;; Add udev rules for backlight control.
|
||||
(simple-service 'backlight udev-service-type (list light))
|
||||
(simple-service 'backlight-external udev-service-type (list ddcutil))
|
||||
(simple-service 'backlight udev-service-type (list ddcutil light))
|
||||
|
||||
(modify-services %desktop-services
|
||||
(delete %display-manager-service-type)
|
||||
|
||||
113
modules/rosenthal/utils/services.scm
Normal file
113
modules/rosenthal/utils/services.scm
Normal file
@ -0,0 +1,113 @@
|
||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||
;;; Copyright © 2026 Hilton Chain <hako@ultrarare.space>
|
||||
|
||||
(define-module (rosenthal utils services)
|
||||
;; Guile builtins
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:use-module (srfi srfi-35)
|
||||
;; Utilities
|
||||
#:use-module (guix diagnostics)
|
||||
#:use-module (guix i18n)
|
||||
;; Guix System - services
|
||||
#:use-module (gnu services)
|
||||
#:export (modify-services/by-name))
|
||||
|
||||
|
||||
;;;
|
||||
;;; modify-services/by-name
|
||||
;;;
|
||||
|
||||
;; Adapted from (gnu services).
|
||||
|
||||
(define-syntax clause-alist
|
||||
(syntax-rules (=> delete)
|
||||
((_ (delete name) rest ...)
|
||||
(cons (list name
|
||||
(lambda (service)
|
||||
#f)
|
||||
(current-source-location))
|
||||
(clause-alist rest ...)))
|
||||
((_ (name param => exp ...) rest ...)
|
||||
(cons (list name
|
||||
(lambda (svc)
|
||||
(let ((param (service-value svc)))
|
||||
(service (service-kind svc)
|
||||
(begin exp ...))))
|
||||
(current-source-location))
|
||||
(clause-alist rest ...)))
|
||||
((_)
|
||||
'())))
|
||||
|
||||
(define (apply-clauses clauses service deleted-services)
|
||||
(define (raise-if-deleted name properties)
|
||||
(match (find (match-lambda
|
||||
((deleted-name _)
|
||||
(eq? name deleted-name)))
|
||||
deleted-services)
|
||||
((_ deleted-properties)
|
||||
(raise (make-compound-condition
|
||||
(condition
|
||||
(&error-location
|
||||
(location (source-properties->location properties))))
|
||||
(formatted-message
|
||||
(G_ "modify-services: service '~a' was deleted here: ~a")
|
||||
name
|
||||
(source-properties->location deleted-properties)))))
|
||||
(_ #t)))
|
||||
|
||||
(match clauses
|
||||
(((name proc properties) . rest)
|
||||
(raise-if-deleted name properties)
|
||||
(if (eq? (and service (service-type-name (service-kind service))) name)
|
||||
(let ((new-service (proc service)))
|
||||
(apply-clauses rest new-service
|
||||
(if new-service
|
||||
deleted-services
|
||||
(cons (list name properties)
|
||||
deleted-services))))
|
||||
(apply-clauses rest service deleted-services)))
|
||||
(()
|
||||
service)))
|
||||
|
||||
(define (%modify-services services clauses)
|
||||
(define (raise-if-not-found clause)
|
||||
(match clause
|
||||
((name _ properties)
|
||||
(unless (find (lambda (service)
|
||||
(eq? name (service-type-name (service-kind service))))
|
||||
services)
|
||||
(raise (make-compound-condition
|
||||
(condition
|
||||
(&error-location
|
||||
(location (source-properties->location properties))))
|
||||
(formatted-message
|
||||
(G_ "modify-services/by-name: service '~a' not found in service list")
|
||||
name)))))))
|
||||
|
||||
(for-each raise-if-not-found clauses)
|
||||
(reverse (filter-map identity
|
||||
(fold (lambda (service services)
|
||||
(cons (apply-clauses clauses service '())
|
||||
services))
|
||||
'()
|
||||
services))))
|
||||
|
||||
(define-syntax modify-services/by-name
|
||||
(syntax-rules ()
|
||||
"Similiar to modify-services but uses the name of the service type instead.
|
||||
For example:
|
||||
|
||||
(modify-services %base-services
|
||||
('guix
|
||||
config => (guix-configuration
|
||||
(inherit config)
|
||||
(use-substitutes? #f)
|
||||
(extra-options '(\"--gc-keep-derivations\"))))
|
||||
('mingetty
|
||||
config => (mingetty-configuration
|
||||
(inherit config)
|
||||
(motd (plain-file \"motd\" \"Hi there!\"))))
|
||||
(delete 'udev))"
|
||||
((_ services clauses ...)
|
||||
(%modify-services services (clause-alist clauses ...)))))
|
||||
@ -75,11 +75,7 @@
|
||||
(inherit os)
|
||||
(kernel-loadable-modules
|
||||
`(,@(if boot?
|
||||
`((,(package/inherit zfs
|
||||
(arguments
|
||||
(substitute-keyword-arguments (package-arguments zfs)
|
||||
((#:linux _ #f) (operating-system-kernel os)))))
|
||||
"module"))
|
||||
`((,zfs "module"))
|
||||
'())
|
||||
,@(operating-system-kernel-loadable-modules os)))
|
||||
(services
|
||||
|
||||
Loading…
Reference in New Issue
Block a user