mirror of
https://codeberg.org/hako/Rosenthal.git
synced 2026-12-06 19:08:05 +00:00
Compare commits
577
Commits
7bda91c1da
..
trunk
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0c7b110f44 | ||
|
|
dc1eb9b49f | ||
|
|
d79904c39c | ||
|
|
dd6f34d630 | ||
|
|
e4673718e1 | ||
|
|
5c9acbaf76 | ||
|
|
9df7b98170 | ||
|
|
9a3dbeabcd | ||
|
|
d63b2e8ed4 | ||
|
|
bfcb3e35f6 | ||
|
|
bd8ba90e4d | ||
|
|
1ce5a82fac | ||
|
|
020eeab068 | ||
|
|
5b6492be2e | ||
|
|
5c805b94ca | ||
|
|
a9b702223f | ||
|
|
689357179a | ||
|
|
7bd1855a00 | ||
|
|
7f6cdacf9d | ||
|
|
cb73c01597 | ||
|
|
ef4eb81a56 | ||
|
|
b4f703f33d | ||
|
|
07f3c47c02 | ||
|
|
b755c0d018 | ||
|
|
6af9d5426f | ||
|
|
a8da12053f | ||
|
|
2f77ce5db2 | ||
|
|
0dec192155 | ||
|
|
c174d7a009 | ||
|
|
357aba2039 | ||
|
|
328d7023af | ||
|
|
e4dafed2ad | ||
|
|
17cae93520 | ||
|
|
fff737cc07 | ||
|
|
a6736d8030 | ||
|
|
00b4c71c87 | ||
|
|
809e90d7fb | ||
|
|
bfe0d7379d | ||
|
|
e0db50c276 | ||
|
|
55d68222f4 | ||
|
|
1c6b3e3cb6 | ||
|
|
22d0abb36a | ||
|
|
0daf8b388b | ||
|
|
a19f1684cf | ||
|
|
a4de900221 | ||
|
|
a6124dd914 | ||
|
|
0e4f53ed58 | ||
|
|
c3781eefc8 | ||
|
|
8b1ecc349e | ||
|
|
cdb841b71e | ||
|
|
18cef20133 | ||
|
|
078c2d7983 | ||
|
|
877fe611c6 | ||
|
|
9c154fa85c | ||
|
|
279e3645b6 | ||
|
|
19d981d97a | ||
|
|
fb5e0fd076 | ||
|
|
c3cb87ecb5 | ||
|
|
e0333310c8 | ||
|
|
db99800394 | ||
|
|
4f8e710735 | ||
|
|
42e0ad6d86 | ||
|
|
f5da8e8aeb | ||
|
|
30cb0fca4f | ||
|
|
0999318f8d | ||
|
|
3507deee77 | ||
|
|
db46c04f3d | ||
|
|
2b03183286 | ||
|
|
579db10847 | ||
|
|
7912112268 | ||
|
|
be842ba63f | ||
|
|
2fb0028c81 | ||
|
|
c27ac08668 | ||
|
|
4b892bd318 | ||
|
|
52f55af4e9 | ||
|
|
9b9071c9e0 | ||
|
|
f6a6436ebc | ||
|
|
a7073acb39 | ||
|
|
276eca71dd | ||
|
|
e1b25f7d8d | ||
|
|
9afc4e56da | ||
|
|
27baf1ba57 | ||
|
|
fc235e2eb0 | ||
|
|
e076f5f3de | ||
|
|
01d1c44615 | ||
|
|
8a41a4e33d | ||
|
|
42e079f438 | ||
|
|
631adacf12 | ||
|
|
b98b1b1e9f | ||
|
|
2e08e1a93e | ||
|
|
90537893e2 | ||
|
|
15e867800b | ||
|
|
717eb109be | ||
|
|
58c47e9bfc | ||
|
|
c62ff66702 | ||
|
|
98a49dcb06 | ||
|
|
14ce4e3aba | ||
|
|
567a1e7a55 | ||
|
|
f25d748dbd | ||
|
|
9f77f8a014 | ||
|
|
3e1ac671e3 | ||
|
|
8f5f47e0c3 | ||
|
|
ee479dbfda | ||
|
|
200667cddc | ||
|
|
c66f1a8c8d | ||
|
|
1122c6fec9 | ||
|
|
755e5c109a | ||
|
|
6142ed7cd5 | ||
|
|
a332d68283 | ||
|
|
a3b53eb118 | ||
|
|
649be3f514 | ||
|
|
ccc53c9afc | ||
|
|
731b5877ff | ||
|
|
c2897f17ad | ||
|
|
2dae5082ff | ||
|
|
5119a0fbfd | ||
|
|
9525c5b1c0 | ||
|
|
bdde9175c6 | ||
|
|
e4aff75551 | ||
|
|
0d00baa9e1 | ||
|
|
34502202bf | ||
|
|
641f1fbd71 | ||
|
|
1398722e04 | ||
|
|
74b0cd7410 | ||
|
|
ed54329e1f | ||
|
|
14bde08c8b | ||
|
|
1f35f0e393 | ||
|
|
87bfe33314 | ||
|
|
5f312b336d | ||
|
|
805ea83faf | ||
|
|
8aae7d26dd | ||
|
|
8bebafaacd | ||
|
|
b353ee7610 | ||
|
|
09bfd608cf | ||
|
|
2816e3e06a | ||
|
|
8f0677e5e3 | ||
|
|
0f8ae9ca08 | ||
|
|
8a8142d16c | ||
|
|
b15af6f9ff | ||
|
|
08b1980f22 | ||
|
|
9454089804 | ||
|
|
ed43a49877 | ||
|
|
c8625f6a8c | ||
|
|
a88ac359a0 | ||
|
|
f34040153c | ||
|
|
bde35a43ac | ||
|
|
c45fecb485 | ||
|
|
996ebc9ec0 | ||
|
|
a6a6564eab | ||
|
|
4b0111cdd7 | ||
|
|
890a978283 | ||
|
|
b93fb3a2b5 | ||
|
|
93f50036db | ||
|
|
ab3698c4ad | ||
|
|
91f2eac90a | ||
|
|
83af642df3 | ||
|
|
5d831de5b5 | ||
|
|
cc797a3378 | ||
|
|
a21dc8e795 | ||
|
|
44e890633e | ||
|
|
7aa919844f | ||
|
|
c6361f6e7b | ||
|
|
ba37355893 | ||
|
|
21391bab6e | ||
|
|
d624abc771 | ||
|
|
956de518d2 | ||
|
|
9a7c64ce33 | ||
|
|
4f3ac7df33 | ||
|
|
9ece9f0544 | ||
|
|
55b07c9767 | ||
|
|
9f0956bfbe | ||
|
|
ef94c881f4 | ||
|
|
010f5f210a | ||
|
|
7a0190a86b | ||
|
|
4982100143 | ||
|
|
1e87b9028b | ||
|
|
3d11e4c069 | ||
|
|
2bf3bf916e | ||
|
|
bb0a9bebf1 | ||
|
|
2fe29cce0a | ||
|
|
87b05c2535 | ||
|
|
c225a5846f | ||
|
|
72b15a5eb2 | ||
|
|
a1bcd459d2 | ||
|
|
916c283444 | ||
|
|
58f025804c | ||
|
|
ee1573b734 | ||
|
|
104ebd3348 | ||
|
|
28aa141446 | ||
|
|
410be8c1be | ||
|
|
e50e842994 | ||
|
|
8237066e73 | ||
|
|
ba91ca76c0 | ||
|
|
6e28a0825b | ||
|
|
ecdb930021 | ||
|
|
ed592c6c6e | ||
|
|
42269efc67 | ||
|
|
87d4e55ea4 | ||
|
|
2e9ba3e2a5 | ||
|
|
1edd471f4c | ||
|
|
43f10a6062 | ||
|
|
63d7c774dc | ||
|
|
08ac8f2e93 | ||
|
|
5d5aefca89 | ||
|
|
3a0838e5e0 | ||
|
|
d687672c1c | ||
|
|
4d553b92ce | ||
|
|
6cf57b252d | ||
|
|
745ad5e88f | ||
|
|
388bb5dbd0 | ||
|
|
386de67aee | ||
|
|
180635cee4 | ||
|
|
30af71b024 | ||
|
|
c2722ed176 | ||
|
|
428a150814 | ||
|
|
39eb45af2b | ||
|
|
e28731a5de | ||
|
|
5f88ec068e | ||
|
|
83773b25db | ||
|
|
4d2f3a2e0c | ||
|
|
205b14dd34 | ||
|
|
06a8a5f726 | ||
|
|
fe34e0911d | ||
|
|
3f77432233 | ||
|
|
7a2f31556f | ||
|
|
17c2fdf76e | ||
|
|
8bf6002818 | ||
|
|
ffce98cafe | ||
|
|
398f692861 | ||
|
|
32b08cc095 | ||
|
|
fbb478cc2c | ||
|
|
b8f6b048c9 | ||
|
|
7de4e2bc47 | ||
|
|
05ac833e35 | ||
|
|
9033ba867d | ||
|
|
07a823cb6b | ||
|
|
02723cc74a | ||
|
|
a1452f76ac | ||
|
|
40a0e474c7 | ||
|
|
9f9e2915bf | ||
|
|
3f71c1448b | ||
|
|
ed943d36b4 | ||
|
|
c5b6a2832d | ||
|
|
f1cdc992a2 | ||
|
|
8d0f3f34c7 | ||
|
|
baa2213866 | ||
|
|
8c29cb4cde | ||
|
|
eeedc71a06 | ||
|
|
9462b7c3db | ||
|
|
1df01c6699 | ||
|
|
83bd48e8c0 | ||
|
|
592ad3d9e8 | ||
|
|
fc0fced73c | ||
|
|
87f3cb47d7 | ||
|
|
258d5123ce | ||
|
|
a9ade5af1c | ||
|
|
5bafe4f0b1 | ||
|
|
5a5dffb983 | ||
|
|
506a39e83a | ||
|
|
a53ee17e5a | ||
|
|
3fd458447b | ||
|
|
27ed879db1 | ||
|
|
239b86e51d | ||
|
|
d1c4b82750 | ||
|
|
05f69100c3 | ||
|
|
c660951855 | ||
|
|
2889a00542 | ||
|
|
42701881b4 | ||
|
|
86d418b080 | ||
|
|
0b6b5feb72 | ||
|
|
ac3a5d8db9 | ||
|
|
29f4881cce | ||
|
|
cc8751302c | ||
|
|
f5d9daa038 | ||
|
|
920c6d63c7 | ||
|
|
7ee922362a | ||
|
|
9e60a11917 | ||
|
|
06e96dcf9e | ||
|
|
3bdede4f6f | ||
|
|
419b4f946f | ||
|
|
84162ee58a | ||
|
|
29583b5c21 | ||
|
|
751a29fb1b | ||
|
|
6101633a4e | ||
|
|
063f1fa1b7 | ||
|
|
cc5a4a0baa | ||
|
|
f729ee2641 | ||
|
|
42c95a4d09 | ||
|
|
de0bc20640 | ||
|
|
36794fe533 | ||
|
|
ad89e90015 | ||
|
|
490af760f8 | ||
|
|
9acdcb4c90 | ||
|
|
028fc14ff2 | ||
|
|
61ada05a4a | ||
|
|
4be95a6eeb | ||
|
|
c6782ce5bc | ||
|
|
7df271645f | ||
|
|
1100a69108 | ||
|
|
54137b18ef | ||
|
|
60f70d4923 | ||
|
|
370e304b87 | ||
|
|
d549c64015 | ||
|
|
6517fe1c32 | ||
|
|
4811a4f315 | ||
|
|
cd97d72f3b | ||
|
|
74832c049d | ||
|
|
057f66639a | ||
|
|
5b3539c882 | ||
|
|
1ada96ae7a | ||
|
|
f60c19aea3 | ||
|
|
8967007a20 | ||
|
|
f7604b8f00 | ||
|
|
2b04665af0 | ||
|
|
d74dd005cf | ||
|
|
3bc7d1cc35 | ||
|
|
1166460094 | ||
|
|
603d65387a | ||
|
|
800092379e | ||
|
|
43a63b9252 | ||
|
|
c4f4d062d8 | ||
|
|
1ae0b8b05e | ||
|
|
2972959e31 | ||
|
|
a2fee8a415 | ||
|
|
93c76b13ae | ||
|
|
3f8e61caee | ||
|
|
5443654eea | ||
|
|
9d95263fcf | ||
|
|
2f044f37a1 | ||
|
|
70963cef82 | ||
|
|
486b0e6b8c | ||
|
|
7f328d7e5e | ||
|
|
00e9db6dec | ||
|
|
c548c1425f | ||
|
|
90dff49155 | ||
|
|
e9be75c6d9 | ||
|
|
fe7df07124 | ||
|
|
11a6d50676 | ||
|
|
a718f60689 | ||
|
|
77a32bb8a9 | ||
|
|
c74f493dc4 | ||
|
|
6c68775645 | ||
|
|
ffd46b111e | ||
|
|
151590cd8a | ||
|
|
537a7bd808 | ||
|
|
7102af4ea6 | ||
|
|
df562fa016 | ||
|
|
8f44724051 | ||
|
|
08c50357d9 | ||
|
|
889a4a3683 | ||
|
|
b0854202ae | ||
|
|
de83ac7d58 | ||
|
|
5adf855943 | ||
|
|
7dc52aa59b | ||
|
|
eef03fcfec | ||
|
|
760c336362 | ||
|
|
a238fc8c28 | ||
|
|
79b5b07f83 | ||
|
|
8821b60e0b | ||
|
|
d9861ba574 | ||
|
|
e899a34d8e | ||
|
|
eff166865a | ||
|
|
0754d51fba | ||
|
|
c85bc1ad8f | ||
|
|
68573186b5 | ||
|
|
1233c2154a | ||
|
|
ad8bb365c0 | ||
|
|
794db4f702 | ||
|
|
af150b1f65 | ||
|
|
0168423b50 | ||
|
|
ef1301d03e | ||
|
|
65e24588c9 | ||
|
|
149247885a | ||
|
|
a617e66a34 | ||
|
|
128c21d11a | ||
|
|
b0e3e8d036 | ||
|
|
0ed25fc96f | ||
|
|
ca9a350d78 | ||
|
|
8f13fe9615 | ||
|
|
6f64117e14 | ||
|
|
ea9ece2941 | ||
|
|
3f4240e093 | ||
|
|
67a6395e7c | ||
|
|
088bc2bf51 | ||
|
|
11d821da23 | ||
|
|
ef75c33357 | ||
|
|
38a475c72b | ||
|
|
a1a442ce84 | ||
|
|
d241a5bea3 | ||
|
|
f58f1b0583 | ||
|
|
19a9eaa029 | ||
|
|
f8fb2556c3 | ||
|
|
c2630512c6 | ||
|
|
2615b2a32d | ||
|
|
8782619822 | ||
|
|
d6fac7ef25 | ||
|
|
0b14f2b0aa | ||
|
|
469ed05022 | ||
|
|
d2223eae62 | ||
|
|
6e40c444b1 | ||
|
|
ce630ae91f | ||
|
|
ae050f9e48 | ||
|
|
a4cf3403f8 | ||
|
|
286896d255 | ||
|
|
3223aabac1 | ||
|
|
c267843aca | ||
|
|
37d8fabc97 | ||
|
|
e8296177df | ||
|
|
cdfbb9d864 | ||
|
|
eb6e174eb8 | ||
|
|
5cbca316d9 | ||
|
|
55459b2515 | ||
|
|
0dbc71e278 | ||
|
|
9cb7193827 | ||
|
|
b6eb64b31d | ||
|
|
eab1e4b7b9 | ||
|
|
f536df13ce | ||
|
|
50d720a1de | ||
|
|
17af453b4c | ||
|
|
6a7e4c83f3 | ||
|
|
87828529f6 | ||
|
|
46231e67c1 | ||
|
|
f1310d37f2 | ||
|
|
8f16d58baa | ||
|
|
9d7be1f81c | ||
|
|
e712df7088 | ||
|
|
3a4e97642b | ||
|
|
ec978c44fa | ||
|
|
9c89821d25 | ||
|
|
7e6e089e45 | ||
|
|
9d90607a02 | ||
|
|
83edc24958 | ||
|
|
725aaa9044 | ||
|
|
c83606a8c7 | ||
|
|
d90148509c | ||
|
|
5b6af027a7 | ||
|
|
cec050aba3 | ||
|
|
5844bbf8ec | ||
|
|
7b51750fd2 | ||
|
|
e4608f6d20 | ||
|
|
5d1948fc96 | ||
|
|
9e52e49acb | ||
|
|
e17628ab79 | ||
|
|
92466cc497 | ||
|
|
3f4d109963 | ||
|
|
4ea2afff4c | ||
|
|
7da3af1adf | ||
|
|
efefd3ba1a | ||
|
|
9386fb64b7 | ||
|
|
7c6e2c6c98 | ||
|
|
a42b6b4d24 | ||
|
|
9f069f714d | ||
|
|
2db419232a | ||
|
|
9c244cfe3b | ||
|
|
2fa2efe8ae | ||
|
|
fdada954a6 | ||
|
|
c9f71daf91 | ||
|
|
d29d8f7dce | ||
|
|
36c789fcb8 | ||
|
|
b351250a90 | ||
|
|
f099cec7d4 | ||
|
|
ed9a415397 | ||
|
|
6a4b42978c | ||
|
|
2a17fef2a9 | ||
|
|
41e46a2523 | ||
|
|
42a46b7b43 | ||
|
|
7e2c3f3573 | ||
|
|
178a9d43fb | ||
|
|
a30c11dcea | ||
|
|
cf2b0b47f2 | ||
|
|
b1c1cceaa9 | ||
|
|
a12364e639 | ||
|
|
55d7f8f06d | ||
|
|
73c32a7b2c | ||
|
|
818b67307c | ||
|
|
f8d4113975 | ||
|
|
2a89fe1f59 | ||
|
|
f4a1592a66 | ||
|
|
bf6937ec63 | ||
|
|
b5e08762c4 | ||
|
|
c38d19ed12 | ||
|
|
090bf6d160 | ||
|
|
b15427f304 | ||
|
|
860dfc897b | ||
|
|
ffebd92d70 | ||
|
|
7ec4a1edf0 | ||
|
|
10740c96f1 | ||
|
|
0b5e6584e1 | ||
|
|
53c757521a | ||
|
|
15b446c932 | ||
|
|
ef4bdc962c | ||
|
|
4f9123400b | ||
|
|
b1f25b0893 | ||
|
|
e326a012d0 | ||
|
|
80874b0c7b | ||
|
|
af7bf64a8c | ||
|
|
2468773dd2 | ||
|
|
6949df2e5b | ||
|
|
452e9d7854 | ||
|
|
64525e12cd | ||
|
|
c1b50aa743 | ||
|
|
f06cef595c | ||
|
|
a4a9c32170 | ||
|
|
ab6d86481a | ||
|
|
4eba556e21 | ||
|
|
c2003fa60c | ||
|
|
6c67cac50f | ||
|
|
6fac29b34d | ||
|
|
4da8818d04 | ||
|
|
cc32c7bbe0 | ||
|
|
8c0b782c6d | ||
|
|
4f027bc456 | ||
|
|
eabcecfe5c | ||
|
|
bb61aead91 | ||
|
|
9997534efe | ||
|
|
9f3003a1f2 | ||
|
|
d43e65476a | ||
|
|
5ab55fd0bf | ||
|
|
77e021308c | ||
|
|
309cddba6c | ||
|
|
86a284fbe3 | ||
|
|
2c4e13eb1e | ||
|
|
225f3ce9bd | ||
|
|
ab429bcc1f | ||
|
|
88505d703f | ||
|
|
0784504c64 | ||
|
|
d461f24357 | ||
|
|
aeabb0d64c | ||
|
|
a1f6309513 | ||
|
|
371186d95a | ||
|
|
4eab99447f | ||
|
|
f549c7604c | ||
|
|
444f54f9f2 | ||
|
|
ca8f28e512 | ||
|
|
e1558d198a | ||
|
|
31279f60c1 | ||
|
|
8c9f36277d | ||
|
|
ec16e0a7bc | ||
|
|
81a607ef4b | ||
|
|
b451586c84 | ||
|
|
09232e12d0 | ||
|
|
d208eb1a41 | ||
|
|
0613347b83 | ||
|
|
904d07ff13 | ||
|
|
f15c27b931 | ||
|
|
d6b51182ab | ||
|
|
cc35f89140 | ||
|
|
1390b59658 | ||
|
|
003ec9efa6 | ||
|
|
c2a613268a | ||
|
|
870a6fe099 | ||
|
|
4fcd931614 | ||
|
|
5cae0412d7 | ||
|
|
db380dc051 | ||
|
|
3382ae51e7 | ||
|
|
35fbf5c342 | ||
|
|
5ac1f7973a | ||
|
|
ee65ec0e89 | ||
|
|
0d15cfdb28 | ||
|
|
312452d1dd | ||
|
|
90a4db4e4f | ||
|
|
3d1539423b | ||
|
|
69c7d35eb5 | ||
|
|
92ffe18fd6 | ||
|
|
a0f7d82605 | ||
|
|
423b906417 | ||
|
|
56ed0382d7 | ||
|
|
29d57819f9 | ||
|
|
2fa66eb246 | ||
|
|
6a1988358f | ||
|
|
0f009c9dbe | ||
|
|
076a8b192f | ||
|
|
f32dcf69a8 | ||
|
|
0b271df078 | ||
|
|
eaa1d09454 | ||
|
|
2e8fd96f92 | ||
|
|
a3e553fc65 |
No files matched your search
+8
-512
@@ -40,54 +40,20 @@
|
|||||||
(fill-column . 72)))
|
(fill-column . 72)))
|
||||||
(scheme-mode
|
(scheme-mode
|
||||||
.
|
.
|
||||||
((eval . (put 'computed-substitution-with-inputs 'scheme-indent-function 1))
|
((geiser-repl-add-project-paths . ("modules"))
|
||||||
(eval . (put 'hidden-desktop-entry 'scheme-indent-function 1))
|
|
||||||
|
|
||||||
(eval . (put 'btrbk-configuration 'scheme-indent-function 0))
|
(eval . (put 'match-record/dolly 'scheme-indent-function 3))
|
||||||
(eval . (put 'caddy-configuration 'scheme-indent-function 0))
|
(eval . (put 'match-record-lambda/dolly 'scheme-indent-function 2))
|
||||||
(eval . (put 'clash-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'cloudflare-tunnel-configuration 'scheme-indent-function 0))
|
(eval . (put 'computed-substitution-with-inputs 'scheme-indent-function 1))
|
||||||
(eval . (put 'cloudflare-warp-configuration 'scheme-indent-function 0))
|
(eval . (put 'hidden-desktop-entry 'scheme-indent-function 1))
|
||||||
(eval . (put 'cuirass-worker-container-configuration 'scheme-indent-function 0))
|
(eval . (put 'modify-services/by-name 'scheme-indent-function 1))
|
||||||
(eval . (put 'docker-mailserver-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'forgejo-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-atuin-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-blueman-applet-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-direnv-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-fcitx5-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-mako-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-network-manager-applet-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-niri-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-qbittorrent-service-type 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-rofi-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-socks2http-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-swaybg-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-theme-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-wakapi-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-waybar-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-zoxide-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'iwd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'jellyfin-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'komga-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'miniflux-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'misskey-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'navidrome-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'qbittorrent-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'shadow-tls-client-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'shadow-tls-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'shadow-tls-server-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'smartdns-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'tailscale-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'vaultwarden-configuration 'scheme-indent-function 0))
|
|
||||||
;; Nonguix
|
;; Nonguix
|
||||||
;; Note this next setting will use the current guix as the geiser binary;
|
;; Note this next setting will use the current guix as the geiser binary;
|
||||||
;; one working with a local guix checkout may want something different.
|
;; one working with a local guix checkout may want something different.
|
||||||
(geiser-guile-binary . ("guix" "repl"))
|
(geiser-guile-binary . ("guix" "repl"))
|
||||||
|
|
||||||
(eval . (put 'with-transformation 'scheme-indent-function 1))
|
(eval . (put 'with-transformation 'scheme-indent-function 1))
|
||||||
|
|
||||||
(eval . (put 'nonguix-container 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'nvidia-configuration 'scheme-indent-function 0))
|
|
||||||
|
|
||||||
;; Below are copied from Guix.
|
;; Below are copied from Guix.
|
||||||
(indent-tabs-mode . nil)
|
(indent-tabs-mode . nil)
|
||||||
@@ -221,474 +187,4 @@
|
|||||||
|
|
||||||
(eval . (put 'with-shepherd-action 'scheme-indent-function 3))
|
(eval . (put 'with-shepherd-action 'scheme-indent-function 3))
|
||||||
|
|
||||||
(eval . (put 'with-http-server 'scheme-indent-function 1))
|
(eval . (put 'with-http-server 'scheme-indent-function 1)))))
|
||||||
|
|
||||||
;; Record constructors.
|
|
||||||
;; URIs for origin methods.
|
|
||||||
(eval . (put 'android-repo-reference 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'bzr-reference 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'cvs-reference 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'git-checkout 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'git-reference 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'hg-reference 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'svn-multi-reference 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'svn-reference 'scheme-indent-function 0))
|
|
||||||
|
|
||||||
;; guix/
|
|
||||||
(eval . (put 'avahi-service 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'bag 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'build-status 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'build-system 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'channel 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'gnu-package-descriptor 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'graft 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'lint-checker 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'lint-warning 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'manifest-entry 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'manifest-pattern 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'manifest-transaction 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'node-type 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'origin 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'package 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'platform 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'profile 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'progress-reporter 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'search-path-specification 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'upstream-input 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'upstream-source 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'upstream-updater 'scheme-indent-function 0))
|
|
||||||
|
|
||||||
;; gnu/
|
|
||||||
(eval . (put 'bootloader 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'bootloader-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'image 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'image-type 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'menu-entry 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'partition 'scheme-indent-function 0))
|
|
||||||
|
|
||||||
;; gnu/machine
|
|
||||||
(eval . (put 'digital-ocean-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'environment-type 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'hetzner-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'machine 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'machine-ssh-configuration 'scheme-indent-function 0))
|
|
||||||
|
|
||||||
;; gnu/system
|
|
||||||
(eval . (put 'boot-parameters 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'file-system 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'file-system-mapping 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'locale-definition 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'mapped-device 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'mapped-device-kind 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'name-service 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'name-service-switch 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'operating-system 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'pam-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'pam-entry 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'pam-extension 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'pam-service 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'privileged-program 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'subid-range 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'subids-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'subids-extension 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'swap-space 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'user-account 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'user-group 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'virtual-machine 'scheme-indent-function 0))
|
|
||||||
|
|
||||||
;; gnu/home
|
|
||||||
(eval . (put 'home-bash-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-bash-extension 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-batsignal-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-beets-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-dbus-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-dotfiles-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-environment 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-fish-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-fish-extension 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-gpg-agent-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-inputrc-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-kodi-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-mcron-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-msmtp-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-openssh-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-parcimonie-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-pipewire-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-redshift-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-shell-profile-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-shepherd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-ssh-agent-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-unclutter-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-xdg-base-directories-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-xdg-mime-applications-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-xdg-user-directories-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-xmodmap-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-znc-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-zsh-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'home-zsh-extension 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'msmtp-account 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'msmtp-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'openssh-host 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'point 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'proxy-jump 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'sway-bar 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'sway-border-color 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'sway-color 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'sway-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'sway-input 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'sway-mode 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'sway-output 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'xdg-desktop-action 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'xdg-desktop-entry 'scheme-indent-function 0))
|
|
||||||
|
|
||||||
;; gnu/services
|
|
||||||
(eval . (put 'agate-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'agetty-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'alsa-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'anonip-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'apcupsd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'apcupsd-event-handlers 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'auditd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'autossh-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'avahi-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'backend-userroot-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'bffe-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'bitlbee-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'bluetooth-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'cachefilesd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'certbot-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'cgit-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'configuration-field 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'connman-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'connman-general-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'containerd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'cuirass-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'cuirass-remote-server-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'cuirass-remote-worker-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'cups-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'darkstat-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'dbus-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'dconf-keyfile 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'dconf-profile 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'debootstrap-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'dhcp-client-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'dhcpcd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'dhcpd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'dicod-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'dict-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'directory-server-instance-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'dnsmasq-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'docker-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'dovecot-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'dropbear-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'earlyoom-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'elogind-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'enlightenment-desktop-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'exim-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'ext-component-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'fail2ban-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'fail2ban-ignore-cache-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'fail2ban-jail-action-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'fail2ban-jail-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'fail2ban-jail-filter-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'fcgiwrap-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'fifo-listener-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'file-database-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'files-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'fprintd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'fstrim-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'ganeti-cleaner-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'ganeti-confd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'ganeti-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'ganeti-kvmd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'ganeti-luxid-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'ganeti-metad-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'ganeti-mond-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'ganeti-noded-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'ganeti-os 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'ganeti-os-variant 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'ganeti-rapi-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'ganeti-watcher-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'ganeti-wconfd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'gdm-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'geoclue-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'getmail-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'getmail-configuration-file 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'getmail-destination-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'getmail-options-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'getmail-retriever-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'git-daemon-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'git-http-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'gitile-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'gitolite-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'gitolite-git-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'gitolite-rc-file 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'gmnisrv-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'gnome-desktop-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'gnome-keyring-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'gpm-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'greetd-agreety-session 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'greetd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'greetd-gtkgreet-sway-session 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'greetd-terminal-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'greetd-user-session 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'greetd-wlgreet-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'greetd-wlgreet-session 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'greetd-wlgreet-sway-session 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'gss-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'guix-build-coordinator-agent-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'guix-build-coordinator-agent-dynamic-auth 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'guix-build-coordinator-agent-dynamic-auth-with-file 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'guix-build-coordinator-agent-password-auth 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'guix-build-coordinator-agent-password-file-auth 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'guix-build-coordinator-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'guix-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'guix-data-service-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'guix-extension 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'guix-publish-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'gvfs-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'host 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'hostapd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'hpcguix-web-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'httpd-config-file 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'httpd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'httpd-module 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'httpd-virtualhost 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'hurd-console-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'hurd-getty-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'hurd-vm-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'idmap-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'imap4d-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'inet-listener-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'inetd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'inetd-entry 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'inputattach-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'int-component-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'ipfs-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'iptables-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'iwd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'iwd-general-settings 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'iwd-network-settings 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'iwd-scan-settings 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'iwd-settings 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'jami-account 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'jami-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'joycond-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'keepalived-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'kmscon-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'knot-acl-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'knot-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'knot-key-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'knot-keystore-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'knot-policy-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'knot-remote-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'knot-resolver-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'knot-zone-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'krb5-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'krb5-realm 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'kwallet-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'ladspa-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'laminar-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'libvirt-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'lightdm-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'lightdm-gtk-greeter-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'lightdm-seat-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'linux-builder-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'lirc-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'live-service 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'localed-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'location-access-control 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'log-cleanup-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'log-rotation 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'log-rotation-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'login-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'lsh-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'lxqt-desktop-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'mailbox-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'mate-desktop-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'mcron-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'memcached-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'method-access-control 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'mingetty-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'mod-muc-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'modem-manager-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'mosquitto-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'mpd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'mpd-output 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'mpd-partition 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'mpd-plugin 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'mumble-server-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'mumble-server-public-registration-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'mumi-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'mumi-package-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'mympd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'mympd-ip-acl 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'mysql-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'namespace-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'nar-herder-cached-compression-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'nar-herder-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'network-address 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'network-link 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'network-manager-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'network-route 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'nfs-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'nftables-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'nginx-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'nginx-location-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'nginx-log-format-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'nginx-named-location-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'nginx-server-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'nginx-upstream-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'ngircd-channel 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'ngircd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'ngircd-global 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'ngircd-limits 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'ngircd-operator 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'ngircd-options 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'ngircd-server 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'ngircd-ssl 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'nix-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'nscd-cache 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'nscd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'nslcd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'ntp-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'ntp-server 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'oci-container-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'oci-image 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'opaque-cgit-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'opaque-cups-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'opaque-dovecot-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'opaque-prosody-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'opendht-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'openntpd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'opensmtpd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'openssh-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'openvpn-ccd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'openvpn-client-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'openvpn-remote-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'openvpn-server-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'openvswitch-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'operation-access-control 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'package-database-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'pagekite-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'pam-krb5-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'pam-mount-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'pam-mount-volume 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'passdb-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'patchwork-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'patchwork-database-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'patchwork-settings-module 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'pcscd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'php-fpm-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'php-fpm-dynamic-process-manager-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'php-fpm-on-demand-process-manager-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'php-fpm-static-process-manager-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'pipefs-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'plasma-desktop-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'plugin-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'policy-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'polkit-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'postgresql-config-file 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'postgresql-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'postgresql-role 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'pounce-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'power-profiles-daemon-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'powertop-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'prometheus-node-exporter-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'prosody-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'protocol-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'pulseaudio-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'qemu-binfmt-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'qemu-guest-agent-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'quassel-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'radicale-auth-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'radicale-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'radicale-encoding-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'radicale-logging-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'radicale-rights-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'radicale-server-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'radicale-storage-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'rasdaemon-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'readymedia-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'readymedia-media-directory 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'redis-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'repository-cgit-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'resize-file-system-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'restic-backup-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'restic-backup-job 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'rngd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'rootless-podman-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'rottlog-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'rpcbind-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'rshiny-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'rspamd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'rsync-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'rsync-module 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'samba-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'screen-locker-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'sddm-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'seatd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'service-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'service-type 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'shepherd-action 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'shepherd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'shepherd-service 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'slim-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'snuik-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'speakersafetyd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'spice-vdagent-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'ssl-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'static-networking 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'strongswan-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'sugar-desktop-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'syncthing-config-file 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'syncthing-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'syncthing-device 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'syncthing-folder 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'syncthing-folder-device 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'sysctl-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'syslog-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'system-log-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'tailon-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'tailon-configuration-file 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'thermald-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'tlp-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'tor-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'tor-onion-service-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'tor-transport-plugin 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'transmission-daemon-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'udev-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'udisks-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'unattended-upgrade-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'unbound-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'unbound-remote 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'unbound-server 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'unbound-zone 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'unix-listener-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'upower-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'usb-modeswitch-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'userdb-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'varnish-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'virtlog-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'virtual-build-machine 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'virtualhost-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'vnstat-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'webssh-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'wesnothd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'whoogle-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'wireguard-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'wireguard-peer 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'wpa-supplicant-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'wsdd-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'xe-guest-utilities-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'xen-guest-agent-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'xfce-desktop-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'xorg-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'xvnc-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'yggdrasil-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'zabbix-agent-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'zabbix-front-end-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'zabbix-server-configuration 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'zone-entry 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'zone-file 'scheme-indent-function 0))
|
|
||||||
(eval . (put 'zram-device-configuration 'scheme-indent-function 0)))))
|
|
||||||
@@ -1,7 +1,4 @@
|
|||||||
;;; -*- mode: scheme -*-
|
;;; -*- mode: scheme -*-
|
||||||
;;; SPDX-FileCopyrightText: 2022, 2024 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: CC0-1.0
|
|
||||||
|
|
||||||
(authorizations
|
(authorizations
|
||||||
(version 0)
|
(version 0)
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
;; -*- mode: scheme -*-
|
;; -*- mode: scheme -*-
|
||||||
;; SPDX-FileCopyrightText: 2022, 2023, 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;
|
|
||||||
;; SPDX-License-Identifier: CC0-1.0
|
|
||||||
|
|
||||||
(channel
|
(channel
|
||||||
(version 0)
|
(version 0)
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
;; -*- mode: scheme -*-
|
;; -*- mode: scheme -*-
|
||||||
;; SPDX-FileCopyrightText: 2023, 2024 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;
|
|
||||||
;; SPDX-License-Identifier: GPL-3.0-or-later
|
;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;; Copyright © 2023, 2024 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(channel-news
|
(channel-news
|
||||||
(version 0)
|
(version 0)
|
||||||
|
|||||||
+14
-9
@@ -1,17 +1,17 @@
|
|||||||
# SPDX-FileCopyrightText: 2022, 2024, 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
# Copyright © 2022, 2024, 2025-2026 Hilton Chain <hako@ultrarare.space>
|
||||||
#+TITLE: Rosenthal - A certain Guix channel
|
#+TITLE: Rosenthal - A certain Guix channel
|
||||||
|
|
||||||
#+html: <a href="https://ci.guix.moe/jobset/rosenthal"><img src="https://ci.guix.moe/jobset/rosenthal/badge.svg?type=1"></a>
|
#+html: <a href="https://ci.guix.moe/jobset/rosenthal"><img src="https://ci.guix.moe/jobset/rosenthal/badge.svg?type=1"></a>
|
||||||
|
|
||||||
Rosenthal is a Guix channel (see [[https://guix.gnu.org/manual/devel/en/html_node/Channels.html][Channels]] in /GNU Guix Reference Manual/) created for experiments. It currently holds some packages and services not ready for upstreaming to [[https://guix.gnu.org/][GNU Guix]].
|
Rosenthal is a [[https://guix.gnu.org/manual/devel/en/html_node/Channels.html][Guix channel]] created for experiments. It currently holds some
|
||||||
|
packages and services not ready for upstreaming.
|
||||||
|
|
||||||
Substitutes for this channel are available via [[https://ci.guix.moe/][Guix Moe CI]], see [[https://ultrarare.space/en/posts/guix-build-farm/][its blog post]] for setup and more information. [[https://codeberg.org/hako/Testament/issues][Send a request]] if you'd like to see substitutes available for more channels.
|
Feel free to upstream things from this channel if you find them useful and
|
||||||
|
suitable. I can help with that but don't have the energy to finish all the
|
||||||
|
process by myself.
|
||||||
|
|
||||||
You can use [[https://toys.whereis.social/][toys]] to search packages and services from Rosenthal and other Guix channels.
|
NOTE: everything in this channel is subject to change and may be deleted *at any
|
||||||
|
time*, please [[https://codeberg.org/hako/Rosenthal/issues][report an issue]] if you are affected.
|
||||||
Note that all contents in this channel are subject to change and may be deleted **at any time**, please [[https://codeberg.org/hako/Rosenthal/issues][report an issue]] if you are affected.
|
|
||||||
|
|
||||||
Channel specification:
|
Channel specification:
|
||||||
#+begin_src scheme
|
#+begin_src scheme
|
||||||
@@ -26,4 +26,9 @@ Channel specification:
|
|||||||
"13E7 6CD6 E649 C28C 3385 4DF5 5E5A A665 6149 17F7"))))
|
"13E7 6CD6 E649 C28C 3385 4DF5 5E5A A665 6149 17F7"))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
For configuration, see [[https://guix.gnu.org/manual/devel/en/html_node/Specifying-Additional-Channels.html][Specifying Additional Channels]], [[https://guix.gnu.org/manual/devel/en/html_node/Customizing-the-System_002dWide-Guix.html][Customizing the System-Wide Guix]] and [[https://guix.gnu.org/manual/devel/en/html_node/Guix-Home-Services.html#index-home_002dchannels_002dservice_002dtype][~home-channels-service-type~]] in /GNU Guix Reference Manual/.
|
Available packages and services are listed in [[file:etc/docs/index.org][index.org]] (outputed by the [[file:etc/scripts/index][index]]
|
||||||
|
script). You can also use [[https://toys.whereis.social/?search=&channel=rosenthal][toys.whereis.social]] or [[https://search.guix.moe/?search=&channel=rosenthal][search.guix.moe]] to search them
|
||||||
|
and public symbols from Rosenthal and other Guix channels.
|
||||||
|
|
||||||
|
[[https://guix.gnu.org/manual/devel/en/html_node/Substitutes.html][Substitutes]] (pre-built package binaries) for this channel are available via [[https://guix.moe/][Guix
|
||||||
|
Moe]]'s infrastructure.
|
||||||
+19
@@ -1,5 +1,24 @@
|
|||||||
version = 1
|
version = 1
|
||||||
|
|
||||||
|
[[annotations]]
|
||||||
|
path = [
|
||||||
|
".guix-authorizations",
|
||||||
|
".guix-channel",
|
||||||
|
"pre-inst-env",
|
||||||
|
]
|
||||||
|
SPDX-FileCopyrightText = ""
|
||||||
|
SPDX-License-Identifier = "CC0-1.0"
|
||||||
|
|
||||||
|
[[annotations]]
|
||||||
|
path = ["modules/**"]
|
||||||
|
SPDX-FileCopyrightText = ""
|
||||||
|
SPDX-License-Identifier = "GPL-3.0-or-later"
|
||||||
|
|
||||||
|
[[annotations]]
|
||||||
|
path = ["modules/rosenthal/examples/**"]
|
||||||
|
SPDX-FileCopyrightText = ""
|
||||||
|
SPDX-License-Identifier = "CC0-1.0"
|
||||||
|
|
||||||
[[annotations]]
|
[[annotations]]
|
||||||
path = ["modules/rosenthal/examples/wallpaper.jpg"]
|
path = ["modules/rosenthal/examples/wallpaper.jpg"]
|
||||||
SPDX-FileCopyrightText = "Copyright © 2023 Hilton Chain <hako@ultrarare.space>"
|
SPDX-FileCopyrightText = "Copyright © 2023 Hilton Chain <hako@ultrarare.space>"
|
||||||
|
|||||||
@@ -0,0 +1,136 @@
|
|||||||
|
*** Packages
|
||||||
|
| PACKAGE | SYNOPSIS | LOCATION |
|
||||||
|
|-+-+-|
|
||||||
|
|[[https://github.com/ai-robots-txt/ai.robots.txt][=ai-robots-txt=]]@2.1|List of AI agents and robots to block|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/web.scm#L37][web.scm]]|
|
||||||
|
|[[https://grafana.com/oss/alloy-opentelemetry-collector/][=alloy-bin=]]@1.21.2|OpenTelemetry Collector distribution with programmable pipelines|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/binaries.scm#L609][binaries.scm]]|
|
||||||
|
|[[https://github.com/anthonyhab/bb-auth][=bb-auth=]]@0.2.0|Unified polkit, keyring, and pinentry authentication daemon|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/authentication.scm#L22][authentication.scm]]|
|
||||||
|
|[[https://bitwarden.com/][=bitwarden-icecat=]]@2026.10.0|Bitwarden client browser extension|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/browser-extensions.scm#L48][browser-extensions.scm]]|
|
||||||
|
|[[https://www.busybox.net][=busybox-static=]]@1.37.0|Many common UNIX utilities in a single executable|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/busybox.scm#L14][busybox.scm]]|
|
||||||
|
|[[https://caddyserver.com/][=caddy=]]@2.11.7|Extensible HTTP web server with automatic HTTPS|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/web.scm#L70][web.scm]]|
|
||||||
|
|[[https://git.guix.moe/hako/caddy][=caddy-dolly=]]@2026.10.23|Extensible HTTP web server with automatic HTTPS|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/web.scm#L139][web.scm]]|
|
||||||
|
|[[https://1.1.1.1/][=cloudflare-warp-bin=]]@2026.8.2115.0|Cloudflare WARP client|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/binaries.scm#L42][binaries.scm]]|
|
||||||
|
|[[https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/][=cloudflared=]]@2026.10.3|Cloudflare Tunnel client|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/networking.scm#L25][networking.scm]]|
|
||||||
|
|[[https://davmac.org/projects/dinit/][=dinit=]]@0.22.1|Service manager with dependency management|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/admin.scm#L25][admin.scm]]|
|
||||||
|
|[[https://github.com/felixonmars/dnsmasq-china-list][=dnsmasq-china-list=]]@0.0.0-22.c79474a|Chinese-specific DNS server configurations|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/dns.scm#L18][dns.scm]]|
|
||||||
|
|[[https://matt.ucc.asn.au/dropbear/dropbear.html][=dropbear-static=]]@2025.89|Small SSH server and client|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/ssh.scm#L16][ssh.scm]]|
|
||||||
|
|[[https://github.com/Schnouki/caddyfile-mode][=emacs-caddyfile-mode=]]@0.2-0.fc41148|Emacs major mode for editing Caddy configuration files|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/emacs-xyz.scm#L25][emacs-xyz.scm]]|
|
||||||
|
|[[https://github.com/dakra/ghostel][=emacs-consult-ghostel=]]@0.59.0|Consult integration for ghostel|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/emacs-xyz.scm#L51][emacs-xyz.scm]]|
|
||||||
|
|[[https://codeberg.org/akib/emacs-eat][=emacs-eat-dolly=]]@0.9.4|Terminal emulator in Emacs|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/emacs-xyz.scm#L77][emacs-xyz.scm]]|
|
||||||
|
|[[https://github.com/astoff/isearch-mb][=emacs-isearch-mb=]]@0.8|Control `isearch' from the minibuffer|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/emacs-xyz.scm#L95][emacs-xyz.scm]]|
|
||||||
|
|[[https://github.com/taquangtrung/emacs-kdl-mode][=emacs-kdl-mode=]]@0.0.1-1.e966ed4|Emacs major mode for editing files in the KDL document language|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/emacs-xyz.scm#L120][emacs-xyz.scm]]|
|
||||||
|
|[[https://github.com/dandavison/magit-delta][=emacs-magit-delta-dolly=]]@0.1-0.5fc7dbd|Integration of `delta' with `emacs-magit'|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/emacs-xyz.scm#L141][emacs-xyz.scm]]|
|
||||||
|
|[[https://github.com/0WD0/majutsu][=emacs-majutsu-dolly=]]@0.6.0-7.19856a9|Emacs interface for Jujutsu version control system|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/emacs-xyz.scm#L156][emacs-xyz.scm]]|
|
||||||
|
|[[https://github.com/xuchunyang/msgpack.el][=emacs-msgpack=]]@0.1.1-0.5353a7b|Read and write MessagePack object in Emacs|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/emacs-xyz.scm#L180][emacs-xyz.scm]]|
|
||||||
|
|[[https://git.thanosapollo.org/pcmpl-tailscale][=emacs-pcmpl-tailscale=]]@0.0.1-0.acd6bce|Enhanced shell completions for tailscale|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/emacs-xyz.scm#L206][emacs-xyz.scm]]|
|
||||||
|
|[[https://codeberg.org/divyaranjan/emacs-reader][=emacs-reader=]]@0.3.2-4.4fca3aa|Emacs document reader|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/emacs-xyz.scm#L231][emacs-xyz.scm]]|
|
||||||
|
|[[https://github.com/ArthurHeymans/emacs-tramp-rpc][=emacs-tramp-rpc=]]@0.15.0|TRAMP backend using RPC|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/emacs-xyz.scm#L264][emacs-xyz.scm]]|
|
||||||
|
|[[https://wakatime.com/emacs][=emacs-wakatime-mode=]]@1.0.2-60.1c5b225|Automatic time tracking extension for Emacs using WakaTime|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/emacs-xyz.scm#L298][emacs-xyz.scm]]|
|
||||||
|
|[[https://forgejo.org/][=forgejo=]]@16.0.6|Self-hosted, lightweight software forge|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/web.scm#L161][web.scm]]|
|
||||||
|
|[[https://grafana.com/][=grafana-bin=]]@13.2.4|Platform for monitoring and observability|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/binaries.scm#L416][binaries.scm]]|
|
||||||
|
|[[https://github.com/hylophile/guile-toml][=guile-toml=]]@1.0|TOML module for Guile Scheme|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/guile-xyz.scm#L19][guile-xyz.scm]]|
|
||||||
|
|[[https://github.com/hifi/heisenbridge][=heisenbridge=]]@1.15.4|Bouncer-style Matrix IRC bridge|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/messaging.scm#L33][messaging.scm]]|
|
||||||
|
|[[https://komga.org/][=komga-bin=]]@1.29.1|Media server for comics/mangas/BDs/magazines/eBooks|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/binaries.scm#L190][binaries.scm]]|
|
||||||
|
|[[https://sr.ht/~kennylevinsen/seatd][=libseat-sans-logind=]]@0.9.3|Seat management library|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/admin.scm#L62][admin.scm]]|
|
||||||
|
|[[https://www.freedesktop.org/wiki/Software/vaapi/][=libva-nox=]]@2.22.0|Video acceleration library|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/video.scm#L14][video.scm]]|
|
||||||
|
|[[https://github.com/Limine-Bootloader/Limine][=limine=]]@12.9.4|Multiprotocol bootloader and boot manager|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/bootloaders.scm#L40][bootloaders.scm]]|
|
||||||
|
|[[https://cachyos.org/][=linux-cachyos-bore-zen4=]]@7.2.11-1|CachyOS Linux kernel (bore + znver4)|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/linux.scm#L289][linux.scm]]|
|
||||||
|
|[[https://cachyos.org/][=linux-cachyos-lts-server=]]@6.18.55-1|CachyOS Linux kernel (lts + server)|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/linux.scm#L247][linux.scm]]|
|
||||||
|
|[[https://grafana.com/oss/loki/][=loki-bin=]]@3.7.9|Log aggregation system|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/binaries.scm#L545][binaries.scm]]|
|
||||||
|
|[[https://github.com/sot-tech/LottieConverter][=lottie-converter=]]@0.2-0.3ad34af|Lottie animation converter|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/animation.scm#L22][animation.scm]]|
|
||||||
|
|[[https://github.com/mautrix/telegram][=mautrix-telegram=]]@0.2610.0|Matrix-Telegram hybrid puppeting/relaybot bridge|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/messaging.scm#L66][messaging.scm]]|
|
||||||
|
|[[https://wiki.metacubex.one/][=mihomo=]]@1.19.33|Rule-based proxy|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/networking.scm#L70][networking.scm]]|
|
||||||
|
|[[https://grafana.com/oss/mimir/][=mimir-bin=]]@3.2.3|Scalable long-term storage for Prometheus|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/binaries.scm#L505][binaries.scm]]|
|
||||||
|
|[[https://github.com/Sevichecc/miniflux-injector][=miniflux-injector-icecat=]]@2.3.3|Injects Miniflux search results into search page|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/browser-extensions.scm#L97][browser-extensions.scm]]|
|
||||||
|
|[[https://codeberg.org/hako/mirror-substitutes][=mirror-substitutes=]]@0.0.3|Mirror Guix substitutes|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/package-management.scm#L39][package-management.scm]]|
|
||||||
|
|[[https://www.navidrome.org/][=navidrome-bin=]]@0.64.2|Web-based music collection server and streamer|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/binaries.scm#L238][binaries.scm]]|
|
||||||
|
|[[https://noctalia.dev/][=noctalia-greeter=]]@1.7.0|Login greeter for greetd|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/wm.scm#L40][wm.scm]]|
|
||||||
|
|[[https://github.com/27justin/ohmyech][=ohmyech-icecat=]]@1.5|Visual indicator for Encrpted Client Hello|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/browser-extensions.scm#L147][browser-extensions.scm]]|
|
||||||
|
|[[https://github.com/ifreund/dumb_runtime_dir][=pam-dumb-runtime-dir=]]@1.0.4|Create `XDG_RUNTIME_DIR' on login and never remove it|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/admin.scm#L74][admin.scm]]|
|
||||||
|
|[[https://prismlauncher.org/][=prismlauncher-dolly=]]@11.1.1|Free, open source launcher for Minecraft|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/games.scm#L45][games.scm]]|
|
||||||
|
|[[https://prometheus.io/][=prometheus-bin=]]@3.15.1|Monitoring system and time series database|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/binaries.scm#L453][binaries.scm]]|
|
||||||
|
|[[https://pypi.org/project/coherent.licensed/][=python-coherent-licensed=]]@0.5.2|License management tooling|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/python-xyz.scm#L31][python-xyz.scm]]|
|
||||||
|
|[[https://github.com/cher-nov/cryptg][=python-cryptg=]]@0.5.2|Cryptographic utilities for Telegram|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/python-xyz.scm#L53][python-xyz.scm]]|
|
||||||
|
|[[https://github.com/jaraco/irc][=python-irc=]]@20.3.1|Python Internet Relay Chat protocol library|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/python-xyz.scm#L109][python-xyz.scm]]|
|
||||||
|
|[[https://github.com/jaraco/jaraco.logging][=python-jaraco-logging=]]@3.4.0|Python logging facility|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/python-xyz.scm#L144][python-xyz.scm]]|
|
||||||
|
|[[https://github.com/jaraco/jaraco.stream][=python-jaraco-stream=]]@3.0.4|Routines for dealing with data streams|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/python-xyz.scm#L170][python-xyz.scm]]|
|
||||||
|
|[[https://github.com/mautrix/python][=python-mautrix=]]@0.20.8|Python 3 asyncio Matrix framework|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/python-xyz.scm#L195][python-xyz.scm]]|
|
||||||
|
|[[https://github.com/tulir/Telethon][=python-tulir-telethon=]]@1.99.0a6|Python 3 MTProto API Telegram client library|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/python-xyz.scm#L228][python-xyz.scm]]|
|
||||||
|
|[[https://sr.ht/~kennylevinsen/seatd][=seatd-sans-logind=]]@0.9.3|Seat management daemon|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/admin.scm#L111][admin.scm]]|
|
||||||
|
|[[https://www.ihcblog.com/a-better-tls-obfs-proxy/][=shadow-tls-bin=]]@0.2.25|Proxy to expose real tls handshake to the firewall|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/binaries.scm#L288][binaries.scm]]|
|
||||||
|
|[[https://sing-box.sagernet.org/][=sing-box=]]@1.14.3|Universal proxy platform|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/networking.scm#L118][networking.scm]]|
|
||||||
|
|[[https://github.com/zenhack/socks2http][=socks2http=]]@0.0.0-20160712034938-bafa2cde8eb4|SOCKS5 to HTTP proxy|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/networking.scm#L190][networking.scm]]|
|
||||||
|
|[[https://tangled.org/oppi.li/stinkpot][=stinkpot=]]@0.1.0|Search shell history|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/shellutils.scm#L18][shellutils.scm]]|
|
||||||
|
|[[https://systemd.io/][=systemd-stub=]]@262.1|Unified kernel image UEFI stub|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/bootloaders.scm#L103][bootloaders.scm]]|
|
||||||
|
|[[https://tailscale.com/][=tailscale=]]@1.104.2|Mesh VPN service utilizing the WireGuard protocol and 2FA|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/networking.scm#L217][networking.scm]]|
|
||||||
|
|[[https://matrix-construct.github.io/tuwunel/][=tuwunel-bin=]]@1.9.4|Matrix homeserver|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/binaries.scm#L131][binaries.scm]]|
|
||||||
|
|[[https://systemd.io][=ukify=]]@262.1|Unified kernel image UEFI tool|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/bootloaders.scm#L146][bootloaders.scm]]|
|
||||||
|
|[[https://wakapi.dev/][=wakapi-bin=]]@2.18.2|WakaTime-compatible backend|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/binaries.scm#L318][binaries.scm]]|
|
||||||
|
|[[https://wakatime.com/plugins][=wakatime-cli-bin=]]@2.27.13|Command line interface to WakaTime|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/packages/binaries.scm#L366][binaries.scm]]|
|
||||||
|
*** Services
|
||||||
|
| SERVICE | DESCRIPTION | LOCATION |
|
||||||
|
|-+-+-|
|
||||||
|
|=alloy=| |[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/monitoring.scm#L82][monitoring.scm]]|
|
||||||
|
|=btrbk=|Configure and run btrbk hourly.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/file-systems.scm#L53][file-systems.scm]]|
|
||||||
|
|=caddy=| |[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/web.scm#L160][web.scm]]|
|
||||||
|
|=clash=|Run Clash.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/child-error.scm#L121][child-error.scm]]|
|
||||||
|
|=cloudflare-tunnel=|Run cloudflared, the Cloudflare Tunnel daemon.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/child-error.scm#L219][child-error.scm]]|
|
||||||
|
|=cloudflare-warp=|Run warp-svc, the Cloudflare Warp daemon.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/child-error.scm#L255][child-error.scm]]|
|
||||||
|
|=cuirass=|Run the Cuirass continuous integration service.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/cuirass.scm#L68][cuirass.scm]]|
|
||||||
|
|=cuirass-worker-container=| |[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/cuirass.scm#L208][cuirass.scm]]|
|
||||||
|
|=docker-mailserver=|Run Docker Mailserver.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/mail.scm#L77][mail.scm]]|
|
||||||
|
|=dumb-runtime-dir=|Create `XDG_RUNTIME_DIR' on login and never remove it.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/file-systems.scm#L94][file-systems.scm]]|
|
||||||
|
|=forgejo=|Run Forgejo.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/web.scm#L302][web.scm]]|
|
||||||
|
|=gamemode=|Set up Guix System environment for gamemode.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/games.scm#L51][games.scm]]|
|
||||||
|
|=grafana=| |[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/monitoring.scm#L180][monitoring.scm]]|
|
||||||
|
|=heisenbridge=| |[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/messaging.scm#L95][messaging.scm]]|
|
||||||
|
|=iocaine=| |[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/web.scm#L408][web.scm]]|
|
||||||
|
|=jellyfin=|Run the Jellyfin media system.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/web.scm#L544][web.scm]]|
|
||||||
|
|=jellyfin-oci=|Run Jellyfin, a media system.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/web.scm#L634][web.scm]]|
|
||||||
|
|=komga=|Run Komga.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/web.scm#L706][web.scm]]|
|
||||||
|
|=loki=| |[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/monitoring.scm#L269][monitoring.scm]]|
|
||||||
|
|=mautrix-telegram=| |[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/messaging.scm#L181][messaging.scm]]|
|
||||||
|
|=mimir=| |[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/monitoring.scm#L356][monitoring.scm]]|
|
||||||
|
|=misskey=|Run Misskey, an interplanetary microblogging platform.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/web.scm#L798][web.scm]]|
|
||||||
|
|=navidrome=|Run Navidrome.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/web.scm#L888][web.scm]]|
|
||||||
|
|=network-online=|Wait for the network to come up.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/networking.scm#L72][networking.scm]]|
|
||||||
|
|=nix-search-paths=|Set up search paths for `with-nix-profile'.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/nix.scm#L59][nix.scm]]|
|
||||||
|
|=noctalia-greeter=|Set up environment for `noctalia-greeter-session'.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/base.scm#L76][base.scm]]|
|
||||||
|
|=prometheus=| |[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/monitoring.scm#L447][monitoring.scm]]|
|
||||||
|
|=qbittorrent=|Run qBittorrent daemon.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/bittorrent.scm#L120][bittorrent.scm]]|
|
||||||
|
|=shadow-tls=|Run shadow-tls.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/child-error.scm#L451][child-error.scm]]|
|
||||||
|
|=sing-box=| |[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/networking.scm#L176][networking.scm]]|
|
||||||
|
|=smartdns=|Run Smartdns daemon.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/dns.scm#L44][dns.scm]]|
|
||||||
|
|=tailscaled=|Run tailscaled.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/networking.scm#L249][networking.scm]]|
|
||||||
|
|=tuwunel=|Run Tuwunel.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/web.scm#L975][web.scm]]|
|
||||||
|
|=vaultwarden=|Run Vaultwarden, a Bitwarden compatible server.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/web.scm#L1114][web.scm]]|
|
||||||
|
|=zfs=| |[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/file-systems.scm#L187][file-systems.scm]]|
|
||||||
|
|=home-atuin=| |[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/shellutils.scm#L68][shellutils.scm]]|
|
||||||
|
|=home-bb-auth=|Run `bb-auth' daemon.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/desktop.scm#L423][desktop.scm]]|
|
||||||
|
|=home-blueman-applet=|Run blueman applet, a tray applet for managing bluetooth.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/desktop.scm#L122][desktop.scm]]|
|
||||||
|
|=home-direnv=| |[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/shellutils.scm#L105][shellutils.scm]]|
|
||||||
|
|=home-emacs=|Install Emacs into home profile and run its daemon.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/home/services/emacs.scm#L142][emacs.scm]]|
|
||||||
|
|=home-fcitx5=|Run fcitx5, an input method framework.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/desktop.scm#L246][desktop.scm]]|
|
||||||
|
|=home-goimapnotify=| |[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/mail.scm#L129][mail.scm]]|
|
||||||
|
|=home-graphical-session=| |[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/home/services/desktop.scm#L165][desktop.scm]]|
|
||||||
|
|=home-gtk2=|Set up GTK2 settings in `~/.config/gtk-2.0/gtkrc'|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/home/services/gtk.scm#L53][gtk.scm]]|
|
||||||
|
|=home-gtk3=|Set up GTK3 settings in `~/.config/gtk-3.0/settings.ini'|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/home/services/gtk.scm#L74][gtk.scm]]|
|
||||||
|
|=home-gtk4=|Set up GTK4 settings in `~/.config/gtk-4.0/settings.ini'|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/home/services/gtk.scm#L84][gtk.scm]]|
|
||||||
|
|=home-keyboard=|Set layouts by configuring XKB_* environment variables. Service accepts an instance of `keyboard-layout' from `(gnu system keyboard)'.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/keyboard.scm#L21][keyboard.scm]]|
|
||||||
|
|=home-mako=|Run mako, a notification daemon.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/desktop.scm#L302][desktop.scm]]|
|
||||||
|
|=home-network-manager-applet=|Run nm-applet, a tray applet for managing networks.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/desktop.scm#L341][desktop.scm]]|
|
||||||
|
|=home-network-online=|Wait for the network to come up.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/networking.scm#L81][networking.scm]]|
|
||||||
|
|=home-niri=|Set up configuration file for niri, a scrollable-tiling Wayland compositor.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/desktop.scm#L381][desktop.scm]]|
|
||||||
|
|=home-nix-search-paths=|Set up search paths for `with-nix-profile'.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/nix.scm#L74][nix.scm]]|
|
||||||
|
|=home-noctalia=|Run Noctalia, a lightweight Wayland shell and bar.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/home/services/desktop.scm#L219][desktop.scm]]|
|
||||||
|
|=home-polkit-gnome=| |[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/desktop.scm#L450][desktop.scm]]|
|
||||||
|
|=home-qbittorrent=|Run qBittorrent daemon.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/bittorrent.scm#L158][bittorrent.scm]]|
|
||||||
|
|=home-rofi=|Set up configuration file for rofi, an application launcher.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/desktop.scm#L476][desktop.scm]]|
|
||||||
|
|=home-shadow-tls=|Run shadow-tls.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/child-error.scm#L460][child-error.scm]]|
|
||||||
|
|=home-socks2http=|Run socks2http.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/child-error.scm#L495][child-error.scm]]|
|
||||||
|
|=home-stinkpot=|Set up `stinkpot' for Fish shell.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/shellutils.scm#L143][shellutils.scm]]|
|
||||||
|
|=home-swaybg=|Run swaybg, a screen wallpaper utility for Wayland compositors.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/desktop.scm#L516][desktop.scm]]|
|
||||||
|
|=home-theme=|Set up desktop themes.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/desktop.scm#L615][desktop.scm]]|
|
||||||
|
|=home-wakapi=|Run Wakapi, a self-hosted WakaTime-compatible backend.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/child-error.scm#L298][child-error.scm]]|
|
||||||
|
|=home-waybar=|Run waybar, a status bar for Wayland compositors.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/desktop.scm#L680][desktop.scm]]|
|
||||||
|
|=home-writable-files-manager=|Provide an `update-writable-files' script, which copies files to configuration files, makes them writable and creates symlinks to directories on every activation. If an existing file would be overwritten, backs up that file first.|[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/home/services/writable-files-manager.scm#L264][writable-files-manager.scm]]|
|
||||||
|
|=home-zoxide=| |[[https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/rosenthal/services/shellutils.scm#L177][shellutils.scm]]|
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
;; SPDX-FileCopyrightText: 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;
|
|
||||||
;; SPDX-License-Identifier: CC0-1.0
|
;; SPDX-License-Identifier: CC0-1.0
|
||||||
|
;; Copyright © 2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(use-modules (guix profiles)
|
(use-modules (guix packages)
|
||||||
|
(guix profiles)
|
||||||
(rosenthal utils packages))
|
(rosenthal utils packages))
|
||||||
|
|
||||||
(manifest (map package->manifest-entry (all-rosenthal-packages)))
|
(manifest (map package->manifest-entry
|
||||||
|
(filter supported-package? (all-rosenthal-packages))))
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
;; SPDX-FileCopyrightText: 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;
|
|
||||||
;; SPDX-License-Identifier: CC0-1.0
|
;; SPDX-License-Identifier: CC0-1.0
|
||||||
|
;; Copyright © 2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(use-modules (guix profiles)
|
(use-modules (guix profiles)
|
||||||
(rosenthal utils packages))
|
(rosenthal utils packages))
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
;; SPDX-FileCopyrightText: 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;
|
|
||||||
;; SPDX-License-Identifier: CC0-1.0
|
;; SPDX-License-Identifier: CC0-1.0
|
||||||
|
;; Copyright © 2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(use-modules (guix packages)
|
(use-modules (guix packages)
|
||||||
(guix profiles)
|
(guix profiles)
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2024-2025 Ludovic Courtès <ludo@gnu.org>
|
|
||||||
;;; SPDX-FileCopyrightText: 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2024-2025 Ludovic Courtès <ludo@gnu.org>
|
||||||
|
;;; Copyright © 2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(use-modules (guix memoization)
|
(use-modules (guix memoization)
|
||||||
(guix packages)
|
(guix packages)
|
||||||
|
|||||||
@@ -0,0 +1,61 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# -*- mode: scheme; -*-
|
||||||
|
exec guix repl -- "$0" "$@"
|
||||||
|
!#
|
||||||
|
|
||||||
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
|
;;; Copyright © 2025-2026 Hilton Chain <hako@ultrarare.space>
|
||||||
|
;;;
|
||||||
|
;;; This file is part of GNU Guix.
|
||||||
|
;;;
|
||||||
|
;;; GNU Guix is free software; you can redistribute it and/or modify it
|
||||||
|
;;; under the terms of the GNU General Public License as published by
|
||||||
|
;;; the Free Software Foundation; either version 3 of the License, or (at
|
||||||
|
;;; your option) any later version.
|
||||||
|
;;;
|
||||||
|
;;; GNU Guix is distributed in the hope that it will be useful, but
|
||||||
|
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
;;; GNU General Public License for more details.
|
||||||
|
;;;
|
||||||
|
;;; You should have received a copy of the GNU General Public License
|
||||||
|
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
;;;
|
||||||
|
;;; Usage: cleanup-crates.scm [FILE] ...
|
||||||
|
;;;
|
||||||
|
|
||||||
|
(use-modules (ice-9 match)
|
||||||
|
(ice-9 regex)
|
||||||
|
(srfi srfi-26)
|
||||||
|
(system base compile)
|
||||||
|
(guix ui)
|
||||||
|
(guix utils)
|
||||||
|
(guix scripts shell))
|
||||||
|
|
||||||
|
(define (cleanup-crates file)
|
||||||
|
(define %unused
|
||||||
|
(let ((warnings (open-output-string)))
|
||||||
|
(parameterize ((current-warning-port warnings))
|
||||||
|
(compile-file file
|
||||||
|
#:optimization-level 0
|
||||||
|
#:warning-level 0
|
||||||
|
#:opts '(#:warnings (unused-toplevel))))
|
||||||
|
(map (cut match:substring <> 1)
|
||||||
|
(list-matches "`(rust-[^']*)'" (get-output-string warnings)))))
|
||||||
|
|
||||||
|
(info (G_ "removing ~a unused definitions~%") (length %unused))
|
||||||
|
(for-each (lambda (name)
|
||||||
|
(info (G_ "removing '~a'...~%") name)
|
||||||
|
(and=> (find-definition-location file (string->symbol name) #:define-prefix 'define)
|
||||||
|
delete-expression))
|
||||||
|
%unused)
|
||||||
|
|
||||||
|
(info (G_ "collapsing newlines~%"))
|
||||||
|
(guix-shell "sed" "--" "sed" "--in-place" ":a;N;$!ba;s/\\n\\n\\+/\\n\\n/g" file))
|
||||||
|
|
||||||
|
(match (program-arguments)
|
||||||
|
((_ files ..1)
|
||||||
|
(for-each cleanup-crates files))
|
||||||
|
(_
|
||||||
|
(cleanup-crates "modules/rosenthal/packages/rust-crates.scm")))
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
#!/usr/bin/env -S guix repl
|
#!/bin/sh
|
||||||
|
# -*- mode: scheme; -*-
|
||||||
|
exec guix repl -- "$0" "$@"
|
||||||
!#
|
!#
|
||||||
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
;;; Copyright © 2020, 2021, 2022, 2023 Ricardo Wurmus <rekado@elephly.net>
|
;;; Copyright © 2020, 2021, 2022, 2023 Ricardo Wurmus <rekado@elephly.net>
|
||||||
;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
|
;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
|
||||||
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
|
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
|
||||||
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
;;; Copyright © 2022, 2026 Maxim Cournoyer <maxim@guixotic.coop>
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
|
||||||
@@ -25,7 +26,9 @@
|
|||||||
(ice-9 rdelim)
|
(ice-9 rdelim)
|
||||||
(ice-9 regex)
|
(ice-9 regex)
|
||||||
(ice-9 textual-ports)
|
(ice-9 textual-ports)
|
||||||
(guix gexp))
|
(guix gexp)
|
||||||
|
(guix modules)
|
||||||
|
(guix packages))
|
||||||
|
|
||||||
(define* (break-string str #:optional (max-line-length 70))
|
(define* (break-string str #:optional (max-line-length 70))
|
||||||
"Break the string STR into lines that are no longer than MAX-LINE-LENGTH.
|
"Break the string STR into lines that are no longer than MAX-LINE-LENGTH.
|
||||||
@@ -267,37 +270,43 @@ corresponding to the top-level definition containing the staged changes."
|
|||||||
(define variable-name
|
(define variable-name
|
||||||
(second old))
|
(second old))
|
||||||
(define version
|
(define version
|
||||||
(and=> ((xpath:node-or
|
(match ((xpath:node-or
|
||||||
(xpath:sxpath '(*any* *any* package version *any*))
|
(xpath:sxpath '(*any* *any* package version *any*))
|
||||||
;; For let binding
|
;; For let binding
|
||||||
(xpath:sxpath '(*any* *any* (*any*) package version *any*)))
|
(xpath:sxpath '(*any* *any* (*any*) package version *any*)))
|
||||||
(cons '*TOP* new))
|
(cons '*TOP* new))
|
||||||
first))
|
(() #f)
|
||||||
(format port
|
((version . rest) version)))
|
||||||
"rosenthal: ~a: Update to ~a.~%~%* ~a (~a): Update to ~a.~%"
|
(if version
|
||||||
variable-name version file-name variable-name version)
|
(format port
|
||||||
|
"rosenthal: ~a: Update to ~a.~%~%* ~a (~a): Update to ~a.~%"
|
||||||
|
variable-name version file-name variable-name version)
|
||||||
|
(format port
|
||||||
|
"rosenthal: ~a: Update.~%~%* ~a (~a): Update.~%"
|
||||||
|
variable-name file-name variable-name))
|
||||||
(for-each (lambda (field)
|
(for-each (lambda (field)
|
||||||
(let ((old-values (get-values old field))
|
(let ((old-values (get-values old field))
|
||||||
(new-values (get-values new field)))
|
(new-values (get-values new field)))
|
||||||
(or (equal? old-values new-values)
|
(or (equal? old-values new-values)
|
||||||
(let ((removed (lset-difference equal? old-values new-values))
|
(let ((removed (lset-difference equal? old-values new-values))
|
||||||
(added (lset-difference equal? new-values old-values)))
|
(added (lset-difference equal? new-values old-values)))
|
||||||
(format port
|
(unless (and (null? added) (null? removed))
|
||||||
"[~a]: ~a~%" field
|
(format port
|
||||||
(break-string
|
"[~a]: ~a~%" field
|
||||||
;; A dependency can be a list of (pkg output).
|
(break-string
|
||||||
(match (list (map object->string removed)
|
;; A dependency can be a list of (pkg output).
|
||||||
(map object->string added))
|
(match (list (map object->string removed)
|
||||||
((() added)
|
(map object->string added))
|
||||||
(format #f "Add ~a."
|
((() added)
|
||||||
(listify added)))
|
(format #f "Add ~a."
|
||||||
((removed ())
|
(listify added)))
|
||||||
(format #f "Remove ~a."
|
((removed ())
|
||||||
(listify removed)))
|
(format #f "Remove ~a."
|
||||||
((removed added)
|
(listify removed)))
|
||||||
(format #f "Remove ~a; add ~a."
|
((removed added)
|
||||||
(listify removed)
|
(format #f "Remove ~a; add ~a."
|
||||||
(listify added))))))))))
|
(listify removed)
|
||||||
|
(listify added)))))))))))
|
||||||
'(inputs propagated-inputs native-inputs)))
|
'(inputs propagated-inputs native-inputs)))
|
||||||
|
|
||||||
(define* (add-commit-message file-name variable-name
|
(define* (add-commit-message file-name variable-name
|
||||||
@@ -374,6 +383,30 @@ modifying."
|
|||||||
(cons* new (old-sexp (first hunks)) hunks)))
|
(cons* new (old-sexp (first hunks)) hunks)))
|
||||||
(group-hunks-by-sexp hunks)))
|
(group-hunks-by-sexp hunks)))
|
||||||
|
|
||||||
|
(define (new+old+hunks->package new+old+hunks)
|
||||||
|
"Return the package object whose source is referenced in a new+old+hunks
|
||||||
|
tuple, which describes modifications to the package in a tuple containing the
|
||||||
|
new sexp, the old sexp as well as a tail of <hunk> objects."
|
||||||
|
(match new+old+hunks
|
||||||
|
((new-sexp old-sexp . hunks)
|
||||||
|
(let* ((hunk-file-name (hunk-file-name (first hunks)))
|
||||||
|
(variable-name (second new-sexp))
|
||||||
|
(module-name
|
||||||
|
(match (file-name->module-name hunk-file-name)
|
||||||
|
(('modules 'rosenthal symbols ...)
|
||||||
|
(cons 'rosenthal symbols))
|
||||||
|
(x x))))
|
||||||
|
(module-ref (resolve-module module-name) variable-name)))))
|
||||||
|
|
||||||
|
(define (sort-new+old+hunks-by-closure new+old+hunks)
|
||||||
|
"Sort new+old+hunks by their package closure size."
|
||||||
|
(sort new+old+hunks
|
||||||
|
(match-lambda*
|
||||||
|
(((= new+old+hunks->package x-package)
|
||||||
|
(= new+old+hunks->package y-package))
|
||||||
|
(< (length (package-closure (list x-package)))
|
||||||
|
(length (package-closure (list y-package))))))))
|
||||||
|
|
||||||
(define %delay 1000)
|
(define %delay 1000)
|
||||||
|
|
||||||
(define (main . args)
|
(define (main . args)
|
||||||
@@ -435,7 +468,7 @@ modifying."
|
|||||||
hunks)
|
hunks)
|
||||||
(define copyright-line
|
(define copyright-line
|
||||||
(any (lambda (line) (and=> (string-prefix? "+;;; Copyright ©" line)
|
(any (lambda (line) (and=> (string-prefix? "+;;; Copyright ©" line)
|
||||||
(const line)))
|
(const line)))
|
||||||
(hunk-diff-lines (first hunks))))
|
(hunk-diff-lines (first hunks))))
|
||||||
(cond
|
(cond
|
||||||
(copyright-line
|
(copyright-line
|
||||||
@@ -450,13 +483,14 @@ modifying."
|
|||||||
(usleep %delay)
|
(usleep %delay)
|
||||||
(unless (eqv? 0 (status:exit-val (close-pipe port)))
|
(unless (eqv? 0 (status:exit-val (close-pipe port)))
|
||||||
(error "Cannot commit")))))))
|
(error "Cannot commit")))))))
|
||||||
(new+old+hunks (match definitions
|
(sort-new+old+hunks-by-closure
|
||||||
('() changes) ;reuse
|
(new+old+hunks (match definitions
|
||||||
(_
|
('() changes) ;reuse
|
||||||
;; XXX: we recompute the hunks here because previous
|
(_
|
||||||
;; insertions lead to offsets.
|
;; XXX: we recompute the hunks here because previous
|
||||||
(let-values (((definitions changes)
|
;; insertions lead to offsets.
|
||||||
(partition hunk-type (diff-info))))
|
(let-values (((definitions changes)
|
||||||
changes)))))))))
|
(partition hunk-type (diff-info))))
|
||||||
|
changes))))))))))
|
||||||
|
|
||||||
(apply main (cdr (command-line)))
|
(apply main (cdr (command-line)))
|
||||||
Executable
+101
@@ -0,0 +1,101 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# -*- mode: scheme; -*-
|
||||||
|
exec guix repl -- "$0" "$@"
|
||||||
|
!#
|
||||||
|
;;; SPDX-License-Identifier: CC0-1.0
|
||||||
|
;;; Copyright © 2025-2026 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
|
(use-modules (ice-9 match)
|
||||||
|
(ice-9 string-fun)
|
||||||
|
(srfi srfi-1)
|
||||||
|
(srfi srfi-71)
|
||||||
|
(guix diagnostics)
|
||||||
|
(guix discovery)
|
||||||
|
(guix packages)
|
||||||
|
(guix profiles)
|
||||||
|
(guix ui)
|
||||||
|
(rosenthal utils packages)
|
||||||
|
(rosenthal utils services)
|
||||||
|
(gnu services))
|
||||||
|
|
||||||
|
(define (location->org-url loc)
|
||||||
|
(match loc
|
||||||
|
(#f "<unknown location>")
|
||||||
|
(($ <location> file line column)
|
||||||
|
(format #f "[[~a][~a]]"
|
||||||
|
(format #f "https://codeberg.org/hako/Rosenthal/src/branch/trunk/modules/~a#L~a"
|
||||||
|
file
|
||||||
|
line)
|
||||||
|
(basename file)))))
|
||||||
|
|
||||||
|
(define (replace-newlines str)
|
||||||
|
(define str*
|
||||||
|
(string-replace-substring
|
||||||
|
(string-trim-right str #\newline)
|
||||||
|
"\n"
|
||||||
|
" "))
|
||||||
|
(if (string-null? str*)
|
||||||
|
" "
|
||||||
|
str*))
|
||||||
|
|
||||||
|
(format #t "\
|
||||||
|
*** Packages
|
||||||
|
| PACKAGE | SYNOPSIS | LOCATION |
|
||||||
|
|-+-+-|
|
||||||
|
")
|
||||||
|
|
||||||
|
(define (sort-packages packages)
|
||||||
|
(stable-sort
|
||||||
|
packages
|
||||||
|
(lambda (a b)
|
||||||
|
(string< (package-name a)
|
||||||
|
(package-name b)))))
|
||||||
|
|
||||||
|
(for-each
|
||||||
|
(lambda (p)
|
||||||
|
(format #t "|[[~a][=~a=]]@~a|~a|~a|~%"
|
||||||
|
(package-home-page p)
|
||||||
|
(package-name p)
|
||||||
|
(package-version p)
|
||||||
|
(replace-newlines (package-synopsis-string p))
|
||||||
|
(and=> (package-location p) location->org-url)))
|
||||||
|
(sort-packages
|
||||||
|
(filter (negate hidden-package?)
|
||||||
|
(all-rosenthal-packages))))
|
||||||
|
|
||||||
|
|
||||||
|
(format #t "\
|
||||||
|
*** Services
|
||||||
|
| SERVICE | DESCRIPTION | LOCATION |
|
||||||
|
|-+-+-|
|
||||||
|
")
|
||||||
|
|
||||||
|
;; Copied from (guix scripts system search).
|
||||||
|
(define service-type-name*
|
||||||
|
(compose symbol->string service-type-name))
|
||||||
|
(define (service-type-description-string type)
|
||||||
|
"Return the rendered and localised description of TYPE, a service type."
|
||||||
|
(and=> (service-type-description type)
|
||||||
|
texi->plain-text))
|
||||||
|
|
||||||
|
(define (sort-services services)
|
||||||
|
(stable-sort
|
||||||
|
services
|
||||||
|
(lambda (a b)
|
||||||
|
(string< (service-type-name* a)
|
||||||
|
(service-type-name* b)))))
|
||||||
|
|
||||||
|
(for-each
|
||||||
|
(lambda (s)
|
||||||
|
(format #t "|=~a=|~a|~a|~%"
|
||||||
|
(service-type-name* s)
|
||||||
|
(replace-newlines (service-type-description-string s))
|
||||||
|
(and=> (service-type-location s) location->org-url)))
|
||||||
|
(let ((home-services
|
||||||
|
services
|
||||||
|
(partition (lambda (s)
|
||||||
|
(string-prefix? "home-" (service-type-name* s)))
|
||||||
|
(all-rosenthal-services))))
|
||||||
|
(append
|
||||||
|
(sort-services services)
|
||||||
|
(sort-services home-services))))
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2024, 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2024, 2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (guix import rosenthal-updaters)
|
(define-module (guix import rosenthal-updaters)
|
||||||
|
;; Guile builtins
|
||||||
#:use-module (srfi srfi-71)
|
#:use-module (srfi srfi-71)
|
||||||
#:use-module (web client)
|
#:use-module (web client)
|
||||||
|
;; Utilities
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix records)
|
#:use-module (guix records)
|
||||||
#:use-module (guix upstream)
|
#:use-module (guix upstream)
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal))
|
(define-module (rosenthal))
|
||||||
|
|
||||||
@@ -15,8 +14,10 @@
|
|||||||
(rosenthal utils packages)
|
(rosenthal utils packages)
|
||||||
(rosenthal utils transformations)
|
(rosenthal utils transformations)
|
||||||
|
|
||||||
|
(gnu system privilege)
|
||||||
(rosenthal bootloader grub)
|
(rosenthal bootloader grub)
|
||||||
(rosenthal bootloader uki)
|
(rosenthal bootloader uki)
|
||||||
|
(rosenthal bootloader limine)
|
||||||
|
|
||||||
(gnu services desktop)
|
(gnu services desktop)
|
||||||
(gnu services guix)
|
(gnu services guix)
|
||||||
|
|||||||
@@ -1,23 +1,13 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2023 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2023 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal bootloader grub)
|
(define-module (rosenthal bootloader grub)
|
||||||
#:use-module (gnu bootloader)
|
;; Utilities
|
||||||
|
#:use-module (guix deprecation)
|
||||||
|
;; Guix System - bootloaders
|
||||||
#:use-module (gnu bootloader grub)
|
#:use-module (gnu bootloader grub)
|
||||||
#:use-module (rosenthal packages bootloaders)
|
|
||||||
#:export (grub-efi-luks2-bootloader
|
#:export (grub-efi-luks2-bootloader
|
||||||
grub-efi-luks2-removable-bootloader))
|
grub-efi-luks2-removable-bootloader))
|
||||||
|
|
||||||
(define grub-efi-luks2-bootloader
|
(define-deprecated/alias grub-efi-luks2-bootloader grub-efi-bootloader)
|
||||||
(bootloader
|
(define-deprecated/alias grub-efi-luks2-removable-bootloader grub-efi-removable-bootloader)
|
||||||
(inherit grub-efi-bootloader)
|
|
||||||
;; NOTE: Don't change the name. Generation switching code only knows
|
|
||||||
;; bootloaders defined in (gnu bootloader grub).
|
|
||||||
(name 'grub-efi)
|
|
||||||
(package grub-efi-luks2)))
|
|
||||||
|
|
||||||
(define grub-efi-luks2-removable-bootloader
|
|
||||||
(bootloader
|
|
||||||
(inherit grub-efi-removable-bootloader)
|
|
||||||
(package grub-efi-luks2)))
|
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2026 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
|
(define-module (rosenthal bootloader limine)
|
||||||
|
;; Guile builtins
|
||||||
|
#:use-module (ice-9 format)
|
||||||
|
#:use-module (srfi srfi-1)
|
||||||
|
;; Utilities
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix modules)
|
||||||
|
#:use-module (guix utils)
|
||||||
|
;; Guix System - bootloaders
|
||||||
|
#:use-module (gnu bootloader)
|
||||||
|
#:use-module (gnu bootloader grub)
|
||||||
|
#:use-module (rosenthal bootloader uki)
|
||||||
|
;; Guix packages
|
||||||
|
#:use-module (rosenthal packages bootloaders)
|
||||||
|
#:export (limine-efi-removable-bootloader))
|
||||||
|
|
||||||
|
(define script-path "/boot/install-limine.scm")
|
||||||
|
|
||||||
|
(define* (limine-configuration-file config entries
|
||||||
|
#:key (old-entries '()) #:allow-other-keys)
|
||||||
|
(define limine
|
||||||
|
(file-append
|
||||||
|
(bootloader-package (bootloader-configuration-bootloader config))
|
||||||
|
(format #f "/share/limine/BOOT~a.EFI"
|
||||||
|
(cond
|
||||||
|
((target-x86-32?) "IA32")
|
||||||
|
((target-x86-64?) "X64")
|
||||||
|
((target-aarch64?) "AA64")
|
||||||
|
((target-riscv64?) "RISCV64")))))
|
||||||
|
|
||||||
|
(define menu-entries
|
||||||
|
(cons (first entries)
|
||||||
|
old-entries))
|
||||||
|
|
||||||
|
(define labels
|
||||||
|
(map menu-entry-label menu-entries))
|
||||||
|
|
||||||
|
(define ukify-args
|
||||||
|
(map menu-entry->ukify-args menu-entries))
|
||||||
|
|
||||||
|
(program-file "install-limine"
|
||||||
|
(with-imported-modules
|
||||||
|
(source-module-closure
|
||||||
|
'((guix build syscalls)
|
||||||
|
(guix build utils)))
|
||||||
|
#~(begin
|
||||||
|
(use-modules (ice-9 match)
|
||||||
|
(srfi srfi-1)
|
||||||
|
(guix build syscalls)
|
||||||
|
(guix build utils))
|
||||||
|
(let* ((args (command-line))
|
||||||
|
(directory (second args))
|
||||||
|
(limine-directory (in-vicinity directory "EFI/BOOT"))
|
||||||
|
(guix-directory (in-vicinity directory "EFI/Guix")))
|
||||||
|
(for-each mkdir-p (list limine-directory guix-directory))
|
||||||
|
;; Install unified kernel images and generate Limine configuration.
|
||||||
|
(call-with-output-file (in-vicinity limine-directory "limine.conf.tmp")
|
||||||
|
(lambda (port)
|
||||||
|
(let ((ukify #$(file-append ukify "/bin/ukify"))
|
||||||
|
(current-label (first '#$labels))
|
||||||
|
(current-args (first (list #$@ukify-args)))
|
||||||
|
(old-labels (cdr '#$labels))
|
||||||
|
(old-args (cdr (list #$@ukify-args))))
|
||||||
|
(format port "\
|
||||||
|
timeout: 5~%")
|
||||||
|
(with-directory-excursion guix-directory
|
||||||
|
(for-each delete-file (find-files "." "^OLD-[0-9]+\\.EFI$"))
|
||||||
|
(apply invoke/quiet ukify "build" "--output" "CURRENT.EFI"
|
||||||
|
current-args)
|
||||||
|
(format port "
|
||||||
|
/~a
|
||||||
|
protocol: efi
|
||||||
|
path: boot():/EFI/Guix/CURRENT.EFI~%"
|
||||||
|
current-label)
|
||||||
|
(unless (null? old-labels)
|
||||||
|
(format port "
|
||||||
|
/GNU system, old configurations...~%"))
|
||||||
|
(let loop ((count 1)
|
||||||
|
(labels old-labels)
|
||||||
|
(args old-args))
|
||||||
|
(let ((image-name (format #f "OLD-~a.EFI" count)))
|
||||||
|
(unless (null? labels)
|
||||||
|
(catch #t
|
||||||
|
(lambda ()
|
||||||
|
(apply invoke/quiet
|
||||||
|
ukify "build" "--output" image-name
|
||||||
|
(first args))
|
||||||
|
(format port "~
|
||||||
|
//~a
|
||||||
|
protocol: efi
|
||||||
|
path: boot():/EFI/Guix/OLD-~a.EFI~%"
|
||||||
|
(first labels)
|
||||||
|
count))
|
||||||
|
(lambda _
|
||||||
|
(delete-file image-name)
|
||||||
|
;; Exit loop.
|
||||||
|
(loop 0 '() '())))
|
||||||
|
(loop (1+ count)
|
||||||
|
(cdr labels)
|
||||||
|
(cdr args)))))))
|
||||||
|
(rename-file (in-vicinity limine-directory "limine.conf.tmp")
|
||||||
|
(in-vicinity limine-directory "limine.conf"))
|
||||||
|
;; Finally, install Limine.
|
||||||
|
(install-file #$limine limine-directory))))))))
|
||||||
|
|
||||||
|
(define install-limine-efi
|
||||||
|
#~(lambda (bootloader target mount-point)
|
||||||
|
(invoke (string-append mount-point #$script-path)
|
||||||
|
(string-append mount-point target))))
|
||||||
|
|
||||||
|
;; Limine + UKI
|
||||||
|
;; NOTE: ‘configuration-file’ here is actually an activation script to be invoked by
|
||||||
|
;; ‘installer’.
|
||||||
|
;; XXX: Not expected by ‘reinstall-bootloader’ so rolling-back and switching
|
||||||
|
;; generation won't work.
|
||||||
|
(define limine-efi-removable-bootloader
|
||||||
|
(bootloader
|
||||||
|
;; NOTE: Don't change the name. Generation switching code only knows
|
||||||
|
;; bootloaders defined in (gnu bootloader grub).
|
||||||
|
(name 'grub-efi-removable-bootloader)
|
||||||
|
(package limine)
|
||||||
|
(installer install-limine-efi)
|
||||||
|
(disk-image-installer #f)
|
||||||
|
(configuration-file script-path)
|
||||||
|
(configuration-file-generator limine-configuration-file)))
|
||||||
@@ -3,48 +3,71 @@
|
|||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
(define-module (rosenthal bootloader uki)
|
(define-module (rosenthal bootloader uki)
|
||||||
|
;; Guile builtins
|
||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
|
;; Utilities
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix modules)
|
#:use-module (guix modules)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
|
;; Guix System - bootloaders
|
||||||
#:use-module (gnu bootloader)
|
#:use-module (gnu bootloader)
|
||||||
|
;; Guix packages
|
||||||
#:use-module (rosenthal packages bootloaders)
|
#:use-module (rosenthal packages bootloaders)
|
||||||
#:export (uefi-uki-removable-bootloader))
|
#:export (menu-entry->ukify-args
|
||||||
|
uefi-uki-removable-bootloader))
|
||||||
|
|
||||||
(define script-path "/boot/install-uki.scm")
|
(define script-path "/boot/install-uki.scm")
|
||||||
|
|
||||||
|
(define (menu-entry->ukify-args entry)
|
||||||
|
(let* ((label (menu-entry-label entry))
|
||||||
|
(linux (menu-entry-linux entry))
|
||||||
|
(initrd (menu-entry-initrd entry))
|
||||||
|
(arguments (menu-entry-linux-arguments entry)))
|
||||||
|
#~(list "--os-release" #$label
|
||||||
|
"--linux" #$linux
|
||||||
|
"--initrd" #$initrd
|
||||||
|
"--cmdline"
|
||||||
|
(string-join
|
||||||
|
(map (lambda (arg)
|
||||||
|
;; Use absolute references to avoid stale system generation
|
||||||
|
;; status.
|
||||||
|
(if (or (string-prefix? "gnu.system=" arg)
|
||||||
|
(string-prefix? "gnu.load=" arg))
|
||||||
|
(let* ((split-arg (string-split arg #\=))
|
||||||
|
(option (car split-arg))
|
||||||
|
(value (cadr split-arg)))
|
||||||
|
(string-join
|
||||||
|
(list option
|
||||||
|
(catch #t
|
||||||
|
(lambda ()
|
||||||
|
(readlink value))
|
||||||
|
(const value)))
|
||||||
|
"="))
|
||||||
|
arg))
|
||||||
|
(list #$@arguments)))
|
||||||
|
"--stub"
|
||||||
|
#$(file-append systemd-stub "/libexec/" (systemd-stub-name)))))
|
||||||
|
|
||||||
(define (uefi-uki-configuration-file config entries . rest)
|
(define (uefi-uki-configuration-file config entries . rest)
|
||||||
|
|
||||||
(define (menu-entry->ukify-args entry)
|
|
||||||
(let* ((label (menu-entry-label entry))
|
|
||||||
(linux (menu-entry-linux entry))
|
|
||||||
(initrd (menu-entry-initrd entry))
|
|
||||||
(arguments (menu-entry-linux-arguments entry))
|
|
||||||
(boot (bootloader-configuration-bootloader config))
|
|
||||||
(stub (bootloader-package boot)))
|
|
||||||
#~(list "--os-release" #$label
|
|
||||||
"--linux" #$linux
|
|
||||||
"--initrd" #$initrd
|
|
||||||
"--cmdline" (string-join (list #$@arguments))
|
|
||||||
"--stub" #$(file-append stub "/libexec/" (systemd-stub-name)))))
|
|
||||||
|
|
||||||
(program-file "install-uki"
|
(program-file "install-uki"
|
||||||
(with-imported-modules (source-module-closure '((guix build utils)))
|
(with-imported-modules (source-module-closure '((guix build utils)))
|
||||||
#~(begin
|
#~(begin
|
||||||
(use-modules (srfi srfi-1)
|
(use-modules (ice-9 match)
|
||||||
(guix build utils))
|
(guix build utils))
|
||||||
(let* ((ukify #$(file-append ukify "/bin/ukify"))
|
(let* ((directory (second (command-line)))
|
||||||
(installation-path
|
(installation-path
|
||||||
(format #f "~a/EFI/BOOT/BOOT~a.EFI"
|
(in-vicinity
|
||||||
(second (command-line))
|
directory
|
||||||
#$(cond
|
#$(format #f "/EFI/BOOT/BOOT~a.EFI"
|
||||||
((target-x86-32?) "IA32")
|
(cond
|
||||||
((target-x86-64?) "X64")
|
((target-x86-32?) "IA32")
|
||||||
((target-arm32?) "ARM")
|
((target-x86-64?) "X64")
|
||||||
((target-aarch64?) "AA64")
|
((target-arm32?) "ARM")
|
||||||
((target-riscv64?) "RISCV64")))))
|
((target-aarch64?) "AA64")
|
||||||
|
((target-riscv64?) "RISCV64"))))))
|
||||||
(mkdir-p (dirname installation-path))
|
(mkdir-p (dirname installation-path))
|
||||||
(apply invoke ukify "build" "--output" installation-path
|
(apply invoke/quiet #$(file-append ukify "/bin/ukify")
|
||||||
|
"build" "--output" installation-path
|
||||||
#$(menu-entry->ukify-args (first entries))))))))
|
#$(menu-entry->ukify-args (first entries))))))))
|
||||||
|
|
||||||
(define install-uefi-uki
|
(define install-uefi-uki
|
||||||
|
|||||||
@@ -0,0 +1,74 @@
|
|||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2026 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
|
(define-module (rosenthal build-system go-vendored)
|
||||||
|
#:use-module (ice-9 match)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix utils)
|
||||||
|
#:use-module (rosenthal utils download)
|
||||||
|
#:use-module (guix build-system)
|
||||||
|
#:use-module (guix build-system gnu)
|
||||||
|
#:use-module (guix build-system go)
|
||||||
|
#:export (%default-go-vendored-imported-modules
|
||||||
|
%default-go-vendored-modules
|
||||||
|
go-vendored-build-system))
|
||||||
|
|
||||||
|
(define %default-go-vendored-imported-modules
|
||||||
|
;; Build-side modules imported and used by default.
|
||||||
|
`(,@%default-gnu-imported-modules
|
||||||
|
(guix build union)
|
||||||
|
(guix build go-build-system)
|
||||||
|
(rosenthal build go-vendored-build-system)))
|
||||||
|
|
||||||
|
(define %default-go-vendored-modules
|
||||||
|
'((guix build union)
|
||||||
|
(guix build utils)
|
||||||
|
(rosenthal build go-vendored-build-system)))
|
||||||
|
|
||||||
|
(define* (lower name #:key source go vendor-hash #:allow-other-keys #:rest rest)
|
||||||
|
(define private-keywords
|
||||||
|
'(#:vendor-hash))
|
||||||
|
|
||||||
|
(define go-lower
|
||||||
|
(build-system-lower go-build-system))
|
||||||
|
|
||||||
|
(define go-bag
|
||||||
|
(apply go-lower name
|
||||||
|
#:source source
|
||||||
|
#:go go
|
||||||
|
rest))
|
||||||
|
|
||||||
|
(bag
|
||||||
|
(inherit go-bag)
|
||||||
|
(build-inputs
|
||||||
|
`(,@(if (and source vendor-hash)
|
||||||
|
`(("vendored-go-dependencies"
|
||||||
|
,(origin
|
||||||
|
(method (go-mod-vendor #:go go))
|
||||||
|
(uri source)
|
||||||
|
(file-name (string-append name "-vendored-go-dependencies"))
|
||||||
|
(hash
|
||||||
|
(if (content-hash? vendor-hash)
|
||||||
|
vendor-hash
|
||||||
|
(content-hash vendor-hash))))))
|
||||||
|
'())
|
||||||
|
,@(bag-build-inputs go-bag)))
|
||||||
|
(build (bag-build go-bag))
|
||||||
|
(arguments
|
||||||
|
(substitute-keyword-arguments
|
||||||
|
(strip-keyword-arguments private-keywords (bag-arguments go-bag))
|
||||||
|
((#:imported-modules imported-modules '())
|
||||||
|
(if (null? imported-modules)
|
||||||
|
%default-go-vendored-imported-modules
|
||||||
|
imported-modules))
|
||||||
|
((#:modules modules '())
|
||||||
|
(if (null? modules)
|
||||||
|
%default-go-vendored-modules
|
||||||
|
modules))))))
|
||||||
|
|
||||||
|
(define go-vendored-build-system
|
||||||
|
(build-system
|
||||||
|
(name 'go-vendored)
|
||||||
|
(description
|
||||||
|
"Build system for Go programs, with vendored dependencies")
|
||||||
|
(lower lower)))
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2026 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
|
(define-module (rosenthal build go-vendored-build-system)
|
||||||
|
#:use-module (guix build utils)
|
||||||
|
#:use-module ((guix build gnu-build-system) #:prefix gnu:)
|
||||||
|
#:use-module ((guix build go-build-system) #:prefix go:)
|
||||||
|
#:export (%standard-phases
|
||||||
|
go-build))
|
||||||
|
|
||||||
|
(define* (unpack-vendored-dependencies #:key native-inputs inputs #:allow-other-keys)
|
||||||
|
(let ((vendored-dependencies
|
||||||
|
(assoc-ref (or native-inputs inputs) "vendored-go-dependencies")))
|
||||||
|
(setenv "GOTOOLCHAIN" "local")
|
||||||
|
(unsetenv "GO111MODULE")
|
||||||
|
(when vendored-dependencies
|
||||||
|
(copy-recursively vendored-dependencies "vendor"))))
|
||||||
|
|
||||||
|
(define %standard-phases
|
||||||
|
(modify-phases go:%standard-phases
|
||||||
|
(add-after 'unpack 'unpack-vendored-dependencies unpack-vendored-dependencies)
|
||||||
|
(replace 'unpack
|
||||||
|
(assoc-ref gnu:%standard-phases 'unpack))
|
||||||
|
(replace 'install-license-files
|
||||||
|
(assoc-ref gnu:%standard-phases 'install-license-files))))
|
||||||
|
|
||||||
|
(define* (go-build #:key inputs (phases %standard-phases)
|
||||||
|
#:allow-other-keys #:rest args)
|
||||||
|
(apply gnu:gnu-build #:inputs inputs #:phases phases args))
|
||||||
@@ -1,18 +1,20 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal ci tarball)
|
(define-module (rosenthal ci tarball)
|
||||||
|
;; Guile builtins
|
||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
|
;; Utilities
|
||||||
|
#:use-module (gnu ci)
|
||||||
|
#:use-module (gnu compression)
|
||||||
#:use-module (guix derivations)
|
#:use-module (guix derivations)
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix monads)
|
#:use-module (guix monads)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix profiles)
|
#:use-module (guix profiles)
|
||||||
#:use-module (guix store)
|
|
||||||
#:use-module (guix scripts pack)
|
#:use-module (guix scripts pack)
|
||||||
#:use-module (gnu ci)
|
#:use-module (guix store)
|
||||||
#:use-module (gnu compression)
|
;; Guix packages
|
||||||
#:use-module (rosenthal packages package-management)
|
#:use-module (rosenthal packages package-management)
|
||||||
#:export (cuirass-jobs))
|
#:export (cuirass-jobs))
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# The default Ctrl+Space has conflict with Emacs, change it to Super+Space.
|
||||||
|
[Hotkey/TriggerKeys]
|
||||||
|
0=Super+space
|
||||||
|
1=Zenkaku_Hankaku
|
||||||
|
2=Hangul
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
htop_version=3.4.1
|
||||||
|
hide_kernel_threads=0
|
||||||
|
show_thread_names=1
|
||||||
|
show_program_path=0
|
||||||
|
highlight_base_name=1
|
||||||
|
highlight_changes=1
|
||||||
|
show_merged_command=1
|
||||||
|
show_cpu_frequency=1
|
||||||
|
show_cpu_temperature=1
|
||||||
|
column_meters_0=AllCPUs4 Memory Swap ZFSARC DiskIO NetworkIO
|
||||||
|
column_meter_modes_0=1 2 2 2 2 2
|
||||||
|
column_meters_1=System Hostname DateTime Uptime Tasks LoadAverage
|
||||||
|
column_meter_modes_1=2 2 2 2 2 2
|
||||||
|
tree_view=1
|
||||||
|
all_branches_collapsed=1
|
||||||
+45
-44
@@ -1,12 +1,11 @@
|
|||||||
// SPDX-FileCopyrightText: 2023-2025 Ivan Molodetskikh <yalterz@gmail.com>
|
|
||||||
//
|
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
|
|
||||||
// This config is in the KDL format: https://kdl.dev
|
// This config is in the KDL format: https://kdl.dev
|
||||||
// "/-" comments out the following node.
|
// "/-" comments out the following node.
|
||||||
// Check the wiki for a full description of the configuration:
|
// Check the wiki for a full description of the configuration:
|
||||||
// https://yalter.github.io/niri/Configuration:-Introduction
|
// https://yalter.github.io/niri/Configuration:-Introduction
|
||||||
|
|
||||||
|
// See also `import_environment' in niri source (src/main.rs).
|
||||||
|
spawn-sh-at-startup "herd set-environment graphical-session XDG_CURRENT_DESKTOP=$XDG_CURRENT_DESKTOP XDG_SESSION_TYPE=$XDG_SESSION_TYPE NIRI_SOCKET=$NIRI_SOCKET"
|
||||||
|
|
||||||
// Input device configuration.
|
// Input device configuration.
|
||||||
// Find the full list of options on the wiki:
|
// Find the full list of options on the wiki:
|
||||||
// https://yalter.github.io/niri/Configuration:-Input
|
// https://yalter.github.io/niri/Configuration:-Input
|
||||||
@@ -270,13 +269,8 @@ layout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add lines like this to spawn processes at startup.
|
// Add lines like this to spawn processes at startup.
|
||||||
// Note that running niri as a session supports xdg-desktop-autostart,
|
|
||||||
// which may be more convenient to use.
|
|
||||||
// See the binds section below for more spawn examples.
|
// See the binds section below for more spawn examples.
|
||||||
|
|
||||||
// This line starts waybar, a commonly used bar for Wayland compositors.
|
|
||||||
// spawn-at-startup "waybar"
|
|
||||||
|
|
||||||
// To run a shell command (with variables, pipes, etc.), use spawn-sh-at-startup:
|
// To run a shell command (with variables, pipes, etc.), use spawn-sh-at-startup:
|
||||||
// spawn-sh-at-startup "qs -c ~/source/qs/MyAwesomeShell"
|
// spawn-sh-at-startup "qs -c ~/source/qs/MyAwesomeShell"
|
||||||
|
|
||||||
@@ -290,7 +284,7 @@ hotkey-overlay {
|
|||||||
// Additionally, clients will be informed that they are tiled, removing some client-side rounded corners.
|
// Additionally, clients will be informed that they are tiled, removing some client-side rounded corners.
|
||||||
// This option will also fix border/focus ring drawing behind some semitransparent windows.
|
// This option will also fix border/focus ring drawing behind some semitransparent windows.
|
||||||
// After enabling or disabling this, you need to restart the apps for this to take effect.
|
// After enabling or disabling this, you need to restart the apps for this to take effect.
|
||||||
// prefer-no-csd
|
prefer-no-csd
|
||||||
|
|
||||||
// You can change the path where screenshots are saved.
|
// You can change the path where screenshots are saved.
|
||||||
// A ~ at the front will be expanded to the home directory.
|
// A ~ at the front will be expanded to the home directory.
|
||||||
@@ -315,14 +309,13 @@ animations {
|
|||||||
// Find more information on the wiki:
|
// Find more information on the wiki:
|
||||||
// https://yalter.github.io/niri/Configuration:-Window-Rules
|
// https://yalter.github.io/niri/Configuration:-Window-Rules
|
||||||
|
|
||||||
// Work around WezTerm's initial configure bug
|
// Keep WezTerm maximized so that the installer won't be resized.
|
||||||
// by setting an empty default-column-width.
|
|
||||||
window-rule {
|
window-rule {
|
||||||
// This regular expression is intentionally made as specific as possible,
|
// This regular expression is intentionally made as specific as possible,
|
||||||
// since this is the default config, and we want no false positives.
|
// since this is the default config, and we want no false positives.
|
||||||
// You can get away with just app-id="wezterm" if you want.
|
// You can get away with just app-id="wezterm" if you want.
|
||||||
match app-id=r#"^org\.wezfurlong\.wezterm$"#
|
match app-id=r#"^org\.wezfurlong\.wezterm$"#
|
||||||
default-column-width {}
|
open-maximized true
|
||||||
}
|
}
|
||||||
|
|
||||||
// Open the Firefox picture-in-picture player as floating by default.
|
// Open the Firefox picture-in-picture player as floating by default.
|
||||||
@@ -333,6 +326,10 @@ window-rule {
|
|||||||
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
|
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
|
||||||
open-floating true
|
open-floating true
|
||||||
}
|
}
|
||||||
|
window-rule {
|
||||||
|
match app-id=r#"librewolf$"# title="^Picture-in-Picture$"
|
||||||
|
open-floating true
|
||||||
|
}
|
||||||
|
|
||||||
// Example: block out two password managers from screen capture.
|
// Example: block out two password managers from screen capture.
|
||||||
// (This example rule is commented out with a "/-" in front.)
|
// (This example rule is commented out with a "/-" in front.)
|
||||||
@@ -346,13 +343,22 @@ window-rule {
|
|||||||
// block-out-from "screencast"
|
// block-out-from "screencast"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Example: enable rounded corners for all windows.
|
// Enable rounded corners for all windows.
|
||||||
// (This example rule is commented out with a "/-" in front.)
|
// For Noctalia shell.
|
||||||
/-window-rule {
|
window-rule {
|
||||||
geometry-corner-radius 12
|
geometry-corner-radius 20
|
||||||
clip-to-geometry true
|
clip-to-geometry true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
debug {
|
||||||
|
honor-xdg-activation-with-invalid-serial
|
||||||
|
}
|
||||||
|
|
||||||
|
// Background color to match the wallpaper.
|
||||||
|
overview {
|
||||||
|
backdrop-color "#D2DEE9"
|
||||||
|
}
|
||||||
|
|
||||||
binds {
|
binds {
|
||||||
// Keys consist of modifiers separated by + signs, followed by an XKB key name
|
// Keys consist of modifiers separated by + signs, followed by an XKB key name
|
||||||
// in the end. To find an XKB name for a particular key, you may use a program
|
// in the end. To find an XKB name for a particular key, you may use a program
|
||||||
@@ -369,28 +375,32 @@ binds {
|
|||||||
Mod+Shift+Slash { show-hotkey-overlay; }
|
Mod+Shift+Slash { show-hotkey-overlay; }
|
||||||
|
|
||||||
// Suggested binds for running programs: terminal, app launcher, screen locker.
|
// Suggested binds for running programs: terminal, app launcher, screen locker.
|
||||||
Mod+T hotkey-overlay-title="Open a Terminal: foot" { spawn "foot"; }
|
Mod+Return hotkey-overlay-title="Open a Terminal" { spawn "wezterm"; }
|
||||||
Mod+D hotkey-overlay-title="Run an Application: rofi" { spawn "rofi" "-show" "drun"; }
|
Mod+D hotkey-overlay-title="Run an Application" { spawn "noctalia-shell" "ipc" "call" "launcher" "toggle"; }
|
||||||
// Super+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; }
|
// Super+Alt+L hotkey-overlay-title="Lock the Screen" { spawn "noctalia-shell" "ipc" "call" "lockScreen" "lock"; }
|
||||||
|
|
||||||
// Use spawn-sh to run a shell command. Do this if you need pipes, multiple commands, etc.
|
// Use spawn-sh to run a shell command. Do this if you need pipes, multiple commands, etc.
|
||||||
// Note: the entire command goes as a single argument. It's passed verbatim to `sh -c`.
|
// Note: the entire command goes as a single argument. It's passed verbatim to `sh -c`.
|
||||||
// For example, this is a standard bind to toggle the screen reader (orca).
|
// For example, this is a standard bind to toggle the screen reader (orca).
|
||||||
Super+Alt+S allow-when-locked=true hotkey-overlay-title=null { spawn-sh "pkill orca || exec orca"; }
|
Super+Alt+S allow-when-locked=true hotkey-overlay-title=null { spawn-sh "pkill orca || exec orca"; }
|
||||||
|
|
||||||
// Example volume keys mappings for PipeWire & WirePlumber.
|
// Example volume keys mappings for Noctalia shell
|
||||||
// The allow-when-locked=true property makes them work even when the session is locked.
|
// The allow-when-locked=true property makes them work even when the session is locked.
|
||||||
// Using spawn-sh allows to pass multiple arguments together with the command.
|
XF86AudioRaiseVolume allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "volume" "increase"; }
|
||||||
XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+"; }
|
XF86AudioLowerVolume allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "volume" "decrease"; }
|
||||||
XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-"; }
|
XF86AudioMute allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "volume" "muteOutput"; }
|
||||||
XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; }
|
XF86AudioMicMute allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "volume" "muteInput"; }
|
||||||
XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; }
|
|
||||||
|
|
||||||
// Example brightness key mappings for light.
|
// Example media keys mappings for Noctalia shell.
|
||||||
// You can use regular spawn with multiple arguments too (to avoid going through "sh"),
|
// This will work with any MPRIS-enabled media player.
|
||||||
// but you need to manually put each argument in separate "" quotes.
|
XF86AudioPlay allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "media" "playPause"; }
|
||||||
XF86MonBrightnessUp allow-when-locked=true { spawn "light" "-A" "10"; }
|
XF86AudioStop allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "media" "pause"; }
|
||||||
XF86MonBrightnessDown allow-when-locked=true { spawn "light" "-U" "10"; }
|
XF86AudioPrev allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "media" "previous"; }
|
||||||
|
XF86AudioNext allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "media" "next"; }
|
||||||
|
|
||||||
|
// Example brightness key mappings for Noctalia shell
|
||||||
|
XF86MonBrightnessUp allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "brightness" "increase"; }
|
||||||
|
XF86MonBrightnessDown allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "brightness" "decrease"; }
|
||||||
|
|
||||||
// Open/close the Overview: a zoomed-out view of workspaces and windows.
|
// Open/close the Overview: a zoomed-out view of workspaces and windows.
|
||||||
// You can also move the mouse into the top-left hot corner,
|
// You can also move the mouse into the top-left hot corner,
|
||||||
@@ -502,8 +512,8 @@ binds {
|
|||||||
// These binds are also affected by touchpad's natural-scroll, so these
|
// These binds are also affected by touchpad's natural-scroll, so these
|
||||||
// example binds are "inverted", since we have natural-scroll enabled for
|
// example binds are "inverted", since we have natural-scroll enabled for
|
||||||
// touchpads by default.
|
// touchpads by default.
|
||||||
// Mod+TouchpadScrollDown { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.02+"; }
|
// Mod+TouchpadScrollDown { spawn "noctalia-shell" "ipc" "call" "volume" "increase"; }
|
||||||
// Mod+TouchpadScrollUp { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.02-"; }
|
// Mod+TouchpadScrollUp { spawn "noctalia-shell" "ipc" "call" "volume" "decrease"; }
|
||||||
|
|
||||||
// You can refer to workspaces by index. However, keep in mind that
|
// You can refer to workspaces by index. However, keep in mind that
|
||||||
// niri is a dynamic workspace system, so these commands are kind of
|
// niri is a dynamic workspace system, so these commands are kind of
|
||||||
@@ -612,19 +622,10 @@ binds {
|
|||||||
// which ensures niri always processes them, even when an inhibitor is active.
|
// which ensures niri always processes them, even when an inhibitor is active.
|
||||||
Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
|
Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
|
||||||
|
|
||||||
// The quit action will show a confirmation dialog to avoid accidental exits.
|
Mod+Shift+E hotkey-overlay-title="Restart Noctalia shell" { spawn "herd" "restart" "noctalia-shell"; }
|
||||||
Mod+Shift+E { quit; }
|
Ctrl+Alt+Delete hotkey-overlay-title="Open Noctalia shell session menu" { spawn "noctalia-shell" "ipc" "call" "sessionMenu" "toggle"; }
|
||||||
Ctrl+Alt+Delete { quit; }
|
|
||||||
|
|
||||||
// Powers off the monitors. To turn them back on, do any input like
|
// Powers off the monitors. To turn them back on, do any input like
|
||||||
// moving the mouse or pressing any other key.
|
// moving the mouse or pressing any other key.
|
||||||
Mod+Shift+P { power-off-monitors; }
|
Mod+Shift+P { power-off-monitors; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Start user Shepherd
|
|
||||||
spawn-at-startup "sh" "-c" "pgrep --uid $USER shepherd > /dev/null || shepherd"
|
|
||||||
|
|
||||||
overview {
|
|
||||||
backdrop-color "#D2DEE9"
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
[bar.default]
|
||||||
|
capsule = true
|
||||||
|
concave_edge_corners = false
|
||||||
|
margin_ends = 0
|
||||||
|
radius = 0
|
||||||
|
|
||||||
|
[dock]
|
||||||
|
concave_edge_corners = false
|
||||||
|
enabled = true
|
||||||
|
launcher_position = "start"
|
||||||
|
position = "left"
|
||||||
|
show_dots = true
|
||||||
|
|
||||||
|
[shell]
|
||||||
|
polkit_agent = true
|
||||||
|
|
||||||
|
[[shell.session.actions]]
|
||||||
|
action = "reboot"
|
||||||
|
variant = "default"
|
||||||
|
|
||||||
|
[[shell.session.actions]]
|
||||||
|
action = "shutdown"
|
||||||
|
variant = "destructive"
|
||||||
|
|
||||||
|
[theme]
|
||||||
|
builtin = "Nord"
|
||||||
|
mode = "light"
|
||||||
|
|
||||||
|
[wallpaper]
|
||||||
|
enabled = false
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
local wezterm = require 'wezterm'
|
||||||
|
local config = wezterm.config_builder()
|
||||||
|
|
||||||
|
-- Use Xwayland in the LiveCD so that we can change keyboard layout when
|
||||||
|
-- WezTerm is running.
|
||||||
|
config.enable_wayland = false
|
||||||
|
|
||||||
|
return config
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
TerminalEmulator=open-wezterm-here
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
;;; -*- lexical-binding: t -*-
|
|
||||||
;;; SPDX-FileCopyrightText: DogLooksGood <doglooksgood@hotmail.com>
|
|
||||||
;;; SPDX-FileCopyrightText: 2022 Nyk Ma <i@nyk.ma>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
|
|
||||||
;; https://github.com/DogLooksGood/meomacs/blob/master/laf.org
|
|
||||||
;; https://github.com/nykma/nema/blob/develop/my-sample/font.el
|
|
||||||
|
|
||||||
(defvar nema--font-size 12 "Font size")
|
|
||||||
(defvar nema-fonts '((mono . "monospace")
|
|
||||||
(sans . "sans")
|
|
||||||
(serif . "serif")
|
|
||||||
(cjk . "Noto Serif CJK SC")
|
|
||||||
(symbol . "Noto Color Emoji")
|
|
||||||
(modeline . "Source Serif 4"))
|
|
||||||
"Fonts to use.")
|
|
||||||
|
|
||||||
(defun nema//get-font-family (key)
|
|
||||||
(alist-get key nema-fonts))
|
|
||||||
|
|
||||||
(defun nema//generate-font-spec (key)
|
|
||||||
(format "%s-%d"
|
|
||||||
(nema//get-font-family key)
|
|
||||||
nema--font-size))
|
|
||||||
|
|
||||||
(defun nema//load-base-font ()
|
|
||||||
"Load the default font for ascii characters."
|
|
||||||
(let* ((font-spec (nema//generate-font-spec 'mono)))
|
|
||||||
(set-frame-parameter nil 'font font-spec)
|
|
||||||
(add-to-list 'default-frame-alist (cons 'font font-spec))))
|
|
||||||
|
|
||||||
(defun nema//load-face-font ()
|
|
||||||
"Load fonts used in faces.
|
|
||||||
|
|
||||||
This function must be called after frame creation."
|
|
||||||
(let ((mono (nema//generate-font-spec 'mono))
|
|
||||||
(sans (nema//generate-font-spec 'sans))
|
|
||||||
(serif (nema//generate-font-spec 'sans-serif))
|
|
||||||
(modeline (nema//generate-font-spec 'modeline)))
|
|
||||||
(set-face-attribute 'variable-pitch nil :font sans)
|
|
||||||
(set-face-attribute 'variable-pitch-text nil :font serif)
|
|
||||||
(set-face-attribute 'fixed-pitch nil :font mono)
|
|
||||||
(set-face-attribute 'fixed-pitch-serif nil :font mono)
|
|
||||||
(set-face-attribute 'mode-line nil :font modeline)
|
|
||||||
(set-face-attribute 'mode-line-inactive nil :font modeline)))
|
|
||||||
|
|
||||||
(defun nema//load-ext-font ()
|
|
||||||
"Load fonts used for non-ascii characters.
|
|
||||||
|
|
||||||
This function must be called after frame creation."
|
|
||||||
(let ((font (frame-parameter nil 'font))
|
|
||||||
(font-spec-cjk (font-spec :family (nema//get-font-family 'cjk)))
|
|
||||||
(font-spec-symbol (font-spec :family (nema//get-font-family 'symbol))))
|
|
||||||
(dolist (charset '(kana han hangul cjk-misc bopomofo))
|
|
||||||
(set-fontset-font font charset font-spec-cjk))
|
|
||||||
(set-fontset-font font 'symbol font-spec-symbol)))
|
|
||||||
|
|
||||||
(defun nema/load-font ()
|
|
||||||
"Load all font configuration."
|
|
||||||
(interactive)
|
|
||||||
(when (display-graphic-p)
|
|
||||||
(nema//load-base-font)
|
|
||||||
(nema//load-ext-font)
|
|
||||||
(nema//load-face-font)))
|
|
||||||
|
|
||||||
(if (daemonp)
|
|
||||||
(add-hook 'server-after-make-frame-hook #'nema/load-font)
|
|
||||||
;; Else: not in daemon
|
|
||||||
(add-hook 'after-init-hook #'nema/load-font))
|
|
||||||
@@ -1,93 +1,239 @@
|
|||||||
;;; -*- lexical-binding: t -*-
|
;;; -*- lexical-binding: t -*-
|
||||||
;;; SPDX-FileCopyrightText: 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
|
|
||||||
(setopt custom-file (locate-user-emacs-file "custom.el"))
|
(setopt custom-file (locate-user-emacs-file "custom.el"))
|
||||||
(if (not (file-exists-p custom-file))
|
(if (not (file-exists-p custom-file))
|
||||||
(make-empty-file custom-file)
|
(make-empty-file custom-file)
|
||||||
(load custom-file))
|
(load custom-file))
|
||||||
|
|
||||||
(let ((font-config (locate-user-emacs-file "fonts.el")))
|
;; Keep ~/.config/emacs clean by setting default storage locations for various
|
||||||
(when (file-exists-p font-config)
|
;; packages. Set this up first.
|
||||||
(load-file font-config)))
|
|
||||||
|
|
||||||
;; Tweak garbage collection strategy.
|
|
||||||
;;guix:emacs-gcmh
|
|
||||||
(use-package gcmh
|
|
||||||
:config
|
|
||||||
(gcmh-mode 1))
|
|
||||||
|
|
||||||
;; Set default storage locations for various packages.
|
|
||||||
;;guix:emacs-no-littering
|
|
||||||
(use-package no-littering
|
(use-package no-littering
|
||||||
:config
|
:config
|
||||||
(no-littering-theme-backups))
|
(no-littering-theme-backups))
|
||||||
|
|
||||||
(use-package emacs
|
(use-package emacs
|
||||||
:custom
|
:custom
|
||||||
;; Workaround to use fish as login shell.
|
(fill-column 80)
|
||||||
(shell-file-name "/bin/sh")
|
(shell-file-name "/bin/sh") ;use POSIX-compatible shell
|
||||||
;; CJK support.
|
(word-wrap-by-category t) ;improve CJK word-wrapping
|
||||||
(word-wrap-by-category t))
|
(pixel-scroll-precision-interpolate-page t)
|
||||||
|
(show-paren-context-when-offscreen 'overlay)
|
||||||
|
:config
|
||||||
|
(setopt electric-indent-inhibit t) ;disable automatic re-indentation
|
||||||
|
:hook
|
||||||
|
(after-init . show-paren-mode)
|
||||||
|
(before-save . delete-trailing-whitespace)
|
||||||
|
(prog-mode . display-fill-column-indicator-mode))
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;;; Interface
|
;;; Guile & Guix hacking.
|
||||||
;;;
|
;;;
|
||||||
|
|
||||||
(use-package emacs
|
(use-package flycheck
|
||||||
|
:hook
|
||||||
|
(after-init . global-flycheck-mode))
|
||||||
|
|
||||||
|
(use-package flycheck-guile
|
||||||
|
:after flycheck geiser-guile)
|
||||||
|
|
||||||
|
(use-package geiser
|
||||||
|
:custom
|
||||||
|
(geiser-active-implementation '(guile))
|
||||||
|
(geiser-default-implementation 'guile)
|
||||||
|
(geiser-autodoc-identifier-format "%s → %s")
|
||||||
|
(geiser-mode-smart-tab-p t)
|
||||||
|
(geiser-mode-start-repl-p t)
|
||||||
|
(geiser-repl-query-on-kill-p nil))
|
||||||
|
|
||||||
|
(use-package geiser-guile
|
||||||
|
:after geiser
|
||||||
|
:config
|
||||||
|
(setopt geiser-guile-load-path
|
||||||
|
(let* ((cmd "echo '(write %load-path)' | guix repl -q --type=machine")
|
||||||
|
(out (nth 1 (split-string (shell-command-to-string cmd) "\n"))))
|
||||||
|
(read out))))
|
||||||
|
|
||||||
|
(use-package guix
|
||||||
|
:hook
|
||||||
|
(scheme-mode . guix-devel-mode))
|
||||||
|
|
||||||
|
(use-package info-look
|
||||||
|
:config
|
||||||
|
(info-lookup-add-help
|
||||||
|
:mode 'scheme-mode
|
||||||
|
:regexp "[^()`',\" \n]+"
|
||||||
|
:ignore-case nil
|
||||||
|
:doc-spec
|
||||||
|
(mapcar (lambda (node-name)
|
||||||
|
(list node-name nil "^[ ]+-+ [^:]+:[ ]*" "\\b"))
|
||||||
|
'("(guile)R5RS Index"
|
||||||
|
"(guix)Programming Index"
|
||||||
|
"(guile)Procedure Index"
|
||||||
|
"(guile)Variable Index"
|
||||||
|
"(r5rs)Index"
|
||||||
|
"(guile)Concept Index"
|
||||||
|
"(guix)Concept Index"))))
|
||||||
|
|
||||||
|
(use-package macrostep
|
||||||
|
:bind
|
||||||
|
((:map emacs-lisp-mode-map)
|
||||||
|
("C-c e" . macrostep-expand)))
|
||||||
|
|
||||||
|
(use-package macrostep-geiser
|
||||||
|
:after geiser
|
||||||
|
:hook
|
||||||
|
((geiser-mode geiser-repl-mode) . macrostep-geiser-setup)
|
||||||
|
:bind
|
||||||
|
((:map geiser-mode-map)
|
||||||
|
("C-c e" . macrostep-expand))
|
||||||
|
((:map geiser-repl-mode-map)
|
||||||
|
("C-c e" . macrostep-expand)))
|
||||||
|
|
||||||
|
(use-package parinfer-rust-mode
|
||||||
|
:config
|
||||||
|
;; Disable parenthesis pairing in `electric-pair-mode' when
|
||||||
|
;; `parinfer-rust-mode' is active.
|
||||||
|
(setopt electric-pair-inhibit-predicate
|
||||||
|
(lambda (char)
|
||||||
|
(or (and (bound-and-true-p parinfer-rust-mode)
|
||||||
|
(memql char '(?\( ?\[ ?\{)))
|
||||||
|
(electric-pair-default-inhibit char))))
|
||||||
|
(setopt parinfer-rust-troublesome-modes
|
||||||
|
(delq 'electric-pair-mode parinfer-rust-troublesome-modes))
|
||||||
|
;; These customizations are managed by Guix but will be overridden if using
|
||||||
|
;; `no-littering'. Reset them to standard values.
|
||||||
|
(custom-reevaluate-setting 'parinfer-rust-library-directory)
|
||||||
|
(custom-reevaluate-setting 'parinfer-rust-library)
|
||||||
|
:hook
|
||||||
|
;; XXX: Enable mode first, workaround to support `menu-find-file-existing'.
|
||||||
|
((emacs-lisp-mode lisp-mode scheme-mode) . parinfer-rust-mode-enable)
|
||||||
|
((emacs-lisp-mode lisp-mode scheme-mode) . parinfer-rust-mode))
|
||||||
|
|
||||||
|
|
||||||
|
;;;
|
||||||
|
;;; Completion.
|
||||||
|
;;;
|
||||||
|
|
||||||
|
(use-package corfu
|
||||||
|
:custom
|
||||||
|
(corfu-auto t) ;auto-complete
|
||||||
|
(corfu-auto-delay 0.3)
|
||||||
|
:hook
|
||||||
|
(after-init . global-corfu-mode))
|
||||||
|
|
||||||
|
(use-package orderless
|
||||||
|
:custom
|
||||||
|
(completion-styles '(orderless basic))
|
||||||
|
(completion-category-overrides '((file (styles basic partial-completion))))
|
||||||
|
(orderless-matching-styles '(orderless-literal orderless-flex orderless-regexp)))
|
||||||
|
|
||||||
|
(use-package vertico
|
||||||
:custom
|
:custom
|
||||||
(blink-cursor-mode nil)
|
|
||||||
(browse-url-firefox-program "librewolf")
|
|
||||||
(enable-recursive-minibuffers t)
|
|
||||||
(inhibit-splash-screen t)
|
|
||||||
(uniquify-buffer-name-style 'forward)
|
|
||||||
;; Exclude unavailable completions.
|
|
||||||
(read-extended-command-predicate 'command-completion-default-include-p)
|
|
||||||
;; Case-insensitive completion.
|
;; Case-insensitive completion.
|
||||||
(completion-ignore-case t)
|
(completion-ignore-case t)
|
||||||
(read-buffer-completion-ignore-case t)
|
(read-buffer-completion-ignore-case t)
|
||||||
(read-file-name-completion-ignore-case t)
|
(read-file-name-completion-ignore-case t)
|
||||||
|
:hook
|
||||||
|
(after-init . vertico-mode))
|
||||||
|
|
||||||
|
(use-package vertico-directory
|
||||||
|
:after vertico
|
||||||
|
:hook
|
||||||
|
;; Tidy shadowed file names.
|
||||||
|
(rfn-eshadow-update-overlay . vertico-directory-tidy)
|
||||||
:bind
|
:bind
|
||||||
([remap list-buffers] . switch-to-buffer)
|
((:map vertico-map)
|
||||||
|
("RET" . vertico-directory-enter)
|
||||||
|
("DEL" . vertico-directory-delete-char)
|
||||||
|
("M-DEL" . vertico-directory-delete-word)))
|
||||||
|
|
||||||
|
|
||||||
|
;;;
|
||||||
|
;;; Vim-like editing experience.
|
||||||
|
;;;
|
||||||
|
|
||||||
|
(use-package evil
|
||||||
|
:custom
|
||||||
|
(evil-undo-system 'undo-redo)
|
||||||
|
(evil-want-integration t)
|
||||||
|
(evil-want-keybinding nil))
|
||||||
|
|
||||||
|
(use-package evil-collection
|
||||||
|
:after evil
|
||||||
|
:config
|
||||||
|
(evil-collection-init))
|
||||||
|
|
||||||
|
|
||||||
|
;;;
|
||||||
|
;;; Enhancements to the default interface.
|
||||||
|
;;;
|
||||||
|
|
||||||
|
(use-package eldoc-box
|
||||||
:hook
|
:hook
|
||||||
(prog-mode . display-line-numbers-mode)
|
(eldoc-mode . eldoc-box-hover-mode))
|
||||||
;; Scrolling enhancement.
|
|
||||||
(after-init . pixel-scroll-precision-mode)
|
;; ElDoc integration for flycheck:
|
||||||
;; Indicatior for recursive minibuffers.
|
;; https://www.masteringemacs.org/article/seamlessly-merge-multiple-documentation-sources-eldoc
|
||||||
(after-init . minibuffer-depth-indicate-mode)
|
(use-package flycheck
|
||||||
;; Save minibuffer history.
|
:init
|
||||||
(after-init . savehist-mode)
|
(defun mp/flycheck-eldoc (callback &rest _ignored)
|
||||||
;; Indicator for `fill-column'.
|
"Print flycheck messages at point by calling CALLBACK."
|
||||||
(prog-mode . display-fill-column-indicator-mode))
|
(when-let ((flycheck-errors (and flycheck-mode (flycheck-overlay-errors-at (point)))))
|
||||||
|
(mapc (lambda (err)
|
||||||
|
(funcall callback
|
||||||
|
(format "%s: %s"
|
||||||
|
(let ((level (flycheck-error-level err)))
|
||||||
|
(pcase level
|
||||||
|
('info (propertize "I" 'face 'flycheck-error-list-info))
|
||||||
|
('error (propertize "E" 'face 'flycheck-error-list-error))
|
||||||
|
('warning (propertize "W" 'face 'flycheck-error-list-warning))
|
||||||
|
(_ level)))
|
||||||
|
(flycheck-error-message err))
|
||||||
|
:thing (or (flycheck-error-id err)
|
||||||
|
(flycheck-error-group err))
|
||||||
|
:face 'font-lock-doc-face))
|
||||||
|
flycheck-errors)))
|
||||||
|
(defun mp/flycheck-prefer-eldoc ()
|
||||||
|
(add-hook 'eldoc-documentation-functions #'mp/flycheck-eldoc nil t)
|
||||||
|
(setq eldoc-documentation-strategy 'eldoc-documentation-compose-eagerly)
|
||||||
|
(setq flycheck-display-errors-function nil)
|
||||||
|
(setq flycheck-help-echo-function nil))
|
||||||
|
:hook
|
||||||
|
(flycheck-mode . mp/flycheck-prefer-eldoc))
|
||||||
|
|
||||||
|
(use-package helpful
|
||||||
|
:bind
|
||||||
|
([remap describe-function] . helpful-callable)
|
||||||
|
([remap describe-variable] . helpful-variable)
|
||||||
|
([remap describe-key] . helpful-key)
|
||||||
|
([remap describe-command] . helpful-command)
|
||||||
|
([remap describe-symbol] . helpful-symbol)
|
||||||
|
("C-c C-d" . helpful-at-point))
|
||||||
|
|
||||||
|
(use-package isearch
|
||||||
|
:custom
|
||||||
|
(isearch-lazy-count t)
|
||||||
|
(isearch-wrap-pause 'no-ding))
|
||||||
|
|
||||||
|
(use-package mwim
|
||||||
|
:bind
|
||||||
|
([remap move-beginning-of-line] . mwim-beginning)
|
||||||
|
([remap move-end-of-line] . mwim-end))
|
||||||
|
|
||||||
|
(use-package which-key
|
||||||
|
:config
|
||||||
|
(which-key-setup-side-window-right-bottom))
|
||||||
|
|
||||||
|
|
||||||
|
;;;
|
||||||
|
;;; Theming.
|
||||||
|
;;;
|
||||||
|
|
||||||
;; Theming
|
|
||||||
(use-package emacs
|
(use-package emacs
|
||||||
:custom
|
|
||||||
(fringe-mode 0)
|
|
||||||
(modus-themes-italic-constructs t)
|
|
||||||
(scroll-bar-mode nil)
|
|
||||||
(tool-bar-mode nil)
|
|
||||||
(tooltip-mode nil)
|
|
||||||
:config
|
:config
|
||||||
(load-theme 'modus-operandi-tinted :no-confirm)
|
(load-theme 'modus-operandi-tinted :no-confirm))
|
||||||
:hook
|
|
||||||
(after-init . menu-bar-mode))
|
|
||||||
|
|
||||||
;;guix:emacs-corfu
|
|
||||||
(use-package corfu
|
|
||||||
:custom
|
|
||||||
;; Auto-completion.
|
|
||||||
(corfu-auto t)
|
|
||||||
(corfu-auto-delay 0.3)
|
|
||||||
:config
|
|
||||||
;; Free the `RET' key for less intrusive behavior.
|
|
||||||
(keymap-unset corfu-map "RET")
|
|
||||||
:hook
|
|
||||||
(after-init . global-corfu-mode))
|
|
||||||
|
|
||||||
;;guix:emacs-doom-modeline
|
|
||||||
(use-package doom-modeline
|
(use-package doom-modeline
|
||||||
:custom
|
:custom
|
||||||
(doom-modeline-icon nil)
|
(doom-modeline-icon nil)
|
||||||
@@ -95,220 +241,131 @@
|
|||||||
:hook
|
:hook
|
||||||
(after-init . doom-modeline-mode))
|
(after-init . doom-modeline-mode))
|
||||||
|
|
||||||
;;guix:emacs-helpful
|
|
||||||
(use-package helpful
|
|
||||||
:bind
|
|
||||||
(([remap describe-function] . helpful-callable)
|
|
||||||
([remap describe-variable] . helpful-variable)
|
|
||||||
([remap describe-key] . helpful-key)
|
|
||||||
([remap describe-command] . helpful-command)
|
|
||||||
([remap describe-symbol] . helpful-symbol)
|
|
||||||
("C-c C-d" . helpful-at-point)))
|
|
||||||
|
|
||||||
;;guix:emacs-hl-todo
|
|
||||||
(use-package hl-todo
|
|
||||||
:custom
|
|
||||||
(hl-todo-highlight-punctuation ":")
|
|
||||||
:hook
|
|
||||||
(prog-mode . hl-todo-mode))
|
|
||||||
|
|
||||||
(use-package isearch
|
|
||||||
:custom
|
|
||||||
(isearch-lazy-count t)
|
|
||||||
(isearch-wrap-pause 'no-ding)
|
|
||||||
(regexp-search-ring-max 200)
|
|
||||||
(search-ring-max 200))
|
|
||||||
|
|
||||||
;;guix:emacs-mwim
|
|
||||||
(use-package mwim
|
|
||||||
:bind
|
|
||||||
(([remap move-beginning-of-line] . mwim-beginning)
|
|
||||||
([remap move-end-of-line] . mwim-end)))
|
|
||||||
|
|
||||||
;;guix:emacs-orderless
|
|
||||||
(use-package orderless
|
|
||||||
:custom
|
|
||||||
(completion-styles '(orderless basic))
|
|
||||||
(completion-category-overrides '((file (styles basic partial-completion))))
|
|
||||||
(orderless-matching-styles '(orderless-literal orderless-flex orderless-regexp)))
|
|
||||||
|
|
||||||
(use-package paren
|
|
||||||
:custom
|
|
||||||
(show-paren-context-when-offscreen 'overlay)
|
|
||||||
:hook
|
|
||||||
(after-init . show-paren-mode))
|
|
||||||
|
|
||||||
;;guix:emacs-rainbow-delimiters
|
|
||||||
(use-package rainbow-delimiters
|
|
||||||
:hook
|
|
||||||
(prog-mode . rainbow-delimiters-mode))
|
|
||||||
|
|
||||||
;;guix:emacs-vertico
|
|
||||||
(use-package vertico
|
|
||||||
:hook
|
|
||||||
(after-init . vertico-mode))
|
|
||||||
|
|
||||||
(use-package vertico-directory
|
|
||||||
:after (vertico)
|
|
||||||
:bind
|
|
||||||
(:map vertico-map
|
|
||||||
("RET" . vertico-directory-enter)
|
|
||||||
("DEL" . vertico-directory-delete-char)
|
|
||||||
("M-DEL" . vertico-directory-delete-word))
|
|
||||||
:hook
|
|
||||||
(rfn-eshadow-update-overlay . vertico-directory-tidy))
|
|
||||||
|
|
||||||
(use-package which-key
|
|
||||||
:config
|
|
||||||
(which-key-setup-side-window-right-bottom)
|
|
||||||
:hook
|
|
||||||
(after-init . which-key-mode))
|
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;;; Editing
|
;;; User options for newcomers.
|
||||||
|
;;; https://cgit.git.savannah.gnu.org/cgit/emacs.git/tree/etc/themes/newcomers-presets-theme.el
|
||||||
|
;;; https://github.com/emacs-mirror/emacs/blob/master/etc/themes/newcomers-presets-theme.el
|
||||||
;;;
|
;;;
|
||||||
|
|
||||||
(use-package emacs
|
(use-package emacs
|
||||||
:custom
|
:custom
|
||||||
;; Disable tab indentation.
|
;; Appearance-related options
|
||||||
|
(font-use-system-font t)
|
||||||
|
(frame-resize-pixelwise t)
|
||||||
|
(window-resize-pixelwise t)
|
||||||
|
(mode-line-compact 'long)
|
||||||
|
;; Mouse-related options
|
||||||
|
(context-menu-mode t)
|
||||||
|
(save-interprogram-paste-before-kill t)
|
||||||
|
(mouse-yank-at-point t)
|
||||||
|
(pixel-scroll-mode t)
|
||||||
|
(pixel-scroll-precision-mode t) ;; see bug#69972
|
||||||
|
(mouse-drag-and-drop-region t)
|
||||||
|
(mouse-drag-and-drop-region-cross-program t)
|
||||||
|
(mouse-drag-mode-line-buffer t)
|
||||||
|
(global-xref-mouse-mode t)
|
||||||
|
;; Persistence-related options
|
||||||
|
(savehist-mode t)
|
||||||
|
(save-place-mode t)
|
||||||
|
(recentf-mode t)
|
||||||
|
;; Editing-related options
|
||||||
|
(electric-pair-mode t)
|
||||||
|
(repeat-mode t)
|
||||||
|
(delete-selection-mode t)
|
||||||
|
(editorconfig-mode t)
|
||||||
(indent-tabs-mode nil)
|
(indent-tabs-mode nil)
|
||||||
:config
|
(imenu-auto-rescan t)
|
||||||
;; Avoid re-indenting current line after entering `RET'.
|
(view-read-only t)
|
||||||
(setopt electric-indent-inhibit t)
|
(column-number-mode t)
|
||||||
|
;; Directory managment-related options
|
||||||
|
(dired-auto-revert-buffer t)
|
||||||
|
(dired-mouse-drag-files t)
|
||||||
|
(shell-command-prompt-show-cwd t)
|
||||||
|
;; File-related options
|
||||||
|
;; (etags-regen-mode t)
|
||||||
|
(vc-auto-revert-mode t)
|
||||||
|
(vc-deduce-backend-nonvc-modes t)
|
||||||
|
(vc-dir-save-some-buffers-on-revert t)
|
||||||
|
(vc-find-revision-no-save t)
|
||||||
|
(vc-follow-symlinks t)
|
||||||
|
(vc-use-incoming-outgoing-prefixes t)
|
||||||
|
;; Completion-related options
|
||||||
|
(minibuffer-visible-completions t)
|
||||||
|
(completions-detailed t)
|
||||||
|
(completions-group t)
|
||||||
|
(completion-auto-select 'second-tab)
|
||||||
|
(completion-eager-update t)
|
||||||
|
;; (completion-styles '(basic emacs22 flex))
|
||||||
|
;; (global-completion-preview-mode t)
|
||||||
|
(tab-always-indent 'complete)
|
||||||
|
(which-key-mode t)
|
||||||
|
;; Package-related options
|
||||||
|
(package-autosuggest-mode t)
|
||||||
|
(package-menu-use-current-if-no-marks nil)
|
||||||
|
;; Frame- and window-related options
|
||||||
|
(frame-inhibit-implied-resize t)
|
||||||
|
(tab-bar-history-mode t)
|
||||||
|
(tab-bar-show t)
|
||||||
|
;; Programming-related options
|
||||||
|
(compilation-scroll-output 'first-error)
|
||||||
:hook
|
:hook
|
||||||
(before-save . delete-trailing-whitespace)
|
(prog-mode . display-line-numbers-mode)
|
||||||
;; Use Ctrl-C/X/Z for copy, cut, paste.
|
;; (prog-mode . flymake-mode)
|
||||||
(after-init . cua-mode)
|
;; (prog-mode . flyspell-prog-mode)
|
||||||
;; Automatic parenthesis pairing.
|
(text-mode . display-line-numbers-mode))
|
||||||
(after-init . electric-pair-mode))
|
;; (text-mode . flyspell-mode))
|
||||||
|
|
||||||
;; Check syntax on the fly.
|
|
||||||
;;guix:emacs-flycheck
|
|
||||||
(use-package flycheck
|
|
||||||
:hook
|
|
||||||
(after-init . global-flycheck-mode))
|
|
||||||
|
|
||||||
;;guix:emacs-flycheck-guile
|
|
||||||
(use-package flycheck-guile
|
|
||||||
:after (flycheck geiser-guile))
|
|
||||||
|
|
||||||
;;guix:emacs-geiser
|
|
||||||
(use-package geiser
|
|
||||||
:custom
|
|
||||||
(geiser-autodoc-identifier-format "%s → %s")
|
|
||||||
(geiser-mode-smart-tab-p t)
|
|
||||||
(geiser-mode-start-repl-p t)
|
|
||||||
(geiser-repl-query-on-kill-p nil)
|
|
||||||
:init
|
|
||||||
;; Context menu on right click.
|
|
||||||
;; Taken from guile-studio: https://elephly.net/guile-studio/
|
|
||||||
(defun context-menu ()
|
|
||||||
(let ((menu (make-sparse-keymap)))
|
|
||||||
(pcase major-mode
|
|
||||||
('scheme-mode
|
|
||||||
(define-key menu (vector 'switch-to-repl)
|
|
||||||
'("Switch to REPL" . geiser-repl-switch))
|
|
||||||
(define-key menu (vector 'eval-buffer)
|
|
||||||
'("Evaluate buffer" . geiser-eval-buffer))
|
|
||||||
(define-key menu (vector 'lookup-documentation)
|
|
||||||
'("Show documentation". geiser-doc-symbol-at-point))
|
|
||||||
menu)
|
|
||||||
(_
|
|
||||||
(mouse-menu-major-mode-map)))))
|
|
||||||
:bind
|
|
||||||
([mouse-3] . (lambda (event)
|
|
||||||
(interactive "e")
|
|
||||||
(mouse-set-point event)
|
|
||||||
(popup-menu (context-menu)))))
|
|
||||||
|
|
||||||
;;guix:emacs-geiser-guile
|
|
||||||
(use-package geiser-guile
|
|
||||||
:after (geiser)
|
|
||||||
:custom
|
|
||||||
(geiser-active-implementation '(guile))
|
|
||||||
(geiser-default-implementation 'guile)
|
|
||||||
:config
|
|
||||||
;; TODO: Make `flycheck-guile' support `guix repl'.
|
|
||||||
(dolist (path
|
|
||||||
(mapcar
|
|
||||||
#'expand-file-name
|
|
||||||
'("~/.config/guix/current/lib/guile/3.0/site-ccache"
|
|
||||||
"~/.config/guix/current/share/guile/site/3.0"
|
|
||||||
"~/.guix-profile/lib/guile/3.0/site-ccache"
|
|
||||||
"~/.guix-profile/share/guile/site/3.0"
|
|
||||||
"~/.guix-home/profile/lib/guile/3.0/site-ccache"
|
|
||||||
"~/.guix-home/profile/share/guile/site/3.0"
|
|
||||||
"/run/current-system/profile/lib/guile/3.0/site-ccache"
|
|
||||||
"/run/current-system/profile/share/guile/site/3.0")))
|
|
||||||
(add-to-list 'geiser-guile-load-path path t)))
|
|
||||||
|
|
||||||
;;guix:emacs-macrostep
|
|
||||||
(use-package macrostep
|
|
||||||
:bind
|
|
||||||
("C-c e" . macrostep-expand))
|
|
||||||
|
|
||||||
;;guix:emacs-puni
|
|
||||||
(use-package puni
|
|
||||||
:hook
|
|
||||||
((eval-expression-minibuffer-setup nxml-mode prog-mode sgml-mode tex-mode)
|
|
||||||
. puni-mode))
|
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;;; Miscellaneous
|
;;; Font configuration with proper CJK support. Based on
|
||||||
|
;;; https://github.com/nykma/nema/blob/develop/my-sample/font.el
|
||||||
;;;
|
;;;
|
||||||
|
|
||||||
;;guix:emacs-daemons
|
(use-package emacs
|
||||||
(use-package daemons
|
|
||||||
:custom
|
|
||||||
(daemons-list-fill-frame t))
|
|
||||||
|
|
||||||
(use-package dired
|
|
||||||
:custom
|
|
||||||
(dired-listing-switches
|
|
||||||
"-lv --all --group-directories-first --human-readable")
|
|
||||||
:bind
|
|
||||||
([remap list-directory] . dired))
|
|
||||||
|
|
||||||
(use-package dired-aux
|
|
||||||
:custom
|
|
||||||
(dired-compress-directory-default-suffix ".tar.zst")
|
|
||||||
(dired-create-destination-dirs 'ask)
|
|
||||||
(dired-create-destination-dirs-on-trailing-dirsep t)
|
|
||||||
(dired-vc-rename-file t))
|
|
||||||
|
|
||||||
;;guix:emacs-envrc
|
|
||||||
(use-package envrc
|
|
||||||
:hook
|
|
||||||
(after-init . envrc-global-mode))
|
|
||||||
|
|
||||||
;;guix:emacs-magit
|
|
||||||
(use-package magit
|
|
||||||
:custom
|
|
||||||
(git-commit-cd-to-toplevel t))
|
|
||||||
|
|
||||||
(use-package project
|
|
||||||
:config
|
:config
|
||||||
(add-to-list 'project-switch-commands '(magit-project-status "Magit") t)
|
(defun hako/load-font ()
|
||||||
:bind
|
(let* ((size 16)
|
||||||
(:map project-prefix-map
|
(mono (font-spec :family "Victor Mono" :size size))
|
||||||
("m" . magit-project-status)))
|
(modeline (font-spec :family "Source Serif 4" :size size))
|
||||||
|
(cjk (font-spec :family "Sarasa Mono CL" :size size))
|
||||||
|
(symbol (font-spec :family "Noto Color Emoji" :size size))
|
||||||
|
(emoji (font-spec :family "Noto Color Emoji" :size size)))
|
||||||
|
(when (display-graphic-p)
|
||||||
|
(set-face-attribute 'default nil :font mono)
|
||||||
|
(set-face-attribute 'mode-line nil :font modeline)
|
||||||
|
(set-face-attribute 'mode-line-active nil :font modeline)
|
||||||
|
(set-face-attribute 'mode-line-inactive nil :font modeline)
|
||||||
|
(let ((font (frame-parameter nil 'font)))
|
||||||
|
(dolist (charset '(kana han hangul cjk-misc bopomofo))
|
||||||
|
(set-fontset-font font charset cjk))
|
||||||
|
(set-fontset-font font 'symbol symbol nil 'append)
|
||||||
|
(set-fontset-font font 'emoji emoji nil 'append)))))
|
||||||
|
|
||||||
;;guix:emacs-forge
|
(if (daemonp)
|
||||||
(use-package forge
|
(add-hook 'server-after-make-frame-hook #'hako/load-font)
|
||||||
:after (magit))
|
(add-hook 'after-init-hook #'hako/load-font)))
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;;; Set up initial screen.
|
;;; Set up a ready-to-use geiser REPL.
|
||||||
;;;
|
;;;
|
||||||
|
|
||||||
(progn
|
(progn
|
||||||
(setopt initial-scratch-message
|
|
||||||
";;; Type your Guile program here and evaluate it.\n\n")
|
|
||||||
(scheme-mode)
|
(scheme-mode)
|
||||||
(geiser-repl-import-module "(rosenthal)")
|
(dolist (module
|
||||||
(geiser-repl-import-module "(nonguix transformations)")
|
'("(guix)"
|
||||||
(delete-window)
|
"(gnu)"
|
||||||
(display-splash-screen))
|
"(gnu services cups)"
|
||||||
|
"(gnu services desktop)"
|
||||||
|
"(gnu services guix)"
|
||||||
|
"(gnu services networking)"
|
||||||
|
"(gnu services shepherd)"
|
||||||
|
"(gnu services ssh)"
|
||||||
|
"(gnu services xorg)"
|
||||||
|
"(gnu home)"
|
||||||
|
"(gnu home services)"
|
||||||
|
"(gnu home services desktop)"
|
||||||
|
"(gnu home services shepherd)"))
|
||||||
|
(geiser-repl-import-module module))
|
||||||
|
(delete-window))
|
||||||
Executable
+13
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
TOP_DIR="$(dirname "$(realpath "$0")")"
|
||||||
|
|
||||||
|
# Install packages.
|
||||||
|
guix repl -- "$TOP_DIR/packages"
|
||||||
|
|
||||||
|
# Install configuration file.
|
||||||
|
if [ ! -f ~/.config/emacs/init.el ]
|
||||||
|
then
|
||||||
|
install -D -mode=0644 --target-directory="$HOME/.config/emacs" "$TOP_DIR/init.el"
|
||||||
|
fi
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
(use-modules (ice-9 match)
|
||||||
|
(guix packages)
|
||||||
|
(guix scripts install)
|
||||||
|
(gnu packages))
|
||||||
|
|
||||||
|
(define emacs-packages
|
||||||
|
(map specification->package
|
||||||
|
(list "bash" ;Required when using in `guix shell --container'.
|
||||||
|
(if (getenv "WAYLAND_DISPLAY")
|
||||||
|
"emacs-pgtk"
|
||||||
|
"emacs")
|
||||||
|
"emacs-no-littering"
|
||||||
|
;; Guile & Guix hacking.
|
||||||
|
"emacs-flycheck"
|
||||||
|
"emacs-flycheck-guile"
|
||||||
|
"emacs-geiser"
|
||||||
|
"emacs-geiser-guile"
|
||||||
|
"emacs-guix"
|
||||||
|
"emacs-macrostep"
|
||||||
|
"emacs-macrostep-geiser"
|
||||||
|
"emacs-parinfer-rust-mode"
|
||||||
|
;; Completion.
|
||||||
|
"emacs-corfu"
|
||||||
|
"emacs-orderless"
|
||||||
|
"emacs-vertico"
|
||||||
|
;; Vim-like editing experience.
|
||||||
|
"emacs-evil"
|
||||||
|
"emacs-evil-collection"
|
||||||
|
"emacs-goto-chg" ;dependency of emacs-evil
|
||||||
|
;; Enhancements to the default interface.
|
||||||
|
"emacs-eldoc-box"
|
||||||
|
"emacs-helpful"
|
||||||
|
"emacs-mwim"
|
||||||
|
;; Theming.
|
||||||
|
"emacs-doom-modeline"
|
||||||
|
;; Fonts.
|
||||||
|
"font-adobe-source-serif"
|
||||||
|
"font-google-noto-emoji"
|
||||||
|
"font-sarasa-gothic"
|
||||||
|
"font-victor-mono"
|
||||||
|
"fontconfig"
|
||||||
|
;; Other useful packages.
|
||||||
|
"emacs-magit")))
|
||||||
|
|
||||||
|
(match (command-line)
|
||||||
|
;; guix repl -- <this-file>
|
||||||
|
((_this-file)
|
||||||
|
(apply guix-install
|
||||||
|
(map package-name
|
||||||
|
emacs-packages)))
|
||||||
|
;; guix shell -f <this-file>, or other use cases.
|
||||||
|
(_
|
||||||
|
emacs-packages))
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
;;; -*- mode: scheme -*-
|
||||||
|
|
||||||
|
;; info "(guix) Channels"
|
||||||
|
;; https://guix.gnu.org/manual/devel/en/html_node/Channels.html
|
||||||
|
|
||||||
|
(list (channel
|
||||||
|
(inherit %default-guix-channel)
|
||||||
|
(name 'guix)
|
||||||
|
(url "https://git.guix.gnu.org/guix.git"))
|
||||||
|
|
||||||
|
(channel
|
||||||
|
(name 'nonguix)
|
||||||
|
(url "https://gitlab.com/nonguix/nonguix")
|
||||||
|
(introduction
|
||||||
|
(make-channel-introduction
|
||||||
|
"897c1a470da759236cc11798f4e0a5f7d4d59fbc"
|
||||||
|
(openpgp-fingerprint
|
||||||
|
"2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5"))))
|
||||||
|
|
||||||
|
(channel
|
||||||
|
(name 'rosenthal)
|
||||||
|
(url "https://codeberg.org/hako/rosenthal.git")
|
||||||
|
(branch "trunk")
|
||||||
|
(introduction
|
||||||
|
(make-channel-introduction
|
||||||
|
"7677db76330121a901604dfbad19077893865f35"
|
||||||
|
(openpgp-fingerprint
|
||||||
|
"13E7 6CD6 E649 C28C 3385 4DF5 5E5A A665 6149 17F7")))))
|
||||||
@@ -0,0 +1,191 @@
|
|||||||
|
;;; -*- mode: scheme -*-
|
||||||
|
|
||||||
|
(use-modules (gnu)
|
||||||
|
(nonguix)
|
||||||
|
(rosenthal)
|
||||||
|
(rosenthal services keyboard)
|
||||||
|
(rosenthal services shellutils)
|
||||||
|
(gnu home services fontutils)
|
||||||
|
(gnu home services shells)
|
||||||
|
(gnu packages fcitx5)
|
||||||
|
(gnu packages gnome-xyz)
|
||||||
|
(gnu packages shells))
|
||||||
|
|
||||||
|
(define %my-keyboard-layout
|
||||||
|
(keyboard-layout "us"))
|
||||||
|
|
||||||
|
(define %my-user
|
||||||
|
(user-account
|
||||||
|
(name "alice")
|
||||||
|
;; Initial password: test
|
||||||
|
;; Change your password via `passwd' after logged in.
|
||||||
|
(password (crypt "test" "$6$abc"))
|
||||||
|
(group "users")
|
||||||
|
(supplementary-groups '("wheel" "audio" "video"))
|
||||||
|
(shell (file-append fish "/bin/fish"))))
|
||||||
|
|
||||||
|
(define %my-home
|
||||||
|
(home-environment
|
||||||
|
(packages (specifications->packages
|
||||||
|
'(;; 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"
|
||||||
|
"thunar-archive-plugin"
|
||||||
|
"thunar-media-tags-plugin"
|
||||||
|
"thunar-volman"
|
||||||
|
"tumbler"
|
||||||
|
|
||||||
|
;; Web browser.
|
||||||
|
"librewolf"
|
||||||
|
"ublock-origin-icecat"
|
||||||
|
|
||||||
|
;; Text editors, see also `%rosenthal-skeletons'.
|
||||||
|
"emacs-pgtk"
|
||||||
|
"neovim"
|
||||||
|
|
||||||
|
"emacs-no-littering"
|
||||||
|
;; Enhancements to the default interface.
|
||||||
|
"emacs-helpful"
|
||||||
|
"emacs-mwim"
|
||||||
|
;; Completion.
|
||||||
|
"emacs-corfu"
|
||||||
|
"emacs-orderless"
|
||||||
|
"emacs-vertico"
|
||||||
|
;; Guile hacking.
|
||||||
|
"emacs-flycheck"
|
||||||
|
"emacs-flycheck-guile"
|
||||||
|
"emacs-geiser"
|
||||||
|
"emacs-geiser-guile"
|
||||||
|
"emacs-parinfer-rust-mode"
|
||||||
|
;; Theming.
|
||||||
|
"emacs-doom-modeline"
|
||||||
|
;; Fonts.
|
||||||
|
"font-adobe-source-serif"
|
||||||
|
"font-google-noto-emoji"
|
||||||
|
"font-sarasa-gothic"
|
||||||
|
"font-victor-mono"
|
||||||
|
"fontconfig"
|
||||||
|
;; Other useful packages.
|
||||||
|
"emacs-edit-indirect"
|
||||||
|
"emacs-evil"
|
||||||
|
"emacs-guix"
|
||||||
|
"emacs-magit"
|
||||||
|
"emacs-markdown-mode"
|
||||||
|
|
||||||
|
;; Fonts.
|
||||||
|
"font-adobe-source-serif"
|
||||||
|
"font-google-noto"
|
||||||
|
"font-google-noto-emoji"
|
||||||
|
"font-nerd-symbols"
|
||||||
|
"font-sarasa-gothic"
|
||||||
|
"font-victor-mono")))
|
||||||
|
(services
|
||||||
|
(cons* (service home-fish-service-type)
|
||||||
|
(service home-keyboard-service-type %my-keyboard-layout)
|
||||||
|
|
||||||
|
(service home-noctalia-shell-service-type)
|
||||||
|
(service home-polkit-gnome-service-type)
|
||||||
|
|
||||||
|
;; Default cursor theme.
|
||||||
|
(service home-theme-service-type
|
||||||
|
(home-theme-configuration
|
||||||
|
(packages (list qogir-icon-theme))
|
||||||
|
(icon-theme "Qogir")
|
||||||
|
(cursor-theme "Qogir")))
|
||||||
|
|
||||||
|
;; Input method.
|
||||||
|
(service home-fcitx5-service-type
|
||||||
|
(home-fcitx5-configuration
|
||||||
|
(gtk-im-module? #t)
|
||||||
|
(qt-im-module? #t)
|
||||||
|
(themes
|
||||||
|
(list fcitx5-material-color-theme))
|
||||||
|
(input-method-editors
|
||||||
|
(list fcitx5-anthy
|
||||||
|
fcitx5-chewing
|
||||||
|
fcitx5-chinese-addons
|
||||||
|
fcitx5-hangul
|
||||||
|
fcitx5-rime
|
||||||
|
fcitx5-skk
|
||||||
|
fcitx5-unikey))))
|
||||||
|
|
||||||
|
%rosenthal-desktop-home-services))))
|
||||||
|
|
||||||
|
(define %my-os
|
||||||
|
(operating-system
|
||||||
|
(host-name "antelope")
|
||||||
|
(timezone "Europe/Paris")
|
||||||
|
(locale "en_US.utf8")
|
||||||
|
(keyboard-layout %my-keyboard-layout)
|
||||||
|
|
||||||
|
(kernel linux)
|
||||||
|
(firmware (cons* linux-firmware %base-firmware))
|
||||||
|
|
||||||
|
;; Use the UEFI variant of GRUB with the EFI System
|
||||||
|
;; Partition mounted on /boot/efi.
|
||||||
|
(bootloader
|
||||||
|
(bootloader-configuration
|
||||||
|
(bootloader grub-efi-bootloader)
|
||||||
|
(targets '("/boot/efi"))
|
||||||
|
(keyboard-layout %my-keyboard-layout)))
|
||||||
|
|
||||||
|
;; Assume the target root file system is labelled "my-root",
|
||||||
|
;; and the EFI System Partition has UUID 1234-ABCD.
|
||||||
|
(file-systems
|
||||||
|
(cons* (file-system
|
||||||
|
(device (file-system-label "my-root"))
|
||||||
|
(mount-point "/")
|
||||||
|
(type "ext4"))
|
||||||
|
(file-system
|
||||||
|
(device (uuid "1234-ABCD" 'fat))
|
||||||
|
(mount-point "/boot/efi")
|
||||||
|
(type "vfat"))
|
||||||
|
%base-file-systems))
|
||||||
|
|
||||||
|
(skeletons %rosenthal-skeletons)
|
||||||
|
|
||||||
|
(users
|
||||||
|
(cons* %my-user
|
||||||
|
(user-account
|
||||||
|
(inherit %root-account)
|
||||||
|
;; Don't initialize password for root.
|
||||||
|
(password #f))
|
||||||
|
%base-user-accounts))
|
||||||
|
|
||||||
|
(packages
|
||||||
|
(append (specifications->packages
|
||||||
|
'(;; CLI utilities.
|
||||||
|
"curl"
|
||||||
|
"file"
|
||||||
|
"git"
|
||||||
|
"gnupg"
|
||||||
|
"mosh"
|
||||||
|
"rsync"
|
||||||
|
"unzip"
|
||||||
|
;; Provide Wayland session for the login manager.
|
||||||
|
"niri"))
|
||||||
|
%base-packages))
|
||||||
|
|
||||||
|
(services
|
||||||
|
(cons* (service guix-home-service-type
|
||||||
|
`((,(user-account-name %my-user) ,%my-home)))
|
||||||
|
|
||||||
|
%rosenthal-desktop-services/tuigreet))))
|
||||||
|
|
||||||
|
((compose
|
||||||
|
;; (nonguix-transformation-nvidia)
|
||||||
|
(nonguix-transformation-guix)
|
||||||
|
(rosenthal-transformation-guix))
|
||||||
|
%my-os)
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
# SPDX-FileCopyrightText: 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
|
||||||
|
|
||||||
font=monospace 11
|
|
||||||
text-color=#13181B
|
|
||||||
background-color=#D2DEE9E0
|
|
||||||
border-size=1
|
|
||||||
border-color=#B3C6D3
|
|
||||||
border-radius=5
|
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
// -*- mode: jsonc -*-
|
|
||||||
// SPDX-FileCopyrightText: 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
//
|
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
|
||||||
|
|
||||||
{
|
|
||||||
"layer": "top",
|
|
||||||
"height": 36,
|
|
||||||
"spacing": 5,
|
|
||||||
"modules-left": [
|
|
||||||
"temperature",
|
|
||||||
"cpu",
|
|
||||||
"memory",
|
|
||||||
"wlr/taskbar",
|
|
||||||
],
|
|
||||||
"modules-center": [
|
|
||||||
"clock",
|
|
||||||
],
|
|
||||||
"modules-right": [
|
|
||||||
"tray",
|
|
||||||
"wireplumber",
|
|
||||||
"backlight",
|
|
||||||
"battery",
|
|
||||||
],
|
|
||||||
// left
|
|
||||||
"temperature": {
|
|
||||||
"critical-threshold": 80,
|
|
||||||
"format": "{temperatureC}\u00B0C",
|
|
||||||
"interval": 2,
|
|
||||||
"tooltip": false,
|
|
||||||
},
|
|
||||||
"cpu": {
|
|
||||||
"format": "CPU {usage}%",
|
|
||||||
"states": {
|
|
||||||
"full": 90,
|
|
||||||
},
|
|
||||||
"interval": 2,
|
|
||||||
},
|
|
||||||
"memory": {
|
|
||||||
"format": "RAM {percentage}%",
|
|
||||||
"states": {
|
|
||||||
"full": 90,
|
|
||||||
},
|
|
||||||
"interval": 2,
|
|
||||||
},
|
|
||||||
"wlr/taskbar": {
|
|
||||||
"format": "{icon}",
|
|
||||||
"icon-size": 16,
|
|
||||||
"tooltip-format": "{title}",
|
|
||||||
"on-click": "activate",
|
|
||||||
"on-click-middle": "close",
|
|
||||||
},
|
|
||||||
// center
|
|
||||||
"clock": {
|
|
||||||
"format": "{:%A, %B %d, %Y (%R)}",
|
|
||||||
"tooltip-format": "<tt><small>{calendar}</small></tt>",
|
|
||||||
"calendar": {
|
|
||||||
"mode" : "year",
|
|
||||||
"mode-mon-col" : 3,
|
|
||||||
"weeks-pos" : "right",
|
|
||||||
"on-scroll" : 1,
|
|
||||||
"format": {
|
|
||||||
"months": "<span color='#FFEAD3'><b>{}</b></span>",
|
|
||||||
"days": "<span color='#ECC6D9'><b>{}</b></span>",
|
|
||||||
"weeks": "<span color='#99FFDD'><b>W{}</b></span>",
|
|
||||||
"weekdays": "<span color='#FFCC66'><b>{}</b></span>",
|
|
||||||
"today": "<span color='#FF6699'><b><u>{}</u></b></span>",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"actions": {
|
|
||||||
"on-click-right": "mode",
|
|
||||||
"on-scroll-up": "tz_up",
|
|
||||||
"on-scroll-down": "tz_down",
|
|
||||||
"on-scroll-up": "shift_up",
|
|
||||||
"on-scroll-down": "shift_down",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// right
|
|
||||||
"tray": {
|
|
||||||
"spacing": 10,
|
|
||||||
},
|
|
||||||
"wireplumber": {
|
|
||||||
"scroll-step": 5,
|
|
||||||
"format": "{icon} {volume}%",
|
|
||||||
"format-icons": ["\uF026", "\uF027", "\uF028"],
|
|
||||||
"format-muted": "Muted {volume}%",
|
|
||||||
"on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
|
|
||||||
"on-click-right": "pavucontrol",
|
|
||||||
},
|
|
||||||
"backlight": {
|
|
||||||
"on-scroll-down": "light -U 5",
|
|
||||||
"on-scroll-up": "light -A 5",
|
|
||||||
"format": "{icon} {percent}%",
|
|
||||||
"format-icons": ["\uF186", "\uF0EB"],
|
|
||||||
"tooltip": false,
|
|
||||||
},
|
|
||||||
"battery": {
|
|
||||||
"interval": 60,
|
|
||||||
"states": {
|
|
||||||
"warning": 30,
|
|
||||||
"critical": 15,
|
|
||||||
},
|
|
||||||
"format": "{icon} {capacity}%",
|
|
||||||
"format-icons": ["\uF244", "\uF243", "\uF242", "\uF241", "\uF240"],
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,139 +0,0 @@
|
|||||||
/* SPDX-FileCopyrightText: 2025 Hilton Chain <hako@ultrarare.space> */
|
|
||||||
/* SPDX-License-Identifier: CC0-1.0 */
|
|
||||||
|
|
||||||
@define-color bg1 #D2DEE9;
|
|
||||||
@define-color bg2 #13181B;
|
|
||||||
|
|
||||||
@define-color red #EC7875;
|
|
||||||
@define-color green #A3BE8C;
|
|
||||||
|
|
||||||
/* Execute ‘guix shell python-pywal imagemagick -- wal -nstei <image>’, */
|
|
||||||
/* then select colors from ‘~/.cache/wal/colors-waybar.css’. */
|
|
||||||
@define-color color0 #AFB5AE;
|
|
||||||
@define-color color1 #A7BAC9;
|
|
||||||
@define-color color2 #B3C6D3;
|
|
||||||
@define-color color3 #DBEDF3;
|
|
||||||
@define-color color4 #A7BAC9;
|
|
||||||
@define-color color5 #C2C2B5;
|
|
||||||
@define-color color6 #939BA3;
|
|
||||||
|
|
||||||
* {
|
|
||||||
font-size: 1.2rem;
|
|
||||||
background-color: transparent;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
window {
|
|
||||||
color: @bg2;
|
|
||||||
}
|
|
||||||
|
|
||||||
tooltip {
|
|
||||||
background-color: @bg2;
|
|
||||||
border: 1px solid @bg2;
|
|
||||||
}
|
|
||||||
|
|
||||||
tooltip label {
|
|
||||||
color: @bg1;
|
|
||||||
text-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modules-right {
|
|
||||||
margin: 10px 10px 0 0;
|
|
||||||
}
|
|
||||||
.modules-center {
|
|
||||||
margin: 10px 0 0 0;
|
|
||||||
}
|
|
||||||
.modules-left {
|
|
||||||
margin: 10px 0 0 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#temperature,
|
|
||||||
#cpu,
|
|
||||||
#memory,
|
|
||||||
#clock,
|
|
||||||
#tray,
|
|
||||||
#wireplumber,
|
|
||||||
#backlight,
|
|
||||||
#battery {
|
|
||||||
padding: 0 10px;
|
|
||||||
background-color: @bg1;
|
|
||||||
opacity: 0.95;
|
|
||||||
}
|
|
||||||
|
|
||||||
#taskbar {
|
|
||||||
color: @bg2;
|
|
||||||
background-color: @bg1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#taskbar.empty {
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
#taskbar button {
|
|
||||||
/* https://github.com/Alexays/Waybar/issues/3334 */
|
|
||||||
padding: 0;
|
|
||||||
padding-left: 5px;
|
|
||||||
padding-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tray menu {
|
|
||||||
color: @bg2;
|
|
||||||
background-color: @bg1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tray menu menuitem:hover {
|
|
||||||
color: @bg1;
|
|
||||||
background-color: @bg2;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tray > .passive {
|
|
||||||
-gtk-icon-effect: dim;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tray > .needs-attention {
|
|
||||||
-gtk-icon-effect: highlight;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tray {
|
|
||||||
background-color: @bg2;
|
|
||||||
}
|
|
||||||
|
|
||||||
#cpu.full,
|
|
||||||
#memory.full,
|
|
||||||
#temperature.critical,
|
|
||||||
#wireplumber.muted,
|
|
||||||
#battery.warning, #battery.critical {
|
|
||||||
background-color: @red;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery.charging, #battery.plugged {
|
|
||||||
background-color: @green;
|
|
||||||
}
|
|
||||||
|
|
||||||
#temperature {
|
|
||||||
background-color: @color0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#cpu {
|
|
||||||
background-color: @color1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#memory {
|
|
||||||
background-color: @color2;
|
|
||||||
}
|
|
||||||
|
|
||||||
#clock {
|
|
||||||
background-color: @color3;
|
|
||||||
}
|
|
||||||
|
|
||||||
#wireplumber {
|
|
||||||
background-color: @color4;
|
|
||||||
}
|
|
||||||
|
|
||||||
#backlight {
|
|
||||||
background-color: @color5;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery {
|
|
||||||
background-color: @color6;
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,230 @@
|
|||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2023 Ludovic Courtès <ludo@gnu.org>
|
||||||
|
;;; Copyright © 2026 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
|
(define-module (rosenthal home services desktop)
|
||||||
|
;; Guile builtins
|
||||||
|
#:use-module (ice-9 match)
|
||||||
|
#:use-module (srfi srfi-1)
|
||||||
|
;; Utilities
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix records)
|
||||||
|
;; Guix System - services
|
||||||
|
#:use-module (gnu services)
|
||||||
|
#:use-module (gnu services configuration)
|
||||||
|
;; Guix Home - services
|
||||||
|
#:use-module (gnu home services)
|
||||||
|
#:use-module (gnu home services shepherd)
|
||||||
|
;; Guix packages
|
||||||
|
#:autoload (gnu packages window-management) (noctalia-shell)
|
||||||
|
#:export (home-graphical-session-service-type
|
||||||
|
home-graphical-session-configuration
|
||||||
|
|
||||||
|
home-noctalia-configuration
|
||||||
|
home-noctalia-service-type))
|
||||||
|
|
||||||
|
|
||||||
|
;;;
|
||||||
|
;;; Graphical session.
|
||||||
|
;;;
|
||||||
|
|
||||||
|
(define-configuration/no-serialization home-graphical-session-configuration
|
||||||
|
(timeout
|
||||||
|
(integer 10)
|
||||||
|
"Time in seconds to wait before a graphical session is found.")
|
||||||
|
(wayland?
|
||||||
|
(boolean #f)
|
||||||
|
"Wait and require Wayland environment to be available, providing a
|
||||||
|
@code{wayland-display} Shepherd service.")
|
||||||
|
(x11?
|
||||||
|
(boolean #f)
|
||||||
|
"Wait and require X11 environment to be available, providing a
|
||||||
|
@code{x11-display} Shepherd service."))
|
||||||
|
|
||||||
|
(define (home-graphical-session-find-socket)
|
||||||
|
#~(lambda* (timeout directory pattern #:key wayland?)
|
||||||
|
;; Wait for an accessible socket matching PATTERN to show up in
|
||||||
|
;; DIRECTORY, up to TIMEOUT seconds.
|
||||||
|
(let loop ((attempts timeout))
|
||||||
|
(define socket
|
||||||
|
(find (match-lambda
|
||||||
|
((or "." "..") #f)
|
||||||
|
(name
|
||||||
|
(let ((name (in-vicinity directory name)))
|
||||||
|
(and (string-match pattern name)
|
||||||
|
(access? name O_RDWR)))))
|
||||||
|
(reverse
|
||||||
|
(or (scandir directory)
|
||||||
|
'()))))
|
||||||
|
|
||||||
|
(if socket
|
||||||
|
(let ((display
|
||||||
|
(if wayland?
|
||||||
|
socket
|
||||||
|
(string-append ":" (string-drop socket 1)))))
|
||||||
|
(format #t "Display server found at ~s.~%" display)
|
||||||
|
display)
|
||||||
|
(if (zero? attempts)
|
||||||
|
(error
|
||||||
|
(format #f "Can't find ~a environment; giving up."
|
||||||
|
(if wayland? "Wayland" "X11")))
|
||||||
|
(begin
|
||||||
|
(sleep 1)
|
||||||
|
(loop (- attempts 1))))))))
|
||||||
|
|
||||||
|
(define home-graphical-session-shepherd-service
|
||||||
|
(match-record-lambda <home-graphical-session-configuration>
|
||||||
|
(timeout wayland? x11?)
|
||||||
|
(append
|
||||||
|
(if (or wayland? x11?)
|
||||||
|
(list (shepherd-service
|
||||||
|
(documentation
|
||||||
|
"Service target to indicate a graphical session is ready.")
|
||||||
|
(provision '(graphical-session))
|
||||||
|
(requirement
|
||||||
|
(append
|
||||||
|
(if wayland?
|
||||||
|
'(wayland-display)
|
||||||
|
'())
|
||||||
|
(if x11?
|
||||||
|
'(x11-display)
|
||||||
|
'())))
|
||||||
|
(respawn? #f)
|
||||||
|
(start #~(const #t))
|
||||||
|
(stop #~(const #f))
|
||||||
|
(actions
|
||||||
|
(list (shepherd-action
|
||||||
|
(name 'set-environment)
|
||||||
|
(documentation
|
||||||
|
"Set environment variables in Shepherd.")
|
||||||
|
(procedure
|
||||||
|
#~(lambda (_ . args)
|
||||||
|
(for-each putenv args))))))))
|
||||||
|
'())
|
||||||
|
(if wayland?
|
||||||
|
(list (shepherd-service
|
||||||
|
(documentation "Find Wayland socket.")
|
||||||
|
(provision '(wayland-display))
|
||||||
|
(modules
|
||||||
|
'((ice-9 ftw)
|
||||||
|
(ice-9 match)
|
||||||
|
(ice-9 regex)
|
||||||
|
(srfi srfi-1)
|
||||||
|
(shepherd support)))
|
||||||
|
(respawn? #f)
|
||||||
|
(start
|
||||||
|
#~(lambda* (#:optional (wayland-display (getenv "WAYLAND_DISPLAY")))
|
||||||
|
(let ((wayland-display
|
||||||
|
(or wayland-display
|
||||||
|
(#$(home-graphical-session-find-socket)
|
||||||
|
#$timeout
|
||||||
|
%user-runtime-dir
|
||||||
|
"wayland-[0-9]+$"
|
||||||
|
#:wayland? #t))))
|
||||||
|
(when wayland-display
|
||||||
|
(setenv "WAYLAND_DISPLAY" wayland-display))
|
||||||
|
wayland-display)))
|
||||||
|
(stop
|
||||||
|
#~(lambda (_)
|
||||||
|
(unsetenv "WAYLAND_DISPLAY")
|
||||||
|
#f))))
|
||||||
|
'())
|
||||||
|
(if x11?
|
||||||
|
(list (shepherd-service
|
||||||
|
(documentation "Find X11 display server.")
|
||||||
|
(provision '(x11-display))
|
||||||
|
(requirement
|
||||||
|
;; XWayland starts later than the compositor.
|
||||||
|
(if wayland?
|
||||||
|
'(wayland-display)
|
||||||
|
'()))
|
||||||
|
(modules
|
||||||
|
'((ice-9 ftw)
|
||||||
|
(ice-9 match)
|
||||||
|
(ice-9 regex)
|
||||||
|
(srfi srfi-1)))
|
||||||
|
(respawn? #f)
|
||||||
|
(start
|
||||||
|
#~(lambda* (#:optional (x11-display (getenv "DISPLAY")))
|
||||||
|
(let ((x11-display
|
||||||
|
(and #$x11?
|
||||||
|
(or x11-display
|
||||||
|
(#$(home-graphical-session-find-socket)
|
||||||
|
#$timeout
|
||||||
|
"/tmp/.X11-unix"
|
||||||
|
"X[0-9]+$")))))
|
||||||
|
(when x11-display
|
||||||
|
(setenv "DISPLAY" x11-display))
|
||||||
|
x11-display)))
|
||||||
|
(stop
|
||||||
|
#~(lambda (_)
|
||||||
|
(unsetenv "DISPLAY")
|
||||||
|
#f))))
|
||||||
|
'()))))
|
||||||
|
|
||||||
|
(define home-graphical-session-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'home-graphical-session)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension home-shepherd-service-type
|
||||||
|
home-graphical-session-shepherd-service)))
|
||||||
|
(compose identity)
|
||||||
|
(extend
|
||||||
|
(lambda (config extensions)
|
||||||
|
(match-record config <home-graphical-session-configuration>
|
||||||
|
(wayland? x11?)
|
||||||
|
(home-graphical-session-configuration
|
||||||
|
(inherit config)
|
||||||
|
(wayland?
|
||||||
|
(if (or wayland?
|
||||||
|
(member 'wayland extensions))
|
||||||
|
#t
|
||||||
|
#f))
|
||||||
|
(x11?
|
||||||
|
(if (or x11?
|
||||||
|
(member 'x11 extensions))
|
||||||
|
#t
|
||||||
|
#f))))))
|
||||||
|
(default-value (home-graphical-session-configuration))
|
||||||
|
(description "")))
|
||||||
|
|
||||||
|
|
||||||
|
;;;
|
||||||
|
;;; Noctalia
|
||||||
|
;;;
|
||||||
|
|
||||||
|
(define-configuration/no-serialization home-noctalia-configuration
|
||||||
|
(noctalia
|
||||||
|
(file-like noctalia-shell)
|
||||||
|
"File-like object to provide @command{/bin/noctalia}."))
|
||||||
|
|
||||||
|
(define home-noctalia-shepherd-service
|
||||||
|
(match-record-lambda <home-noctalia-configuration>
|
||||||
|
(noctalia)
|
||||||
|
(list (shepherd-service
|
||||||
|
(documentation "Start noctalia.")
|
||||||
|
(provision '(noctalia))
|
||||||
|
(requirement '(dbus graphical-session))
|
||||||
|
(modules '((shepherd support)))
|
||||||
|
(start
|
||||||
|
#~(lambda args
|
||||||
|
((make-forkexec-constructor
|
||||||
|
(list #$(file-append noctalia "/bin/noctalia"))
|
||||||
|
#:log-file (in-vicinity %user-log-dir "noctalia.log")
|
||||||
|
;; Inherit graphical session environment.
|
||||||
|
#:environment-variables (environ))
|
||||||
|
args)))
|
||||||
|
(stop #~(make-kill-destructor))))))
|
||||||
|
|
||||||
|
(define home-noctalia-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'home-noctalia)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension home-profile-service-type
|
||||||
|
(compose list home-noctalia-configuration-noctalia))
|
||||||
|
(service-extension home-shepherd-service-type
|
||||||
|
home-noctalia-shepherd-service)
|
||||||
|
(service-extension home-graphical-session-service-type
|
||||||
|
(const 'wayland))))
|
||||||
|
(default-value (home-noctalia-configuration))
|
||||||
|
(description "Run Noctalia, a lightweight Wayland shell and bar.")))
|
||||||
@@ -0,0 +1,130 @@
|
|||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2026 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
|
;; Inspired by https://codeberg.org/guix/guix/pulls/2395
|
||||||
|
|
||||||
|
(define-module (rosenthal home services emacs)
|
||||||
|
;; Utilities
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix modules)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix profiles)
|
||||||
|
#:use-module (guix records)
|
||||||
|
#:autoload (guix self) (make-config.scm)
|
||||||
|
;; Guix System - services
|
||||||
|
#:use-module (gnu services)
|
||||||
|
#:use-module (gnu services configuration)
|
||||||
|
;; Guix Home - services
|
||||||
|
#:use-module (gnu home services)
|
||||||
|
#:use-module (gnu home services shepherd)
|
||||||
|
;; Guix build systems
|
||||||
|
#:use-module (guix build-system trivial)
|
||||||
|
;; Guix packages
|
||||||
|
#:autoload (gnu packages emacs) (emacs)
|
||||||
|
#:export (home-emacs-service-type
|
||||||
|
home-emacs-configuration))
|
||||||
|
|
||||||
|
(define-configuration/no-serialization home-emacs-configuration
|
||||||
|
(emacs
|
||||||
|
(file-like emacs)
|
||||||
|
"Emacs package to use.")
|
||||||
|
(packages
|
||||||
|
(manifest (manifest '()))
|
||||||
|
"A manifest (@pxref{Writing Manifests,,, guix, GNU Guix Reference Manual})
|
||||||
|
of Emacs extensions.")
|
||||||
|
(shepherd-requirement
|
||||||
|
(list-of-symbols '())
|
||||||
|
"List of services that should be started before this service."))
|
||||||
|
|
||||||
|
(define home-emacs-package
|
||||||
|
(match-record-lambda <home-emacs-configuration>
|
||||||
|
(emacs packages)
|
||||||
|
(let* ((home-emacs-profile
|
||||||
|
(profile
|
||||||
|
(name "home-emacs-profile")
|
||||||
|
(content (manifest
|
||||||
|
(cons (package->manifest-entry emacs)
|
||||||
|
(manifest-entries packages))))))
|
||||||
|
(home-emacs-program
|
||||||
|
(program-file "home-emacs-program"
|
||||||
|
(with-imported-modules
|
||||||
|
(cons `((guix config) => ,(make-config.scm))
|
||||||
|
(delete '(guix config)
|
||||||
|
(source-module-closure '((guix profiles)))))
|
||||||
|
#~(begin
|
||||||
|
(use-modules (ice-9 match)
|
||||||
|
(guix profiles))
|
||||||
|
(load-profile #$home-emacs-profile)
|
||||||
|
(match (command-line)
|
||||||
|
((cmd . args)
|
||||||
|
(apply system*
|
||||||
|
(string-append #$home-emacs-profile "/bin/" (basename cmd))
|
||||||
|
args))))))))
|
||||||
|
(package
|
||||||
|
(inherit emacs)
|
||||||
|
(name "emacs-wrapper")
|
||||||
|
(build-system trivial-build-system)
|
||||||
|
(arguments
|
||||||
|
(list #:modules '((guix build utils))
|
||||||
|
#:builder
|
||||||
|
#~(begin
|
||||||
|
(use-modules (ice-9 match)
|
||||||
|
(guix build utils))
|
||||||
|
(let ((bin (in-vicinity #$output "bin")))
|
||||||
|
(mkdir-p bin)
|
||||||
|
(with-directory-excursion bin
|
||||||
|
(for-each (lambda (name)
|
||||||
|
(symlink #$home-emacs-program name))
|
||||||
|
'("ctags"
|
||||||
|
"ebrowse"
|
||||||
|
"emacs"
|
||||||
|
"emacsclient"
|
||||||
|
"etags"))))
|
||||||
|
(for-each
|
||||||
|
(lambda (path)
|
||||||
|
(let ((src (in-vicinity #$home-emacs-profile path))
|
||||||
|
(dst (in-vicinity #$output path)))
|
||||||
|
(mkdir-p (dirname dst))
|
||||||
|
(copy-recursively src dst)))
|
||||||
|
'("share/applications"
|
||||||
|
"share/icons"
|
||||||
|
"share/info"
|
||||||
|
"share/man"))
|
||||||
|
(let ((applications
|
||||||
|
(in-vicinity #$output "share/applications")))
|
||||||
|
(substitute* (find-files applications "\\.desktop$")
|
||||||
|
((#$emacs) #$output))))))
|
||||||
|
(native-inputs '())
|
||||||
|
(inputs '())
|
||||||
|
(propagated-inputs '())
|
||||||
|
(outputs '("out"))))))
|
||||||
|
|
||||||
|
(define (home-emacs-shepherd config)
|
||||||
|
(match-record config <home-emacs-configuration>
|
||||||
|
(shepherd-requirement)
|
||||||
|
(let ((emacs (home-emacs-package config)))
|
||||||
|
(list (shepherd-service
|
||||||
|
(documentation "Run Emacs daemon.")
|
||||||
|
(provision '(emacs-daemon))
|
||||||
|
(requirement shepherd-requirement)
|
||||||
|
(modules '((shepherd support)))
|
||||||
|
(start
|
||||||
|
#~(lambda args
|
||||||
|
((make-forkexec-constructor
|
||||||
|
(list #$(file-append emacs "/bin/emacs") "--fg-daemon")
|
||||||
|
#:log-file (in-vicinity %user-log-dir "emacs-daemon.log")
|
||||||
|
;; Inherit graphical session environment.
|
||||||
|
#:environment-variables (environ))
|
||||||
|
args)))
|
||||||
|
(stop #~(make-kill-destructor)))))))
|
||||||
|
|
||||||
|
(define home-emacs-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'home-emacs)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension home-profile-service-type
|
||||||
|
(compose list home-emacs-package))
|
||||||
|
(service-extension home-shepherd-service-type
|
||||||
|
home-emacs-shepherd)))
|
||||||
|
(default-value (home-emacs-configuration))
|
||||||
|
(description "Install Emacs into home profile and run its daemon.")))
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2026 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
|
(define-module (rosenthal home services gtk)
|
||||||
|
;; Guilt builtins
|
||||||
|
#:use-module (srfi srfi-1)
|
||||||
|
;; Utilities
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix records)
|
||||||
|
#:use-module (rosenthal utils file)
|
||||||
|
;; Guix Home - services
|
||||||
|
#:use-module (gnu home services)
|
||||||
|
#:export (home-gtk2-service-type
|
||||||
|
home-gtk3-service-type
|
||||||
|
home-gtk4-service-type))
|
||||||
|
|
||||||
|
(define (home-gtk2-environment-variables config)
|
||||||
|
(if (null? config)
|
||||||
|
'()
|
||||||
|
;; https://wiki.archlinux.org/title/XDG_Base_Directory
|
||||||
|
'(("GTK2_RC_FILES" . "$XDG_CONFIG_HOME/gtk-2.0/gtkrc"))))
|
||||||
|
|
||||||
|
(define (home-gtk2-xdg-configuration-files config)
|
||||||
|
(if (null? config)
|
||||||
|
'()
|
||||||
|
`(("gtk-2.0/gtkrc"
|
||||||
|
,(computed-file "gtkrc"
|
||||||
|
#~(begin
|
||||||
|
(use-modules (ice-9 match))
|
||||||
|
(call-with-output-file #$output
|
||||||
|
(lambda (port)
|
||||||
|
(for-each (match-lambda
|
||||||
|
((key . val)
|
||||||
|
(format port "~a = ~a~%" key val)))
|
||||||
|
'#$config))))
|
||||||
|
#:options '(#:substitutable? #f))))))
|
||||||
|
|
||||||
|
(define (home-gtk3-xdg-configuration-files config)
|
||||||
|
(if (null? config)
|
||||||
|
'()
|
||||||
|
`(("gtk-3.0/settings.ini"
|
||||||
|
,(ini-file "settings.ini"
|
||||||
|
#~'(("Settings" . #$config)))))))
|
||||||
|
|
||||||
|
(define (home-gtk4-xdg-configuration-files config)
|
||||||
|
(if (null? config)
|
||||||
|
'()
|
||||||
|
`(("gtk-4.0/settings.ini"
|
||||||
|
,(ini-file "settings.ini"
|
||||||
|
#~'(("Settings" . #$config)))))))
|
||||||
|
|
||||||
|
(define home-gtk2-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'home-gtk2)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension home-environment-variables-service-type
|
||||||
|
home-gtk2-environment-variables)
|
||||||
|
(service-extension home-xdg-configuration-files-service-type
|
||||||
|
home-gtk2-xdg-configuration-files)))
|
||||||
|
(compose concatenate)
|
||||||
|
(extend
|
||||||
|
(lambda (config extension)
|
||||||
|
(delete-duplicates
|
||||||
|
;; Allow overriding extensions via configuration.
|
||||||
|
(append config
|
||||||
|
extension)
|
||||||
|
(lambda (a b)
|
||||||
|
(string=? (car a)
|
||||||
|
(car b))))))
|
||||||
|
(description "Set up GTK2 settings in @file{~/.config/gtk-2.0/gtkrc}")
|
||||||
|
(default-value '())))
|
||||||
|
|
||||||
|
(define home-gtk3-service-type
|
||||||
|
(service-type
|
||||||
|
(inherit home-gtk2-service-type)
|
||||||
|
(name 'home-gtk3)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension home-xdg-configuration-files-service-type
|
||||||
|
home-gtk3-xdg-configuration-files)))
|
||||||
|
(description
|
||||||
|
"Set up GTK3 settings in @file{~/.config/gtk-3.0/settings.ini}")))
|
||||||
|
|
||||||
|
(define home-gtk4-service-type
|
||||||
|
(service-type
|
||||||
|
(inherit home-gtk2-service-type)
|
||||||
|
(name 'home-gtk4)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension home-xdg-configuration-files-service-type
|
||||||
|
home-gtk4-xdg-configuration-files)))
|
||||||
|
(description
|
||||||
|
"Set up GTK4 settings in @file{~/.config/gtk-4.0/settings.ini}")))
|
||||||
@@ -0,0 +1,276 @@
|
|||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2021 Andrew Tropin <andrew@trop.in>
|
||||||
|
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
|
||||||
|
;;; Copyright © 2022 Ludovic Courtès <ludo@gnu.org>
|
||||||
|
;;; Copyright © 2024 Nicolas Graves <ngraves@ngraves.fr>
|
||||||
|
;;; Copyright © 2026 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
|
(define-module (rosenthal home services writable-files-manager)
|
||||||
|
#:use-module (gnu home services)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix modules)
|
||||||
|
#:autoload (gnu packages gnupg) (guile-gcrypt)
|
||||||
|
#:export (home-writable-files-manager-service-type))
|
||||||
|
|
||||||
|
;;; Based on (gnu home services symlink-manager).
|
||||||
|
;;; This service is a replacement to home-symlink-manager-service-type.
|
||||||
|
;;;
|
||||||
|
;;; Usage:
|
||||||
|
;;;--8<---------------cut here---------------start------------->8---
|
||||||
|
;;; (home-environment
|
||||||
|
;;; (essential-services
|
||||||
|
;;; (cons* (service home-writable-files-manager-service-type)
|
||||||
|
;;; (modify-services ((@@ (gnu home) home-environment-default-essential-services)
|
||||||
|
;;; this-home-environment)
|
||||||
|
;;; (delete home-symlink-manager-service-type)))
|
||||||
|
;;; ...))
|
||||||
|
;;;--8<---------------cut here---------------end--------------->8---
|
||||||
|
;;;
|
||||||
|
;;; Files managed by Guix Home are copied as regular file and made writable.
|
||||||
|
;;; Directories are still symlinked.
|
||||||
|
|
||||||
|
(define (update-writable-files-script)
|
||||||
|
(program-file
|
||||||
|
"update-writable-files"
|
||||||
|
(with-extensions (list guile-gcrypt)
|
||||||
|
(with-imported-modules (source-module-closure
|
||||||
|
'((guix build utils)
|
||||||
|
(guix hash)
|
||||||
|
(guix i18n)))
|
||||||
|
#~(begin
|
||||||
|
(use-modules (ice-9 ftw)
|
||||||
|
(ice-9 match)
|
||||||
|
(srfi srfi-1)
|
||||||
|
(guix hash)
|
||||||
|
(guix i18n)
|
||||||
|
(guix build utils))
|
||||||
|
|
||||||
|
(define home-directory
|
||||||
|
(getenv "HOME"))
|
||||||
|
|
||||||
|
(define xdg-config-home
|
||||||
|
(or (getenv "XDG_CONFIG_HOME")
|
||||||
|
(string-append (getenv "HOME") "/.config")))
|
||||||
|
|
||||||
|
(define xdg-data-home
|
||||||
|
(or (getenv "XDG_DATA_HOME")
|
||||||
|
(string-append (getenv "HOME") "/.local/share")))
|
||||||
|
|
||||||
|
(define backup-directory
|
||||||
|
(string-append home-directory "/" (number->string (current-time))
|
||||||
|
"-guix-home-legacy-configs-backup"))
|
||||||
|
|
||||||
|
(define (preprocess-file file)
|
||||||
|
"If file is in XDG-CONFIGURATION-FILES-DIRECTORY use
|
||||||
|
subdirectory from XDG_CONFIG_HOME to generate a target path."
|
||||||
|
(cond
|
||||||
|
((string-prefix? #$xdg-configuration-files-directory file)
|
||||||
|
(string-append
|
||||||
|
(substring xdg-config-home
|
||||||
|
(1+ (string-length home-directory)))
|
||||||
|
(substring file
|
||||||
|
(string-length #$xdg-configuration-files-directory))))
|
||||||
|
((string-prefix? #$xdg-data-files-directory file)
|
||||||
|
(string-append
|
||||||
|
(substring xdg-data-home
|
||||||
|
(1+ (string-length home-directory)))
|
||||||
|
(substring file
|
||||||
|
(string-length #$xdg-data-files-directory))))
|
||||||
|
(else file)))
|
||||||
|
|
||||||
|
(define (target-file file)
|
||||||
|
;; Return the target of FILE, a config file name sans leading dot
|
||||||
|
;; such as "config/fontconfig/fonts.conf" or "bashrc".
|
||||||
|
(string-append home-directory "/" (preprocess-file file)))
|
||||||
|
|
||||||
|
(define (no-follow-file-exists? file)
|
||||||
|
"Return #t if file exists, even if it's a dangling symlink."
|
||||||
|
(->bool (false-if-exception (lstat file))))
|
||||||
|
|
||||||
|
(define (symlink-to-store? file)
|
||||||
|
(catch 'system-error
|
||||||
|
(lambda ()
|
||||||
|
(store-file-name? (readlink file)))
|
||||||
|
(lambda args
|
||||||
|
(if (= EINVAL (system-error-errno args))
|
||||||
|
#f
|
||||||
|
(apply throw args)))))
|
||||||
|
|
||||||
|
(define (backup-file file)
|
||||||
|
(define backup
|
||||||
|
(string-append backup-directory "/" (preprocess-file file)))
|
||||||
|
|
||||||
|
(define (copy-file* oldfile newfile)
|
||||||
|
"Like 'copy-file', but also copies dangling symlinks."
|
||||||
|
(catch 'system-error
|
||||||
|
(lambda ()
|
||||||
|
(copy-file oldfile newfile))
|
||||||
|
(lambda args
|
||||||
|
(if (and (eq? 'symlink (stat:type (lstat oldfile)))
|
||||||
|
(= ENOENT (system-error-errno args)))
|
||||||
|
(symlink (readlink oldfile) newfile)
|
||||||
|
(apply throw args)))))
|
||||||
|
|
||||||
|
(mkdir-p backup-directory)
|
||||||
|
(format #t (G_ "Backing up ~a...") (target-file file))
|
||||||
|
(mkdir-p (dirname backup))
|
||||||
|
(copy-file* (target-file file) backup)
|
||||||
|
(delete-file (target-file file))
|
||||||
|
(display (G_ " done\n")))
|
||||||
|
|
||||||
|
(define (cleanup-writable-files home-generation)
|
||||||
|
;; Delete from $HOME files that originate in HOME-GENERATION, the
|
||||||
|
;; store item containing a home generation.
|
||||||
|
(define config-file-directory
|
||||||
|
;; Note: Trailing slash is needed because "files" is a symlink.
|
||||||
|
(string-append home-generation "/" #$home-files-directory "/"))
|
||||||
|
|
||||||
|
(define (strip file)
|
||||||
|
(string-drop file
|
||||||
|
(+ 1 (string-length config-file-directory))))
|
||||||
|
|
||||||
|
(define (source-file file)
|
||||||
|
(readlink (string-append config-file-directory file)))
|
||||||
|
|
||||||
|
(format #t (G_ "Cleaning up writable files from previous home at ~a.~%")
|
||||||
|
home-generation)
|
||||||
|
(newline)
|
||||||
|
|
||||||
|
(file-system-fold
|
||||||
|
(const #t)
|
||||||
|
(lambda (file stat _) ;leaf
|
||||||
|
(let ((source (source-file (strip file)))
|
||||||
|
(target (target-file (strip file))))
|
||||||
|
(when (no-follow-file-exists? target)
|
||||||
|
;; DO NOT remove the file if it is different from the one
|
||||||
|
;; we'll create later, it will be backed up later during
|
||||||
|
;; create-writable-files phase.
|
||||||
|
(if (or (symlink-to-store? target)
|
||||||
|
(equal?
|
||||||
|
(file-hash* (if (symbolic-link? target) file source))
|
||||||
|
(file-hash* target)))
|
||||||
|
(begin
|
||||||
|
(format #t (G_ "Removing ~a...") target)
|
||||||
|
(delete-file target)
|
||||||
|
(display (G_ " done\n")))
|
||||||
|
(format
|
||||||
|
#t
|
||||||
|
(G_ "Skipping ~a (file changed)... done\n")
|
||||||
|
target)))))
|
||||||
|
|
||||||
|
(const #t) ;down
|
||||||
|
(lambda (directory stat _) ;up
|
||||||
|
(unless (string=? directory config-file-directory)
|
||||||
|
(let ((directory (target-file (strip directory))))
|
||||||
|
(catch 'system-error
|
||||||
|
(lambda ()
|
||||||
|
(rmdir directory)
|
||||||
|
(format #t (G_ "Removed ~a.\n") directory))
|
||||||
|
(lambda args
|
||||||
|
(let ((errno (system-error-errno args)))
|
||||||
|
(cond
|
||||||
|
((= ENOTEMPTY errno)
|
||||||
|
(format
|
||||||
|
#t
|
||||||
|
(G_ "Skipping ~a (not an empty directory)... done\n")
|
||||||
|
directory))
|
||||||
|
;; This happens when the directory is a mounted device.
|
||||||
|
((= EBUSY errno)
|
||||||
|
(format
|
||||||
|
#t
|
||||||
|
(G_ "Skipping ~a (underlying device is busy)... done\n")
|
||||||
|
directory))
|
||||||
|
((= ENOENT errno) #t)
|
||||||
|
((= ENOTDIR errno) #t)
|
||||||
|
(else
|
||||||
|
(apply throw args)))))))))
|
||||||
|
(const #t) ;skip
|
||||||
|
(const #t) ;error
|
||||||
|
#t ;init
|
||||||
|
config-file-directory
|
||||||
|
lstat)
|
||||||
|
|
||||||
|
(display (G_ "Cleanup finished.\n\n")))
|
||||||
|
|
||||||
|
(define (create-writable-files home-generation)
|
||||||
|
;; Create in $HOME writable files for the files in HOME-GENERATION.
|
||||||
|
(define config-file-directory
|
||||||
|
;; Note: Trailing slash is needed because "files" is a symlink.
|
||||||
|
(string-append home-generation "/" #$home-files-directory "/"))
|
||||||
|
|
||||||
|
(define (strip file)
|
||||||
|
(string-drop file
|
||||||
|
(+ 1 (string-length config-file-directory))))
|
||||||
|
|
||||||
|
(define (source-file file)
|
||||||
|
(readlink (string-append config-file-directory file)))
|
||||||
|
|
||||||
|
(file-system-fold
|
||||||
|
(const #t) ;enter?
|
||||||
|
(lambda (file stat result) ;leaf
|
||||||
|
(let ((source (source-file (strip file)))
|
||||||
|
(target (target-file (strip file))))
|
||||||
|
(when (no-follow-file-exists? target)
|
||||||
|
(backup-file (strip file)))
|
||||||
|
(format #t (G_ "Copying ~a -> ~a...")
|
||||||
|
source target)
|
||||||
|
(if (or (not (file-exists? source))
|
||||||
|
(file-is-directory? source))
|
||||||
|
(symlink source target)
|
||||||
|
(begin
|
||||||
|
(copy-file source target)
|
||||||
|
(make-file-writable target)))
|
||||||
|
(display (G_ " done\n"))))
|
||||||
|
(lambda (directory stat result) ;down
|
||||||
|
(unless (string=? directory config-file-directory)
|
||||||
|
(let ((target (target-file (strip directory))))
|
||||||
|
(when (and (no-follow-file-exists? target)
|
||||||
|
(not (file-is-directory? target)))
|
||||||
|
(backup-file (strip directory)))
|
||||||
|
|
||||||
|
(catch 'system-error
|
||||||
|
(lambda ()
|
||||||
|
(mkdir target))
|
||||||
|
(lambda args
|
||||||
|
(let ((errno (system-error-errno args)))
|
||||||
|
(unless (= EEXIST errno)
|
||||||
|
(format #t (G_ "failed to create directory ~a: ~s~%")
|
||||||
|
target (strerror errno))
|
||||||
|
(apply throw args))))))))
|
||||||
|
(const #t) ;up
|
||||||
|
(const #t) ;skip
|
||||||
|
(const #t) ;error
|
||||||
|
#t ;init
|
||||||
|
config-file-directory))
|
||||||
|
|
||||||
|
#$%initialize-gettext
|
||||||
|
|
||||||
|
(let* ((home (string-append home-directory "/.guix-home"))
|
||||||
|
(pivot (string-append home ".new"))
|
||||||
|
(new-home (getenv "GUIX_NEW_HOME"))
|
||||||
|
(old-home (getenv "GUIX_OLD_HOME")))
|
||||||
|
(when old-home
|
||||||
|
(cleanup-writable-files old-home))
|
||||||
|
|
||||||
|
(create-writable-files new-home)
|
||||||
|
|
||||||
|
(symlink new-home pivot)
|
||||||
|
(rename-file pivot home)
|
||||||
|
|
||||||
|
(display (G_" done\nFinished updating writable files.\n\n"))))))))
|
||||||
|
|
||||||
|
(define (update-writable-files-gexp _)
|
||||||
|
#~(primitive-load #$(update-writable-files-script)))
|
||||||
|
|
||||||
|
(define home-writable-files-manager-service-type
|
||||||
|
(service-type (name 'home-writable-files-manager)
|
||||||
|
(extensions
|
||||||
|
(list
|
||||||
|
(service-extension
|
||||||
|
home-activation-service-type
|
||||||
|
update-writable-files-gexp)))
|
||||||
|
(default-value #f)
|
||||||
|
(description "Provide an @code{update-writable-files} script,
|
||||||
|
which copies files to configuration files, makes them writable and creates
|
||||||
|
symlinks to directories on every activation. If an existing file would be
|
||||||
|
overwritten, backs up that file first.")))
|
||||||
@@ -1,18 +1,21 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2022, 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;; SPDX-FileCopyrightText: 2025 William Goodspeed
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2022, 2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
;;; Copyright © 2025 William Goodspeed
|
||||||
|
|
||||||
(define-module (rosenthal packages admin)
|
(define-module (rosenthal packages admin)
|
||||||
#:use-module ((guix licenses) #:prefix license:)
|
;; Utilities
|
||||||
#:use-module (guix git-download)
|
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
#:use-module (rosenthal utils cargo)
|
#:use-module (rosenthal utils cargo)
|
||||||
|
;; Guix origin methods
|
||||||
|
#:use-module (guix git-download)
|
||||||
|
;; Guix build systems
|
||||||
#:use-module (guix build-system cargo)
|
#:use-module (guix build-system cargo)
|
||||||
#:use-module (guix build-system gnu)
|
#:use-module (guix build-system gnu)
|
||||||
#:use-module (guix build-system meson)
|
#:use-module (guix build-system meson)
|
||||||
|
;; Guix packages
|
||||||
#:use-module (gnu packages admin)
|
#:use-module (gnu packages admin)
|
||||||
#:use-module (gnu packages linux)
|
#:use-module (gnu packages linux)
|
||||||
#:use-module (gnu packages m4)
|
#:use-module (gnu packages m4)
|
||||||
@@ -21,7 +24,7 @@
|
|||||||
(define-public dinit
|
(define-public dinit
|
||||||
(package
|
(package
|
||||||
(name "dinit")
|
(name "dinit")
|
||||||
(version "0.19.4")
|
(version "0.23.0")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
@@ -30,14 +33,15 @@
|
|||||||
(commit (string-append "v" version))))
|
(commit (string-append "v" version))))
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "09k7airphnpg6hmif91d9nfi5fhz40qh52sp8vnrshfy7mhkq571"))))
|
(base32 "0dni69n4115g5d4kjrpx3krgzmclpy5mzs0kms01x9ifzp5kw4yh"))))
|
||||||
(build-system meson-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list #:configure-flags
|
(list #:configure-flags
|
||||||
#~(list "-Dshutdown-prefix=dinit-"
|
#~(list "--shutdown-prefix=dinit-"
|
||||||
"-Dunit-tests=true"
|
(string-append "--sbindir=" #$output "/sbin"))
|
||||||
"-Digr-tests=true"
|
#:make-flags
|
||||||
(string-append "-Ddinit-sbindir=" #$output "/sbin"))
|
#~(list (string-append "CXX=" #$(cxx-for-target))
|
||||||
|
"CXX_FOR_BUILD=g++")
|
||||||
#:phases
|
#:phases
|
||||||
#~(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'fix-paths
|
(add-after 'unpack 'fix-paths
|
||||||
@@ -55,17 +59,16 @@ the user to manage services with dependencies and parallel startup.")
|
|||||||
(license license:asl2.0)))
|
(license license:asl2.0)))
|
||||||
|
|
||||||
(define-public libseat-sans-logind
|
(define-public libseat-sans-logind
|
||||||
(let ((base libseat))
|
(package
|
||||||
(package
|
(inherit libseat)
|
||||||
(inherit base)
|
(name "libseat-sans-logind")
|
||||||
(name "libseat-sans-logind")
|
(arguments
|
||||||
(arguments
|
(substitute-keyword-arguments arguments
|
||||||
(substitute-keyword-arguments (package-arguments base)
|
((#:configure-flags configure-flags)
|
||||||
((#:configure-flags configure-flags)
|
#~(append #$configure-flags
|
||||||
#~(append #$configure-flags
|
(list "-Dlibseat-logind=disabled")))))
|
||||||
(list "-Dlibseat-logind=disabled")))))
|
(propagated-inputs '())
|
||||||
(propagated-inputs '())
|
(properties '((disable-updater? . #t)))))
|
||||||
(properties '((disable-updater? . #t))))))
|
|
||||||
|
|
||||||
(define-public pam-dumb-runtime-dir
|
(define-public pam-dumb-runtime-dir
|
||||||
(package
|
(package
|
||||||
@@ -105,14 +108,13 @@ exists and is only writable by root.")
|
|||||||
(license license:bsd-0)))
|
(license license:bsd-0)))
|
||||||
|
|
||||||
(define-public seatd-sans-logind
|
(define-public seatd-sans-logind
|
||||||
(let ((base seatd))
|
(package
|
||||||
(package
|
(inherit seatd)
|
||||||
(inherit base)
|
(name "seatd-sans-logind")
|
||||||
(name "seatd-sans-logind")
|
(arguments
|
||||||
(arguments
|
(substitute-keyword-arguments arguments
|
||||||
(substitute-keyword-arguments (package-arguments base)
|
((#:configure-flags configure-flags)
|
||||||
((#:configure-flags configure-flags)
|
#~(append #$configure-flags
|
||||||
#~(append #$configure-flags
|
(list "-Dlibseat-logind=disabled")))))
|
||||||
(list "-Dlibseat-logind=disabled")))))
|
(propagated-inputs '())
|
||||||
(propagated-inputs '())
|
(properties '((disable-updater? . #t)))))
|
||||||
(properties '((disable-updater? . #t))))))
|
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2026 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
|
(define-module (rosenthal packages android)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix download)
|
||||||
|
#:use-module (guix git-download)
|
||||||
|
#:use-module (guix build-system meson)
|
||||||
|
#:use-module (gnu packages android)
|
||||||
|
#:use-module (gnu packages libusb)
|
||||||
|
#:use-module (gnu packages pkg-config)
|
||||||
|
#:use-module (gnu packages sdl)
|
||||||
|
#:use-module (gnu packages video))
|
||||||
|
|
||||||
|
(define-public scrcpy
|
||||||
|
(package
|
||||||
|
(name "scrcpy")
|
||||||
|
(version "5.0.1")
|
||||||
|
(source (origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/Genymobile/scrcpy")
|
||||||
|
(commit (string-append "v" version))))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"062fnhm5pj39cxygs276zqw780blfw6rf850r442iw587a63fsyf"))))
|
||||||
|
(build-system meson-build-system)
|
||||||
|
(arguments
|
||||||
|
(list #:configure-flags
|
||||||
|
#~(list (string-append
|
||||||
|
"-Dprebuilt_server="
|
||||||
|
#+(this-package-native-input
|
||||||
|
(string-append "scrcpy-server-v"
|
||||||
|
(package-version this-package)))))
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(add-after 'unpack 'fix-references
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
(substitute* "app/src/adb/adb.c"
|
||||||
|
(("strdup\\(\"adb\"\\)")
|
||||||
|
(format #f "strdup(~s)"
|
||||||
|
(search-input-file inputs "bin/adb")))))))))
|
||||||
|
(native-inputs
|
||||||
|
(list pkg-config
|
||||||
|
(let ((version (package-version this-package)))
|
||||||
|
(origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (string-append
|
||||||
|
"https://github.com/Genymobile/scrcpy/releases/download/v"
|
||||||
|
version "/scrcpy-server-v" version))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"0dn57gjn5dizpzbrgf31g969ka9bi0h12d6zx4gj3m8ik3vvckkn"))))))
|
||||||
|
(inputs (list adb ffmpeg libusb sdl3))
|
||||||
|
(home-page "https://github.com/Genymobile/scrcpy")
|
||||||
|
(synopsis "Display and control your Android device")
|
||||||
|
(description
|
||||||
|
"This application mirrors Android devices (video and audio) connected via
|
||||||
|
USB or TCP/IP and allows control using the computer's keyboard and mouse. It
|
||||||
|
does not require root access or an app installed on the device.")
|
||||||
|
(license license:asl2.0)))
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
|
(define-module (rosenthal packages animation)
|
||||||
|
;; Utilities
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix utils)
|
||||||
|
;; Guix origin methods
|
||||||
|
#:use-module (guix git-download)
|
||||||
|
;; Guix build systems
|
||||||
|
#:use-module (guix build-system cmake)
|
||||||
|
;; Guix packages
|
||||||
|
#:use-module (gnu packages animation)
|
||||||
|
#:use-module (gnu packages compression)
|
||||||
|
#:use-module (gnu packages image))
|
||||||
|
|
||||||
|
(define-public lottie-converter
|
||||||
|
(let ((commit "3ad34af7bbcf9197fda782a5832b18b72a3bb939")
|
||||||
|
(revision "0"))
|
||||||
|
(package
|
||||||
|
(name "lottie-converter")
|
||||||
|
(version (git-version "0.2" revision commit))
|
||||||
|
(source (origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/sot-tech/LottieConverter")
|
||||||
|
(commit commit)))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"12py6y05cv38cri0q813m7nsaizhqjnqnq0jp6bfviam5cq240p8"))))
|
||||||
|
(build-system cmake-build-system)
|
||||||
|
(arguments
|
||||||
|
(list #:configure-flags
|
||||||
|
#~(list "-DSYSTEM_PNG=1"
|
||||||
|
"-DSYSTEM_RL=1"
|
||||||
|
"-DSYSTEM_GL=1")
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(replace 'install
|
||||||
|
(lambda _
|
||||||
|
(let ((bindir (in-vicinity #$output "bin")))
|
||||||
|
(install-file "lottieconverter" bindir)))))))
|
||||||
|
(inputs (list giflib libpng rlottie zlib))
|
||||||
|
(synopsis "Lottie animation converter")
|
||||||
|
(description "This package provides a simple lottie animation converter.
|
||||||
|
Animations can be converted to PNG (with transparency) or GIF.")
|
||||||
|
(home-page "https://github.com/sot-tech/LottieConverter")
|
||||||
|
(license license:bsd-3)
|
||||||
|
(properties '((disable-updater? . #t))))))
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2026 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
|
(define-module (rosenthal packages authentication)
|
||||||
|
;; Utilities
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix utils)
|
||||||
|
#:use-module (rosenthal utils packages)
|
||||||
|
;; Guix origin methods
|
||||||
|
#:use-module (guix git-download)
|
||||||
|
;; Guix build systems
|
||||||
|
#:use-module (guix build-system qt)
|
||||||
|
;; Guix packages
|
||||||
|
#:use-module (gnu packages gnome)
|
||||||
|
#:use-module (gnu packages pkg-config)
|
||||||
|
#:use-module (gnu packages polkit)
|
||||||
|
#:use-module (gnu packages qt))
|
||||||
|
|
||||||
|
(define-public bb-auth
|
||||||
|
(package
|
||||||
|
(name "bb-auth")
|
||||||
|
(version "0.2.0")
|
||||||
|
(source (origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/anthonyhab/bb-auth")
|
||||||
|
(commit (string-append "v" version))))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"1jx526h7qw7mw4cp2c8ys4ck1qlc5v9qf51zvj951l4kqbrs0w44"))
|
||||||
|
(patches (rosenthal-patches "bb-auth.patch"))))
|
||||||
|
(build-system qt-build-system)
|
||||||
|
(arguments
|
||||||
|
(list #:qtbase qtbase
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(add-after 'unpack 'patch-test-references
|
||||||
|
(lambda _
|
||||||
|
(substitute* (find-files "tests")
|
||||||
|
(("/bin/(true|false)" _ cmd)
|
||||||
|
(which cmd)))))
|
||||||
|
(add-after 'qt-wrap 'patch-script
|
||||||
|
(lambda _
|
||||||
|
(with-directory-excursion (in-vicinity #$output "libexec")
|
||||||
|
(substitute* "pinentry-bb"
|
||||||
|
(("libexec/bb-auth\"" all)
|
||||||
|
(string-append all " \"--pinentry\"")))
|
||||||
|
(substitute* "bb-keyring-prompter"
|
||||||
|
(("libexec/bb-auth\"" all)
|
||||||
|
(string-append all " \"--keyring\"")))))))))
|
||||||
|
(native-inputs
|
||||||
|
(list pkg-config))
|
||||||
|
(inputs
|
||||||
|
(list gcr
|
||||||
|
json-glib-minimal
|
||||||
|
polkit
|
||||||
|
polkit-qt6))
|
||||||
|
(home-page "https://github.com/anthonyhab/bb-auth")
|
||||||
|
(synopsis "Unified polkit, keyring, and pinentry authentication daemon")
|
||||||
|
(description "")
|
||||||
|
(license license:bsd-3)))
|
||||||
@@ -1,17 +1,25 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2023-2024 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2023-2024 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal packages binaries)
|
(define-module (rosenthal packages binaries)
|
||||||
|
;; Guile builtins
|
||||||
|
#:use-module (ice-9 match)
|
||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
#:use-module ((guix licenses) #:prefix license:)
|
;; Utilities
|
||||||
#:use-module (guix gexp)
|
|
||||||
#:use-module (guix deprecation)
|
|
||||||
#:use-module (guix packages)
|
|
||||||
#:use-module (guix download)
|
|
||||||
#:use-module (guix utils)
|
|
||||||
#:use-module (guix build-system copy)
|
|
||||||
#:use-module (gnu build icecat-extension)
|
#:use-module (gnu build icecat-extension)
|
||||||
|
#:use-module (guix deprecation)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix platform)
|
||||||
|
#:use-module (guix utils)
|
||||||
|
#:use-module (rosenthal utils packages)
|
||||||
|
;; Guix origin methods
|
||||||
|
#:use-module (guix download)
|
||||||
|
;; Guix build systems
|
||||||
|
#:use-module (guix build-system gnu)
|
||||||
|
#:use-module (guix build-system copy)
|
||||||
|
;; Guix packages
|
||||||
#:use-module (gnu packages base)
|
#:use-module (gnu packages base)
|
||||||
#:use-module (gnu packages bash)
|
#:use-module (gnu packages bash)
|
||||||
#:use-module (gnu packages bootstrap)
|
#:use-module (gnu packages bootstrap)
|
||||||
@@ -19,6 +27,7 @@
|
|||||||
#:use-module (gnu packages elf)
|
#:use-module (gnu packages elf)
|
||||||
#:use-module (gnu packages gcc)
|
#:use-module (gnu packages gcc)
|
||||||
#:use-module (gnu packages glib)
|
#:use-module (gnu packages glib)
|
||||||
|
#:use-module (gnu packages hardware)
|
||||||
#:use-module (gnu packages java)
|
#:use-module (gnu packages java)
|
||||||
#:use-module (gnu packages nss)
|
#:use-module (gnu packages nss)
|
||||||
#:use-module (gnu packages sync)
|
#:use-module (gnu packages sync)
|
||||||
@@ -32,7 +41,7 @@
|
|||||||
(define-public cloudflare-warp-bin
|
(define-public cloudflare-warp-bin
|
||||||
(package
|
(package
|
||||||
(name "cloudflare-warp-bin")
|
(name "cloudflare-warp-bin")
|
||||||
(version "2025.8.779.0")
|
(version "2026.9.3927.0")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append "https://pkg.cloudflareclient.com"
|
(uri (string-append "https://pkg.cloudflareclient.com"
|
||||||
@@ -40,48 +49,68 @@
|
|||||||
"cloudflare-warp_" version "_amd64.deb"))
|
"cloudflare-warp_" version "_amd64.deb"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0p6d7zib94f20hp7wdilb92cdqvvh6qnf77844zy3fkjyghksvff"))))
|
"12hfq9yxa9igjif42anxwf3vaf7c518wahkzj87fl6jyf65xn89g"))))
|
||||||
(build-system copy-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list #:install-plan
|
(list
|
||||||
#~'(("bin" "bin" #:include ("warp-cli" "warp-svc")))
|
#:tests? (not (%current-target-system))
|
||||||
#:phases
|
#:imported-modules
|
||||||
#~(modify-phases %standard-phases
|
(append %default-gnu-imported-modules
|
||||||
(add-after 'unpack 'unpack-deb
|
%copy-build-system-modules)
|
||||||
(lambda* (#:key source #:allow-other-keys)
|
#:modules
|
||||||
(invoke "ar" "-x" source)
|
'((guix build utils)
|
||||||
(invoke "tar" "-xf" "data.tar.gz")))
|
(guix build gnu-build-system)
|
||||||
(add-after 'install 'patch-elf
|
((guix build copy-build-system) #:prefix copy:))
|
||||||
(lambda _
|
#:phases
|
||||||
(let ((ld.so (string-append #$(this-package-input "glibc")
|
#~(modify-phases %standard-phases
|
||||||
#$(glibc-dynamic-linker)))
|
(delete 'configure)
|
||||||
(rpath (string-join
|
(delete 'build)
|
||||||
(list
|
(delete 'check)
|
||||||
(string-append
|
(add-after 'unpack 'unpack-deb
|
||||||
(ungexp
|
(lambda* (#:key source #:allow-other-keys)
|
||||||
(this-package-input "gcc") "lib") "/lib")
|
(invoke "ar" "-x" source)
|
||||||
(string-append
|
(invoke "tar" "-xf" "data.tar.gz")))
|
||||||
#$(this-package-input "dbus") "/lib")
|
(replace 'install
|
||||||
(string-append
|
(lambda args
|
||||||
#$(this-package-input "glibc") "/lib")
|
(apply (assoc-ref copy:%standard-phases 'install)
|
||||||
(string-append
|
#:install-plan
|
||||||
#$(this-package-input "nspr") "/lib")
|
'(("bin" "bin" #:include ("warp-cli" "warp-svc")))
|
||||||
(string-append
|
args)))
|
||||||
#$(this-package-input "nss") "/lib/nss"))
|
(add-after 'install 'patch-elf
|
||||||
":")))
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(define (patch-elf file)
|
(let* ((ld.so (search-input-file inputs #$(glibc-dynamic-linker)))
|
||||||
(format #t "Patching ~a ..." file)
|
(rpath
|
||||||
(unless (string-contains file ".so")
|
(string-join
|
||||||
(invoke "patchelf" "--set-interpreter" ld.so file))
|
(cons* (dirname ld.so)
|
||||||
(invoke "patchelf" "--set-rpath" rpath file)
|
(dirname
|
||||||
(display " done\n"))
|
(search-input-file inputs "lib/nss/libnss3.so"))
|
||||||
(for-each (lambda (file)
|
(map (lambda (lib)
|
||||||
(patch-elf file))
|
(dirname (search-input-file
|
||||||
(find-files
|
inputs (in-vicinity "lib" lib))))
|
||||||
(string-append #$output "/bin")))))))))
|
'("libdbus-1.so"
|
||||||
|
"libgcc_s.so"
|
||||||
|
"libnspr4.so"
|
||||||
|
"libtss2-esys.so")))
|
||||||
|
":")))
|
||||||
|
(define (patch-elf file)
|
||||||
|
(format #t "Patching ~a ..." file)
|
||||||
|
(unless (string-contains file ".so")
|
||||||
|
(invoke "patchelf" "--set-interpreter" ld.so file))
|
||||||
|
(invoke "patchelf" "--set-rpath" rpath file)
|
||||||
|
(display " done\n"))
|
||||||
|
(for-each (lambda (file)
|
||||||
|
(patch-elf file))
|
||||||
|
(find-files
|
||||||
|
(string-append #$output "/bin"))))))
|
||||||
|
(add-after 'patch-elf 'check
|
||||||
|
(lambda* (#:key tests? outputs #:allow-other-keys)
|
||||||
|
(let ((cmd (search-input-file outputs "bin/warp-cli")))
|
||||||
|
(when tests?
|
||||||
|
(invoke cmd "--help")
|
||||||
|
(invoke cmd "--version"))))))))
|
||||||
(supported-systems '("x86_64-linux"))
|
(supported-systems '("x86_64-linux"))
|
||||||
(native-inputs (list patchelf-0.16))
|
(native-inputs (list patchelf-0.16))
|
||||||
(inputs (list dbus `(,gcc "lib") glibc nspr nss))
|
(inputs (list dbus `(,gcc "lib") glibc nspr nss tpm2-tss))
|
||||||
(home-page "https://1.1.1.1/")
|
(home-page "https://1.1.1.1/")
|
||||||
(synopsis "Cloudflare WARP client")
|
(synopsis "Cloudflare WARP client")
|
||||||
(description
|
(description
|
||||||
@@ -98,10 +127,69 @@ different needs.")
|
|||||||
(release-monitoring-url
|
(release-monitoring-url
|
||||||
. "https://pkg.cloudflareclient.com/dists/bookworm/main/binary-amd64/Packages")))))
|
. "https://pkg.cloudflareclient.com/dists/bookworm/main/binary-amd64/Packages")))))
|
||||||
|
|
||||||
|
(define-public tuwunel-bin
|
||||||
|
(package
|
||||||
|
(name "tuwunel-bin")
|
||||||
|
(version "1.9.4")
|
||||||
|
(source (origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (string-append
|
||||||
|
"https://github.com/matrix-construct/tuwunel"
|
||||||
|
"/releases/download/v" version "/v" version
|
||||||
|
"-release-all-x86_64-v1-linux-gnu-tuwunel.zst"))
|
||||||
|
(file-name (string-append name "-" version ".zst"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"18ymxl238xzgwr2mp0d8f173qbik20nkzfdf6949xnny2dnqwqkq"))))
|
||||||
|
(build-system gnu-build-system)
|
||||||
|
(arguments
|
||||||
|
(list #:tests? (not (%current-target-system))
|
||||||
|
#:imported-modules
|
||||||
|
(append %default-gnu-imported-modules
|
||||||
|
%copy-build-system-modules)
|
||||||
|
#:modules
|
||||||
|
'((guix build utils)
|
||||||
|
(guix build gnu-build-system)
|
||||||
|
((guix build copy-build-system) #:prefix copy:))
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(delete 'configure)
|
||||||
|
(delete 'build)
|
||||||
|
(delete 'check)
|
||||||
|
(replace 'install
|
||||||
|
(lambda args
|
||||||
|
(apply (assoc-ref copy:%standard-phases 'install)
|
||||||
|
#:install-plan
|
||||||
|
'((#$(format #f "~a-~a"
|
||||||
|
(package-name this-package)
|
||||||
|
(package-version this-package))
|
||||||
|
"bin/tuwunel"))
|
||||||
|
args)))
|
||||||
|
(add-after 'install 'fix-permission
|
||||||
|
(lambda _
|
||||||
|
(chmod (string-append #$output "/bin/tuwunel") #o555)))
|
||||||
|
(add-after 'fix-permission 'check
|
||||||
|
(lambda* (#:key tests? outputs #:allow-other-keys)
|
||||||
|
(let ((tuwunel (search-input-file outputs "bin/tuwunel")))
|
||||||
|
(when tests?
|
||||||
|
(invoke tuwunel "--help")
|
||||||
|
(invoke tuwunel "--version"))))))))
|
||||||
|
(supported-systems '("x86_64-linux"))
|
||||||
|
(synopsis "Matrix homeserver")
|
||||||
|
(description
|
||||||
|
"Tuwunel is a featureful Matrix homeserver you can use instead of Synapse
|
||||||
|
with your favorite client, bridge or bot. It is written entirely in Rust to be
|
||||||
|
a scalable, lightweight, low-cost, community-driven alternative covering all but
|
||||||
|
the most niche uses.")
|
||||||
|
(home-page "https://matrix-construct.github.io/tuwunel/")
|
||||||
|
(license license:asl2.0)
|
||||||
|
(properties '((upstream-name . "tuwunel")
|
||||||
|
(disable-updater? . #t)))))
|
||||||
|
|
||||||
(define-public komga-bin
|
(define-public komga-bin
|
||||||
(package
|
(package
|
||||||
(name "komga-bin")
|
(name "komga-bin")
|
||||||
(version "1.22.1")
|
(version "1.30.2")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append
|
(uri (string-append
|
||||||
@@ -109,7 +197,7 @@ different needs.")
|
|||||||
"/komga-" version ".jar"))
|
"/komga-" version ".jar"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0y3khm3q4mh1qrbklzjn1ac7xgb1g21qw3fn9vxmjsvghanhf0rh"))))
|
"0fx40hzbzgpsalwf48yxaa7cpkjkg07pca46pwcv6zl4n1l68wx5"))))
|
||||||
(build-system copy-build-system)
|
(build-system copy-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list #:install-plan
|
(list #:install-plan
|
||||||
@@ -144,13 +232,12 @@ exec ~a -jar ~a $@~%"
|
|||||||
eBooks.")
|
eBooks.")
|
||||||
(supported-systems '("x86_64-linux"))
|
(supported-systems '("x86_64-linux"))
|
||||||
(license license:expat)
|
(license license:expat)
|
||||||
(properties '((upstream-name . "komga")
|
(properties '((upstream-name . "komga")))))
|
||||||
(disable-updater? . #t)))))
|
|
||||||
|
|
||||||
(define-public navidrome-bin
|
(define-public navidrome-bin
|
||||||
(package
|
(package
|
||||||
(name "navidrome-bin")
|
(name "navidrome-bin")
|
||||||
(version "0.57.0")
|
(version "0.65.0")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append
|
(uri (string-append
|
||||||
@@ -158,11 +245,33 @@ eBooks.")
|
|||||||
version "/navidrome_" version "_linux_amd64.tar.gz"))
|
version "/navidrome_" version "_linux_amd64.tar.gz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0v2av7q9sfsm17m03xdzb7afn3hlqb2vj3ps0xwsa8x7yza4j3fb"))))
|
"1s53wy7ccm43nhp8hkzkafdm9b2ja7ncnampwal4471hmafm1817"))))
|
||||||
(build-system copy-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list #:install-plan
|
(list #:tests? (not (%current-target-system))
|
||||||
#~'(("navidrome" "bin/"))))
|
#:imported-modules
|
||||||
|
(append %default-gnu-imported-modules
|
||||||
|
%copy-build-system-modules)
|
||||||
|
#:modules
|
||||||
|
'((guix build utils)
|
||||||
|
(guix build gnu-build-system)
|
||||||
|
((guix build copy-build-system) #:prefix copy:))
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(delete 'configure)
|
||||||
|
(delete 'build)
|
||||||
|
(delete 'check)
|
||||||
|
(replace 'install
|
||||||
|
(lambda args
|
||||||
|
(apply (assoc-ref copy:%standard-phases 'install)
|
||||||
|
#:install-plan '(("navidrome" "bin/"))
|
||||||
|
args)))
|
||||||
|
(add-after 'install 'check
|
||||||
|
(lambda* (#:key tests? outputs #:allow-other-keys)
|
||||||
|
(let ((cmd (search-input-file outputs "bin/navidrome")))
|
||||||
|
(when tests?
|
||||||
|
(invoke cmd "--help")
|
||||||
|
(invoke cmd "--version"))))))))
|
||||||
(supported-systems '("x86_64-linux"))
|
(supported-systems '("x86_64-linux"))
|
||||||
(home-page "https://www.navidrome.org/")
|
(home-page "https://www.navidrome.org/")
|
||||||
(synopsis "Web-based music collection server and streamer")
|
(synopsis "Web-based music collection server and streamer")
|
||||||
@@ -171,31 +280,9 @@ eBooks.")
|
|||||||
manage their music collections. It provides a web interface and is compatible
|
manage their music collections. It provides a web interface and is compatible
|
||||||
with the Subsonic API.")
|
with the Subsonic API.")
|
||||||
(license license:expat)
|
(license license:expat)
|
||||||
(properties '((upstream-name . "navidrome")
|
(properties '((upstream-name . "navidrome")))))
|
||||||
(disable-updater? . #t)))))
|
|
||||||
|
|
||||||
(define-public rclone-bin
|
(define-deprecated-package rclone-bin rclone)
|
||||||
(package
|
|
||||||
(inherit rclone)
|
|
||||||
(name "rclone-bin")
|
|
||||||
(version "1.71.0")
|
|
||||||
(source (origin
|
|
||||||
(method url-fetch/zipbomb)
|
|
||||||
(uri (string-append
|
|
||||||
"https://github.com/rclone/rclone/releases/download/v"
|
|
||||||
version "/rclone-v" version "-linux-amd64.zip"))
|
|
||||||
(sha256
|
|
||||||
(base32
|
|
||||||
"14wyd767nbk3whgfvblb3kpiyzskcqbq61nh1jq6wbpg6pawznrx"))))
|
|
||||||
(build-system copy-build-system)
|
|
||||||
(arguments
|
|
||||||
(list #:install-plan
|
|
||||||
#~'((#$(string-append "rclone-v" (package-version this-package)
|
|
||||||
"-linux-amd64/rclone")
|
|
||||||
"bin/rclone"))))
|
|
||||||
(supported-systems '("x86_64-linux"))
|
|
||||||
(properties '((upstream-name . "rclone")
|
|
||||||
(disable-updater? . #t)))))
|
|
||||||
|
|
||||||
(define-public shadow-tls-bin
|
(define-public shadow-tls-bin
|
||||||
(package
|
(package
|
||||||
@@ -225,13 +312,12 @@ with the Subsonic API.")
|
|||||||
"Shadow TLS is a proxy to expose real tls handshake to the @acronym{MITM,
|
"Shadow TLS is a proxy to expose real tls handshake to the @acronym{MITM,
|
||||||
monster-in-the-middle}.")
|
monster-in-the-middle}.")
|
||||||
(license license:expat)
|
(license license:expat)
|
||||||
(properties '((upstream-name . "shadow-tls")
|
(properties '((upstream-name . "shadow-tls")))))
|
||||||
(disable-updater? . #t)))))
|
|
||||||
|
|
||||||
(define-public wakapi-bin
|
(define-public wakapi-bin
|
||||||
(package
|
(package
|
||||||
(name "wakapi-bin")
|
(name "wakapi-bin")
|
||||||
(version "2.14.1")
|
(version "2.18.2")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append
|
(uri (string-append
|
||||||
@@ -239,9 +325,33 @@ monster-in-the-middle}.")
|
|||||||
version "/wakapi_linux_amd64.zip"))
|
version "/wakapi_linux_amd64.zip"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1qfm3di3bfk7pc6ks22287hib7jk57ilvsy3hm42xvv2fhk77m69"))))
|
"0fr7948g4ddyzd5ih16w586i689viswzbgykbridvr4sm7q9hkm6"))))
|
||||||
(build-system copy-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments (list #:install-plan #~'(("wakapi" "bin/wakapi"))))
|
(arguments
|
||||||
|
(list #:tests? (not (%current-target-system))
|
||||||
|
#:imported-modules
|
||||||
|
(append %default-gnu-imported-modules
|
||||||
|
%copy-build-system-modules)
|
||||||
|
#:modules
|
||||||
|
'((guix build utils)
|
||||||
|
(guix build gnu-build-system)
|
||||||
|
((guix build copy-build-system) #:prefix copy:))
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(delete 'configure)
|
||||||
|
(delete 'build)
|
||||||
|
(delete 'check)
|
||||||
|
(replace 'install
|
||||||
|
(lambda args
|
||||||
|
(apply (assoc-ref copy:%standard-phases 'install)
|
||||||
|
#:install-plan '(("wakapi" "bin/wakapi"))
|
||||||
|
args)))
|
||||||
|
(add-after 'install 'check
|
||||||
|
(lambda* (#:key tests? outputs #:allow-other-keys)
|
||||||
|
(let ((cmd (search-input-file outputs "bin/wakapi")))
|
||||||
|
(when tests?
|
||||||
|
(invoke cmd "--help")
|
||||||
|
(invoke cmd "--version"))))))))
|
||||||
(supported-systems '("x86_64-linux"))
|
(supported-systems '("x86_64-linux"))
|
||||||
(native-inputs (list unzip))
|
(native-inputs (list unzip))
|
||||||
(home-page "https://wakapi.dev/")
|
(home-page "https://wakapi.dev/")
|
||||||
@@ -250,13 +360,12 @@ monster-in-the-middle}.")
|
|||||||
"This package provides @code{wakapi}, a WakaTime-compatible backend for
|
"This package provides @code{wakapi}, a WakaTime-compatible backend for
|
||||||
coding statistics.")
|
coding statistics.")
|
||||||
(license license:expat)
|
(license license:expat)
|
||||||
(properties '((upstream-name . "wakapi")
|
(properties '((upstream-name . "wakapi")))))
|
||||||
(disable-updater? . #t)))))
|
|
||||||
|
|
||||||
(define-public wakatime-cli-bin
|
(define-public wakatime-cli-bin
|
||||||
(package
|
(package
|
||||||
(name "wakatime-cli-bin")
|
(name "wakatime-cli-bin")
|
||||||
(version "1.124.1")
|
(version "2.28.4")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append "https://github.com/wakatime/wakatime-cli"
|
(uri (string-append "https://github.com/wakatime/wakatime-cli"
|
||||||
@@ -264,11 +373,35 @@ coding statistics.")
|
|||||||
"/wakatime-cli-linux-amd64.zip"))
|
"/wakatime-cli-linux-amd64.zip"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"16glv2x0n118dczgjfaz02dwq70ngcq4wqc3pswdjzkch79z109m"))))
|
"0i83azdzxlmbvm8ffqzs3z3dkpmq474pis8fv6z0xjv097yakpz1"))))
|
||||||
(build-system copy-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list #:install-plan
|
(list #:tests? (not (%current-target-system))
|
||||||
#~'(("wakatime-cli-linux-amd64" "bin/wakatime-cli"))))
|
#:imported-modules
|
||||||
|
(append %default-gnu-imported-modules
|
||||||
|
%copy-build-system-modules)
|
||||||
|
#:modules
|
||||||
|
'((guix build utils)
|
||||||
|
(guix build gnu-build-system)
|
||||||
|
((guix build copy-build-system) #:prefix copy:))
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(delete 'configure)
|
||||||
|
(delete 'build)
|
||||||
|
(delete 'check)
|
||||||
|
(replace 'install
|
||||||
|
(lambda args
|
||||||
|
(apply (assoc-ref copy:%standard-phases 'install)
|
||||||
|
#:install-plan
|
||||||
|
'(("wakatime-cli-linux-amd64" "bin/wakatime-cli"))
|
||||||
|
args)))
|
||||||
|
(add-after 'install 'check
|
||||||
|
(lambda* (#:key tests? outputs #:allow-other-keys)
|
||||||
|
(let ((cmd (search-input-file outputs "bin/wakatime-cli")))
|
||||||
|
(when tests?
|
||||||
|
(setenv "HOME" "/tmp")
|
||||||
|
(invoke cmd "--help")
|
||||||
|
(invoke cmd "--version"))))))))
|
||||||
(supported-systems '("x86_64-linux"))
|
(supported-systems '("x86_64-linux"))
|
||||||
(native-inputs (list unzip))
|
(native-inputs (list unzip))
|
||||||
(home-page "https://wakatime.com/plugins")
|
(home-page "https://wakatime.com/plugins")
|
||||||
@@ -277,27 +410,35 @@ coding statistics.")
|
|||||||
"This package provides @command{wakatime-cli}, the command line interface
|
"This package provides @command{wakatime-cli}, the command line interface
|
||||||
to WakaTime, which is used by all WakaTime text editor plugins.")
|
to WakaTime, which is used by all WakaTime text editor plugins.")
|
||||||
(license license:bsd-3)
|
(license license:bsd-3)
|
||||||
(properties '((upstream-name . "wakatime-cli")
|
(properties '((upstream-name . "wakatime-cli")))))
|
||||||
(disable-updater? . #t)))))
|
|
||||||
|
|
||||||
(define-public grafana-bin
|
(define-public grafana-bin
|
||||||
(package
|
(package
|
||||||
(name "grafana-bin")
|
(name "grafana-bin")
|
||||||
(version "12.1.1")
|
(version "13.2.4")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append "https://dl.grafana.com/grafana/release/"
|
(uri (string-append "https://dl.grafana.com/grafana/release/"
|
||||||
version "/grafana_" version "_" "16903967602"
|
version "/grafana_" version "_"
|
||||||
"_linux_amd64.tar.gz"))
|
"38252365904_linux_amd64.tar.gz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"056jj4ww1l36y77v9qmqhgsg7lsr328bhp7y48c6l125cal1snl2"))))
|
"1awjgdcg79k7rzrx0q73nd5fda7q38jp19jfgrh751fqiyc6b1y4"))))
|
||||||
(build-system copy-build-system)
|
(build-system copy-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list #:install-plan
|
(list #:tests? (not (%current-target-system))
|
||||||
|
#:install-plan
|
||||||
#~'(("bin" "bin")
|
#~'(("bin" "bin")
|
||||||
("conf" "share/grafana/")
|
("conf" "share/grafana/")
|
||||||
("public" "share/grafana/"))))
|
("public" "share/grafana/"))
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(add-after 'install 'check
|
||||||
|
(lambda* (#:key tests? outputs #:allow-other-keys)
|
||||||
|
(let ((cmd (search-input-file outputs "bin/grafana")))
|
||||||
|
(when tests?
|
||||||
|
(invoke cmd "--help")
|
||||||
|
(invoke cmd "--version"))))))))
|
||||||
(synopsis "Platform for monitoring and observability")
|
(synopsis "Platform for monitoring and observability")
|
||||||
(description
|
(description
|
||||||
"Grafana allows you to query, visualize, alert on and understand your
|
"Grafana allows you to query, visualize, alert on and understand your
|
||||||
@@ -311,7 +452,7 @@ metrics no matter where they are stored.")
|
|||||||
(define-public prometheus-bin
|
(define-public prometheus-bin
|
||||||
(package
|
(package
|
||||||
(name "prometheus-bin")
|
(name "prometheus-bin")
|
||||||
(version "3.7.2")
|
(version "3.16.0")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append "https://github.com/prometheus/prometheus"
|
(uri (string-append "https://github.com/prometheus/prometheus"
|
||||||
@@ -319,13 +460,36 @@ metrics no matter where they are stored.")
|
|||||||
"/prometheus-" version ".linux-amd64.tar.gz"))
|
"/prometheus-" version ".linux-amd64.tar.gz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0wam45r7ksgmpbgryxwy1pddk3yf0pk85zph4k7gag8x7k2bqn35"))))
|
"0d0gdsfl9yvn1hs2vz68zxdjhdz6ngajy1kzzzhh4b1a8w4p0wk8"))))
|
||||||
(build-system copy-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list #:install-plan
|
(list #:tests? (not (%current-target-system))
|
||||||
#~'(("prometheus" "bin/")
|
#:imported-modules
|
||||||
("promtool" "bin/")
|
(append %default-gnu-imported-modules
|
||||||
("prometheus.yml" "etc/"))))
|
%copy-build-system-modules)
|
||||||
|
#:modules
|
||||||
|
'((guix build utils)
|
||||||
|
(guix build gnu-build-system)
|
||||||
|
((guix build copy-build-system) #:prefix copy:))
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(delete 'configure)
|
||||||
|
(delete 'build)
|
||||||
|
(delete 'check)
|
||||||
|
(replace 'install
|
||||||
|
(lambda args
|
||||||
|
(apply (assoc-ref copy:%standard-phases 'install)
|
||||||
|
#:install-plan
|
||||||
|
'(("prometheus" "bin/")
|
||||||
|
("promtool" "bin/")
|
||||||
|
("prometheus.yml" "etc/"))
|
||||||
|
args)))
|
||||||
|
(add-after 'install 'check
|
||||||
|
(lambda* (#:key tests? outputs #:allow-other-keys)
|
||||||
|
(let ((cmd (search-input-file outputs "bin/prometheus")))
|
||||||
|
(when tests?
|
||||||
|
(invoke cmd "--help")
|
||||||
|
(invoke cmd "--version"))))))))
|
||||||
(synopsis "Monitoring system and time series database")
|
(synopsis "Monitoring system and time series database")
|
||||||
(description
|
(description
|
||||||
"Prometheus is a systems and service monitoring system. It collects
|
"Prometheus is a systems and service monitoring system. It collects
|
||||||
@@ -340,7 +504,7 @@ observed.")
|
|||||||
(define-public mimir-bin
|
(define-public mimir-bin
|
||||||
(package
|
(package
|
||||||
(name "mimir-bin")
|
(name "mimir-bin")
|
||||||
(version "2.17.1")
|
(version "3.2.3")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append
|
(uri (string-append
|
||||||
@@ -348,10 +512,11 @@ observed.")
|
|||||||
version "/mimir-linux-amd64"))
|
version "/mimir-linux-amd64"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1vnrpzwyjz7plzdiih65853ndvg64a9n1x1i7jqr085byhpayp82"))))
|
"17rhn69z3vvkxhfjr14gv7zx22x1spgf1cyj8gc0zidwy09d8wzj"))))
|
||||||
(build-system copy-build-system)
|
(build-system copy-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list #:phases
|
(list #:tests? (not (%current-target-system))
|
||||||
|
#:phases
|
||||||
#~(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(replace 'install
|
(replace 'install
|
||||||
(lambda* (#:key source #:allow-other-keys)
|
(lambda* (#:key source #:allow-other-keys)
|
||||||
@@ -360,7 +525,12 @@ observed.")
|
|||||||
(mkdir-p dest)
|
(mkdir-p dest)
|
||||||
(with-directory-excursion dest
|
(with-directory-excursion dest
|
||||||
(copy-file source name)
|
(copy-file source name)
|
||||||
(chmod name #o555))))))))
|
(chmod name #o555)))))
|
||||||
|
(add-after 'install 'check
|
||||||
|
(lambda* (#:key tests? outputs #:allow-other-keys)
|
||||||
|
(let ((cmd (search-input-file outputs "bin/mimir")))
|
||||||
|
(when tests?
|
||||||
|
(invoke cmd "-version"))))))))
|
||||||
(synopsis "Scalable long-term storage for Prometheus")
|
(synopsis "Scalable long-term storage for Prometheus")
|
||||||
(description
|
(description
|
||||||
"Grafana Mimir provides horizontally scalable, highly available,
|
"Grafana Mimir provides horizontally scalable, highly available,
|
||||||
@@ -374,19 +544,20 @@ multi-tenant, long-term storage for Prometheus.")
|
|||||||
(define-public loki-bin
|
(define-public loki-bin
|
||||||
(package
|
(package
|
||||||
(name "loki-bin")
|
(name "loki-bin")
|
||||||
(version "3.5.4")
|
(version "3.7.11")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch/zipbomb)
|
(method url-fetch)
|
||||||
(uri (string-append
|
(uri (string-append
|
||||||
"https://github.com/grafana/loki/releases/download/v"
|
"https://github.com/grafana/loki/releases/download/v"
|
||||||
version "/loki-linux-amd64.zip"))
|
version "/loki-linux-amd64.zip"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1z1z60ki4zavijw0idpard0xx38q8140wv2hykxb3rikb05z0frk"))))
|
"0ydgjphmqy2ihf1ff7la254si270g82kpazaq8j1yz1s40h3q1l5"))))
|
||||||
(build-system copy-build-system)
|
(build-system copy-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list #:install-plan
|
(list #:install-plan
|
||||||
#~'(("loki-linux-amd64" "bin/loki"))))
|
#~'(("loki-linux-amd64" "bin/loki"))))
|
||||||
|
(native-inputs (list unzip))
|
||||||
(synopsis "Log aggregation system")
|
(synopsis "Log aggregation system")
|
||||||
(description
|
(description
|
||||||
"Loki is a horizontally scalable, highly available, multi-tenant log
|
"Loki is a horizontally scalable, highly available, multi-tenant log
|
||||||
@@ -396,62 +567,109 @@ rather a set of labels for each log stream.")
|
|||||||
(home-page "https://grafana.com/oss/loki/")
|
(home-page "https://grafana.com/oss/loki/")
|
||||||
(license license:agpl3)
|
(license license:agpl3)
|
||||||
(supported-systems '("x86_64-linux"))
|
(supported-systems '("x86_64-linux"))
|
||||||
(properties '((upstream-name . "loki")
|
(properties '((upstream-name . "loki")))))
|
||||||
(disable-updater? . #t)))))
|
|
||||||
|
|
||||||
(define-public alloy-bin
|
|
||||||
|
;;;
|
||||||
|
;;; alloy
|
||||||
|
;;;
|
||||||
|
|
||||||
|
(define-public %alloy-source-x86_64-linux
|
||||||
(package
|
(package
|
||||||
(name "alloy-bin")
|
(inherit %binary-source)
|
||||||
(version "1.10.2")
|
(name "alloy")
|
||||||
|
(version "1.22.0")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch/zipbomb)
|
(method url-fetch)
|
||||||
(uri (string-append
|
(uri (string-append
|
||||||
"https://github.com/grafana/alloy/releases/download/v"
|
"https://github.com/grafana/alloy/releases/download/v"
|
||||||
version "/alloy-linux-amd64.zip"))
|
version "/alloy-linux-amd64.zip"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"03hwmnkx2awxlfw3ixplfnwzx7n1x624n1yw6cgky4hhjz13d3i8"))))
|
"1ybn64yg57bla7wny2bxa1dcgbx6ham770kccgynz6wcn7z7glb2"))))))
|
||||||
(build-system copy-build-system)
|
|
||||||
(arguments
|
|
||||||
(list #:install-plan
|
|
||||||
#~'(("alloy-linux-amd64" "bin/alloy"))
|
|
||||||
#:phases
|
|
||||||
#~(modify-phases %standard-phases
|
|
||||||
(add-after 'install 'patch-elf
|
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
|
||||||
(let ((name "alloy")
|
|
||||||
(dest (in-vicinity #$output "bin"))
|
|
||||||
(ld.so (search-input-file inputs #$(glibc-dynamic-linker))))
|
|
||||||
(with-directory-excursion dest
|
|
||||||
(invoke "patchelf" "--set-interpreter" ld.so name))))))))
|
|
||||||
(native-inputs (list patchelf))
|
|
||||||
(synopsis
|
|
||||||
"OpenTelemetry Collector distribution with programmable pipelines")
|
|
||||||
(description
|
|
||||||
"Grafana Alloy is an open source OpenTelemetry Collector distribution with
|
|
||||||
built-in Prometheus pipelines and support for metrics, logs, traces, and
|
|
||||||
profiles.")
|
|
||||||
(home-page "https://grafana.com/oss/alloy-opentelemetry-collector/")
|
|
||||||
(license license:agpl3)
|
|
||||||
(supported-systems '("x86_64-linux"))
|
|
||||||
(properties '((upstream-name . "alloy")
|
|
||||||
(disable-updater? . #t)))))
|
|
||||||
|
|
||||||
(define-public alloy-bin-aarch64-linux
|
(define-public %alloy-source-aarch64-linux
|
||||||
(package
|
(package
|
||||||
(inherit alloy-bin)
|
(inherit %binary-source)
|
||||||
(name "alloy-bin-aarch64-linux")
|
(name "alloy")
|
||||||
(version "1.10.2")
|
(version "1.22.0")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch/zipbomb)
|
(method url-fetch)
|
||||||
(uri (string-append
|
(uri (string-append
|
||||||
"https://github.com/grafana/alloy/releases/download/v"
|
"https://github.com/grafana/alloy/releases/download/v"
|
||||||
version "/alloy-linux-arm64.zip"))
|
version "/alloy-linux-arm64.zip"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1gnfdhs8rxyn18swy1kv1f2lbsj6abjlhrgaibsj2a87swgcyvjg"))))
|
"1lva8f7shynbgp06ic3d046yp94vhxcmffcmikgzfgjxq9xlsb6c"))))))
|
||||||
(arguments
|
|
||||||
(substitute-keyword-arguments (package-arguments alloy-bin)
|
(define-public alloy-bin
|
||||||
((#:install-plan _ ''())
|
(binary-package
|
||||||
#~'(("alloy-linux-arm64" "bin/alloy")))))
|
`(("x86_64-linux" . ,%alloy-source-x86_64-linux)
|
||||||
(supported-systems '("aarch64-linux"))))
|
("aarch64-linux" . ,%alloy-source-aarch64-linux))
|
||||||
|
(package
|
||||||
|
(name "alloy-bin")
|
||||||
|
(version "")
|
||||||
|
(source #f)
|
||||||
|
(build-system gnu-build-system)
|
||||||
|
(arguments
|
||||||
|
(list
|
||||||
|
#:modules
|
||||||
|
`((ice-9 match)
|
||||||
|
,@%default-gnu-modules)
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(delete 'bootstrap)
|
||||||
|
(delete 'configure)
|
||||||
|
(delete 'build)
|
||||||
|
(delete 'check)
|
||||||
|
(replace 'install
|
||||||
|
(lambda _
|
||||||
|
(let ((src #$(mapping-for-system
|
||||||
|
'(("x86_64-linux" . "alloy-linux-amd64")
|
||||||
|
("aarch64-linux" . "alloy-linux-arm64"))))
|
||||||
|
(dst (in-vicinity #$output "bin/alloy")))
|
||||||
|
(mkdir-p (dirname dst))
|
||||||
|
(copy-file src dst))))
|
||||||
|
(add-after 'install 'patch-elf
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
(let ((ld.so (search-input-file inputs #$(glibc-dynamic-linker)))
|
||||||
|
(dest (in-vicinity #$output "bin"))
|
||||||
|
(name "alloy"))
|
||||||
|
(with-directory-excursion dest
|
||||||
|
(invoke "patchelf" "--set-interpreter" ld.so name)
|
||||||
|
(invoke "patchelf" "--set-rpath" (dirname ld.so) name)
|
||||||
|
(chmod name #o555)))))
|
||||||
|
(add-after 'patch-elf 'install-extras
|
||||||
|
(lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
|
||||||
|
(let ((alloy
|
||||||
|
(search-input-file
|
||||||
|
(if #$(%current-target-system)
|
||||||
|
native-inputs
|
||||||
|
outputs)
|
||||||
|
"bin/alloy")))
|
||||||
|
(for-each
|
||||||
|
(match-lambda
|
||||||
|
((shell . file)
|
||||||
|
(mkdir-p (in-vicinity #$output (dirname file)))
|
||||||
|
(with-output-to-file (in-vicinity #$output file)
|
||||||
|
(lambda ()
|
||||||
|
(invoke alloy "completion" shell)))))
|
||||||
|
'(("bash" . "share/bash-completion/completions/alloy")
|
||||||
|
("fish" . "share/fish/vendor_completions.d/alloy.fish")
|
||||||
|
("zsh" . "share/zsh/site-functions/_alloy")))))))))
|
||||||
|
(native-inputs
|
||||||
|
(append (if (%current-target-system)
|
||||||
|
(list this-package)
|
||||||
|
'())
|
||||||
|
(list patchelf-0.16 unzip)))
|
||||||
|
(supported-systems '("x86_64-linux" "aarch64-linux"))
|
||||||
|
(home-page "https://grafana.com/oss/alloy-opentelemetry-collector/")
|
||||||
|
(synopsis
|
||||||
|
"OpenTelemetry Collector distribution with programmable pipelines")
|
||||||
|
(description
|
||||||
|
"Grafana Alloy is an open source OpenTelemetry Collector distribution with
|
||||||
|
built-in Prometheus pipelines and support for metrics, logs, traces, and
|
||||||
|
profiles.")
|
||||||
|
(license license:agpl3))))
|
||||||
|
|
||||||
|
(define-deprecated-package alloy-bin-aarch64-linux alloy-bin)
|
||||||
@@ -1,21 +1,29 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2023-2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;; Copyright © 2024 Lilah Tascheter <lilah@lunabee.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2023-2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
;;; Copyright © 2024 Lilah Tascheter <lilah@lunabee.space>
|
||||||
|
|
||||||
(define-module (rosenthal packages bootloaders)
|
(define-module (rosenthal packages bootloaders)
|
||||||
|
#:use-module (srfi srfi-26)
|
||||||
|
;; Utilities
|
||||||
|
#:use-module (guix deprecation)
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module ((guix licenses) #:prefix license:)
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
|
;; Guix origin methods
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
#:use-module (guix git-download)
|
#:use-module (guix git-download)
|
||||||
|
;; Guix build systems
|
||||||
|
#:use-module (guix build-system gnu)
|
||||||
#:use-module (guix build-system meson)
|
#:use-module (guix build-system meson)
|
||||||
#:use-module (guix build-system pyproject)
|
#:use-module (guix build-system pyproject)
|
||||||
|
;; Guix packages
|
||||||
#:use-module (gnu packages autotools)
|
#:use-module (gnu packages autotools)
|
||||||
#:use-module (gnu packages base)
|
#:use-module (gnu packages base)
|
||||||
#:use-module (gnu packages bootloaders)
|
#:use-module (gnu packages bootloaders)
|
||||||
#:use-module (gnu packages crypto)
|
#:use-module (gnu packages crypto)
|
||||||
|
#:use-module (gnu packages assembly)
|
||||||
|
#:use-module (gnu packages mtools)
|
||||||
#:use-module (gnu packages efi)
|
#:use-module (gnu packages efi)
|
||||||
#:use-module (gnu packages gperf)
|
#:use-module (gnu packages gperf)
|
||||||
#:use-module (gnu packages linux)
|
#:use-module (gnu packages linux)
|
||||||
@@ -26,46 +34,57 @@
|
|||||||
#:use-module (gnu packages python-xyz)
|
#:use-module (gnu packages python-xyz)
|
||||||
#:export (systemd-stub-name))
|
#:export (systemd-stub-name))
|
||||||
|
|
||||||
;; Patches obtained from:
|
(define-deprecated-package grub-efi-luks2 grub-efi)
|
||||||
;; <https://leo3418.github.io/collections/gentoo-config-luks2-grub-systemd/packages.html>
|
|
||||||
|
|
||||||
(define grub-luks2-argon2-support-patch
|
(define-public limine
|
||||||
(origin
|
(package
|
||||||
(method url-fetch)
|
(name "limine")
|
||||||
(uri (string-append "https://leo3418.github.io/"
|
(version "12.11.3")
|
||||||
"res/collections/gentoo-config-luks2-grub-systemd/"
|
(source (origin
|
||||||
"grub-2.12-luks2-argon2-v4.patch"))
|
(method url-fetch)
|
||||||
(sha256
|
(uri (string-append
|
||||||
(base32
|
"https://github.com/Limine-Bootloader/Limine/releases"
|
||||||
"02y15k6rd5vj2shfijyhq2nr2775vpa55ijfy6bb8irpnh8i2272"))))
|
"/download/v" version "/limine-" version ".tar.xz"))
|
||||||
|
(sha256
|
||||||
(define-public grub-efi-luks2
|
(base32
|
||||||
(let ((base grub-efi))
|
"1wsjv099nf8hg5irlhj71pxin7c5skpgvkplgrnh1mcwsj10m4ay"))))
|
||||||
(package
|
(build-system gnu-build-system)
|
||||||
(inherit base)
|
(arguments
|
||||||
(name "grub-efi-luks2")
|
(list #:tests? #f
|
||||||
(source
|
#:configure-flags
|
||||||
(let ((base (package-source base)))
|
#~(list (string-append
|
||||||
(origin
|
"TOOLCHAIN_FOR_TARGET="
|
||||||
(inherit base)
|
#$(or (and=> (%current-target-system)
|
||||||
(patches
|
(cut string-append <> "-"))
|
||||||
(append (origin-patches base)
|
""))
|
||||||
(list grub-luks2-argon2-support-patch))))))
|
(string-append "--prefix=" #$output)
|
||||||
(arguments
|
#$@(if (target-x86?)
|
||||||
(substitute-keyword-arguments (package-arguments base)
|
'("--enable-bios-cd"
|
||||||
((#:configure-flags flags ''())
|
"--enable-bios-pxe"
|
||||||
#~(append #$flags '("--disable-werror")))
|
"--enable-bios"
|
||||||
((#:phases phases '%standard-phases)
|
"--enable-uefi-ia32")
|
||||||
#~(modify-phases #$phases
|
'())
|
||||||
(add-after 'unpack 'delete-configure-script
|
#$@(if (target-x86-64?)
|
||||||
(lambda _
|
'("--enable-uefi-x86-64")
|
||||||
(delete-file "configure")))))))
|
'())
|
||||||
(native-inputs
|
#$@(if (target-aarch64?)
|
||||||
(modify-inputs (package-native-inputs base)
|
'("--enable-uefi-aarch64")
|
||||||
(append autoconf automake python-minimal-wrapper)))
|
'())
|
||||||
(properties
|
#$@(if (target-riscv64?)
|
||||||
`(,@(package-properties base)
|
'("--enable-uefi-riscv64")
|
||||||
(disable-updater? . #t))))))
|
'())
|
||||||
|
#$@(if (target-loongarch64?)
|
||||||
|
'("--enable-uefi-loongarch64")
|
||||||
|
'()))
|
||||||
|
#:make-flags
|
||||||
|
#~(list "SHELL=sh")))
|
||||||
|
(native-inputs (list mtools nasm))
|
||||||
|
(home-page "https://github.com/Limine-Bootloader/Limine")
|
||||||
|
(synopsis "Multiprotocol bootloader and boot manager")
|
||||||
|
(description
|
||||||
|
"Limine is a multiprotocol bootloader and boot manager. It's also used as
|
||||||
|
the reference implementation for the Limine boot protocol.")
|
||||||
|
(license license:bsd-2)))
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
@@ -83,7 +102,7 @@
|
|||||||
(define-public systemd-stub
|
(define-public systemd-stub
|
||||||
(package
|
(package
|
||||||
(name "systemd-stub")
|
(name "systemd-stub")
|
||||||
(version "258")
|
(version "262.2")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
@@ -92,7 +111,7 @@
|
|||||||
(file-name (git-file-name "name" version))
|
(file-name (git-file-name "name" version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"18gnp45gl1154jra6qv95k8y7ny6phdm87yqi5jdq13cadlrklf6"))))
|
"1a5n1h3pkha5id2mdpl8b07dggrga4zvm6w4yw30xdv63mmgplh4"))))
|
||||||
(build-system meson-build-system)
|
(build-system meson-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list #:tests? #f
|
(list #:tests? #f
|
||||||
@@ -126,7 +145,7 @@ Supports measured and/or verified boot environments.")
|
|||||||
(define-public ukify
|
(define-public ukify
|
||||||
(package
|
(package
|
||||||
(name "ukify")
|
(name "ukify")
|
||||||
(version "258")
|
(version "262.2")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
@@ -135,7 +154,7 @@ Supports measured and/or verified boot environments.")
|
|||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"18gnp45gl1154jra6qv95k8y7ny6phdm87yqi5jdq13cadlrklf6"))))
|
"1a5n1h3pkha5id2mdpl8b07dggrga4zvm6w4yw30xdv63mmgplh4"))))
|
||||||
(build-system pyproject-build-system)
|
(build-system pyproject-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list #:phases
|
(list #:phases
|
||||||
|
|||||||
@@ -1,21 +1,26 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2023-2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2023-2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal packages browser-extensions)
|
(define-module (rosenthal packages browser-extensions)
|
||||||
|
;; Guile builtins
|
||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
|
;; Utilities
|
||||||
|
#:use-module (gnu build icecat-extension)
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module ((guix licenses) #:prefix license:)
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
|
;; Guix origin methods
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
#:use-module (guix git-download)
|
#:use-module (guix git-download)
|
||||||
|
;; Guix build systems
|
||||||
#:use-module (guix build-system copy)
|
#:use-module (guix build-system copy)
|
||||||
#:use-module (gnu build icecat-extension))
|
;; Guix packages
|
||||||
|
#:use-module (gnu packages compression))
|
||||||
|
|
||||||
(define-public bitwarden
|
(define bitwarden
|
||||||
(package
|
(package
|
||||||
(name "bitwarden")
|
(name "bitwarden")
|
||||||
(version "2025.6.1")
|
(version "2026.10.0")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch/zipbomb)
|
(method url-fetch/zipbomb)
|
||||||
(uri (string-append "https://github.com/bitwarden/clients"
|
(uri (string-append "https://github.com/bitwarden/clients"
|
||||||
@@ -23,7 +28,7 @@
|
|||||||
"/dist-firefox-" version ".zip"))
|
"/dist-firefox-" version ".zip"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1yx9f1adh6swbzf24rj621vgccvi8gl7hi8q4r9ccv5qq4zq3f53"))))
|
"0k8c1wfq9yzgyq7whj5gbp00pbkr4a7aklkd3ybczi4zws1d55v8"))))
|
||||||
(build-system copy-build-system)
|
(build-system copy-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list #:install-plan
|
(list #:install-plan
|
||||||
@@ -95,10 +100,10 @@ results are added in a sidebar next to search engine results.")
|
|||||||
`(,@(alist-delete 'hidden? (package-properties base))
|
`(,@(alist-delete 'hidden? (package-properties base))
|
||||||
(disable-updater? . #t))))))
|
(disable-updater? . #t))))))
|
||||||
|
|
||||||
(define-public ohmyech
|
(define ohmyech
|
||||||
(package
|
(package
|
||||||
(name "ohmyech")
|
(name "ohmyech")
|
||||||
(version "1.1")
|
(version "1.5")
|
||||||
(properties
|
(properties
|
||||||
'((addon-id . "{46b8ab0b-8adf-4e43-ad67-acef5a8d45c9}")
|
'((addon-id . "{46b8ab0b-8adf-4e43-ad67-acef5a8d45c9}")
|
||||||
(hidden? . #t)
|
(hidden? . #t)
|
||||||
@@ -107,11 +112,11 @@ results are added in a sidebar next to search engine results.")
|
|||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
(url "https://github.com/27justin/ohmyech")
|
(url "https://github.com/27justin/ohmyech")
|
||||||
(commit "ec7935d500a9d354776586e25261cef3595c40c7")))
|
(commit "1faea936f6507580c6b2bd04dc57449398c799f4")))
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1mrbm8c8z9zpfrs0qk5qj64f35p7c5lrxfn3nhda0ar0b2rv6593"))
|
"0r1kipfy3afgc0jabav7q7h90d153nly1iakn4pfrwf8401n4qsi"))
|
||||||
(modules '((guix build utils)))
|
(modules '((guix build utils)))
|
||||||
(snippet
|
(snippet
|
||||||
#~(substitute* "manifest.json"
|
#~(substitute* "manifest.json"
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2022 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2022 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal packages busybox)
|
(define-module (rosenthal packages busybox)
|
||||||
|
;; Utilities
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
|
;; Guix packages
|
||||||
#:use-module (gnu packages busybox))
|
#:use-module (gnu packages busybox))
|
||||||
|
|
||||||
(define-public busybox/static
|
(define-public busybox/static
|
||||||
@@ -14,7 +15,7 @@
|
|||||||
(inherit base)
|
(inherit base)
|
||||||
(name "busybox-static")
|
(name "busybox-static")
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments (package-arguments base)
|
(substitute-keyword-arguments arguments
|
||||||
((#:phases phases)
|
((#:phases phases)
|
||||||
#~(modify-phases #$phases
|
#~(modify-phases #$phases
|
||||||
(add-after 'configure 'static-build
|
(add-after 'configure 'static-build
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal packages ci)
|
(define-module (rosenthal packages ci)
|
||||||
#:use-module ((guix licenses) #:prefix license:)
|
;; Utilities
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
|
#:use-module (rosenthal utils packages)
|
||||||
|
;; Guix origin methods
|
||||||
#:use-module (guix git-download)
|
#:use-module (guix git-download)
|
||||||
|
;; Guix packages
|
||||||
#:use-module (gnu packages ci))
|
#:use-module (gnu packages ci))
|
||||||
@@ -1,21 +1,23 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2022-2024 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2022-2024 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal packages dns)
|
(define-module (rosenthal packages dns)
|
||||||
#:use-module ((guix licenses) #:prefix license:)
|
;; Utilities
|
||||||
#:use-module (guix build-system copy)
|
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
;; Guix origin methods
|
||||||
#:use-module (guix git-download)
|
#:use-module (guix git-download)
|
||||||
#:use-module (guix packages))
|
;; Guix build systems
|
||||||
|
#:use-module (guix build-system copy))
|
||||||
|
|
||||||
(define-public dnsmasq-china-list
|
(define-public dnsmasq-china-list
|
||||||
;; No version.
|
;; No version.
|
||||||
(let ((commit "1a4d9fce63c44e80c2d6d790d7501e6103caf8da")
|
(let ((commit "c79474a5445e7ebbde7275648b1078a0582510ab")
|
||||||
(revision "20"))
|
(revision "22"))
|
||||||
(package
|
(package
|
||||||
(name "dnsmasq-china-list")
|
(name "dnsmasq-china-list")
|
||||||
(version (git-version "0" revision commit))
|
(version (git-version "0.0.0" revision commit))
|
||||||
(source (origin
|
(source (origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
@@ -24,7 +26,7 @@
|
|||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0wy3p9fimzvbv6jrcyi2s89cvz2v7b3h61gfj93kn2wmpli6apyp"))))
|
"0ifgkg7l31623q46cx0ymcfvw4gkmnir47z2xdn203icwic6224y"))))
|
||||||
(build-system copy-build-system)
|
(build-system copy-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list #:install-plan
|
(list #:install-plan
|
||||||
|
|||||||
@@ -1,15 +1,24 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2022-2024 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2022-2024 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal packages emacs-xyz)
|
(define-module (rosenthal packages emacs-xyz)
|
||||||
#:use-module ((guix licenses) #:prefix license:)
|
;; Utilities
|
||||||
#:use-module (guix build-system emacs)
|
#:use-module (guix deprecation)
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix utils)
|
||||||
|
;; Guix origin methods
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
#:use-module (guix git-download)
|
#:use-module (guix git-download)
|
||||||
#:use-module (guix packages)
|
;; Guix build systems
|
||||||
#:use-module (gnu packages emacs-xyz))
|
#:use-module (guix build-system emacs)
|
||||||
|
;; Guix packages
|
||||||
|
#:use-module (gnu packages emacs-build)
|
||||||
|
#:use-module (gnu packages emacs-xyz)
|
||||||
|
#:use-module (gnu packages gcc)
|
||||||
|
#:use-module (gnu packages pdf)
|
||||||
|
#:use-module (rosenthal packages version-control))
|
||||||
|
|
||||||
(define-public emacs-caddyfile-mode
|
(define-public emacs-caddyfile-mode
|
||||||
(let ((commit "fc41148f5a7eb320f070666f046fb9d88cf17680")
|
(let ((commit "fc41148f5a7eb320f070666f046fb9d88cf17680")
|
||||||
@@ -39,6 +48,32 @@ editing Caddyfiles, configuration files for @code{caddy}.")
|
|||||||
(properties
|
(properties
|
||||||
'((disable-updater? . #t))))))
|
'((disable-updater? . #t))))))
|
||||||
|
|
||||||
|
(define-public emacs-consult-ghostel
|
||||||
|
(package
|
||||||
|
(name "emacs-consult-ghostel")
|
||||||
|
(version "0.68.0")
|
||||||
|
(source (origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/dakra/ghostel")
|
||||||
|
(commit (string-append "v" version))))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"1sl9sv4w4ffyh3ga1qwi4y49gk4m00i101xmyy2aq8chn6wc2jqy"))))
|
||||||
|
(build-system emacs-build-system)
|
||||||
|
(arguments
|
||||||
|
(list #:tests? #f ;no tests
|
||||||
|
#:lisp-directory "extensions/consult-ghostel"
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(delete 'build)))) ;ghostel isn't packaged
|
||||||
|
(propagated-inputs (list emacs-compat emacs-consult))
|
||||||
|
(home-page "https://github.com/dakra/ghostel")
|
||||||
|
(synopsis "Consult integration for ghostel")
|
||||||
|
(description "This package provides consult integration for ghostel.")
|
||||||
|
(license license:gpl3+)))
|
||||||
|
|
||||||
(define-public emacs-eat/dolly
|
(define-public emacs-eat/dolly
|
||||||
(package
|
(package
|
||||||
(inherit
|
(inherit
|
||||||
@@ -57,24 +92,69 @@ editing Caddyfiles, configuration files for @code{caddy}.")
|
|||||||
"14d6nvagcri0r687y3m179ijmnad89m5d5dj2rn2p6rpfc5nssr0"))))))
|
"14d6nvagcri0r687y3m179ijmnad89m5d5dj2rn2p6rpfc5nssr0"))))))
|
||||||
(name "emacs-eat-dolly")))
|
(name "emacs-eat-dolly")))
|
||||||
|
|
||||||
(define-public emacs-nftables-mode
|
(define-public emacs-isearch-mb
|
||||||
(package
|
(package
|
||||||
(name "emacs-nftables-mode")
|
(name "emacs-isearch-mb")
|
||||||
(version "1.1")
|
(version "0.8")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append "https://elpa.gnu.org/packages/nftables-mode-"
|
(uri (string-append "https://elpa.gnu.org/packages/isearch-mb-"
|
||||||
version ".tar"))
|
version ".tar"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "1wjw6n60kj84j8gj62mr6s97xd0aqvr4v7npyxwmhckw9z13xcqv"))))
|
(base32 "1b4929vr5gib406p51zcvq1ysmzvnz6bs1lqwjp517kzp6r4gc5y"))))
|
||||||
(build-system emacs-build-system)
|
(build-system emacs-build-system)
|
||||||
(home-page "https://elpa.gnu.org/packages/nftables-mode.html")
|
(home-page "https://github.com/astoff/isearch-mb")
|
||||||
(synopsis "Major mode for editing nftables scripts")
|
(synopsis "Control @code{isearch} from the minibuffer")
|
||||||
(description
|
(description
|
||||||
"@code{nftables-mode} is an Emacs major mode for editing nftables scripts.
|
"This Emacs package provides an alternative @code{isearch} UI based on the
|
||||||
It currently only offers basic highlighting and primitive indentation.")
|
minibuffer. This allows editing the search string in arbitrary ways without any
|
||||||
(license license:gpl3+)))
|
special maneuver. Unlike standard @code{isearch}, cursor motion commands do not
|
||||||
|
end the search. Moreover, the search status information in the echo area and
|
||||||
|
some keybindings are slightly simplified.")
|
||||||
|
(license license:gpl3+)
|
||||||
|
(properties '((disable-updater? . #t)))))
|
||||||
|
|
||||||
|
(define-public emacs-magit-delta/dolly
|
||||||
|
(package
|
||||||
|
(inherit
|
||||||
|
(package-with-extra-patches emacs-magit-delta
|
||||||
|
(list (origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri "https://github.com/dandavison/magit-delta/pull/34.patch")
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"1ipqvrszh6fp9d9g3grk4mbh762knhn0zp3jhww0mkib73f3p0sy"))))))
|
||||||
|
(name "emacs-magit-delta-dolly")
|
||||||
|
(properties '((disable-updater? . #t)))))
|
||||||
|
|
||||||
|
(define-deprecated-package emacs-majutsu/dolly "emacs-majutsu-dolly" emacs-majutsu)
|
||||||
|
|
||||||
|
(define-public emacs-msgpack
|
||||||
|
(let ((commit "5353a7b2da854c843cbec4536996242001f63471")
|
||||||
|
(revision "0"))
|
||||||
|
(package
|
||||||
|
(name "emacs-msgpack")
|
||||||
|
(version (git-version "0.1.1" revision commit))
|
||||||
|
(source (origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/xuchunyang/msgpack.el")
|
||||||
|
(commit commit)))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"08pr8ijvfpnzx4bxbj8cjmibk2mlx0ksjwm3dv3lzp3i6cg5mhsw"))))
|
||||||
|
(build-system emacs-build-system)
|
||||||
|
(arguments
|
||||||
|
(list #:test-command ''("ert-runner" "msgpack-tests.el")))
|
||||||
|
(native-inputs (list emacs-ert-runner))
|
||||||
|
(home-page "https://github.com/xuchunyang/msgpack.el")
|
||||||
|
(synopsis "Read and write MessagePack object in Emacs")
|
||||||
|
(description
|
||||||
|
"This package provides an Emacs Lisp library for MessagePack.")
|
||||||
|
(license license:gpl3+)
|
||||||
|
(properties '((disable-updater? . #t))))))
|
||||||
|
|
||||||
(define-public emacs-pcmpl-tailscale
|
(define-public emacs-pcmpl-tailscale
|
||||||
(let ((commit "acd6bce54af506b0450cf6aa1068f63d4e25c8ce")
|
(let ((commit "acd6bce54af506b0450cf6aa1068f63d4e25c8ce")
|
||||||
@@ -101,6 +181,38 @@ and it's subcommands.")
|
|||||||
(properties
|
(properties
|
||||||
'((disable-updater? . #t))))))
|
'((disable-updater? . #t))))))
|
||||||
|
|
||||||
|
(define-deprecated-package emacs-reader emacs-emureader)
|
||||||
|
|
||||||
|
(define-public emacs-tramp-rpc
|
||||||
|
(package
|
||||||
|
(name "emacs-tramp-rpc")
|
||||||
|
(version "0.17.0")
|
||||||
|
(source (origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/ArthurHeymans/emacs-tramp-rpc")
|
||||||
|
(commit (string-append "v" version))))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"13bjnazn2mgvw4pywkxz2m2lld7ga2i3f88srpdsr23mb1bbxfxa"))))
|
||||||
|
(build-system emacs-build-system)
|
||||||
|
(arguments
|
||||||
|
(list #:lisp-directory "lisp"
|
||||||
|
#:test-command ''("bash" "../test/run-tests.sh" "--protocol")
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(delete 'patch-el-files))))
|
||||||
|
(native-inputs (list emacs-tramp))
|
||||||
|
(propagated-inputs (list emacs-msgpack))
|
||||||
|
(home-page "https://github.com/ArthurHeymans/emacs-tramp-rpc")
|
||||||
|
(synopsis "TRAMP backend using RPC")
|
||||||
|
(description
|
||||||
|
"This package provides a TRAMP backend that uses a custom RPC server
|
||||||
|
instead of parsing shell command output. This significantly improves
|
||||||
|
performance for remote file operations.")
|
||||||
|
(license license:gpl3+)))
|
||||||
|
|
||||||
;; https://issues.guix.gnu.org/59552
|
;; https://issues.guix.gnu.org/59552
|
||||||
(define-public emacs-wakatime-mode
|
(define-public emacs-wakatime-mode
|
||||||
;; No release since May 5, 2015.
|
;; No release since May 5, 2015.
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2026 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
|
(define-module (rosenthal packages file-systems)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix git-download)
|
||||||
|
#:use-module (gnu packages file-systems))
|
||||||
|
|
||||||
|
(define-public zfs-cachyos
|
||||||
|
(let ((commit "fb48c76e17d3e0092fbba430a9eec1960e1b9961")
|
||||||
|
(revision "0"))
|
||||||
|
(package/inherit zfs
|
||||||
|
(name "zfs-cachyos")
|
||||||
|
(version (git-version "2.4.5" revision commit))
|
||||||
|
(source
|
||||||
|
(origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/CachyOS/zfs")
|
||||||
|
(commit commit)))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32 "1zb3rs40fhkhn2fd3g5aspm50cy4xvg84ah84h5brz6abvfr1rg4")))))))
|
||||||
@@ -1,76 +1,151 @@
|
|||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
;;; Copyright © 2022 Cairn <cairn@pm.me>
|
;;; Copyright © 2022 Cairn <cairn@pm.me>
|
||||||
;;; Copyright © 2025 Carmine Margiotta <accounts@cmargiotta.net>
|
;;; Copyright © 2025 Carmine Margiotta <accounts@cmargiotta.net>
|
||||||
;;; Copyright © 2025 Noah Evans <noah@nevans.me>
|
;;; Copyright © 2025 Noah Evans <noah@nevans.me>
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; Copyright © 2026 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal packages games)
|
(define-module (rosenthal packages games)
|
||||||
|
;; Guile builtins
|
||||||
|
#:use-module (srfi srfi-26)
|
||||||
|
;; Utilities
|
||||||
|
#:use-module (guix gexp)
|
||||||
#:use-module ((guix licenses) #:prefix license:)
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix utils)
|
||||||
|
;; Guix origin methods
|
||||||
#:use-module (guix git-download)
|
#:use-module (guix git-download)
|
||||||
|
;; Guix build systems
|
||||||
#:use-module (guix build-system cmake)
|
#:use-module (guix build-system cmake)
|
||||||
|
#:use-module (guix build-system qt)
|
||||||
|
;; Guix packages
|
||||||
|
#:use-module (gnu packages aidc)
|
||||||
|
#:use-module (gnu packages audio)
|
||||||
|
#:use-module (gnu packages backup)
|
||||||
#:use-module (gnu packages bash)
|
#:use-module (gnu packages bash)
|
||||||
#:use-module (gnu packages compression)
|
#:use-module (gnu packages compression)
|
||||||
|
#:use-module (gnu packages cpp)
|
||||||
|
#:use-module (gnu packages freedesktop)
|
||||||
#:use-module (gnu packages gl)
|
#:use-module (gnu packages gl)
|
||||||
#:use-module (gnu packages java)
|
#:use-module (gnu packages java)
|
||||||
#:use-module (gnu packages kde-frameworks)
|
#:use-module (gnu packages kde-frameworks)
|
||||||
|
#:use-module (gnu packages libusb)
|
||||||
|
#:use-module (gnu packages linux)
|
||||||
|
#:use-module (gnu packages markup)
|
||||||
|
#:use-module (gnu packages pciutils)
|
||||||
|
#:use-module (gnu packages pkg-config)
|
||||||
#:use-module (gnu packages pulseaudio)
|
#:use-module (gnu packages pulseaudio)
|
||||||
#:use-module (gnu packages qt)
|
#:use-module (gnu packages qt)
|
||||||
|
#:use-module (gnu packages sdl)
|
||||||
|
#:use-module (gnu packages speech)
|
||||||
|
#:use-module (gnu packages vulkan)
|
||||||
#:use-module (gnu packages xorg))
|
#:use-module (gnu packages xorg))
|
||||||
|
|
||||||
;; Copied from Guix Gaming Channels
|
;; Copied from Guix Gaming Channels
|
||||||
(define-public prismlauncher/dolly
|
(define-public prismlauncher/dolly
|
||||||
(package
|
(package
|
||||||
(name "prismlauncher-dolly")
|
(name "prismlauncher-dolly")
|
||||||
(version "9.4")
|
(version "12.0.0")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
(url "https://github.com/PrismLauncher/PrismLauncher")
|
(url "https://github.com/PrismLauncher/PrismLauncher")
|
||||||
(recursive? #t)
|
(commit version)
|
||||||
(commit version)))
|
(recursive? #t)))
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1xxgyx0z5r3hk3yk4gglbfwvq2qk1j9a0dkrv55j4vrlkni79nrm"))))
|
"1awbh6ib0hh2x1xr37bc2vkcd1wm7w7hxxlyz0ga52zxjhgsbrcx"))
|
||||||
|
(modules '((guix build utils)))
|
||||||
|
(snippet
|
||||||
|
'(substitute* "launcher/CMakeLists.txt"
|
||||||
|
((" -Werror") "")))))
|
||||||
(build-system cmake-build-system)
|
(build-system cmake-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
(list
|
||||||
(modify-phases %standard-phases
|
#:imported-modules
|
||||||
(add-after 'install 'patch-paths
|
(append %cmake-build-system-modules
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
%qt-build-system-modules)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
#:modules
|
||||||
(bin (string-append out "/bin/prismlauncher"))
|
'((guix build utils)
|
||||||
(xrandr (assoc-ref inputs "xrandr"))
|
(guix build cmake-build-system)
|
||||||
(qtwayland (assoc-ref inputs "qtwayland"))
|
((guix build qt-build-system) #:prefix qt:))
|
||||||
(qtsvg (assoc-ref inputs "qtsvg")))
|
#:phases
|
||||||
(wrap-program bin
|
#~(modify-phases %standard-phases
|
||||||
`("PATH" ":" prefix (,(string-append xrandr "/bin")))
|
(add-after 'install 'qt-wrap
|
||||||
`("QT_PLUGIN_PATH" ":" prefix ,(map (lambda (package)
|
(lambda args
|
||||||
(string-append package "/lib/qt6/plugins"))
|
(apply (assoc-ref qt:%standard-phases 'qt-wrap)
|
||||||
(list qtwayland qtsvg)))
|
#:qtbase #$(this-package-input "qtbase")
|
||||||
`("LD_LIBRARY_PATH" ":" prefix
|
args)))
|
||||||
(,@(map (lambda (dep)
|
(add-after 'qt-wrap 'wrap-program
|
||||||
(string-append (assoc-ref inputs dep)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
"/lib"))
|
(wrap-program (search-input-file outputs "bin/prismlauncher")
|
||||||
'("libx11" "libxext" "libxcursor"
|
`("PATH" ":" prefix
|
||||||
"libxrandr" "libxxf86vm" "pulseaudio" "mesa")))))))))))
|
,(map (lambda (bin)
|
||||||
(native-inputs (list extra-cmake-modules))
|
(dirname (search-input-file
|
||||||
(inputs (list bash-minimal ; for wrap-program
|
inputs (in-vicinity "bin" bin))))
|
||||||
zlib
|
'("glxinfo"
|
||||||
qtbase
|
"lspci"
|
||||||
qt5compat
|
"xrandr")))
|
||||||
qtnetworkauth
|
`("LD_LIBRARY_PATH" ":" prefix
|
||||||
qtwayland
|
,(map (lambda (lib)
|
||||||
qtsvg
|
(dirname (search-input-file
|
||||||
xrandr
|
inputs (in-vicinity "lib" lib))))
|
||||||
libx11
|
'("libflite.so"
|
||||||
libxext
|
"libglfw.so"
|
||||||
libxcursor
|
"libopenal.so"
|
||||||
libxrandr
|
"libudev.so"
|
||||||
libxxf86vm
|
"libusb-1.0.so"
|
||||||
pulseaudio
|
"libvulkan.so"
|
||||||
mesa
|
;; glfw
|
||||||
`(,openjdk17 "jdk")))
|
"libGL.so"
|
||||||
|
"libX11.so"
|
||||||
|
"libXcursor.so"
|
||||||
|
"libXext.so"
|
||||||
|
"libXi.so"
|
||||||
|
"libXrandr.so"
|
||||||
|
"libXxf86vm.so"
|
||||||
|
;; openal
|
||||||
|
"libasound.so"
|
||||||
|
"libjack.so"
|
||||||
|
"libpipewire-0.3.so"
|
||||||
|
"libpulse.so")))))))))
|
||||||
|
(native-inputs
|
||||||
|
(list extra-cmake-modules
|
||||||
|
pkg-config))
|
||||||
|
(inputs
|
||||||
|
(list alsa-lib
|
||||||
|
bash-minimal
|
||||||
|
cmark
|
||||||
|
eudev
|
||||||
|
flite
|
||||||
|
gamemode
|
||||||
|
glfw-3.4
|
||||||
|
`(,icedtea-8 "jdk")
|
||||||
|
jack-2
|
||||||
|
libarchive
|
||||||
|
libusb
|
||||||
|
libx11
|
||||||
|
libxi
|
||||||
|
libxcursor
|
||||||
|
libxext
|
||||||
|
libxrandr
|
||||||
|
libxxf86vm
|
||||||
|
mesa
|
||||||
|
mesa-utils
|
||||||
|
openal
|
||||||
|
pciutils
|
||||||
|
pipewire
|
||||||
|
pulseaudio
|
||||||
|
qrencode
|
||||||
|
qtbase
|
||||||
|
qtimageformats
|
||||||
|
qtnetworkauth
|
||||||
|
qtsvg
|
||||||
|
qtwayland
|
||||||
|
tomlplusplus
|
||||||
|
vulkan-loader
|
||||||
|
xrandr
|
||||||
|
zlib))
|
||||||
(home-page "https://prismlauncher.org/")
|
(home-page "https://prismlauncher.org/")
|
||||||
(synopsis "Free, open source launcher for Minecraft")
|
(synopsis "Free, open source launcher for Minecraft")
|
||||||
(description
|
(description
|
||||||
|
|||||||
@@ -1,15 +1,22 @@
|
|||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal packages golang)
|
(define-module (rosenthal packages golang)
|
||||||
#:use-module ((guix licenses) #:prefix license:)
|
;; Utilities
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
|
#:use-module (rosenthal utils cargo)
|
||||||
|
;; Guix origin methods
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
#:use-module (guix git-download)
|
#:use-module (guix git-download)
|
||||||
#:use-module (rosenthal utils download)
|
#:use-module (rosenthal utils download)
|
||||||
#:use-module (rosenthal utils cargo)
|
;; Guix build systems
|
||||||
#:use-module (guix build-system cargo)
|
#:use-module (guix build-system cargo)
|
||||||
#:use-module (guix build-system copy)
|
#:use-module (guix build-system copy)
|
||||||
#:use-module (guix build-system go)
|
#:use-module (guix build-system go)
|
||||||
|
;; Guix packages
|
||||||
#:use-module (gnu packages golang)
|
#:use-module (gnu packages golang)
|
||||||
#:use-module (gnu packages image)
|
#:use-module (gnu packages image)
|
||||||
#:use-module (gnu packages jemalloc)
|
#:use-module (gnu packages jemalloc)
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2026 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
|
(define-module (rosenthal packages guile-xyz)
|
||||||
|
;; Utilities
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (rosenthal utils packages)
|
||||||
|
;; Guix origin methods
|
||||||
|
#:use-module (guix git-download)
|
||||||
|
;; Guix build systems
|
||||||
|
#:use-module (guix build-system guile)
|
||||||
|
;; Guix packages
|
||||||
|
#:use-module (gnu packages guile)
|
||||||
|
#:use-module (gnu packages guile-xyz))
|
||||||
|
|
||||||
|
(define-public guile-toml/dolly
|
||||||
|
(package
|
||||||
|
(inherit guile-toml)
|
||||||
|
(name "guile-toml")
|
||||||
|
(version "1.0")
|
||||||
|
(source
|
||||||
|
(origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/hylophile/guile-toml")
|
||||||
|
(commit (string-append "v" version))))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32 "0nyxj9gz0v5n2whi5wikidz5d5a7hf181vwnlr0v1l67xvxhxv1d"))
|
||||||
|
(patches
|
||||||
|
(rosenthal-patches "guile-toml-support-boolean.patch"))))
|
||||||
|
(properties '((disable-updater? . #t)))))
|
||||||
@@ -0,0 +1,308 @@
|
|||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2026 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
|
(define-module (rosenthal packages linux)
|
||||||
|
;; Guile builtins
|
||||||
|
#:use-module (ice-9 match)
|
||||||
|
#:use-module (ice-9 regex)
|
||||||
|
;; Utilities
|
||||||
|
#:use-module (guix diagnostics)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix utils)
|
||||||
|
;; Guix origin methods
|
||||||
|
#:use-module (guix download)
|
||||||
|
#:use-module (guix git-download)
|
||||||
|
;; Guix packages
|
||||||
|
#:use-module (gnu packages linux)
|
||||||
|
#:export (default-initrd-configs
|
||||||
|
cachyos-configs))
|
||||||
|
|
||||||
|
(define* (default-initrd-configs
|
||||||
|
#:optional
|
||||||
|
(system (or (%current-target-system)
|
||||||
|
(%current-system))))
|
||||||
|
"Kernel configurations required by 'default-linux-libre-initrd-modules'."
|
||||||
|
`("CONFIG_NLS_ISO8859_1=m"
|
||||||
|
|
||||||
|
"CONFIG_CRYPTO_SERPENT=m"
|
||||||
|
"CONFIG_CRYPTO_WP512=m"
|
||||||
|
"CONFIG_DM_CRYPT=m"
|
||||||
|
|
||||||
|
"CONFIG_BLK_DEV_NVME=m"
|
||||||
|
"CONFIG_MMC_BLOCK=m"
|
||||||
|
"CONFIG_SATA_AHCI=m"
|
||||||
|
"CONFIG_USB_STORAGE=m"
|
||||||
|
"CONFIG_USB_UAS=m"
|
||||||
|
,@(if (string-match "^(x86_64|i[3-6]86)-" system)
|
||||||
|
'("CONFIG_PATA_ACPI=m"
|
||||||
|
"CONFIG_PATA_ATIIXP=m"
|
||||||
|
"CONFIG_SCSI_ISCI=m")
|
||||||
|
'())
|
||||||
|
|
||||||
|
"CONFIG_HW_RANDOM_VIRTIO=m"
|
||||||
|
"CONFIG_SCSI_VIRTIO=m"
|
||||||
|
"CONFIG_VIRTIO_BALLOON=m"
|
||||||
|
"CONFIG_VIRTIO_BLK=m"
|
||||||
|
"CONFIG_VIRTIO_CONSOLE=m"
|
||||||
|
"CONFIG_VIRTIO_MMIO=m"
|
||||||
|
"CONFIG_VIRTIO_NET=m"
|
||||||
|
"CONFIG_VIRTIO_PCI=m"
|
||||||
|
|
||||||
|
"CONFIG_HID_GENERIC=m"
|
||||||
|
"CONFIG_USB_HID=m"
|
||||||
|
,@(if (target-riscv64? system)
|
||||||
|
'()
|
||||||
|
'("CONFIG_HID_APPLE=m"))))
|
||||||
|
|
||||||
|
|
||||||
|
;;;
|
||||||
|
;;; linux-cachyos
|
||||||
|
;;; https://github.com/CachyOS/linux-cachyos
|
||||||
|
;;;
|
||||||
|
|
||||||
|
(define* (cachyos-configs #:key (major-version "6")
|
||||||
|
cachy-config?
|
||||||
|
cpusched
|
||||||
|
cc-harder?
|
||||||
|
per-gov?
|
||||||
|
tcp-bbr3?
|
||||||
|
HZ-ticks
|
||||||
|
tickrate
|
||||||
|
preempt
|
||||||
|
hugepage
|
||||||
|
processor-opt)
|
||||||
|
`(,@(match processor-opt
|
||||||
|
('generic
|
||||||
|
'("CONFIG_GENERIC_CPU=y"
|
||||||
|
"CONFIG_MZEN4"
|
||||||
|
"CONFIG_X86_NATIVE_CPU"))
|
||||||
|
('zen4
|
||||||
|
'("CONFIG_GENERIC_CPU"
|
||||||
|
"CONFIG_MZEN4=y"
|
||||||
|
"CONFIG_X86_NATIVE_CPU"))
|
||||||
|
('native
|
||||||
|
'("CONFIG_GENERIC_CPU"
|
||||||
|
"CONFIG_MZEN4"
|
||||||
|
"CONFIG_X86_NATIVE_CPU=y"))
|
||||||
|
(_ '()))
|
||||||
|
,@(if cachy-config?
|
||||||
|
'("CONFIG_CACHY=y")
|
||||||
|
'())
|
||||||
|
,@(match cpusched
|
||||||
|
((or 'cachyos 'bore 'hardened)
|
||||||
|
'("CONFIG_SCHED_BORE=y"))
|
||||||
|
('bmq
|
||||||
|
'("CONFIG_SCHED_ALT=y"
|
||||||
|
"CONFIG_SCHED_BMQ=y"))
|
||||||
|
('eevdf
|
||||||
|
'())
|
||||||
|
('rt
|
||||||
|
'("CONFIG_PREEMPT_RT=y"))
|
||||||
|
('rt-bore
|
||||||
|
'("CONFIG_SCHED_BORE=y"
|
||||||
|
"CONFIG_PREEMPT_RT=y"))
|
||||||
|
(_ '()))
|
||||||
|
,@(match HZ-ticks
|
||||||
|
((or 100 250 500 600 750 1000)
|
||||||
|
`("CONFIG_HZ_300"
|
||||||
|
,(format #f "CONFIG_HZ_~a=y" HZ-ticks)
|
||||||
|
,(format #f "CONFIG_HZ=~a" HZ-ticks)))
|
||||||
|
(300
|
||||||
|
'("CONFIG_HZ_300=y"
|
||||||
|
"CONFIG_HZ=300"))
|
||||||
|
(_ '()))
|
||||||
|
,@(if per-gov?
|
||||||
|
'("CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL"
|
||||||
|
"CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y")
|
||||||
|
'())
|
||||||
|
,@(match tickrate
|
||||||
|
('periodic
|
||||||
|
'("CONFIG_NO_HZ_IDLE"
|
||||||
|
"CONFIG_NO_HZ_FULL"
|
||||||
|
"CONFIG_NO_HZ"
|
||||||
|
"CONFIG_NO_HZ_COMMON"
|
||||||
|
"CONFIG_HZ_PERIODIC=y"))
|
||||||
|
('idle
|
||||||
|
'("CONFIG_HZ_PERIODIC"
|
||||||
|
"CONFIG_NO_HZ_FULL"
|
||||||
|
"CONFIG_NO_HZ_IDLE=y"
|
||||||
|
"CONFIG_NO_HZ"
|
||||||
|
"CONFIG_NO_HZ_COMMON"))
|
||||||
|
('full
|
||||||
|
'("CONFIG_HZ_PERIODIC"
|
||||||
|
"CONFIG_NO_HZ_IDLE"
|
||||||
|
"CONFIG_CONTEXT_TRACKING_FORCE"
|
||||||
|
"CONFIG_NO_HZ_FULL=y"
|
||||||
|
"CONFIG_NO_HZ=y"
|
||||||
|
"CONFIG_NO_HZ_COMMON=y"
|
||||||
|
"CONFIG_CONTEXT_TRACKING=y")))
|
||||||
|
,@(if (not (member cpusched '(rt rt-bore)))
|
||||||
|
(if (version>=? major-version "7.0")
|
||||||
|
(match preempt
|
||||||
|
('full
|
||||||
|
'("CONFIG_PREEMPT=y"
|
||||||
|
"CONFIG_PREEMPT_LAZY"))
|
||||||
|
('lazy
|
||||||
|
'("CONFIG_PREEMPT"
|
||||||
|
"CONFIG_PREEMPT_LAZY=y"))
|
||||||
|
(_ '()))
|
||||||
|
(match preempt
|
||||||
|
('full
|
||||||
|
'("CONFIG_PREEMPT_DYNAMIC=y"
|
||||||
|
"CONFIG_PREEMPT=y"
|
||||||
|
"CONFIG_PREEMPT_VOLUNTARY"
|
||||||
|
"CONFIG_PREEMPT_LAZY"
|
||||||
|
"CONFIG_PREEMPT_NONE"))
|
||||||
|
('lazy
|
||||||
|
'("CONFIG_PREEMPT_DYNAMIC=y"
|
||||||
|
"CONFIG_PREEMPT"
|
||||||
|
"CONFIG_PREEMPT_VOLUNTARY"
|
||||||
|
"CONFIG_PREEMPT_LAZY=y"
|
||||||
|
"CONFIG_PREEMPT_NONE"))
|
||||||
|
('voluntary
|
||||||
|
'("CONFIG_PREEMPT_DYNAMIC"
|
||||||
|
"CONFIG_PREEMPT=y"
|
||||||
|
"CONFIG_PREEMPT_VOLUNTARY=y"
|
||||||
|
"CONFIG_PREEMPT_LAZY"
|
||||||
|
"CONFIG_PREEMPT_NONE"))
|
||||||
|
('none
|
||||||
|
'("CONFIG_PREEMPT_DYNAMIC"
|
||||||
|
"CONFIG_PREEMPT"
|
||||||
|
"CONFIG_PREEMPT_VOLUNTARY"
|
||||||
|
"CONFIG_PREEMPT_LAZY"
|
||||||
|
"CONFIG_PREEMPT_NONE=y"))
|
||||||
|
(_ '())))
|
||||||
|
'())
|
||||||
|
,@(if cc-harder?
|
||||||
|
'("CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE"
|
||||||
|
"CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y")
|
||||||
|
'())
|
||||||
|
,@(if tcp-bbr3?
|
||||||
|
'("CONFIG_TCP_CONG_CUBIC=m"
|
||||||
|
"CONFIG_DEFAULT_CUBIC"
|
||||||
|
"CONFIG_TCP_CONG_BBR=y"
|
||||||
|
"CONFIG_DEFAULT_BBR=y"
|
||||||
|
"CONFIG_DEFAULT_TCP_CONG=\"bbr\""
|
||||||
|
"CONFIG_NET_SCH_FQ_CODEL=m"
|
||||||
|
"CONFIG_NET_SCH_FQ=y"
|
||||||
|
"CONFIG_DEFAULT_FQ_CODEL"
|
||||||
|
"CONFIG_DEFAULT_FQ=y")
|
||||||
|
'())
|
||||||
|
,@(match hugepage
|
||||||
|
('always
|
||||||
|
'("CONFIG_TRANSPARENT_HUGEPAGE_MADVISE"
|
||||||
|
"CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y"))
|
||||||
|
('madvise
|
||||||
|
'("CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS"
|
||||||
|
"CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y"))
|
||||||
|
(_ '()))
|
||||||
|
,@(if (version>=? major-version "7.0")
|
||||||
|
'()
|
||||||
|
'("CONFIG_USER_NS=y"))))
|
||||||
|
|
||||||
|
(define (%kernel-config commit hash)
|
||||||
|
(let ((source
|
||||||
|
(origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://codeberg.org/hako/kernel-config.git")
|
||||||
|
(commit commit)))
|
||||||
|
(file-name (string-append "kernel-config." (string-take commit 7)))
|
||||||
|
(hash
|
||||||
|
(if (content-hash? hash)
|
||||||
|
hash
|
||||||
|
(content-hash hash))))))
|
||||||
|
(lambda (path)
|
||||||
|
(file-append source path))))
|
||||||
|
|
||||||
|
(define-public linux-cachyos-lts-server
|
||||||
|
(let* ((version "6.18.65-1")
|
||||||
|
(config
|
||||||
|
(%kernel-config
|
||||||
|
"30ca31f1a4b05d9c42f1b9482f6a7419b12453be"
|
||||||
|
(base32 "0qb8mgrj458xxjp3m050lf03wf4j2nz4jpxix068cv0pnvlj3y3k")))
|
||||||
|
(kernel
|
||||||
|
(customize-linux
|
||||||
|
#:name "linux-cachyos-lts-server"
|
||||||
|
#:source
|
||||||
|
(origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (string-append
|
||||||
|
"https://github.com/CachyOS/linux/releases/download/cachyos-"
|
||||||
|
version "/cachyos-" version ".tar.gz"))
|
||||||
|
(sha256
|
||||||
|
(base32 "102ad9k412166b6kdaiql15dynanqm11gppagpi1zx4cz80lwkm0")))
|
||||||
|
#:defconfig (config "/defconfig_server")
|
||||||
|
#:configs
|
||||||
|
(string-join
|
||||||
|
(append (cachyos-configs
|
||||||
|
#:major-version (version-major version)
|
||||||
|
#:cachy-config? #f
|
||||||
|
#:cpusched 'eevdf
|
||||||
|
#:cc-harder? #t
|
||||||
|
#:per-gov? #f
|
||||||
|
#:tcp-bbr3? #t
|
||||||
|
#:HZ-ticks 300
|
||||||
|
#:tickrate 'full
|
||||||
|
#:preempt 'none
|
||||||
|
#:hugepage 'madvise
|
||||||
|
#:processor-opt 'generic)
|
||||||
|
(default-initrd-configs))
|
||||||
|
"\n"))))
|
||||||
|
(package
|
||||||
|
(inherit kernel)
|
||||||
|
(version version)
|
||||||
|
(home-page "https://cachyos.org/")
|
||||||
|
(synopsis "CachyOS Linux kernel (lts + server)")
|
||||||
|
(description "")
|
||||||
|
(supported-systems '("x86_64-linux"))
|
||||||
|
(properties
|
||||||
|
(cons '(disable-updater? . #t)
|
||||||
|
(package-properties kernel))))))
|
||||||
|
|
||||||
|
(define-public linux-cachyos-bore-zen4
|
||||||
|
(let* ((version "7.3.6-1")
|
||||||
|
(config
|
||||||
|
(%kernel-config
|
||||||
|
"f45de89952cd52542e3a3cbf4fcedaa75d817e89"
|
||||||
|
(base32 "12xhs53ihg4k1vgx042acfri174mblbfrcp0199i3fbl0vy0xpaz")))
|
||||||
|
(kernel
|
||||||
|
(customize-linux
|
||||||
|
#:name "linux-cachyos-bore-zen4"
|
||||||
|
#:source
|
||||||
|
(origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (string-append
|
||||||
|
"https://github.com/CachyOS/linux/releases/download/cachyos-"
|
||||||
|
version "/cachyos-" version ".tar.gz"))
|
||||||
|
(sha256
|
||||||
|
(base32 "0gvgp0hwnrdgxs07wlz474c40g15z1r3aq7dq1yi4nn5p09yhp7v"))
|
||||||
|
(patches (map config '("/patches/bore-cachy-7.3.patch"))))
|
||||||
|
#:defconfig (config "/defconfig_desktop")
|
||||||
|
#:configs
|
||||||
|
(string-join
|
||||||
|
(append (cachyos-configs
|
||||||
|
#:major-version (version-major version)
|
||||||
|
#:cachy-config? #t
|
||||||
|
#:cpusched 'bore
|
||||||
|
#:cc-harder? #t
|
||||||
|
#:per-gov? #f
|
||||||
|
#:tcp-bbr3? #t
|
||||||
|
#:HZ-ticks 1000
|
||||||
|
#:tickrate 'full
|
||||||
|
#:preempt 'full
|
||||||
|
#:hugepage 'always
|
||||||
|
#:processor-opt 'zen4)
|
||||||
|
(default-initrd-configs))
|
||||||
|
"\n"))))
|
||||||
|
(package
|
||||||
|
(inherit kernel)
|
||||||
|
(version version)
|
||||||
|
(home-page "https://cachyos.org/")
|
||||||
|
(synopsis "CachyOS Linux kernel (bore + znver4)")
|
||||||
|
(description "")
|
||||||
|
(supported-systems '("x86_64-linux"))
|
||||||
|
(properties
|
||||||
|
(cons '(disable-updater? . #t)
|
||||||
|
(package-properties kernel))))))
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
|
(define-module (rosenthal packages messaging)
|
||||||
|
;; Utilities
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix utils)
|
||||||
|
;; Guix origin methods
|
||||||
|
#:use-module (guix git-download)
|
||||||
|
;; Guix build systems
|
||||||
|
#:use-module (guix build-system pyproject)
|
||||||
|
#:use-module (rosenthal build-system go-vendored)
|
||||||
|
;; Guix packages
|
||||||
|
#:use-module (gnu packages bash)
|
||||||
|
#:use-module (gnu packages crypto)
|
||||||
|
#:use-module (gnu packages databases)
|
||||||
|
#:use-module (gnu packages golang)
|
||||||
|
#:use-module (gnu packages monitoring)
|
||||||
|
#:use-module (gnu packages python)
|
||||||
|
#:use-module (gnu packages python-build)
|
||||||
|
#:use-module (gnu packages python-compression)
|
||||||
|
#:use-module (gnu packages python-crypto)
|
||||||
|
#:use-module (gnu packages python-web)
|
||||||
|
#:use-module (gnu packages python-xyz)
|
||||||
|
#:use-module (gnu packages serialization)
|
||||||
|
#:use-module (gnu packages video)
|
||||||
|
#:use-module (rosenthal packages animation)
|
||||||
|
#:use-module (rosenthal packages python-xyz))
|
||||||
|
|
||||||
|
(define-public heisenbridge
|
||||||
|
(package
|
||||||
|
(name "heisenbridge")
|
||||||
|
(version "1.15.4")
|
||||||
|
(source (origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/hifi/heisenbridge")
|
||||||
|
(commit (string-append "v" version))))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"1viv18bkj0lccr00218xp818i923h1ax7c50kl0yn834axdz6y4l"))))
|
||||||
|
(build-system pyproject-build-system)
|
||||||
|
(arguments (list #:tests? #f)) ;TODO
|
||||||
|
(native-inputs
|
||||||
|
(list python-setuptools))
|
||||||
|
(propagated-inputs
|
||||||
|
(list python-aiohttp
|
||||||
|
python-irc
|
||||||
|
python-mautrix
|
||||||
|
python-ruamel.yaml
|
||||||
|
python-socks))
|
||||||
|
(synopsis "Bouncer-style Matrix IRC bridge")
|
||||||
|
(description
|
||||||
|
"Heisenbridge brings IRC to Matrix by creating an environment where every
|
||||||
|
user connects to each network individually like they would with a traditional
|
||||||
|
IRC bouncer. Simplicity is achieved by exposing IRC in the most straightforward
|
||||||
|
way as possible where it makes sense so it feels familiar for long time IRC
|
||||||
|
users.")
|
||||||
|
(home-page "https://github.com/hifi/heisenbridge")
|
||||||
|
(license license:expat)))
|
||||||
|
|
||||||
|
(define-public mautrix-telegram
|
||||||
|
(package
|
||||||
|
(name "mautrix-telegram")
|
||||||
|
(version "0.2611.0")
|
||||||
|
(source (origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/mautrix/telegram")
|
||||||
|
(commit (string-append "v" version))))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"19r2z4h5p6q86jskszdq4i4nwfg4ww94xk9i0qfbpqx11j6xyy6g"))))
|
||||||
|
(build-system go-vendored-build-system)
|
||||||
|
(arguments
|
||||||
|
(list #:go go-1.27
|
||||||
|
#:vendor-hash
|
||||||
|
(base32 "05rl044xci0hlcijrsm7zbvc6brhy332fpw59kzsdjz03rfx6avg")
|
||||||
|
#:install-source? #f
|
||||||
|
#:import-path "./cmd/mautrix-telegram"
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(add-after 'install 'wrap-binary
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
(wrap-program (in-vicinity #$output "bin/mautrix-telegram")
|
||||||
|
`("PATH" ":" prefix
|
||||||
|
,(map (lambda (cmd)
|
||||||
|
(dirname (search-input-file inputs cmd)))
|
||||||
|
'("bin/ffmpeg"
|
||||||
|
"bin/lottieconverter")))))))))
|
||||||
|
(inputs (list bash-minimal ffmpeg lottie-converter olm))
|
||||||
|
(synopsis "Matrix-Telegram hybrid puppeting/relaybot bridge")
|
||||||
|
(description
|
||||||
|
"This package provides a Matrix-Telegram hybrid puppeting/relaybot
|
||||||
|
bridge.")
|
||||||
|
(home-page "https://github.com/mautrix/telegram")
|
||||||
|
(license license:agpl3+)))
|
||||||
@@ -1,44 +1,45 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2022-2024 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2022-2024 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal packages networking)
|
(define-module (rosenthal packages networking)
|
||||||
#:use-module ((guix licenses) #:prefix license:)
|
;; Utilities
|
||||||
#:use-module (guix build-system go)
|
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix git-download)
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (rosenthal utils download)
|
|
||||||
#:use-module (rosenthal utils packages)
|
#:use-module (rosenthal utils packages)
|
||||||
|
;; Guix origin methods
|
||||||
|
#:use-module (guix git-download)
|
||||||
|
#:use-module (rosenthal utils download)
|
||||||
|
;; Guix build systems
|
||||||
|
#:use-module (guix build-system go)
|
||||||
|
#:use-module (rosenthal build-system go-vendored)
|
||||||
|
;; Guix packages
|
||||||
#:use-module (gnu packages base)
|
#:use-module (gnu packages base)
|
||||||
#:use-module (gnu packages dns)
|
#:use-module (gnu packages dns)
|
||||||
|
#:use-module (gnu packages freedesktop)
|
||||||
#:use-module (gnu packages golang)
|
#:use-module (gnu packages golang)
|
||||||
#:use-module (gnu packages golang-build)
|
#:use-module (gnu packages golang-build)
|
||||||
#:use-module (gnu packages linux)
|
#:use-module (gnu packages linux))
|
||||||
#:use-module (rosenthal packages golang))
|
|
||||||
|
|
||||||
(define-public cloudflared
|
(define-public cloudflared
|
||||||
(package
|
(package
|
||||||
(name "cloudflared")
|
(name "cloudflared")
|
||||||
(version "2025.10.0")
|
(version "2026.10.7")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
(url "https://github.com/cloudflare/cloudflared")
|
(url "https://github.com/cloudflare/cloudflared")
|
||||||
(commit version)))
|
(commit version)))
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
;; TODO: Unbundle vendored dependencies.
|
|
||||||
;; (modules '((guix build utils)))
|
|
||||||
;; (snippet '(delete-file-recursively "vendor"))
|
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"17an3nky4ibfi486wy2gsbv39qcmbsc3yvs3h2w6yxa4cb9knk6v"))))
|
"1nyihh0z4l81w60phmlv0pqsjw29pr2v2f8byc9qasqs4qy9q8db"))))
|
||||||
(build-system go-build-system)
|
(build-system go-vendored-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list #:go go-1.24
|
(list #:go go-1.27
|
||||||
|
#:vendor-hash (base32 "0dqgcmrlbd0c5mi0msgb6iz6nkrhasdh0gnmifn9l8fnwqis87va")
|
||||||
#:install-source? #f
|
#:install-source? #f
|
||||||
#:import-path "github.com/cloudflare/cloudflared/cmd/cloudflared"
|
#:import-path "./cmd/cloudflared"
|
||||||
#:unpack-path "github.com/cloudflare/cloudflared"
|
|
||||||
#:build-flags
|
#:build-flags
|
||||||
#~(list (string-append
|
#~(list (string-append
|
||||||
"-ldflags="
|
"-ldflags="
|
||||||
@@ -46,12 +47,9 @@
|
|||||||
" -X github.com/cloudflare/cloudflared/cmd/cloudflared/updater.BuiltForPackageManager=Guix"))
|
" -X github.com/cloudflare/cloudflared/cmd/cloudflared/updater.BuiltForPackageManager=Guix"))
|
||||||
#:phases
|
#:phases
|
||||||
#~(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(add-before 'build 'disable-cgo
|
|
||||||
(lambda _
|
|
||||||
(setenv "CGO_ENABLED" "0")))
|
|
||||||
(add-after 'install 'install-documentation
|
(add-after 'install 'install-documentation
|
||||||
(lambda _
|
(lambda _
|
||||||
(let ((src "src/github.com/cloudflare/cloudflared/cloudflared_man_template")
|
(let ((src "cloudflared_man_template")
|
||||||
(dst (string-append #$output "/share/man/man1/cloudflared.1")))
|
(dst (string-append #$output "/share/man/man1/cloudflared.1")))
|
||||||
(substitute* src
|
(substitute* src
|
||||||
(("\\$\\{VERSION\\}") #$(package-version this-package)))
|
(("\\$\\{VERSION\\}") #$(package-version this-package)))
|
||||||
@@ -71,7 +69,7 @@ origin can remain as closed as possible.")
|
|||||||
(define-public mihomo
|
(define-public mihomo
|
||||||
(package
|
(package
|
||||||
(name "mihomo")
|
(name "mihomo")
|
||||||
(version "1.19.15")
|
(version "1.19.34")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
@@ -80,36 +78,22 @@ origin can remain as closed as possible.")
|
|||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0znia4yhnz5c8bi4picksibrr1ggqf8adphmisxim4720nv1ja2v"))))
|
"1aisnsbc6jr4fd913pwzhcb9mxnqcfwwrfd6m4zzlzhxkbwnbiz6"))))
|
||||||
(build-system go-build-system)
|
(build-system go-vendored-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
|
#:go go-1.27
|
||||||
|
#:vendor-hash (base32 "1cpw11jrmxilqs6zrb3qdkqrnndrk33b6v0q4g3mrbpj8dfmdmyv")
|
||||||
#:tests? (not (%current-target-system)) ;TODO: Run test suite.
|
#:tests? (not (%current-target-system)) ;TODO: Run test suite.
|
||||||
#:go go-1.23
|
|
||||||
#:install-source? #f
|
#:install-source? #f
|
||||||
#:import-path "."
|
|
||||||
#:build-flags
|
#:build-flags
|
||||||
#~(list "-tags" "with_gvisor"
|
#~(list "-tags" "with_gvisor"
|
||||||
(string-append
|
(string-append
|
||||||
"-ldflags="
|
"-ldflags="
|
||||||
" -X github.com/metacubex/mihomo/constant.Version="
|
" -X github.com/metacubex/mihomo/constant.Version="
|
||||||
#$(package-version this-package)))
|
#$(package-version this-package)))
|
||||||
#:modules
|
|
||||||
'((ice-9 match)
|
|
||||||
((guix build gnu-build-system) #:prefix gnu:)
|
|
||||||
(guix build go-build-system)
|
|
||||||
(guix build utils))
|
|
||||||
#:phases
|
#:phases
|
||||||
#~(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(replace 'unpack
|
|
||||||
(lambda args
|
|
||||||
(unsetenv "GO111MODULE")
|
|
||||||
(apply (assoc-ref gnu:%standard-phases 'unpack) args)
|
|
||||||
(copy-recursively
|
|
||||||
#+(this-package-native-input "vendored-go-dependencies")
|
|
||||||
"vendor")))
|
|
||||||
(replace 'install-license-files
|
|
||||||
(assoc-ref gnu:%standard-phases 'install-license-files))
|
|
||||||
(delete 'check)
|
(delete 'check)
|
||||||
(add-after 'install 'check
|
(add-after 'install 'check
|
||||||
(lambda* (#:key tests? #:allow-other-keys)
|
(lambda* (#:key tests? #:allow-other-keys)
|
||||||
@@ -118,17 +102,9 @@ origin can remain as closed as possible.")
|
|||||||
(invoke mihomo "--help")
|
(invoke mihomo "--help")
|
||||||
(invoke mihomo "-v"))))))))
|
(invoke mihomo "-v"))))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(append
|
(if (%current-target-system)
|
||||||
(list (origin
|
(list this-package)
|
||||||
(method (go-mod-vendor #:go go-1.23))
|
'()))
|
||||||
(uri (package-source this-package))
|
|
||||||
(file-name "vendored-go-dependencies")
|
|
||||||
(sha256
|
|
||||||
(base32
|
|
||||||
"0917ksckkyh78v6sjbyss4ca52pqbza05vdxsxr79f9r6frzxsxp"))))
|
|
||||||
(if (%current-target-system)
|
|
||||||
(list this-package)
|
|
||||||
'())))
|
|
||||||
(home-page "https://wiki.metacubex.one/")
|
(home-page "https://wiki.metacubex.one/")
|
||||||
(synopsis "Rule-based proxy")
|
(synopsis "Rule-based proxy")
|
||||||
(description
|
(description
|
||||||
@@ -141,7 +117,7 @@ bypass network restrictions." )
|
|||||||
(define-public sing-box
|
(define-public sing-box
|
||||||
(package
|
(package
|
||||||
(name "sing-box")
|
(name "sing-box")
|
||||||
(version "1.12.11")
|
(version "1.14.7")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
@@ -150,12 +126,12 @@ bypass network restrictions." )
|
|||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1vk7wqbwzy1qwhiak0n6dbjxr4mcdpmlbrsflr6l8xwfjmzhnvrb"))))
|
"0g2pxaxb39dyfjigidqglvnzxpmp154c7k99pmvjkz1d5yr8l9vz"))))
|
||||||
(build-system go-build-system)
|
(build-system go-vendored-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
#:tests? (not (%current-target-system)) ;TODO: Run test suite.
|
#:go go-1.27
|
||||||
#:go go-1.23
|
#:vendor-hash (base32 "1akyjq3hk4igcrflq9ydzdncizvq0ckgkn2y0fd4p08rqxxgvq3l")
|
||||||
#:install-source? #f
|
#:install-source? #f
|
||||||
#:import-path "./cmd/sing-box"
|
#:import-path "./cmd/sing-box"
|
||||||
#:build-flags
|
#:build-flags
|
||||||
@@ -173,22 +149,11 @@ bypass network restrictions." )
|
|||||||
" -X github.com/sagernet/sing-box/constant.Version="
|
" -X github.com/sagernet/sing-box/constant.Version="
|
||||||
#$(package-version this-package)))
|
#$(package-version this-package)))
|
||||||
#:modules
|
#:modules
|
||||||
'((ice-9 match)
|
(cons '(ice-9 match)
|
||||||
((guix build gnu-build-system) #:prefix gnu:)
|
%default-go-vendored-modules)
|
||||||
(guix build go-build-system)
|
|
||||||
(guix build utils))
|
|
||||||
#:phases
|
#:phases
|
||||||
#~(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(replace 'unpack
|
(add-after 'unpack-vendored-dependencies 'set-tailscale-default-wireguard-port
|
||||||
(lambda args
|
|
||||||
(unsetenv "GO111MODULE")
|
|
||||||
(apply (assoc-ref gnu:%standard-phases 'unpack) args)
|
|
||||||
(copy-recursively
|
|
||||||
#+(this-package-native-input "vendored-go-dependencies")
|
|
||||||
"vendor")))
|
|
||||||
(replace 'install-license-files
|
|
||||||
(assoc-ref gnu:%standard-phases 'install-license-files))
|
|
||||||
(add-after 'unpack 'set-tailscale-default-wireguard-port
|
|
||||||
(lambda _
|
(lambda _
|
||||||
;; See also: https://tailscale.com/kb/1082/firewall-ports
|
;; See also: https://tailscale.com/kb/1082/firewall-ports
|
||||||
;; https://github.com/tailscale/tailscale/blob/51c11a864b1241d1cf1a736fbc94b0f8c76da563/cmd/tailscaled/tailscaled.go#L102
|
;; https://github.com/tailscale/tailscale/blob/51c11a864b1241d1cf1a736fbc94b0f8c76da563/cmd/tailscaled/tailscaled.go#L102
|
||||||
@@ -211,17 +176,9 @@ bypass network restrictions." )
|
|||||||
("fish" . "share/fish/vendor_completions.d/sing-box.fish")
|
("fish" . "share/fish/vendor_completions.d/sing-box.fish")
|
||||||
("zsh" . "share/zsh/site-functions/_sing-box")))))))))
|
("zsh" . "share/zsh/site-functions/_sing-box")))))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(append
|
(if (%current-target-system)
|
||||||
(list (origin
|
(list this-package)
|
||||||
(method (go-mod-vendor #:go go-1.23))
|
'()))
|
||||||
(uri (package-source this-package))
|
|
||||||
(file-name "vendored-go-dependencies")
|
|
||||||
(sha256
|
|
||||||
(base32
|
|
||||||
"1dwrii2d05rc4j6gy6kbz4q6ry9xghggb8384y7x8a3czsq9x7gs"))))
|
|
||||||
(if (%current-target-system)
|
|
||||||
(list this-package)
|
|
||||||
'())))
|
|
||||||
(home-page "https://sing-box.sagernet.org/")
|
(home-page "https://sing-box.sagernet.org/")
|
||||||
(synopsis "Universal proxy platform")
|
(synopsis "Universal proxy platform")
|
||||||
(description
|
(description
|
||||||
@@ -259,7 +216,7 @@ a SOCKS5 proxy.")
|
|||||||
(define-public tailscale
|
(define-public tailscale
|
||||||
(package
|
(package
|
||||||
(name "tailscale")
|
(name "tailscale")
|
||||||
(version "1.90.4")
|
(version "1.104.6")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
@@ -268,7 +225,7 @@ a SOCKS5 proxy.")
|
|||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0rs6db5dfmhiaylkpv85b3xn8n7y612z1vln79m33xgvc708vpni"))
|
"1ys6mgbc622vx9ddg3pgjcligpmcdq6syxwa25p99734b76f4pd0"))
|
||||||
(patches
|
(patches
|
||||||
(rosenthal-patches
|
(rosenthal-patches
|
||||||
"tailscale-set-guix-system-PATH-for-SSH.patch"))
|
"tailscale-set-guix-system-PATH-for-SSH.patch"))
|
||||||
@@ -278,13 +235,13 @@ a SOCKS5 proxy.")
|
|||||||
(delete-file-recursively "tool")
|
(delete-file-recursively "tool")
|
||||||
(substitute* "net/tstun/tun_linux.go"
|
(substitute* "net/tstun/tun_linux.go"
|
||||||
(("/sbin/(modprobe)" _ cmd) cmd))))))
|
(("/sbin/(modprobe)" _ cmd) cmd))))))
|
||||||
(build-system go-build-system)
|
(build-system go-vendored-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
|
#:go go-1.27
|
||||||
|
#:vendor-hash (base32 "084cmr6irkspxqvh3bpgjwjhqqgk6kj42pjf0j61rl8glpkjd790")
|
||||||
#:tests? (not (%current-target-system)) ;TODO: Run test suite.
|
#:tests? (not (%current-target-system)) ;TODO: Run test suite.
|
||||||
#:go go-1.25
|
|
||||||
#:install-source? #f
|
#:install-source? #f
|
||||||
#:import-path "."
|
|
||||||
#:build-flags
|
#:build-flags
|
||||||
#~(list "-tags" "ts_include_cli"
|
#~(list "-tags" "ts_include_cli"
|
||||||
(string-append
|
(string-append
|
||||||
@@ -294,21 +251,15 @@ a SOCKS5 proxy.")
|
|||||||
" -X tailscale.com/version.shortStamp="
|
" -X tailscale.com/version.shortStamp="
|
||||||
#$(package-version this-package)))
|
#$(package-version this-package)))
|
||||||
#:modules
|
#:modules
|
||||||
'((ice-9 match)
|
(cons '(ice-9 match)
|
||||||
((guix build gnu-build-system) #:prefix gnu:)
|
%default-go-vendored-modules)
|
||||||
(guix build go-build-system)
|
|
||||||
(guix build utils))
|
|
||||||
#:phases
|
#:phases
|
||||||
#~(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(replace 'unpack
|
(add-after 'unpack 'patch-references
|
||||||
(lambda args
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(unsetenv "GO111MODULE")
|
(substitute* "client/systray/startup-creator.go"
|
||||||
(apply (assoc-ref gnu:%standard-phases 'unpack) args)
|
(("desktop-file-(install|edit)" all)
|
||||||
(copy-recursively
|
(search-input-file inputs (in-vicinity "bin" all))))))
|
||||||
#+(this-package-native-input "vendored-go-dependencies")
|
|
||||||
"vendor")))
|
|
||||||
(replace 'install-license-files
|
|
||||||
(assoc-ref gnu:%standard-phases 'install-license-files))
|
|
||||||
(replace 'build
|
(replace 'build
|
||||||
(lambda* (#:key build-flags parallel-build? #:allow-other-keys)
|
(lambda* (#:key build-flags parallel-build? #:allow-other-keys)
|
||||||
(let* ((njobs (if parallel-build? (parallel-job-count) 1)))
|
(let* ((njobs (if parallel-build? (parallel-job-count) 1)))
|
||||||
@@ -366,19 +317,18 @@ a SOCKS5 proxy.")
|
|||||||
"tailscaled"
|
"tailscaled"
|
||||||
"tsidp"))))))))
|
"tsidp"))))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(append
|
(if (%current-target-system)
|
||||||
(list (origin
|
(list this-package)
|
||||||
(method (go-mod-vendor #:go go-1.25))
|
'()))
|
||||||
(uri (package-source this-package))
|
|
||||||
(file-name "vendored-go-dependencies")
|
|
||||||
(sha256
|
|
||||||
(base32
|
|
||||||
"1g040kwafvwma0ncy8ni86zq13rv8kkz0ybbgji51w5qb3cw4pdd"))))
|
|
||||||
(if (%current-target-system)
|
|
||||||
(list this-package)
|
|
||||||
'())))
|
|
||||||
(inputs
|
(inputs
|
||||||
(list findutils glibc iproute iptables-nft kmod openresolv procps))
|
(list desktop-file-utils
|
||||||
|
findutils
|
||||||
|
glibc
|
||||||
|
iproute
|
||||||
|
iptables-nft
|
||||||
|
kmod
|
||||||
|
openresolv
|
||||||
|
procps))
|
||||||
(home-page "https://tailscale.com/")
|
(home-page "https://tailscale.com/")
|
||||||
(synopsis "Mesh VPN service utilizing the WireGuard protocol and 2FA")
|
(synopsis "Mesh VPN service utilizing the WireGuard protocol and 2FA")
|
||||||
(description
|
(description
|
||||||
|
|||||||
@@ -1,24 +1,94 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2022, 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2022, 2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal packages package-management)
|
(define-module (rosenthal packages package-management)
|
||||||
#:use-module ((guix licenses) #:prefix license:)
|
;; Guix utilities
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
#:use-module (rosenthal utils packages)
|
#:use-module (rosenthal utils packages)
|
||||||
|
;; Guix origin methods
|
||||||
|
#:use-module (guix git-download)
|
||||||
|
;; Guix build systems
|
||||||
|
#:use-module (guix build-system guile)
|
||||||
|
;; Guix packages
|
||||||
|
#:use-module (gnu packages base)
|
||||||
|
#:use-module (gnu packages bash)
|
||||||
|
#:use-module (gnu packages guile)
|
||||||
#:use-module (gnu packages package-management))
|
#:use-module (gnu packages package-management))
|
||||||
|
|
||||||
(define-public guix/dolly
|
(define guix-for-mirror-substitutes
|
||||||
|
(let ((commit "5ceffb60e55b86920fd720817dd24b0e1f900ac1")
|
||||||
|
(revision "7"))
|
||||||
|
(package
|
||||||
|
(inherit guix)
|
||||||
|
(name "guix")
|
||||||
|
(version (git-version "1.5.0" revision commit))
|
||||||
|
(source (origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://git.guix.gnu.org/guix.git")
|
||||||
|
(commit commit)))
|
||||||
|
(file-name (string-append "guix-" version "-checkout"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"0nb0xhd2jlg613d3z3br6yl3xj75b4vlyw9y45pwg8zrq02kjajd")))))))
|
||||||
|
|
||||||
|
(define-public mirror-substitutes
|
||||||
(package
|
(package
|
||||||
(inherit
|
(name "mirror-substitutes")
|
||||||
(package-with-extra-patches guix
|
(version "0.0.3")
|
||||||
(rosenthal-patches "guix-change-publish-cache-storage.patch"
|
(source (origin
|
||||||
"guix-allow-out-of-tree-modules-in-initrd.patch"
|
(method git-fetch)
|
||||||
"guix-wip-zfs-boot-support.patch")))
|
(uri (git-reference
|
||||||
(name "guix-dolly")
|
(url "https://codeberg.org/hako/mirror-substitutes.git")
|
||||||
|
(commit (string-append "v" version))))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"1qf2180bj36py05wz031m5fk2xmzwyf2cl8nhcnny63ghkm27m7j"))))
|
||||||
|
(build-system guile-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments (package-arguments guix)
|
(list
|
||||||
((#:parallel-build? _ #f) #t)))
|
#:source-directory "modules"
|
||||||
(properties '((disable-updater? . #t)))))
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(add-after 'build 'install
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
(define-values (module-dir object-dir)
|
||||||
|
(target-guile-scm+go #$output))
|
||||||
|
(define bindir
|
||||||
|
(in-vicinity #$output "bin"))
|
||||||
|
(with-directory-excursion "scripts"
|
||||||
|
(for-each
|
||||||
|
(lambda (script)
|
||||||
|
(substitute* script
|
||||||
|
(("/usr/(bin/env) -S guix" _ env)
|
||||||
|
(format #f "~a -S ~a"
|
||||||
|
(search-input-file inputs env)
|
||||||
|
(if (string-suffix? "query-substitutes" script)
|
||||||
|
"guix"
|
||||||
|
(search-input-file inputs "bin/guix")))))
|
||||||
|
(install-file script bindir)
|
||||||
|
(with-directory-excursion bindir
|
||||||
|
(wrap-program script
|
||||||
|
`("GUILE_LOAD_PATH" prefix
|
||||||
|
(,module-dir))
|
||||||
|
`("GUILE_LOAD_COMPILED_PATH" prefix
|
||||||
|
(,object-dir)))))
|
||||||
|
(find-files "."))))))))
|
||||||
|
(native-inputs
|
||||||
|
(list bash-minimal
|
||||||
|
guile-3.0-latest
|
||||||
|
guix-for-mirror-substitutes))
|
||||||
|
(inputs
|
||||||
|
(list bash-minimal
|
||||||
|
coreutils-minimal
|
||||||
|
guix-for-mirror-substitutes))
|
||||||
|
(home-page "https://codeberg.org/hako/mirror-substitutes")
|
||||||
|
(synopsis "Mirror Guix substitutes")
|
||||||
|
(description
|
||||||
|
"This package provides a collection of commands to help mirror Guix / Nix
|
||||||
|
substitutes (binary cache) from any upstream server.")
|
||||||
|
(license license:gpl3+)))
|
||||||
@@ -1,69 +1,17 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal packages password-utils)
|
(define-module (rosenthal packages password-utils)
|
||||||
|
;; Utilities
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module ((guix licenses) #:prefix license:)
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
|
;; Guix origin methods
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
#:use-module (guix git-download)
|
#:use-module (guix git-download)
|
||||||
#:use-module (rosenthal utils download)
|
#:use-module (rosenthal utils download)
|
||||||
|
;; Guix build systems
|
||||||
#:use-module (guix build-system go)
|
#:use-module (guix build-system go)
|
||||||
|
;; Guix packages
|
||||||
#:use-module (gnu packages golang))
|
#:use-module (gnu packages golang))
|
||||||
|
|
||||||
(define-public sops
|
|
||||||
(package
|
|
||||||
(name "sops")
|
|
||||||
(version "3.11.0")
|
|
||||||
(source (origin
|
|
||||||
(method git-fetch)
|
|
||||||
(uri (git-reference
|
|
||||||
(url "https://github.com/getsops/sops")
|
|
||||||
(commit (string-append "v" version))))
|
|
||||||
(file-name (git-file-name name version))
|
|
||||||
(sha256
|
|
||||||
(base32
|
|
||||||
"1md6mk1cklcaa90mfy5dsm44i5xc0l598dfr3mi0j1k4ydkfn280"))))
|
|
||||||
(build-system go-build-system)
|
|
||||||
(arguments
|
|
||||||
(list #:go go-1.24
|
|
||||||
#:install-source? #f
|
|
||||||
#:import-path "./cmd/sops"
|
|
||||||
#:build-flags
|
|
||||||
#~(list (string-append
|
|
||||||
"-ldflags="
|
|
||||||
"-X github.com/getsops/sops/v3/version.Version="
|
|
||||||
#$(package-version this-package)))
|
|
||||||
#:modules
|
|
||||||
'(((guix build gnu-build-system) #:prefix gnu:)
|
|
||||||
(guix build go-build-system)
|
|
||||||
(guix build utils))
|
|
||||||
#:phases
|
|
||||||
#~(modify-phases %standard-phases
|
|
||||||
(replace 'unpack
|
|
||||||
(lambda args
|
|
||||||
(unsetenv "GO111MODULE")
|
|
||||||
(apply (assoc-ref gnu:%standard-phases 'unpack) args)
|
|
||||||
(copy-recursively
|
|
||||||
#+(this-package-native-input "vendored-go-dependencies")
|
|
||||||
"vendor")))
|
|
||||||
(replace 'install-license-files
|
|
||||||
(assoc-ref gnu:%standard-phases 'install-license-files)))))
|
|
||||||
(native-inputs
|
|
||||||
(list (origin
|
|
||||||
(method (go-mod-vendor #:go go-1.24))
|
|
||||||
(uri (package-source this-package))
|
|
||||||
(file-name "vendored-go-dependencies")
|
|
||||||
(sha256
|
|
||||||
(base32
|
|
||||||
"05pd6d80x70xyak8clnjiiir8limlzq5cx2aqlda3p1ln4qpgc7m")))))
|
|
||||||
(home-page "https://getsops.io/")
|
|
||||||
(synopsis "Simple and flexible tool for managing secrets")
|
|
||||||
(description
|
|
||||||
"@acronym{SOPS, Secrets OPerationS} is an editor of encrypted files that
|
|
||||||
supports YAML, JSON, ENV, INI and binary formats and encrypts with @acronym{AWS
|
|
||||||
KMS, Amazon Web Services Key Management Service}, @acronym{GCP KMS, Google Cloud
|
|
||||||
Platform Key Management Service}, Azure Key Vault, @code{age}, and OpenPGP.")
|
|
||||||
(license license:mpl2.0)))
|
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
diff --git a/src/main.cpp b/src/main.cpp
|
||||||
|
index 18898d7..6426354 100644
|
||||||
|
--- a/src/main.cpp
|
||||||
|
+++ b/src/main.cpp
|
||||||
|
@@ -49,6 +49,7 @@ namespace {
|
||||||
|
QCommandLineOption optDaemon(QStringList{"daemon", "d"}, "Run as daemon (polkit agent + IPC server).");
|
||||||
|
QCommandLineOption optKeyring(QStringList{"keyring"}, "Run as keyring prompter (GCR replacement).");
|
||||||
|
QCommandLineOption optPinentry(QStringList{"pinentry"}, "Run as GPG pinentry.");
|
||||||
|
+ QCommandLineOption optDisplay(QStringList{"display"}, "");
|
||||||
|
|
||||||
|
// CLI options (for interacting with running daemon)
|
||||||
|
QCommandLineOption optPing(QStringList{"ping"}, "Check if the daemon is reachable.");
|
||||||
|
@@ -60,6 +61,7 @@ namespace {
|
||||||
|
parser.addOption(optDaemon);
|
||||||
|
parser.addOption(optKeyring);
|
||||||
|
parser.addOption(optPinentry);
|
||||||
|
+ parser.addOption(optDisplay);
|
||||||
|
parser.addOption(optPing);
|
||||||
|
parser.addOption(optNext);
|
||||||
|
parser.addOption(optRespond);
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
From 2f7e3c6f46233f9c9159fac61ca4121fe342107f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Hilton Chain <hako@ultrarare.space>
|
||||||
|
Date: Thu, 26 Feb 2026 09:57:51 +0800
|
||||||
|
Subject: [PATCH] builder: Support boolean value.
|
||||||
|
|
||||||
|
* toml/builder.scm (toml-build-boolean): New procedure.
|
||||||
|
(toml-build-value): Use it.
|
||||||
|
---
|
||||||
|
toml/builder.scm | 5 ++++-
|
||||||
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/toml/builder.scm b/toml/builder.scm
|
||||||
|
index f6bdcea..3531c6f 100644
|
||||||
|
--- a/toml/builder.scm
|
||||||
|
+++ b/toml/builder.scm
|
||||||
|
@@ -74,6 +74,9 @@
|
||||||
|
(else (string c))))
|
||||||
|
(string->list s))))
|
||||||
|
|
||||||
|
+(define (toml-build-boolean b port)
|
||||||
|
+ (put-string port (if b "true" "false")))
|
||||||
|
+
|
||||||
|
(define (toml-build-string s port)
|
||||||
|
(define quote-type (if (or
|
||||||
|
(string-contains s "\\")
|
||||||
|
@@ -198,7 +201,7 @@
|
||||||
|
(scm port #:key (newline? #t) (inline? #f))
|
||||||
|
(cond
|
||||||
|
;; ((eq? scm null) (toml-build-null port))
|
||||||
|
- ;; ((boolean? scm) (toml-build-boolean scm port))
|
||||||
|
+ ((boolean? scm) (toml-build-boolean scm port))
|
||||||
|
;; ((symbol? scm) (toml-build-string (symbol->string scm) port))
|
||||||
|
|
||||||
|
;; TODO float (nan, inf)
|
||||||
|
--
|
||||||
|
2.52.0
|
||||||
|
|
||||||
@@ -1,270 +0,0 @@
|
|||||||
From 4323514d1b259a0dd61572e3c0859fab4250d297 Mon Sep 17 00:00:00 2001
|
|
||||||
Message-ID: <4323514d1b259a0dd61572e3c0859fab4250d297.1757725903.git.hako@ultrarare.space>
|
|
||||||
From: Brian Cully <bjc@spork.org>
|
|
||||||
Date: Sun, 16 Feb 2025 21:52:45 +0900
|
|
||||||
Subject: [PATCH] Allow copying of out-of-tree modules to the Linux initrd.
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
With this patch, modules for ‘initrd-modules’ will not only be searched for in
|
|
||||||
the in-tree Linux modules, but also any additional modules specified in
|
|
||||||
‘kernel-loadable-modules’.
|
|
||||||
|
|
||||||
* gnu/build/linux-modules.scm (find-module-file): Change DIRECTORY argument to
|
|
||||||
DIRECTORIES. Now takes a list of directories to search, rather than a single
|
|
||||||
one.
|
|
||||||
* gnu/system/linux-initrd.scm (flat-linux-module-directory): change LINUX
|
|
||||||
argument to PACKAGES. Now contains a list of file-like objects to search for
|
|
||||||
modules.
|
|
||||||
(raw-initrd): Add LINUX-EXTRA-MODULE-DIRECTORIES keyword argument. Pass it
|
|
||||||
to (flat-linux-module-directory) along with the selected LINUX package.
|
|
||||||
(base-initrd): Add LINUX-EXTRA-MODULE-DIRECTORIES keyword argument. Pass it
|
|
||||||
to (raw-initrd).
|
|
||||||
* gnu/system.scm (operating-system-initrd-file): Pass in operating system
|
|
||||||
definition's kernel-loadable-modules into (make-initrd) as
|
|
||||||
LINUX-EXTRA-MODULE-DIRECTORIES.
|
|
||||||
* doc/guix.texi (Initial RAM Disk): Document how out-of-tree modules can be
|
|
||||||
used.
|
|
||||||
|
|
||||||
Change-Id: Ic39f2abcfabc3ec34a71acce840038396bf9c82e
|
|
||||||
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
|
||||||
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
|
||||||
Modified-by: Hilton Chain <hako@ultrarare.space>
|
|
||||||
---
|
|
||||||
doc/guix.texi | 15 ++++++++++
|
|
||||||
gnu/build/linux-modules.scm | 23 ++++++++++-----
|
|
||||||
gnu/system.scm | 2 ++
|
|
||||||
gnu/system/linux-initrd.scm | 58 +++++++++++++++++++++++--------------
|
|
||||||
4 files changed, 69 insertions(+), 29 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/doc/guix.texi b/doc/guix.texi
|
|
||||||
index 4ab404dcdb2..3c05428829b 100644
|
|
||||||
--- a/doc/guix.texi
|
|
||||||
+++ b/doc/guix.texi
|
|
||||||
@@ -46404,6 +46404,21 @@ Initial RAM Disk
|
|
||||||
(initrd-modules (cons "megaraid_sas" %base-initrd-modules)))
|
|
||||||
@end lisp
|
|
||||||
|
|
||||||
+If a module listed in @code{initrd-modules} is not included in the
|
|
||||||
+Linux-libre kernel, then its location must be provided via the
|
|
||||||
+@code{kernel-loadable-modules} list.
|
|
||||||
+
|
|
||||||
+As an example, if you need the driver for a Realtek RTL8821CE wireless
|
|
||||||
+network adapter for mounting the root file system over NFS, your
|
|
||||||
+configuration might include the following:
|
|
||||||
+
|
|
||||||
+@lisp
|
|
||||||
+(operating-system
|
|
||||||
+ ;; @dots{}
|
|
||||||
+ (initrd-modules (cons "8821ce" %base-initrd-modules))
|
|
||||||
+ (kernel-loadable-modules (list (list rtl8821ce-linux-module "module"))))
|
|
||||||
+@end lisp
|
|
||||||
+
|
|
||||||
@defvar %base-initrd-modules
|
|
||||||
This is the list of kernel modules included in the initrd by default.
|
|
||||||
@end defvar
|
|
||||||
diff --git a/gnu/build/linux-modules.scm b/gnu/build/linux-modules.scm
|
|
||||||
index 32baf6c5259..f45db55f861 100644
|
|
||||||
--- a/gnu/build/linux-modules.scm
|
|
||||||
+++ b/gnu/build/linux-modules.scm
|
|
||||||
@@ -246,8 +246,8 @@ (define (file-name->module-name file)
|
|
||||||
'.ko[.gz|.xz|.zst]' and normalizing it."
|
|
||||||
(normalize-module-name (strip-extension (basename file))))
|
|
||||||
|
|
||||||
-(define (find-module-file directory module)
|
|
||||||
- "Lookup module NAME under DIRECTORY, and return its absolute file name.
|
|
||||||
+(define (find-module-file directories module)
|
|
||||||
+ "Lookup module NAME under DIRECTORIES, and return its absolute file name.
|
|
||||||
NAME can be a file name with or without '.ko', or it can be a module name.
|
|
||||||
Raise an error if it could not be found.
|
|
||||||
|
|
||||||
@@ -255,6 +255,10 @@ (define (find-module-file directory module)
|
|
||||||
module names usually (always?) use underscores as the inter-word separator,
|
|
||||||
whereas file names often, but not always, use hyphens. Examples:
|
|
||||||
\"usb-storage.ko\", \"serpent_generic.ko\"."
|
|
||||||
+ ;; For backward compatibility.
|
|
||||||
+ (define %directories (if (pair? directories)
|
|
||||||
+ directories
|
|
||||||
+ (list directories)))
|
|
||||||
(define names
|
|
||||||
;; List of possible file names. XXX: It would of course be cleaner to
|
|
||||||
;; have a database that maps module names to file names and vice versa,
|
|
||||||
@@ -268,16 +272,19 @@ (define (find-module-file directory module)
|
|
||||||
(else chr)))
|
|
||||||
module))))
|
|
||||||
|
|
||||||
- (match (find-files directory
|
|
||||||
- (lambda (file stat)
|
|
||||||
- (member (strip-extension
|
|
||||||
- (basename file)) names)))
|
|
||||||
+ (match (append-map
|
|
||||||
+ (cut find-files <>
|
|
||||||
+ (lambda (file _)
|
|
||||||
+ (member (strip-extension
|
|
||||||
+ (basename file))
|
|
||||||
+ names)))
|
|
||||||
+ %directories)
|
|
||||||
((file)
|
|
||||||
file)
|
|
||||||
(()
|
|
||||||
- (error "kernel module not found" module directory))
|
|
||||||
+ (error "kernel module not found" module %directories))
|
|
||||||
((_ ...)
|
|
||||||
- (error "several modules by that name" module directory))))
|
|
||||||
+ (error "several modules by that name" module %directories))))
|
|
||||||
|
|
||||||
(define* (recursive-module-dependencies files
|
|
||||||
#:key (lookup-module dot-ko))
|
|
||||||
diff --git a/gnu/system.scm b/gnu/system.scm
|
|
||||||
index 78a30646e1b..b709686744d 100644
|
|
||||||
--- a/gnu/system.scm
|
|
||||||
+++ b/gnu/system.scm
|
|
||||||
@@ -1380,6 +1380,8 @@ (define (operating-system-initrd-file os)
|
|
||||||
#:linux (operating-system-kernel os)
|
|
||||||
#:linux-modules
|
|
||||||
(operating-system-initrd-modules os)
|
|
||||||
+ #:linux-extra-module-directories
|
|
||||||
+ (operating-system-kernel-loadable-modules os)
|
|
||||||
#:mapped-devices mapped-devices
|
|
||||||
#:keyboard-layout (operating-system-keyboard-layout os)))
|
|
||||||
|
|
||||||
diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm
|
|
||||||
index 17c2e6f6bfd..978084062b2 100644
|
|
||||||
--- a/gnu/system/linux-initrd.scm
|
|
||||||
+++ b/gnu/system/linux-initrd.scm
|
|
||||||
@@ -120,13 +120,19 @@ (define* (expression->initrd exp
|
|
||||||
`(#:references-graphs (("closure" ,init))))
|
|
||||||
"/initrd.cpio.gz"))
|
|
||||||
|
|
||||||
-(define (flat-linux-module-directory linux modules)
|
|
||||||
+(define (flat-linux-module-directory packages modules)
|
|
||||||
"Return a flat directory containing the Linux kernel modules listed in
|
|
||||||
-MODULES and taken from LINUX."
|
|
||||||
+MODULES and taken from PACKAGES."
|
|
||||||
(define imported-modules
|
|
||||||
(source-module-closure '((gnu build linux-modules)
|
|
||||||
(guix build utils))))
|
|
||||||
|
|
||||||
+ (define package-inputs
|
|
||||||
+ (map (match-lambda
|
|
||||||
+ ((p o) (gexp-input p o))
|
|
||||||
+ (p (gexp-input p "out")))
|
|
||||||
+ packages))
|
|
||||||
+
|
|
||||||
(define build-exp
|
|
||||||
(with-imported-modules imported-modules
|
|
||||||
(with-extensions (list guile-zlib guile-zstd)
|
|
||||||
@@ -138,13 +144,17 @@ (define (flat-linux-module-directory linux modules)
|
|
||||||
(srfi srfi-26)
|
|
||||||
(ice-9 match))
|
|
||||||
|
|
||||||
- (define module-dir
|
|
||||||
- (string-append #$linux "/lib/modules"))
|
|
||||||
+ (define module-dirs
|
|
||||||
+ (map (cut string-append <> "/lib/modules")
|
|
||||||
+ '#$package-inputs))
|
|
||||||
|
|
||||||
(define builtin-modules
|
|
||||||
- (match (find-files module-dir (lambda (file stat)
|
|
||||||
- (string=? (basename file)
|
|
||||||
- "modules.builtin")))
|
|
||||||
+ (match (append-map
|
|
||||||
+ (cut find-files <>
|
|
||||||
+ (lambda (file stat)
|
|
||||||
+ (string=? (basename file)
|
|
||||||
+ "modules.builtin")))
|
|
||||||
+ module-dirs)
|
|
||||||
((file . _)
|
|
||||||
(call-with-input-file file
|
|
||||||
(lambda (port)
|
|
||||||
@@ -157,7 +167,7 @@ (define (flat-linux-module-directory linux modules)
|
|
||||||
(lset-difference string=? '#$modules builtin-modules))
|
|
||||||
|
|
||||||
(define modules
|
|
||||||
- (let* ((lookup (cut find-module-file module-dir <>))
|
|
||||||
+ (let* ((lookup (cut find-module-file module-dirs <>))
|
|
||||||
(modules (map lookup modules-to-lookup)))
|
|
||||||
(append modules
|
|
||||||
(recursive-module-dependencies
|
|
||||||
@@ -192,6 +202,7 @@ (define* (raw-initrd file-systems
|
|
||||||
#:key
|
|
||||||
(linux linux-libre)
|
|
||||||
(linux-modules '())
|
|
||||||
+ (linux-extra-module-directories '())
|
|
||||||
(pre-mount #t)
|
|
||||||
(mapped-devices '())
|
|
||||||
(keyboard-layout #f)
|
|
||||||
@@ -199,15 +210,16 @@ (define* (raw-initrd file-systems
|
|
||||||
qemu-networking?
|
|
||||||
volatile-root?
|
|
||||||
(on-error 'debug))
|
|
||||||
- "Return as a file-like object a raw initrd, with kernel
|
|
||||||
-modules taken from LINUX. FILE-SYSTEMS is a list of file-systems to be
|
|
||||||
-mounted by the initrd, possibly in addition to the root file system specified
|
|
||||||
-on the kernel command line via 'root'. LINUX-MODULES is a list of kernel
|
|
||||||
-modules to be loaded at boot time. MAPPED-DEVICES is a list of device
|
|
||||||
-mappings to realize before FILE-SYSTEMS are mounted. PRE-MOUNT is a
|
|
||||||
-G-expression to evaluate before realizing MAPPED-DEVICES.
|
|
||||||
-HELPER-PACKAGES is a list of packages to be copied in the initrd. It may include
|
|
||||||
-e2fsck/static or other packages needed by the initrd to check root partition.
|
|
||||||
+ "Return as a file-like object a raw initrd, with kernel modules taken from
|
|
||||||
+LINUX. FILE-SYSTEMS is a list of file-systems to be mounted by the initrd,
|
|
||||||
+possibly in addition to the root file system specified on the kernel command
|
|
||||||
+line via 'root'. LINUX-MODULES is a list of kernel modules to be loaded at
|
|
||||||
+boot time. LINUX-EXTRA-MODULE-DIRECTORIES is a list of file-like objects which
|
|
||||||
+will be searched for modules in addition to the linux kernel. MAPPED-DEVICES
|
|
||||||
+is a list of device mappings to realize before FILE-SYSTEMS are mounted.
|
|
||||||
+HELPER-PACKAGES is a list of packages to be copied in the initrd. It may
|
|
||||||
+include e2fsck/static or other packages needed by the initrd to check root
|
|
||||||
+partition.
|
|
||||||
|
|
||||||
When true, KEYBOARD-LAYOUT is a <keyboard-layout> record denoting the desired
|
|
||||||
console keyboard layout. This is done before MAPPED-DEVICES are set up and
|
|
||||||
@@ -244,7 +256,8 @@ (define* (raw-initrd file-systems
|
|
||||||
#~())))
|
|
||||||
|
|
||||||
(define kodir
|
|
||||||
- (flat-linux-module-directory linux linux-modules))
|
|
||||||
+ (flat-linux-module-directory (cons linux linux-extra-module-directories)
|
|
||||||
+ linux-modules))
|
|
||||||
|
|
||||||
(expression->initrd
|
|
||||||
(with-imported-modules (source-module-closure
|
|
||||||
@@ -392,6 +405,7 @@ (define* (base-initrd file-systems
|
|
||||||
#:key
|
|
||||||
(linux linux-libre)
|
|
||||||
(linux-modules '())
|
|
||||||
+ (linux-extra-module-directories '())
|
|
||||||
(mapped-devices '())
|
|
||||||
(keyboard-layout #f)
|
|
||||||
qemu-networking?
|
|
||||||
@@ -412,9 +426,10 @@ (define* (base-initrd file-systems
|
|
||||||
QEMU-NETWORKING? and VOLATILE-ROOT? behaves as in raw-initrd.
|
|
||||||
|
|
||||||
The initrd is automatically populated with all the kernel modules necessary
|
|
||||||
-for FILE-SYSTEMS and for the given options. Additional kernel
|
|
||||||
-modules can be listed in LINUX-MODULES. They will be added to the initrd, and
|
|
||||||
-loaded at boot time in the order in which they appear."
|
|
||||||
+for FILE-SYSTEMS and for the given options. Additional kernel modules can be
|
|
||||||
+listed in LINUX-MODULES. Additional directories for modules can be listed in
|
|
||||||
+LINUX-EXTRA-MODULE-DIRECTORIES. They will be added to the initrd, and loaded
|
|
||||||
+at boot time in the order in which they appear."
|
|
||||||
(define linux-modules*
|
|
||||||
;; Modules added to the initrd and loaded from the initrd.
|
|
||||||
`(,@linux-modules
|
|
||||||
@@ -434,6 +449,7 @@ (define* (base-initrd file-systems
|
|
||||||
(raw-initrd file-systems
|
|
||||||
#:linux linux
|
|
||||||
#:linux-modules linux-modules*
|
|
||||||
+ #:linux-extra-module-directories linux-extra-module-directories
|
|
||||||
#:mapped-devices mapped-devices
|
|
||||||
#:helper-packages helper-packages
|
|
||||||
#:keyboard-layout keyboard-layout
|
|
||||||
|
|
||||||
base-commit: 6174b135ffa3328fd7ad404b15b1586fc64e5666
|
|
||||||
prerequisite-patch-id: f71061d735b69d75799eb03df6215bbcb20d53b2
|
|
||||||
prerequisite-patch-id: 88337e68e714f3b1fe0d8e6588a1a4f423251610
|
|
||||||
--
|
|
||||||
2.51.0
|
|
||||||
|
|
||||||
@@ -1,259 +0,0 @@
|
|||||||
From 5c0b93219bf5def932dfe4de3288fd09ea557f69 Mon Sep 17 00:00:00 2001
|
|
||||||
Message-ID: <5c0b93219bf5def932dfe4de3288fd09ea557f69.1761666722.git.hako@ultrarare.space>
|
|
||||||
From: Hilton Chain <hako@ultrarare.space>
|
|
||||||
Date: Sat, 23 Aug 2025 14:07:19 +0800
|
|
||||||
Subject: [PATCH] publish: Store cache in a layout identical to HTTP endpoints.
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
This allows serving substitutes using a file server.
|
|
||||||
|
|
||||||
Original layout:
|
|
||||||
--8<---------------cut here---------------start------------->8---
|
|
||||||
/path/to/publish/cache
|
|
||||||
├── hashes
|
|
||||||
│ ├── k0pin1y1r0vdkdbg3lwjqc52hpwjbdyb
|
|
||||||
│ └── ql2nxr2b587kjydfwivjsnhmqya957bq
|
|
||||||
└── nar
|
|
||||||
├── none
|
|
||||||
│ ├── k0pin1y1r0vdkdbg3lwjqc52hpwjbdyb-hello-2.12.2.narinfo
|
|
||||||
│ └── k0pin1y1r0vdkdbg3lwjqc52hpwjbdyb-hello-2.12.2.nar
|
|
||||||
└── zstd
|
|
||||||
├── ql2nxr2b587kjydfwivjsnhmqya957bq-helix-25.01.1.narinfo
|
|
||||||
└── ql2nxr2b587kjydfwivjsnhmqya957bq-helix-25.01.1.nar
|
|
||||||
--8<---------------cut here---------------end--------------->8---
|
|
||||||
|
|
||||||
Modified layout:
|
|
||||||
--8<---------------cut here---------------start------------->8---
|
|
||||||
/path/to/publish/cache
|
|
||||||
├── hashes
|
|
||||||
│ ├── k0pin1y1r0vdkdbg3lwjqc52hpwjbdyb
|
|
||||||
│ └── ql2nxr2b587kjydfwivjsnhmqya957bq
|
|
||||||
├── nar
|
|
||||||
│ ├── none
|
|
||||||
│ │ └── k0pin1y1r0vdkdbg3lwjqc52hpwjbdyb-hello-2.12.2
|
|
||||||
│ └── zstd
|
|
||||||
│ └── ql2nxr2b587kjydfwivjsnhmqya957bq-helix-25.01.1
|
|
||||||
├── k0pin1y1r0vdkdbg3lwjqc52hpwjbdyb.narinfo
|
|
||||||
└── ql2nxr2b587kjydfwivjsnhmqya957bq.narinfo
|
|
||||||
--8<---------------cut here---------------end--------------->8---
|
|
||||||
|
|
||||||
Change-Id: I07689f08eef23c5cd4494451678f4e1ad709f1b3
|
|
||||||
---
|
|
||||||
guix/scripts/publish.scm | 17 +++++---------
|
|
||||||
tests/publish.scm | 48 ++++++++++++++++++++--------------------
|
|
||||||
2 files changed, 30 insertions(+), 35 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/guix/scripts/publish.scm b/guix/scripts/publish.scm
|
|
||||||
index 7638bcbd0e..a70a9b730f 100644
|
|
||||||
--- a/guix/scripts/publish.scm
|
|
||||||
+++ b/guix/scripts/publish.scm
|
|
||||||
@@ -47,6 +47,7 @@ (define-module (guix scripts publish)
|
|
||||||
#:use-module (guix base32)
|
|
||||||
#:use-module (guix base64)
|
|
||||||
#:use-module (guix config)
|
|
||||||
+ #:use-module (guix records)
|
|
||||||
#:use-module (gcrypt hash)
|
|
||||||
#:use-module (guix pki)
|
|
||||||
#:use-module (gcrypt pk-crypto)
|
|
||||||
@@ -306,8 +307,6 @@ (define* (store-item->recutils store-item
|
|
||||||
(let ((url (encode-and-join-uri-path
|
|
||||||
`(,@(split-and-decode-uri-path nar-path)
|
|
||||||
,@(match compression
|
|
||||||
- (($ <compression> 'none)
|
|
||||||
- '())
|
|
||||||
(($ <compression> type)
|
|
||||||
(list (symbol->string type))))
|
|
||||||
,(basename store-item)))))
|
|
||||||
@@ -424,16 +423,13 @@ (define* (render-narinfo store request hash
|
|
||||||
|
|
||||||
(define* (nar-cache-file directory item
|
|
||||||
#:key (compression %no-compression))
|
|
||||||
- (string-append directory "/"
|
|
||||||
+ (string-append directory "/nar/"
|
|
||||||
(symbol->string (compression-type compression))
|
|
||||||
- "/" (basename item) ".nar"))
|
|
||||||
+ "/" (basename item)))
|
|
||||||
|
|
||||||
(define* (narinfo-cache-file directory item
|
|
||||||
#:key (compression %no-compression))
|
|
||||||
- (string-append directory "/"
|
|
||||||
- (symbol->string (compression-type compression))
|
|
||||||
- "/" (basename item)
|
|
||||||
- ".narinfo"))
|
|
||||||
+ (string-append directory "/" (string-take (basename item) 32) ".narinfo"))
|
|
||||||
|
|
||||||
(define (hash-part-mapping-cache-file directory hash)
|
|
||||||
(string-append directory "/hashes/" hash))
|
|
||||||
@@ -533,9 +529,7 @@ (define* (render-narinfo/cached store request hash
|
|
||||||
requested using POOL."
|
|
||||||
(define (delete-entry narinfo)
|
|
||||||
;; Delete NARINFO and the corresponding nar from CACHE.
|
|
||||||
- (let* ((nar (string-append (string-drop-right narinfo
|
|
||||||
- (string-length ".narinfo"))
|
|
||||||
- ".nar"))
|
|
||||||
+ (let* ((nar (uri-decode (assoc-ref (call-with-input-file narinfo recutils->alist) "URL")))
|
|
||||||
(base (basename narinfo ".narinfo"))
|
|
||||||
(hash (string-take base (string-index base #\-)))
|
|
||||||
(mapping (hash-part-mapping-cache-file cache hash)))
|
|
||||||
@@ -1039,6 +1033,7 @@ (define (string->compression-type string)
|
|
||||||
("gzip" 'gzip)
|
|
||||||
("lzip" 'lzip)
|
|
||||||
("zstd" 'zstd)
|
|
||||||
+ ("none" 'none)
|
|
||||||
(_ #f)))
|
|
||||||
|
|
||||||
(define (effective-compression requested-type compressions)
|
|
||||||
diff --git a/tests/publish.scm b/tests/publish.scm
|
|
||||||
index 3c80c50d51..52c6f6d10c 100644
|
|
||||||
--- a/tests/publish.scm
|
|
||||||
+++ b/tests/publish.scm
|
|
||||||
@@ -173,7 +173,7 @@ (define %gzip-magic-bytes
|
|
||||||
(canonical-sexp->string
|
|
||||||
(signed-string unsigned-info))))))
|
|
||||||
(format #f "~aSignature: 1;~a;~a
|
|
||||||
-URL: nar/~a
|
|
||||||
+URL: nar/none/~a
|
|
||||||
Compression: none
|
|
||||||
FileSize: ~a\n"
|
|
||||||
unsigned-info (gethostname) signature
|
|
||||||
@@ -223,7 +223,7 @@ (define %gzip-magic-bytes
|
|
||||||
(canonical-sexp->string
|
|
||||||
(signed-string unsigned-info))))))
|
|
||||||
(format #f "~aSignature: 1;~a;~a
|
|
||||||
-URL: nar/~a
|
|
||||||
+URL: nar/none/~a
|
|
||||||
Compression: none
|
|
||||||
FileSize: ~a~%"
|
|
||||||
unsigned-info (gethostname) signature
|
|
||||||
@@ -332,7 +332,7 @@ (define %gzip-magic-bytes
|
|
||||||
(recutils->alist body)))))
|
|
||||||
|
|
||||||
(test-equal "/*.narinfo for a compressed file"
|
|
||||||
- '("none" "nar") ;compression-less nar
|
|
||||||
+ '("none" "nar/none") ;compression-less nar
|
|
||||||
;; Assume 'guix publish -C' is already running on port 6799.
|
|
||||||
(let* ((item (add-text-to-store %store "fake.tar.gz"
|
|
||||||
"This is a fake compressed file."))
|
|
||||||
@@ -378,7 +378,7 @@ (define %gzip-magic-bytes
|
|
||||||
(test-equal "custom nar path"
|
|
||||||
;; Serve nars at /foo/bar/chbouib instead of /nar.
|
|
||||||
(list `(("StorePath" . ,%item)
|
|
||||||
- ("URL" . ,(string-append "foo/bar/chbouib/" (basename %item)))
|
|
||||||
+ ("URL" . ,(string-append "foo/bar/chbouib/none/" (basename %item)))
|
|
||||||
("Compression" . "none"))
|
|
||||||
200
|
|
||||||
404)
|
|
||||||
@@ -403,7 +403,7 @@ (define %gzip-magic-bytes
|
|
||||||
(recutils->alist body))
|
|
||||||
(response-code (http-get nar-url))
|
|
||||||
(response-code
|
|
||||||
- (http-get (string-append base "nar/" (basename %item))))))))
|
|
||||||
+ (http-get (string-append base "nar/none/" (basename %item))))))))
|
|
||||||
|
|
||||||
(test-equal "/nar/ with properly encoded '+' sign"
|
|
||||||
"Congrats!"
|
|
||||||
@@ -479,10 +479,10 @@ (define %gzip-magic-bytes
|
|
||||||
(part (store-path-hash-part %item))
|
|
||||||
(url (string-append base part ".narinfo"))
|
|
||||||
(nar-url (string-append base "nar/gzip/" (basename %item)))
|
|
||||||
- (cached (string-append cache "/gzip/" (basename %item)
|
|
||||||
+ (cached (string-append cache "/" part
|
|
||||||
".narinfo"))
|
|
||||||
- (nar (string-append cache "/gzip/"
|
|
||||||
- (basename %item) ".nar"))
|
|
||||||
+ (nar (string-append cache "/nar/gzip/"
|
|
||||||
+ (basename %item)))
|
|
||||||
(response (http-get url)))
|
|
||||||
(and (= 404 (response-code response))
|
|
||||||
|
|
||||||
@@ -535,15 +535,15 @@ (define %gzip-magic-bytes
|
|
||||||
(url (string-append base part ".narinfo"))
|
|
||||||
(nar-url (cute string-append "nar/" <> "/"
|
|
||||||
(basename %item)))
|
|
||||||
- (cached (cute string-append cache "/" <> "/"
|
|
||||||
- (basename %item) ".narinfo"))
|
|
||||||
- (nar (cute string-append cache "/" <> "/"
|
|
||||||
- (basename %item) ".nar"))
|
|
||||||
+ (cached (string-append cache "/"
|
|
||||||
+ part ".narinfo"))
|
|
||||||
+ (nar (cute string-append cache "/nar/" <> "/"
|
|
||||||
+ (basename %item)))
|
|
||||||
(response (http-get url)))
|
|
||||||
- (wait-for-file (cached "gzip"))
|
|
||||||
+ (wait-for-file cached)
|
|
||||||
(let* ((body (http-get-port url))
|
|
||||||
(narinfo (recutils->alist body))
|
|
||||||
- (uncompressed (string-append base "nar/"
|
|
||||||
+ (uncompressed (string-append base "nar/none/"
|
|
||||||
(basename %item))))
|
|
||||||
(and (file-exists? (nar "gzip"))
|
|
||||||
(file-exists? (nar "lzip"))
|
|
||||||
@@ -576,7 +576,7 @@ (define %gzip-magic-bytes
|
|
||||||
(list #t
|
|
||||||
(* 42 3600) ;TTL on narinfo
|
|
||||||
`(("StorePath" . ,item)
|
|
||||||
- ("URL" . ,(string-append "nar/" (basename item)))
|
|
||||||
+ ("URL" . ,(string-append "nar/none/" (basename item)))
|
|
||||||
("Compression" . "none"))
|
|
||||||
200 ;nar/…
|
|
||||||
(* 42 3600) ;TTL on nar/…
|
|
||||||
@@ -595,10 +595,10 @@ (define %gzip-magic-bytes
|
|
||||||
(let* ((base "http://localhost:6796/")
|
|
||||||
(part (store-path-hash-part item))
|
|
||||||
(url (string-append base part ".narinfo"))
|
|
||||||
- (cached (string-append cache "/none/"
|
|
||||||
- (basename item) ".narinfo"))
|
|
||||||
- (nar (string-append cache "/none/"
|
|
||||||
- (basename item) ".nar"))
|
|
||||||
+ (cached (string-append cache "/"
|
|
||||||
+ part ".narinfo"))
|
|
||||||
+ (nar (string-append cache "/nar/none/"
|
|
||||||
+ (basename item)))
|
|
||||||
(response (http-get url)))
|
|
||||||
(and (= 404 (response-code response))
|
|
||||||
|
|
||||||
@@ -607,7 +607,7 @@ (define %gzip-magic-bytes
|
|
||||||
(body (http-get-port url))
|
|
||||||
(compressed (http-get (string-append base "nar/gzip/"
|
|
||||||
(basename item))))
|
|
||||||
- (uncompressed (http-get (string-append base "nar/"
|
|
||||||
+ (uncompressed (http-get (string-append base "nar/none/"
|
|
||||||
(basename item))))
|
|
||||||
(narinfo (recutils->alist body)))
|
|
||||||
(list (file-exists? nar)
|
|
||||||
@@ -650,8 +650,8 @@ (define %gzip-magic-bytes
|
|
||||||
(item (add-text-to-store %store "random" (random-text)))
|
|
||||||
(part (store-path-hash-part item))
|
|
||||||
(url (string-append base part ".narinfo"))
|
|
||||||
- (cached (string-append cache "/gzip/"
|
|
||||||
- (basename item)
|
|
||||||
+ (cached (string-append cache "/"
|
|
||||||
+ part
|
|
||||||
".narinfo"))
|
|
||||||
(response (http-get url)))
|
|
||||||
(and (= 200 (response-code response)) ;we're below the threshold
|
|
||||||
@@ -676,7 +676,7 @@ (define %gzip-magic-bytes
|
|
||||||
(part (store-path-hash-part item))
|
|
||||||
(narinfo (string-append base part ".narinfo"))
|
|
||||||
(nar (string-append base "nar/gzip/" (basename item)))
|
|
||||||
- (cached (string-append cache "/gzip/" (basename item)
|
|
||||||
+ (cached (string-append cache "/" part
|
|
||||||
".narinfo")))
|
|
||||||
;; We're below the default cache bypass threshold, so NAR and NARINFO
|
|
||||||
;; should immediately return 200. The NARINFO request should trigger
|
|
||||||
@@ -712,7 +712,7 @@ (define %gzip-magic-bytes
|
|
||||||
(part (store-path-hash-part item))
|
|
||||||
(narinfo (string-append base part ".narinfo"))
|
|
||||||
(nar (string-append base "nar/gzip/" (basename item)))
|
|
||||||
- (cached (string-append cache "/gzip/" (basename item)
|
|
||||||
+ (cached (string-append cache "/" part
|
|
||||||
".narinfo")))
|
|
||||||
;; The first response used to be 500 and to terminate the daemon
|
|
||||||
;; connection as a side effect.
|
|
||||||
|
|
||||||
base-commit: 31a211f180fd8246dbf7efb4120236c837faffc8
|
|
||||||
--
|
|
||||||
2.51.0
|
|
||||||
|
|
||||||
@@ -1,184 +0,0 @@
|
|||||||
From ab4aa6e7bb41fe0f2c64cfb587562b19a7cb44ff Mon Sep 17 00:00:00 2001
|
|
||||||
Message-ID: <ab4aa6e7bb41fe0f2c64cfb587562b19a7cb44ff.1757826291.git.hako@ultrarare.space>
|
|
||||||
From: Hilton Chain <hako@ultrarare.space>
|
|
||||||
Date: Sun, 7 Sep 2025 13:52:57 +0800
|
|
||||||
Subject: [PATCH] WIP: ZFS boot support.
|
|
||||||
|
|
||||||
Change-Id: I6579a36d66fcd0a487fe262c9a7c36e51532cb70
|
|
||||||
---
|
|
||||||
gnu/build/file-systems.scm | 21 ++++++++++++++-------
|
|
||||||
gnu/build/linux-boot.scm | 1 +
|
|
||||||
gnu/system/file-systems.scm | 30 +++++++++++++++++++++---------
|
|
||||||
gnu/system/linux-initrd.scm | 25 ++++++++++++++++++++-----
|
|
||||||
guix/scripts/system.scm | 3 ++-
|
|
||||||
5 files changed, 58 insertions(+), 22 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm
|
|
||||||
index c506a4911ff..05d0cb819ae 100644
|
|
||||||
--- a/gnu/build/file-systems.scm
|
|
||||||
+++ b/gnu/build/file-systems.scm
|
|
||||||
@@ -1173,13 +1173,20 @@ (define (canonicalize-device-spec spec)
|
|
||||||
|
|
||||||
(match spec
|
|
||||||
((? string?)
|
|
||||||
- (if (or (string-contains spec ":/") ;nfs
|
|
||||||
- (and (>= (string-length spec) 2)
|
|
||||||
- (equal? (string-take spec 2) "//")) ;cifs
|
|
||||||
- (string=? spec "none"))
|
|
||||||
- spec ; do not resolve NFS / CIFS / tmpfs devices
|
|
||||||
- ;; Nothing to do, but wait until SPEC shows up.
|
|
||||||
- (resolve identity spec identity)))
|
|
||||||
+ (cond
|
|
||||||
+ ((or (string-contains spec ":/") ;nfs
|
|
||||||
+ (and (>= (string-length spec) 2)
|
|
||||||
+ (equal? (string-take spec 2) "//")) ;cifs
|
|
||||||
+ (string=? spec "none"))
|
|
||||||
+ ;; Do not resolve NFS / CIFS / tmpfs devices.
|
|
||||||
+ spec)
|
|
||||||
+ ((and (>= (string-length spec) 4)
|
|
||||||
+ (string=? (string-take spec 4) "zfs:"))
|
|
||||||
+ ;; "zfs:zpool/dataset" => "zpool/dataset"
|
|
||||||
+ (string-drop spec 4))
|
|
||||||
+ (else
|
|
||||||
+ ;; Nothing to do, but wait until SPEC shows up.
|
|
||||||
+ (resolve identity spec identity))))
|
|
||||||
((? file-system-label?)
|
|
||||||
;; Resolve the label.
|
|
||||||
(resolve find-partition-by-label
|
|
||||||
diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
|
|
||||||
index 548e28a1c97..2b577483832 100644
|
|
||||||
--- a/gnu/build/linux-boot.scm
|
|
||||||
+++ b/gnu/build/linux-boot.scm
|
|
||||||
@@ -523,6 +523,7 @@ (define* (boot-system #:key
|
|
||||||
;; So check for all four.
|
|
||||||
(cond ((string-prefix? "/" device-string) device-string)
|
|
||||||
((string-contains device-string ":/") device-string) ; nfs-root
|
|
||||||
+ ((string-prefix? "zfs:" device-string) device-string)
|
|
||||||
((uuid device-string) => identity)
|
|
||||||
(else (file-system-label device-string))))
|
|
||||||
|
|
||||||
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
|
|
||||||
index 4ea8237c70d..c6cf828db21 100644
|
|
||||||
--- a/gnu/system/file-systems.scm
|
|
||||||
+++ b/gnu/system/file-systems.scm
|
|
||||||
@@ -372,7 +372,9 @@ (define %pseudo-file-system-types
|
|
||||||
;; List of know pseudo file system types. This is used when validating file
|
|
||||||
;; system definitions.
|
|
||||||
'("binfmt_misc" "cgroup" "cgroup2" "debugfs" "devpts" "devtmpfs" "efivarfs" "fusectl"
|
|
||||||
- "hugetlbfs" "overlay" "proc" "securityfs" "sysfs" "tmpfs" "tracefs" "virtiofs" "xenfs"))
|
|
||||||
+ "hugetlbfs" "overlay" "proc" "securityfs" "sysfs" "tmpfs" "tracefs" "virtiofs" "xenfs"
|
|
||||||
+ ;; HACK
|
|
||||||
+ "zfs"))
|
|
||||||
|
|
||||||
(define %fuse-control-file-system
|
|
||||||
;; Control file system for Linux' file systems in user-space (FUSE).
|
|
||||||
@@ -627,18 +629,21 @@ (define (file-system-mount-point-predicate mount-point)
|
|
||||||
|
|
||||||
|
|
||||||
;;;
|
|
||||||
-;;; Btrfs specific helpers.
|
|
||||||
+;;; Btrfs specific helpers. TODO: Refactor
|
|
||||||
;;;
|
|
||||||
|
|
||||||
(define (btrfs-subvolume? fs)
|
|
||||||
"Predicate to check if FS, a file-system object, is a Btrfs subvolume."
|
|
||||||
- (and-let* ((btrfs-file-system? (string= "btrfs" (file-system-type fs)))
|
|
||||||
- (option-keys (map (match-lambda
|
|
||||||
- ((key . value) key)
|
|
||||||
- (key key))
|
|
||||||
- (file-system-options->alist
|
|
||||||
- (file-system-options fs)))))
|
|
||||||
- (find (cut string-prefix? "subvol" <>) option-keys)))
|
|
||||||
+ (or (and-let* ((btrfs-file-system? (string= "btrfs" (file-system-type fs)))
|
|
||||||
+ (option-keys (map (match-lambda
|
|
||||||
+ ((key . value) key)
|
|
||||||
+ (key key))
|
|
||||||
+ (file-system-options->alist
|
|
||||||
+ (file-system-options fs)))))
|
|
||||||
+ (find (cut string-prefix? "subvol" <>) option-keys))
|
|
||||||
+ (and (string=? "zfs" (file-system-type fs))
|
|
||||||
+ ;; "zfs:zpool/dataset"
|
|
||||||
+ (string-contains (file-system-device fs) "/"))))
|
|
||||||
|
|
||||||
(define (btrfs-store-subvolume-file-name file-systems)
|
|
||||||
"Return the subvolume file name within the Btrfs top level onto which the
|
|
||||||
@@ -664,6 +669,13 @@ (define (btrfs-store-subvolume-file-name file-systems)
|
|
||||||
;; XXX: Deriving the subvolume name based from a subvolume ID is not
|
|
||||||
;; supported, as we'd need to query the actual file system.
|
|
||||||
(or (and=> (assoc-ref options "subvol") prepend-slash/maybe)
|
|
||||||
+ (and (string=? "zfs" (file-system-type store-subvolume-fs))
|
|
||||||
+ ;; "zfs:zpool/dataset" => "/dataset@"
|
|
||||||
+ (and=> (file-system-device store-subvolume-fs)
|
|
||||||
+ (lambda (device)
|
|
||||||
+ (string-append
|
|
||||||
+ (substring device (string-index device #\/))
|
|
||||||
+ "@"))))
|
|
||||||
(raise (condition
|
|
||||||
(&message
|
|
||||||
(message "The store is on a Btrfs subvolume, but the \
|
|
||||||
diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm
|
|
||||||
index 978084062b2..8bd4a4a7850 100644
|
|
||||||
--- a/gnu/system/linux-initrd.scm
|
|
||||||
+++ b/gnu/system/linux-initrd.scm
|
|
||||||
@@ -249,11 +249,25 @@ (define* (raw-initrd file-systems
|
|
||||||
;; File systems like btrfs need help to assemble multi-device file systems
|
|
||||||
;; but do not use manually-specified <mapped-devices>.
|
|
||||||
(let ((file-system-types (map file-system-type file-systems)))
|
|
||||||
- (if (member "btrfs" file-system-types)
|
|
||||||
- ;; Ignore errors: if the system manages to boot anyway, the better.
|
|
||||||
- #~((system* (string-append #$btrfs-progs/static "/bin/btrfs")
|
|
||||||
- "device" "scan"))
|
|
||||||
- #~())))
|
|
||||||
+ (and
|
|
||||||
+ (if (member "btrfs" file-system-types)
|
|
||||||
+ ;; Ignore errors: if the system manages to boot anyway, the better.
|
|
||||||
+ #~((system* (string-append #$btrfs-progs/static "/bin/btrfs")
|
|
||||||
+ "device" "scan"))
|
|
||||||
+ #~())
|
|
||||||
+ (map (lambda (zpool)
|
|
||||||
+ ;; Ignore errors: if the system manages to boot anyway, the
|
|
||||||
+ ;; better.
|
|
||||||
+ #~(system* #$(file-append zfs "/sbin/zpool")
|
|
||||||
+ "import" "-N" #$zpool))
|
|
||||||
+ (delete-duplicates
|
|
||||||
+ ;; "zfs:zpool/dataset" => "zpool"
|
|
||||||
+ (map (compose second
|
|
||||||
+ (cut string-split <> (char-set #\: #\/))
|
|
||||||
+ file-system-device)
|
|
||||||
+ (filter (lambda (fs)
|
|
||||||
+ (equal? (file-system-type fs) "zfs"))
|
|
||||||
+ file-systems)))))))
|
|
||||||
|
|
||||||
(define kodir
|
|
||||||
(flat-linux-module-directory (cons linux linux-extra-module-directories)
|
|
||||||
@@ -364,6 +378,7 @@ (define file-system-type-modules
|
|
||||||
("jfs" => '("jfs"))
|
|
||||||
("f2fs" => '("f2fs" "crc32_generic"))
|
|
||||||
("xfs" => '("xfs"))
|
|
||||||
+ ("zfs" => '("zfs"))
|
|
||||||
(else '())))
|
|
||||||
|
|
||||||
(define (file-system-modules file-systems)
|
|
||||||
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
|
|
||||||
index 8a56f1cc63d..75a5bb1d5f1 100644
|
|
||||||
--- a/guix/scripts/system.scm
|
|
||||||
+++ b/guix/scripts/system.scm
|
|
||||||
@@ -610,7 +610,8 @@ (define (check-file-system-availability file-systems)
|
|
||||||
|
|
||||||
(define literal
|
|
||||||
(filter (lambda (fs)
|
|
||||||
- (string? (file-system-device fs)))
|
|
||||||
+ (and (string? (file-system-device fs))
|
|
||||||
+ (not (string=? "zfs" (file-system-type fs)))))
|
|
||||||
relevant))
|
|
||||||
|
|
||||||
(define uuid
|
|
||||||
|
|
||||||
base-commit: 6174b135ffa3328fd7ad404b15b1586fc64e5666
|
|
||||||
prerequisite-patch-id: f71061d735b69d75799eb03df6215bbcb20d53b2
|
|
||||||
prerequisite-patch-id: 88337e68e714f3b1fe0d8e6588a1a4f423251610
|
|
||||||
prerequisite-patch-id: 466ade9e99cc152f8e9a33c742a4954ade466c25
|
|
||||||
prerequisite-patch-id: d66207367fc491f6569100503cd9df98b6888560
|
|
||||||
--
|
|
||||||
2.51.0
|
|
||||||
|
|
||||||
@@ -1,28 +1,47 @@
|
|||||||
From 06ab33a4317d41953ad167bfabd5b5ff4e001fee Mon Sep 17 00:00:00 2001
|
From 1e845f9a5c5854ce6a0f5d66c4a8f997ec881a67 Mon Sep 17 00:00:00 2001
|
||||||
From: Hilton Chain <hako@ultrarare.space>
|
From: Hilton Chain <hako@ultrarare.space>
|
||||||
Date: Wed, 29 Oct 2025 18:58:27 +0800
|
Date: Sat, 10 Oct 2026 09:17:00 +0800
|
||||||
Subject: [PATCH] Set Guix System PATH for Tailscale SSH.
|
Subject: [PATCH] Set Guix System PATH for Tailscale SSH.
|
||||||
|
|
||||||
---
|
---
|
||||||
ssh/tailssh/user.go | 4 ++--
|
ssh/tailssh/user_unix.go | 2 ++
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
version/distro/distro.go | 3 +++
|
||||||
|
2 files changed, 5 insertions(+)
|
||||||
|
|
||||||
diff --git a/ssh/tailssh/user.go b/ssh/tailssh/user.go
|
diff --git a/ssh/tailssh/user_unix.go b/ssh/tailssh/user_unix.go
|
||||||
index ac92c762a..fccc5cbf5 100644
|
index d482b09ba..f68ebf82b 100644
|
||||||
--- a/ssh/tailssh/user.go
|
--- a/ssh/tailssh/user_unix.go
|
||||||
+++ b/ssh/tailssh/user.go
|
+++ b/ssh/tailssh/user_unix.go
|
||||||
@@ -109,9 +109,9 @@ func defaultPathForUser(u *user.User) string {
|
@@ -102,6 +102,8 @@ func defaultPathForUser(u *userMeta) string {
|
||||||
return defaultPathForUserOnNixOS(u)
|
return "/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
|
||||||
|
case distro.NixOS:
|
||||||
|
return defaultPathForUserOnNixOS(&u.User)
|
||||||
|
+ case distro.Guix:
|
||||||
|
+ return "/run/privileged/bin:/run/current-system/profile/sbin:/run/current-system/profile/bin"
|
||||||
}
|
}
|
||||||
if isRoot {
|
if isRoot {
|
||||||
- return "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
return "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||||
+ return "/run/privileged/bin:/run/current-system/profile/sbin:/run/current-system/profile/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
diff --git a/version/distro/distro.go b/version/distro/distro.go
|
||||||
}
|
index 5407f8dae..2a6312bf7 100644
|
||||||
- return "/usr/local/bin:/usr/bin:/bin"
|
--- a/version/distro/distro.go
|
||||||
+ return "/run/privileged/bin:/run/current-system/profile/sbin:/run/current-system/profile/bin:/usr/local/bin:/usr/bin:/bin"
|
+++ b/version/distro/distro.go
|
||||||
}
|
@@ -34,6 +34,7 @@
|
||||||
|
Alpine = Distro("alpine")
|
||||||
|
UBNT = Distro("ubnt") // Ubiquiti Networks
|
||||||
|
JetKVM = Distro("jetkvm")
|
||||||
|
+ Guix = Distro("guix")
|
||||||
|
)
|
||||||
|
|
||||||
func defaultPathForUserOnNixOS(u *user.User) string {
|
var distro lazy.SyncValue[Distro]
|
||||||
|
@@ -112,6 +113,8 @@ func linuxDistro() Distro {
|
||||||
|
return Alpine
|
||||||
|
case runtime.GOARCH == "arm" && isDeviceModel("JetKVM"):
|
||||||
|
return JetKVM
|
||||||
|
+ case have("/run/current-system/parameters"):
|
||||||
|
+ return Guix
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
--
|
--
|
||||||
2.51.0
|
2.55.0
|
||||||
|
|
||||||
@@ -0,0 +1,249 @@
|
|||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
|
(define-module (rosenthal packages python-xyz)
|
||||||
|
;; Utilities
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix utils)
|
||||||
|
#:use-module (rosenthal utils cargo)
|
||||||
|
;; Guix build systems
|
||||||
|
#:use-module (guix build-system cargo)
|
||||||
|
#:use-module (guix build-system pyproject)
|
||||||
|
;; Guix origin methods
|
||||||
|
#:use-module (guix download)
|
||||||
|
#:use-module (guix git-download)
|
||||||
|
;; Guix packages
|
||||||
|
#:use-module (gnu packages check)
|
||||||
|
#:use-module (gnu packages crypto)
|
||||||
|
#:use-module (gnu packages databases)
|
||||||
|
#:use-module (gnu packages python-build)
|
||||||
|
#:use-module (gnu packages python-check)
|
||||||
|
#:use-module (gnu packages python-crypto)
|
||||||
|
#:use-module (gnu packages python-web)
|
||||||
|
#:use-module (gnu packages python-xyz)
|
||||||
|
#:use-module (gnu packages rust)
|
||||||
|
#:use-module (gnu packages serialization)
|
||||||
|
#:use-module (gnu packages time))
|
||||||
|
|
||||||
|
(define-public python-coherent-licensed
|
||||||
|
(package
|
||||||
|
(name "python-coherent-licensed")
|
||||||
|
(version "0.5.2")
|
||||||
|
(source
|
||||||
|
(origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (pypi-uri "coherent_licensed" version))
|
||||||
|
(sha256
|
||||||
|
(base32 "0va113rfa0i8sns2if8mnkzwliks0nvlzp1db71klbblrq1i81yq"))))
|
||||||
|
(build-system pyproject-build-system)
|
||||||
|
(arguments (list #:tests? #f)) ;No tests.
|
||||||
|
(native-inputs (list python-flit-core))
|
||||||
|
(home-page "https://pypi.org/project/coherent.licensed/")
|
||||||
|
(synopsis "License management tooling")
|
||||||
|
(description
|
||||||
|
"This library was built for
|
||||||
|
@url{https://github.com/coherent-oss/coherent.build, coherent.build} and
|
||||||
|
@url{https://blog.jaraco.com/skeleton, skeleton} projects to inject a license
|
||||||
|
file at build time to reflect the license declared in the license expression.")
|
||||||
|
(license license:expat)))
|
||||||
|
|
||||||
|
(define-public python-cryptg
|
||||||
|
(package
|
||||||
|
(name "python-cryptg")
|
||||||
|
(version "0.5.2")
|
||||||
|
(source (origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/cher-nov/cryptg")
|
||||||
|
(commit (string-append "v" version))))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"0l2i8s96xdzq16svcfsvyd7chl9k6f0hg6acahj44xi485fsnrz1"))))
|
||||||
|
(build-system pyproject-build-system)
|
||||||
|
(arguments
|
||||||
|
(list #:tests? #f ;No test suite.
|
||||||
|
#:imported-modules
|
||||||
|
(append %pyproject-build-system-modules
|
||||||
|
%cargo-build-system-modules)
|
||||||
|
#:modules
|
||||||
|
'(((guix build cargo-build-system) #:prefix cargo:)
|
||||||
|
(guix build pyproject-build-system)
|
||||||
|
(guix build utils))
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(add-after 'unpack 'prepare-cargo-build-system
|
||||||
|
(lambda args
|
||||||
|
(for-each
|
||||||
|
(lambda (phase)
|
||||||
|
(format #t "Running cargo phase: ~a~%" phase)
|
||||||
|
(apply (assoc-ref cargo:%standard-phases phase)
|
||||||
|
#:cargo-target #$(cargo-triplet)
|
||||||
|
args))
|
||||||
|
'(unpack-rust-crates
|
||||||
|
configure
|
||||||
|
check-for-pregenerated-files
|
||||||
|
patch-cargo-checksums)))))))
|
||||||
|
(native-inputs
|
||||||
|
(append
|
||||||
|
(list python-setuptools
|
||||||
|
python-setuptools-rust
|
||||||
|
python-wheel
|
||||||
|
rust
|
||||||
|
`(,rust "cargo") )
|
||||||
|
(or (and=> (%current-target-system)
|
||||||
|
(compose list make-rust-sysroot))
|
||||||
|
'())))
|
||||||
|
(inputs (rosenthal-cargo-inputs 'python-cryptg))
|
||||||
|
(home-page "https://github.com/cher-nov/cryptg")
|
||||||
|
(synopsis "Cryptographic utilities for Telegram")
|
||||||
|
(description
|
||||||
|
"This is a small native extension for Python 3 to help libraries that want
|
||||||
|
to work with the Telegram API, which uses the uncommon AES-IGE mode for it.")
|
||||||
|
(license license:cc0)
|
||||||
|
(properties '((disable-updater? . #t)))))
|
||||||
|
|
||||||
|
(define-public python-irc
|
||||||
|
(package
|
||||||
|
(name "python-irc")
|
||||||
|
(version "20.3.1")
|
||||||
|
(source
|
||||||
|
(origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (pypi-uri "irc" version))
|
||||||
|
(sha256
|
||||||
|
(base32 "02r8fb15wb6b9rf4kh3cvs48a4j00slncj71s4g152sdi6pq6sw0"))))
|
||||||
|
(build-system pyproject-build-system)
|
||||||
|
(native-inputs
|
||||||
|
(list python-setuptools
|
||||||
|
python-setuptools-scm
|
||||||
|
python-pytest))
|
||||||
|
(propagated-inputs
|
||||||
|
(list python-jaraco-collections
|
||||||
|
python-jaraco-functools
|
||||||
|
python-jaraco-logging
|
||||||
|
python-jaraco-stream
|
||||||
|
python-jaraco-text
|
||||||
|
python-more-itertools
|
||||||
|
python-pytz
|
||||||
|
python-tempora))
|
||||||
|
(home-page "https://github.com/jaraco/irc")
|
||||||
|
(synopsis "Python Internet Relay Chat protocol library")
|
||||||
|
(description
|
||||||
|
"This library provides a low-level implementation of the @acronym{IRC,
|
||||||
|
Internet Relay Chat} protocol for Python. It provides an event-driven IRC
|
||||||
|
client framework. It has a fairly thorough support for the basic IRC protocol,
|
||||||
|
@acronym{CTCP, Client-to-Client Protocol}, and @acronym{DCC, Direct
|
||||||
|
Client-to-Client} connections.")
|
||||||
|
(license license:expat)
|
||||||
|
(properties '((disable-updater? . #t)))))
|
||||||
|
|
||||||
|
(define-public python-jaraco-logging
|
||||||
|
(package
|
||||||
|
(name "python-jaraco-logging")
|
||||||
|
(version "3.4.0")
|
||||||
|
(source
|
||||||
|
(origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (pypi-uri "jaraco_logging" version))
|
||||||
|
(sha256
|
||||||
|
(base32 "1yvmnyq120sqfcbzvqrcjk5a35jqh0fqbvfnn6gfcz27d21xrmp7"))))
|
||||||
|
(build-system pyproject-build-system)
|
||||||
|
(native-inputs
|
||||||
|
(list python-coherent-licensed
|
||||||
|
python-pytest
|
||||||
|
python-setuptools
|
||||||
|
python-setuptools-scm
|
||||||
|
python-wheel))
|
||||||
|
(propagated-inputs
|
||||||
|
(list python-tempora))
|
||||||
|
(home-page "https://github.com/jaraco/jaraco.logging")
|
||||||
|
(synopsis "Python logging facility")
|
||||||
|
(description
|
||||||
|
"This package provides additional facilities to supplement Python's
|
||||||
|
standard logging module.")
|
||||||
|
(license license:expat)))
|
||||||
|
|
||||||
|
(define-public python-jaraco-stream
|
||||||
|
(package
|
||||||
|
(name "python-jaraco-stream")
|
||||||
|
(version "3.0.4")
|
||||||
|
(source
|
||||||
|
(origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (pypi-uri "jaraco_stream" version))
|
||||||
|
(sha256
|
||||||
|
(base32 "0jwk85k14zb1pvppxy6vnbln8xib7yiwjvmrab42rv91wwl51g72"))))
|
||||||
|
(build-system pyproject-build-system)
|
||||||
|
(native-inputs
|
||||||
|
(list python-pytest
|
||||||
|
python-setuptools
|
||||||
|
python-setuptools-scm
|
||||||
|
python-wheel))
|
||||||
|
(propagated-inputs
|
||||||
|
(list python-more-itertools))
|
||||||
|
(home-page "https://github.com/jaraco/jaraco.stream")
|
||||||
|
(synopsis "Routines for dealing with data streams")
|
||||||
|
(description
|
||||||
|
"This package provides routines for handling streaming data, including a
|
||||||
|
set of generators for loading gzip data on the fly.")
|
||||||
|
(license license:expat)))
|
||||||
|
|
||||||
|
(define-public python-mautrix
|
||||||
|
(package
|
||||||
|
(name "python-mautrix")
|
||||||
|
(version "0.20.8")
|
||||||
|
(source (origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/mautrix/python")
|
||||||
|
(commit (string-append "v" version))))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"1axwcdrs3zws5jgxxxpf7309p6bc8hrwr0jy94yc1km7kqjvq8l2"))))
|
||||||
|
(build-system pyproject-build-system)
|
||||||
|
(native-inputs
|
||||||
|
(list python-aiosqlite
|
||||||
|
python-asyncpg
|
||||||
|
python-olm
|
||||||
|
python-pycryptodome
|
||||||
|
python-pytest
|
||||||
|
python-pytest-asyncio
|
||||||
|
python-ruamel.yaml
|
||||||
|
python-setuptools
|
||||||
|
python-unpaddedbase64))
|
||||||
|
(propagated-inputs
|
||||||
|
(list python-aiohttp python-attrs python-yarl))
|
||||||
|
(home-page "https://github.com/mautrix/python")
|
||||||
|
(synopsis "Python 3 asyncio Matrix framework")
|
||||||
|
(description
|
||||||
|
"This package provides a Python 3.10+ asyncio Matrix framework.")
|
||||||
|
(license license:mpl2.0)
|
||||||
|
(properties '((disable-updater? . #t)))))
|
||||||
|
|
||||||
|
(define-public python-tulir-telethon
|
||||||
|
(package
|
||||||
|
(name "python-tulir-telethon")
|
||||||
|
(version "1.99.0a6")
|
||||||
|
(source (origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/tulir/Telethon")
|
||||||
|
(commit (string-append "v" version))))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"1z53na08wqhx5fk5z22j1j34vl2q07d1f9knrn9k6r4v2bxw0nds"))))
|
||||||
|
(build-system pyproject-build-system)
|
||||||
|
(arguments (list #:tests? #f)) ;TODO
|
||||||
|
(native-inputs (list python-setuptools python-wheel))
|
||||||
|
(propagated-inputs (list python-cryptg python-pyaes python-rsa))
|
||||||
|
(home-page "https://github.com/tulir/Telethon")
|
||||||
|
(synopsis "Python 3 MTProto API Telegram client library")
|
||||||
|
(description
|
||||||
|
"Telethon is an @code{asyncio} Python 3 MTProto library to interact with
|
||||||
|
Telegram's API as a user or through a bot account (bot API alternative).")
|
||||||
|
(license license:expat)))
|
||||||
@@ -1,81 +1,15 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal packages rust-apps)
|
(define-module (rosenthal packages rust-apps)
|
||||||
#:use-module ((guix licenses) #:prefix license:)
|
;; Utilities
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix git-download)
|
|
||||||
#:use-module (guix build-system cargo)
|
|
||||||
#:use-module (rosenthal utils cargo)
|
#:use-module (rosenthal utils cargo)
|
||||||
|
;; Guix origin methods
|
||||||
|
#:use-module (guix git-download)
|
||||||
|
;; Guix build systems
|
||||||
|
#:use-module (guix build-system cargo)
|
||||||
|
;; Guix packages
|
||||||
#:use-module (gnu packages sqlite))
|
#:use-module (gnu packages sqlite))
|
||||||
|
|
||||||
(define-public atuin
|
|
||||||
(package
|
|
||||||
(name "atuin")
|
|
||||||
(version "18.4.0")
|
|
||||||
(source (origin
|
|
||||||
(method git-fetch)
|
|
||||||
(uri (git-reference
|
|
||||||
(url "https://github.com/atuinsh/atuin")
|
|
||||||
(commit (string-append "v" version))))
|
|
||||||
(file-name (git-file-name name version))
|
|
||||||
(sha256
|
|
||||||
(base32
|
|
||||||
"1zi7ar999ycvig9c9crylab540xdgr0h6v99q9j8ypk9i1fviyiz"))))
|
|
||||||
(build-system cargo-build-system)
|
|
||||||
(arguments
|
|
||||||
(list
|
|
||||||
#:tests? #f ;TODO.
|
|
||||||
#:install-source? #f
|
|
||||||
#:features
|
|
||||||
''("client" "sync" "server" "clipboard" "daemon")
|
|
||||||
#:phases
|
|
||||||
#~(modify-phases %standard-phases
|
|
||||||
(add-after 'unpack 'disable-failing-tests
|
|
||||||
(lambda _
|
|
||||||
(substitute* '("crates/atuin/tests/sync.rs"
|
|
||||||
"crates/atuin/tests/users.rs"
|
|
||||||
"crates/atuin-dotfiles/src/store.rs"
|
|
||||||
"crates/atuin-dotfiles/src/store/var.rs")
|
|
||||||
(((string-append
|
|
||||||
".*async fn (" (string-join
|
|
||||||
'(;; Require running database.
|
|
||||||
"build_aliases"
|
|
||||||
"build_vars"
|
|
||||||
"sync"
|
|
||||||
"registration"
|
|
||||||
"change_password"
|
|
||||||
"multi_user_test")
|
|
||||||
"|") ")")
|
|
||||||
all)
|
|
||||||
(string-append "#[ignore]\n" all)))))
|
|
||||||
(add-after 'unpack 'patch-references
|
|
||||||
(lambda _
|
|
||||||
(substitute* (find-files "crates/atuin/src/shell")
|
|
||||||
(("atuin (uuid|history|search)" all)
|
|
||||||
(string-append #$output "/bin/" all)))))
|
|
||||||
(replace 'install
|
|
||||||
(lambda* (#:key outputs features #:allow-other-keys)
|
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
|
||||||
(registry (string-append out "/share/cargo/registry"))
|
|
||||||
(sources (string-append out "/share/cargo/src")))
|
|
||||||
(mkdir-p out)
|
|
||||||
;; Make cargo reuse all the artifacts we just built instead
|
|
||||||
;; of defaulting to making a new temp directory
|
|
||||||
(setenv "CARGO_TARGET_DIR" "./target")
|
|
||||||
;; Only install crates which include binary targets,
|
|
||||||
;; otherwise cargo will raise an error.
|
|
||||||
(invoke "cargo" "install" "--no-track" "--path" "crates/atuin"
|
|
||||||
"--root" out "--features" (string-join features))))))))
|
|
||||||
(inputs (cons sqlite (rosenthal-cargo-inputs 'atuin)))
|
|
||||||
(home-page "https://atuin.sh/")
|
|
||||||
(synopsis "Sync, search and backup shell history")
|
|
||||||
(description
|
|
||||||
"Atuin replaces existing shell history with a SQLite database, and records
|
|
||||||
additional context for commands. Additionally, it provides optional and fully
|
|
||||||
encrypted synchronisation of history between machines, via an Atuin server.")
|
|
||||||
(license license:expat)
|
|
||||||
(properties
|
|
||||||
'((disable-updater? . #t)))))
|
|
||||||
+1556
-2849
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,49 @@
|
|||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2026 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
|
(define-module (rosenthal packages shellutils)
|
||||||
|
;; Utilities
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix utils)
|
||||||
|
;; Guix origin methods
|
||||||
|
#:use-module (guix git-download)
|
||||||
|
;; Guix build systems
|
||||||
|
#:use-module (rosenthal build-system go-vendored)
|
||||||
|
;; Guix packages
|
||||||
|
#:use-module (gnu packages golang))
|
||||||
|
|
||||||
|
(define-public stinkpot
|
||||||
|
(package
|
||||||
|
(name "stinkpot")
|
||||||
|
(version "0.1.0")
|
||||||
|
(source (origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://tangled.org/oppi.li/stinkpot")
|
||||||
|
(commit (string-append "v" version))))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"1mnxjg3krvdgxclh4bd757p8wgvx57s9i8zyrppgwhcps1r2ifw2"))))
|
||||||
|
(build-system go-vendored-build-system)
|
||||||
|
(arguments
|
||||||
|
(list #:tests? #f ;no tests
|
||||||
|
#:go go-1.27
|
||||||
|
#:vendor-hash
|
||||||
|
(base32 "1kqmw6c2h11wxx4a683k10rzrsydc1pbq5rp3d570nk8bl5c0lr1")
|
||||||
|
#:install-source? #f
|
||||||
|
#:import-path "."
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(add-after 'unpack 'patch-references
|
||||||
|
(lambda _
|
||||||
|
(substitute* "main.go"
|
||||||
|
(("stinkpot (add|search)" all)
|
||||||
|
(string-append #$output "/bin/" all))))))))
|
||||||
|
(home-page "https://tangled.org/oppi.li/stinkpot")
|
||||||
|
(synopsis "Search shell history")
|
||||||
|
(description
|
||||||
|
"@command{stinkpot} is an sqlite backed shell-history searcher.")
|
||||||
|
(license license:expat)))
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2022 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2022 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal packages ssh)
|
(define-module (rosenthal packages ssh)
|
||||||
|
;; Utilities
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
|
;; Guix packages
|
||||||
#:use-module (gnu packages compression)
|
#:use-module (gnu packages compression)
|
||||||
#:use-module (gnu packages multiprecision)
|
#:use-module (gnu packages multiprecision)
|
||||||
#:use-module (gnu packages ssh))
|
#:use-module (gnu packages ssh))
|
||||||
@@ -16,11 +17,11 @@
|
|||||||
(inherit dropbear)
|
(inherit dropbear)
|
||||||
(name "dropbear-static")
|
(name "dropbear-static")
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments (package-arguments base)
|
(substitute-keyword-arguments arguments
|
||||||
((#:configure-flags flags)
|
((#:configure-flags flags)
|
||||||
#~(append #$flags (list "--enable-static")))))
|
#~(append #$flags (list "--enable-static")))))
|
||||||
(inputs
|
(inputs
|
||||||
(modify-inputs (package-inputs base)
|
(modify-inputs inputs
|
||||||
(append `(,zlib "static"))
|
(append `(,zlib "static"))
|
||||||
(replace "libtomcrypt" `(,libtomcrypt "static"))
|
(replace "libtomcrypt" `(,libtomcrypt "static"))
|
||||||
(replace "libtommath" `(,libtommath "static"))))
|
(replace "libtommath" `(,libtommath "static"))))
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2023 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2023 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal packages tree-sitter)
|
(define-module (rosenthal packages tree-sitter)
|
||||||
|
;; Utilities
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix packages))
|
#:use-module (guix packages))
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2026 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
|
(define-module (rosenthal packages version-control)
|
||||||
|
;; Utilities
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (rosenthal utils packages)
|
||||||
|
;; Guix packages
|
||||||
|
#:use-module (gnu packages rust-apps))
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2022 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2022 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal packages video)
|
(define-module (rosenthal packages video)
|
||||||
|
;; Utilities
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
|
;; Guix packages
|
||||||
#:use-module (gnu packages video))
|
#:use-module (gnu packages video))
|
||||||
|
|
||||||
(define-public libva-nox
|
(define-public libva-nox
|
||||||
@@ -14,12 +15,12 @@
|
|||||||
(inherit base)
|
(inherit base)
|
||||||
(name "libva-nox")
|
(name "libva-nox")
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments (package-arguments base)
|
(substitute-keyword-arguments arguments
|
||||||
((#:configure-flags configure-flags)
|
((#:configure-flags configure-flags)
|
||||||
#~(append #$configure-flags (list "--disable-glx")))
|
#~(append #$configure-flags (list "--disable-glx")))
|
||||||
((#:phases _) #~%standard-phases)))
|
((#:phases _) #~%standard-phases)))
|
||||||
(inputs
|
(inputs
|
||||||
(modify-inputs (package-inputs base)
|
(modify-inputs inputs
|
||||||
(delete "libx11" "libxext" "libxfixes")))
|
(delete "libx11" "libxext" "libxfixes")))
|
||||||
(properties
|
(properties
|
||||||
`(,@(package-properties base)
|
`(,@(package-properties base)
|
||||||
|
|||||||
+118
-321
@@ -1,30 +1,42 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2022, 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2022, 2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
;;; Copyright © 2026 Maxim Cournoyer <maxim@guixotic.coop>
|
||||||
|
|
||||||
(define-module (rosenthal packages web)
|
(define-module (rosenthal packages web)
|
||||||
#:use-module ((guix licenses) #:prefix license:)
|
;; Utilities
|
||||||
|
#:use-module (guix deprecation)
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
|
#:use-module (rosenthal utils cargo)
|
||||||
|
;; Guix origin methods
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
#:use-module (guix git-download)
|
#:use-module (guix git-download)
|
||||||
#:use-module (rosenthal utils download)
|
#:use-module (rosenthal utils download)
|
||||||
#:use-module (rosenthal utils cargo)
|
;; Guix build systems
|
||||||
#:use-module (guix build-system cargo)
|
#:use-module (guix build-system cargo)
|
||||||
#:use-module (guix build-system copy)
|
#:use-module (guix build-system copy)
|
||||||
|
#:use-module (guix build-system gnu)
|
||||||
#:use-module (guix build-system go)
|
#:use-module (guix build-system go)
|
||||||
|
#:use-module (rosenthal build-system go-vendored)
|
||||||
|
;; Guix packages
|
||||||
|
#:use-module (gnu packages base)
|
||||||
|
#:use-module (gnu packages bash)
|
||||||
|
#:use-module (gnu packages compression)
|
||||||
#:use-module (gnu packages golang)
|
#:use-module (gnu packages golang)
|
||||||
#:use-module (gnu packages image)
|
#:use-module (gnu packages image)
|
||||||
#:use-module (gnu packages jemalloc)
|
#:use-module (gnu packages jemalloc)
|
||||||
#:use-module (gnu packages web)
|
#:use-module (gnu packages node)
|
||||||
|
#:use-module (gnu packages sqlite)
|
||||||
|
#:use-module (gnu packages ssh)
|
||||||
#:use-module (gnu packages version-control)
|
#:use-module (gnu packages version-control)
|
||||||
#:use-module (rosenthal packages golang))
|
#:use-module (gnu packages web))
|
||||||
|
|
||||||
(define-public ai-robots-txt
|
(define-public ai-robots-txt
|
||||||
(package
|
(package
|
||||||
(name "ai-robots-txt")
|
(name "ai-robots-txt")
|
||||||
(version "1.42")
|
(version "2.2")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
@@ -33,7 +45,7 @@
|
|||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"05nnc0r4zz8sq8mhp299d9d6hpd8qcm81wkn30i4bzq0a220si07"))
|
"0ssi8zkl17nwbs03drc9pv9zakpid91yrl91v57s290ldjn7bnz5"))
|
||||||
(modules '((guix build utils)))
|
(modules '((guix build utils)))
|
||||||
(snippet '(delete-file-recursively "code"))))
|
(snippet '(delete-file-recursively "code"))))
|
||||||
(build-system copy-build-system)
|
(build-system copy-build-system)
|
||||||
@@ -52,337 +64,122 @@
|
|||||||
website owners block unwanted AI crawlers from accessing their sites.")
|
website owners block unwanted AI crawlers from accessing their sites.")
|
||||||
(license license:expat)))
|
(license license:expat)))
|
||||||
|
|
||||||
(define-public anubis-anti-crawler
|
(define-deprecated/public-alias anubis-anti-crawler anubis-ai-firewall)
|
||||||
(package
|
|
||||||
(name "anubis-anti-crawler")
|
|
||||||
(version "1.21.1")
|
|
||||||
(source (origin
|
|
||||||
(method url-fetch)
|
|
||||||
(uri (string-append
|
|
||||||
"https://github.com/TecharoHQ/anubis/releases/download/v"
|
|
||||||
version "/anubis-src-vendor-npm-" version ".tar.gz"))
|
|
||||||
(sha256
|
|
||||||
(base32
|
|
||||||
"1anjymg7mwjc8j0gn2gn1wb15iiljm68p15n77y5jg3av8wnky5g"))))
|
|
||||||
(build-system go-build-system)
|
|
||||||
(arguments
|
|
||||||
(list #:tests? (not (%current-target-system)) ;FIXME
|
|
||||||
#:go go-1.24
|
|
||||||
#:install-source? #f
|
|
||||||
#:import-path "./cmd/anubis"
|
|
||||||
#:build-flags
|
|
||||||
#~(list (string-append
|
|
||||||
"-ldflags="
|
|
||||||
" -X github.com/TecharoHQ/anubis.Version="
|
|
||||||
#$(package-version this-package)))
|
|
||||||
#:modules
|
|
||||||
'(((guix build gnu-build-system) #:prefix gnu:)
|
|
||||||
(guix build go-build-system)
|
|
||||||
(guix build utils))
|
|
||||||
#:phases
|
|
||||||
#~(modify-phases %standard-phases
|
|
||||||
(replace 'unpack
|
|
||||||
(lambda args
|
|
||||||
(unsetenv "GO111MODULE")
|
|
||||||
(apply (assoc-ref gnu:%standard-phases 'unpack) args)))
|
|
||||||
(replace 'install-license-files
|
|
||||||
(assoc-ref gnu:%standard-phases 'install-license-files))
|
|
||||||
(delete 'check)
|
|
||||||
(add-after 'install 'check
|
|
||||||
(lambda* (#:key tests? #:allow-other-keys)
|
|
||||||
(when tests?
|
|
||||||
(let ((cmd (in-vicinity #$output "bin/anubis")))
|
|
||||||
(invoke cmd "--help")
|
|
||||||
(invoke cmd "--version"))))))))
|
|
||||||
(home-page "https://anubis.techaro.lol/")
|
|
||||||
(synopsis "Proof-of-work check to stop crawlers")
|
|
||||||
(description
|
|
||||||
"Anubis checks incoming HTTP requests using one or more challenges in
|
|
||||||
order to protect upstream resources from web crawlers.")
|
|
||||||
(license license:expat)
|
|
||||||
(properties '((upstream-name . "anubis")
|
|
||||||
(disable-updater? . #t)))))
|
|
||||||
|
|
||||||
(define-public caddy
|
|
||||||
(package
|
|
||||||
(name "caddy")
|
|
||||||
(version "2.10.2")
|
|
||||||
(source (origin
|
|
||||||
(method git-fetch)
|
|
||||||
(uri (git-reference
|
|
||||||
(url "https://github.com/caddyserver/caddy")
|
|
||||||
(commit (string-append "v" version))))
|
|
||||||
(file-name (git-file-name name version))
|
|
||||||
(sha256
|
|
||||||
(base32
|
|
||||||
"1ygjbvz1ig62r63l6324728nbg6nwbc0vsi5qis5cg2qyils9y1a"))))
|
|
||||||
(build-system go-build-system)
|
|
||||||
(arguments
|
|
||||||
(list #:go go-1.25
|
|
||||||
#:tests? (not (%current-target-system)) ;TODO: Run test suite.
|
|
||||||
#:install-source? #f
|
|
||||||
#:import-path
|
|
||||||
(if (string=? "caddy" (package-name this-package))
|
|
||||||
"./cmd/caddy"
|
|
||||||
".")
|
|
||||||
#:build-flags
|
|
||||||
#~(list "-tags" "nobadger nomysql nopgx"
|
|
||||||
(string-append
|
|
||||||
"-ldflags="
|
|
||||||
" -X github.com/caddyserver/caddy/v2.CustomVersion="
|
|
||||||
#$(package-version this-package)))
|
|
||||||
#:modules
|
|
||||||
'((ice-9 match)
|
|
||||||
((guix build gnu-build-system) #:prefix gnu:)
|
|
||||||
(guix build go-build-system)
|
|
||||||
(guix build utils))
|
|
||||||
#:phases
|
|
||||||
#~(modify-phases %standard-phases
|
|
||||||
(replace 'unpack
|
|
||||||
(lambda args
|
|
||||||
(unsetenv "GO111MODULE")
|
|
||||||
(apply (assoc-ref gnu:%standard-phases 'unpack) args)
|
|
||||||
(copy-recursively
|
|
||||||
#+(this-package-native-input "vendored-go-dependencies")
|
|
||||||
"vendor")))
|
|
||||||
(replace 'install-license-files
|
|
||||||
(assoc-ref gnu:%standard-phases 'install-license-files))
|
|
||||||
(add-after 'install 'install-extras
|
|
||||||
(lambda _
|
|
||||||
(let ((caddy
|
|
||||||
(or (which "caddy")
|
|
||||||
(in-vicinity #$output "bin/caddy"))))
|
|
||||||
(invoke caddy "manpage" "--directory"
|
|
||||||
(in-vicinity #$output "share/man/man8"))
|
|
||||||
(map
|
|
||||||
(match-lambda
|
|
||||||
((shell . path)
|
|
||||||
(let ((file (in-vicinity #$output path)))
|
|
||||||
(mkdir-p (dirname file))
|
|
||||||
(with-output-to-file file
|
|
||||||
(lambda ()
|
|
||||||
(invoke caddy "completion" shell))))))
|
|
||||||
'(("bash" . "etc/bash_completion.d/caddy")
|
|
||||||
("fish" . "share/fish/vendor_completions.d/caddy.fish")
|
|
||||||
("zsh" . "share/zsh/site-functions/_caddy"))))))
|
|
||||||
(delete 'check)
|
|
||||||
(add-after 'install 'check
|
|
||||||
(lambda* (#:key tests? #:allow-other-keys)
|
|
||||||
(when tests?
|
|
||||||
(let ((caddy (in-vicinity #$output "bin/caddy")))
|
|
||||||
(invoke caddy "help")
|
|
||||||
(invoke caddy "version"))))))))
|
|
||||||
(native-inputs
|
|
||||||
(list (origin
|
|
||||||
(method (go-mod-vendor #:go go-1.25))
|
|
||||||
(uri (package-source this-package))
|
|
||||||
(file-name "vendored-go-dependencies")
|
|
||||||
(sha256
|
|
||||||
(base32
|
|
||||||
"1gza58qyxiz0v0wgsvbj3dpcaf8h9b5qpm42dhr10b36lmc2cdy2")))))
|
|
||||||
(home-page "https://caddyserver.com/")
|
|
||||||
(synopsis "Extensible HTTP web server with automatic HTTPS")
|
|
||||||
(description
|
|
||||||
"Caddy is a web server designed for simplicity and ease of use. It is
|
|
||||||
notable for its automatic HTTPS feature, which enables secure connections
|
|
||||||
without requiring complex configuration. Caddy is built with a focus on
|
|
||||||
performance and flexibility, making it suitable for a variety of applications,
|
|
||||||
from serving static websites to running dynamic web applications.")
|
|
||||||
(license license:asl2.0)))
|
|
||||||
|
|
||||||
(define-public caddy/dolly
|
(define-public caddy/dolly
|
||||||
(package
|
(package
|
||||||
(inherit caddy)
|
(inherit caddy)
|
||||||
(name "caddy-dolly")
|
(name "caddy-dolly")
|
||||||
(version "2025.09.20-1")
|
(version "2026.12.03")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
(url "https://codeberg.org/hako/caddy.git")
|
(url "https://git.guix.moe/hako/caddy.git")
|
||||||
(commit version)))
|
(commit version)))
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"14vpk4939v67jiapl8yn3a2v0sfzblaajlzcqfqii2xcb3a290j3"))))
|
"1348g60fcyzjkbb61pw0rg4xmyydpbdx7bnij6hnpa0wlv1bjq4z"))))
|
||||||
(native-inputs
|
(build-system go-vendored-build-system)
|
||||||
(modify-inputs (package-native-inputs caddy)
|
(arguments
|
||||||
(replace "vendored-go-dependencies"
|
(substitute-keyword-arguments arguments
|
||||||
(origin
|
((#:go _ #f) go-1.27)
|
||||||
(method (go-mod-vendor #:go go-1.25))
|
((#:import-path _ #f) ".")
|
||||||
(uri (package-source this-package))
|
((#:vendor-hash _ #f)
|
||||||
(file-name "vendored-go-dependencies")
|
(base32 "0xkh4gdw3qadag3gbw4l674p5knvarmkx51365m25cfg2fv5kawf"))))
|
||||||
(sha256
|
(native-inputs '())
|
||||||
(base32
|
(inputs '())
|
||||||
"1lxbzig37z32nw2njiqy7bild4aw4y32man7490d13gg2s11rbn4"))))))
|
(propagated-inputs '())
|
||||||
(home-page "https://git.boiledscript.com/hako/caddy")
|
(home-page "https://git.guix.moe/hako/caddy")
|
||||||
(properties '((disable-updater? . #t)))))
|
(properties '((disable-updater? . #t)))))
|
||||||
|
|
||||||
(define-public hugo
|
;; https://codeberg.org/guix/guix/pulls/9006
|
||||||
(package
|
|
||||||
(name "hugo")
|
|
||||||
(version "0.152.2")
|
|
||||||
(source (origin
|
|
||||||
(method git-fetch)
|
|
||||||
(uri (git-reference
|
|
||||||
(url "https://github.com/gohugoio/hugo")
|
|
||||||
(commit (string-append "v" version))))
|
|
||||||
(file-name (git-file-name name version))
|
|
||||||
(sha256
|
|
||||||
(base32
|
|
||||||
"093p1k0m2n5b2bbk49kmciwr92wy9b8b4hw5wwmlhs2v304rw9cx"))))
|
|
||||||
(build-system go-build-system)
|
|
||||||
(arguments
|
|
||||||
(list
|
|
||||||
#:go go-1.24
|
|
||||||
#:install-source? #f
|
|
||||||
#:import-path "."
|
|
||||||
#:build-flags
|
|
||||||
#~(list "-tags" "extended withdeploy"
|
|
||||||
(string-append
|
|
||||||
"-ldflags="
|
|
||||||
" -X github.com/gohugoio/hugo/common/hugo.vendorInfo=Nonguix"))
|
|
||||||
#:test-flags ''("-skip=^TestCommands/mod|^TestCommands/server")
|
|
||||||
#:test-subdirs ''(".")
|
|
||||||
#:modules
|
|
||||||
'(((guix build gnu-build-system) #:prefix gnu:)
|
|
||||||
(guix build go-build-system)
|
|
||||||
(guix build utils))
|
|
||||||
#:phases
|
|
||||||
#~(modify-phases %standard-phases
|
|
||||||
(replace 'unpack
|
|
||||||
(lambda args
|
|
||||||
(unsetenv "GO111MODULE")
|
|
||||||
(apply (assoc-ref gnu:%standard-phases 'unpack) args)
|
|
||||||
(copy-recursively
|
|
||||||
#+(this-package-native-input "vendored-go-dependencies")
|
|
||||||
"vendor")))
|
|
||||||
(replace 'install-license-files
|
|
||||||
(assoc-ref gnu:%standard-phases 'install-license-files))
|
|
||||||
(add-after 'unpack 'fix-paths
|
|
||||||
(lambda* (#:key native-inputs inputs #:allow-other-keys)
|
|
||||||
(setenv "C_INCLUDE_PATH"
|
|
||||||
(string-append
|
|
||||||
(getenv "C_INCLUDE_PATH") ":"
|
|
||||||
(dirname
|
|
||||||
(dirname
|
|
||||||
(dirname
|
|
||||||
(search-input-file
|
|
||||||
(or native-inputs inputs)
|
|
||||||
"src/dec/alphai_dec.h"))))))
|
|
||||||
(with-directory-excursion "vendor/github.com/bep/gowebp"
|
|
||||||
(substitute* (find-files "internal/libwebp")
|
|
||||||
(("../../libwebp_src/(.*)\"" _ file)
|
|
||||||
(format #f "~a\""
|
|
||||||
(search-input-file
|
|
||||||
(or native-inputs inputs) file)))))
|
|
||||||
(with-directory-excursion "vendor/github.com/bep/golibsass"
|
|
||||||
(substitute* (find-files "internal/libsass")
|
|
||||||
(("../../libsass_src/(.*)\"" _ file)
|
|
||||||
(format #f "~a\""
|
|
||||||
(search-input-file
|
|
||||||
(or native-inputs inputs) file))))))))))
|
|
||||||
(native-inputs
|
|
||||||
(list (origin
|
|
||||||
(method (go-mod-vendor #:go go-1.24))
|
|
||||||
(uri (package-source this-package))
|
|
||||||
(file-name "vendored-go-dependencies")
|
|
||||||
(sha256
|
|
||||||
(base32
|
|
||||||
"1yhk8as1jz5459bzkmqjwdp82xqsr7sx1m1jkkk58cfzagznpz78")))
|
|
||||||
(package-source libsass)
|
|
||||||
(package-source libwebp)))
|
|
||||||
(home-page "https://gohugo.io/")
|
|
||||||
(synopsis "Static site generator written in Go")
|
|
||||||
(description
|
|
||||||
"Hugo is a static site generator written in Go, optimized for speed and
|
|
||||||
designed for flexibility. With its advanced templating system and fast asset
|
|
||||||
pipelines, Hugo renders a complete site in seconds, often less.")
|
|
||||||
(license license:asl2.0)))
|
|
||||||
|
|
||||||
(define-public forgejo
|
(define-public forgejo
|
||||||
(package
|
(package
|
||||||
(name "forgejo")
|
(name "forgejo")
|
||||||
(version "12.0.3")
|
(version "16.0.6")
|
||||||
;; TODO: Address npm dependencies and fetch from git.
|
|
||||||
(source (origin
|
|
||||||
(method url-fetch)
|
|
||||||
(uri (string-append
|
|
||||||
"https://codeberg.org/forgejo/forgejo/releases/download/v"
|
|
||||||
version "/forgejo-src-" version ".tar.gz"))
|
|
||||||
(sha256
|
|
||||||
(base32
|
|
||||||
"0x09nwhps70n8rkvgp7mqzr7cyprdn274q7jhkljxna3r3w8qcb5"))))
|
|
||||||
(build-system go-build-system)
|
|
||||||
(arguments
|
|
||||||
(list #:tests? (not (%current-target-system)) ;TODO: Run test suite.
|
|
||||||
#:go go-1.25
|
|
||||||
#:install-source? #f
|
|
||||||
#:import-path "."
|
|
||||||
#:build-flags
|
|
||||||
#~(list (string-append
|
|
||||||
"-ldflags="
|
|
||||||
" -X main.ReleaseVersion=" #$(package-version this-package)
|
|
||||||
" -X main.Version=" #$(package-version this-package)
|
|
||||||
" -X main.ForgejoVersion=" #$(package-version this-package)
|
|
||||||
" -X forgejo.org/modules/setting.AppWorkPath=/var/lib/forgejo"
|
|
||||||
" -X forgejo.org/modules/setting.CustomPath=" #$output "/etc/forgejo"
|
|
||||||
" -X forgejo.org/modules/setting.CustomConf=/etc/forgejo/app.ini"))
|
|
||||||
#:modules
|
|
||||||
'(((guix build gnu-build-system) #:prefix gnu:)
|
|
||||||
(guix build go-build-system)
|
|
||||||
(guix build union)
|
|
||||||
(guix build utils))
|
|
||||||
#:phases
|
|
||||||
#~(modify-phases %standard-phases
|
|
||||||
(replace 'unpack
|
|
||||||
(lambda args
|
|
||||||
(unsetenv "GO111MODULE")
|
|
||||||
(apply (assoc-ref gnu:%standard-phases 'unpack) args)))
|
|
||||||
(replace 'install-license-files
|
|
||||||
(assoc-ref gnu:%standard-phases 'install-license-files))
|
|
||||||
(add-after 'install 'rename-binary
|
|
||||||
(lambda _
|
|
||||||
(rename-file (in-vicinity #$output "bin/forgejo.org")
|
|
||||||
(in-vicinity #$output "bin/forgejo"))))
|
|
||||||
(add-after 'install 'install-extras
|
|
||||||
(lambda _
|
|
||||||
(mkdir-p (in-vicinity #$output "/etc/forgejo"))
|
|
||||||
(copy-file "custom/conf/app.example.ini"
|
|
||||||
(in-vicinity #$output "etc/forgejo/app.ini"))
|
|
||||||
(for-each
|
|
||||||
(lambda (dir)
|
|
||||||
(copy-recursively
|
|
||||||
dir (string-append #$output "/etc/forgejo/" dir)))
|
|
||||||
'("options" "public" "templates"))))
|
|
||||||
(delete 'check)
|
|
||||||
(add-after 'rename-binary 'check
|
|
||||||
(lambda* (#:key tests? #:allow-other-keys)
|
|
||||||
(when tests?
|
|
||||||
(let ((forgejo (in-vicinity #$output "bin/forgejo")))
|
|
||||||
(invoke forgejo "--help")
|
|
||||||
(invoke forgejo "--version"))))))))
|
|
||||||
(native-inputs (list git-minimal))
|
|
||||||
(home-page "https://forgejo.org/")
|
|
||||||
(synopsis "Lightweight software forge")
|
|
||||||
(description
|
|
||||||
"Forgejo is a self-hosted, lightweight software forge designed to
|
|
||||||
facilitate collaborative software development. It is built to be easy to
|
|
||||||
install and maintain, making it an ideal choice for teams and organizations
|
|
||||||
looking for a reliable platform to manage their software projects.")
|
|
||||||
(license license:gpl3+)
|
|
||||||
(properties
|
|
||||||
'((disable-updater? . #t)))))
|
|
||||||
|
|
||||||
(define-public iocaine/dolly
|
|
||||||
(package
|
|
||||||
(inherit iocaine)
|
|
||||||
(name "iocaine-dolly")
|
|
||||||
(version "2.5.0")
|
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (crate-uri "iocaine" version))
|
;; XXX: We build from the release tarball for now, which includes all
|
||||||
(file-name (string-append name "-" version ".tar.gz"))
|
;; of the needed Go dependencies.
|
||||||
|
;; TODO: "Unbundle" the index.js and index.css by building them with
|
||||||
|
;; webpack. This cannot currently be done because of missing Node
|
||||||
|
;; modules.
|
||||||
|
(uri (string-append "https://codeberg.org/forgejo/forgejo/"
|
||||||
|
"releases/download/v" version
|
||||||
|
"/forgejo-src-" version ".tar.gz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "1x445vnalm323qphxfbfrdzmv9q83h2kybimwm2j39j9p9hj188s"))))
|
(base32
|
||||||
(inputs (cons* jemalloc (rosenthal-cargo-inputs 'iocaine)))))
|
"0c56zxadj8rpn9xj7i3l97z2xh0w318vwrbxmb1nw071qh5krs8g"))))
|
||||||
|
(build-system gnu-build-system)
|
||||||
|
(outputs (list "out" "data"))
|
||||||
|
(arguments
|
||||||
|
(list
|
||||||
|
#:test-target "test-backend" ;test-frontend requires npm modules
|
||||||
|
#:make-flags #~(list "TAGS=sqlite sqlite_unlock_notify") ;sqlite support
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(add-after 'unpack 'patch-paths
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
(substitute* "modules/git/hook_generate.go"
|
||||||
|
(("/usr/bin/env")
|
||||||
|
(search-input-file inputs "bin/env")))))
|
||||||
|
(add-after 'unpack 'set-static-root-path
|
||||||
|
(lambda _
|
||||||
|
(substitute* "modules/setting/server.go"
|
||||||
|
(("StaticRootPath = AppWorkPath")
|
||||||
|
(format #f "StaticRootPath = ~s" #$output:data)))))
|
||||||
|
(add-after 'unpack 'disable-problematic-tests
|
||||||
|
(lambda _
|
||||||
|
(for-each
|
||||||
|
delete-file
|
||||||
|
;; Theses tests require internet.
|
||||||
|
'("modules/hcaptcha/hcaptcha_test.go"
|
||||||
|
"modules/updatechecker/update_checker_test.go"
|
||||||
|
"services/migrations/migrate_test.go"
|
||||||
|
"services/migrations/allowlist/is_migrate_allowed_test.go"
|
||||||
|
;; The 'TestGetDirectorySize' test expects 8037
|
||||||
|
;; entries, finds 7597 for unknown reasons.
|
||||||
|
"modules/repository/create_test.go"))))
|
||||||
|
(replace 'configure
|
||||||
|
(lambda _
|
||||||
|
(setenv "CC" "gcc")
|
||||||
|
(setenv "CGO_ENABLED" "1")
|
||||||
|
(setenv "GOTOOLCHAIN" "local") ;use 'go' from Guix
|
||||||
|
(setenv "HOME" (getcwd))
|
||||||
|
(invoke "git" "init"))) ;for tests
|
||||||
|
(add-after 'install 'post-install
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
(rename-file "go/bin/forgejo.org" "go/bin/forgejo")
|
||||||
|
(let ((forgejo (string-append #$output "/bin/forgejo")))
|
||||||
|
(install-file "go/bin/forgejo" (dirname forgejo))
|
||||||
|
(wrap-program forgejo
|
||||||
|
`("PATH" prefix
|
||||||
|
,(map (lambda (c)
|
||||||
|
(dirname
|
||||||
|
(search-input-file inputs
|
||||||
|
(string-append "bin/" c))))
|
||||||
|
'("git" "gzip" "sh" "ssh"))))
|
||||||
|
(substitute* forgejo ;avoid stripping argv[0] in wrapper
|
||||||
|
(("exec -a \"\\$\\{0##\\*/\\}\" ")
|
||||||
|
"exec ")))
|
||||||
|
;; Install data files.
|
||||||
|
(copy-recursively "options"
|
||||||
|
(string-append #$output:data "/options"))
|
||||||
|
(copy-recursively "public"
|
||||||
|
(string-append #$output:data "/public"))
|
||||||
|
(copy-recursively "templates"
|
||||||
|
(string-append #$output:data "/templates")))))))
|
||||||
|
(native-inputs (list git go-1.26 openssh node sqlite))
|
||||||
|
(inputs (list bash coreutils git gzip openssh))
|
||||||
|
(home-page "https://forgejo.org/")
|
||||||
|
(synopsis "Self-hosted, lightweight software forge")
|
||||||
|
(description
|
||||||
|
"Forgejo is a lightweight software forge that aims to be easy to self-host
|
||||||
|
and maintain. It offers a rich web API for accessing its data. ALong the usual
|
||||||
|
forge features such as issues and pull requests tracking, it also includes
|
||||||
|
simple software project management features like roles, scopes, and time
|
||||||
|
tracking to ease collaboration.")
|
||||||
|
(license license:expat)
|
||||||
|
(properties '((disable-updater? . #t)))))
|
||||||
@@ -1,21 +1,94 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2025-2026 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal packages wm)
|
(define-module (rosenthal packages wm)
|
||||||
#:use-module ((guix licenses) #:prefix license:)
|
;; Utilities
|
||||||
|
#:use-module (guix deprecation)
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
|
;; Guix origin methods
|
||||||
#:use-module (guix git-download)
|
#:use-module (guix git-download)
|
||||||
#:use-module (guix build-system cargo)
|
;; Guix build systems
|
||||||
#:use-module (rosenthal utils cargo)
|
#:use-module (guix build-system meson)
|
||||||
#:use-module (gnu packages admin)
|
;; Guix packages
|
||||||
|
#:use-module (gnu packages calendar)
|
||||||
|
#:use-module (gnu packages cpp)
|
||||||
|
#:use-module (gnu packages crypto)
|
||||||
|
#:use-module (gnu packages curl)
|
||||||
|
#:use-module (gnu packages fontutils)
|
||||||
#:use-module (gnu packages freedesktop)
|
#:use-module (gnu packages freedesktop)
|
||||||
#:use-module (gnu packages gl)
|
#:use-module (gnu packages gl)
|
||||||
#:use-module (gnu packages glib)
|
#:use-module (gnu packages glib)
|
||||||
|
#:use-module (gnu packages gnome)
|
||||||
#:use-module (gnu packages gtk)
|
#:use-module (gnu packages gtk)
|
||||||
|
#:use-module (gnu packages image)
|
||||||
|
#:use-module (gnu packages jemalloc)
|
||||||
#:use-module (gnu packages linux)
|
#:use-module (gnu packages linux)
|
||||||
#:use-module (gnu packages llvm)
|
#:use-module (gnu packages markup)
|
||||||
|
#:use-module (gnu packages maths)
|
||||||
|
#:use-module (gnu packages multiprecision)
|
||||||
#:use-module (gnu packages pkg-config)
|
#:use-module (gnu packages pkg-config)
|
||||||
#:use-module (gnu packages wm)
|
#:use-module (gnu packages polkit)
|
||||||
#:use-module (gnu packages xdisorg))
|
#:use-module (gnu packages pulseaudio)
|
||||||
|
#:use-module (gnu packages stb)
|
||||||
|
#:use-module (gnu packages window-management)
|
||||||
|
#:use-module (gnu packages xdisorg)
|
||||||
|
#:use-module (gnu packages xml))
|
||||||
|
|
||||||
|
(define-public noctalia-greeter
|
||||||
|
(package
|
||||||
|
(name "noctalia-greeter")
|
||||||
|
(version "1.7.2")
|
||||||
|
(source (origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/noctalia-dev/noctalia-greeter")
|
||||||
|
(commit (string-append "v" version))))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"04rbq6ld830grz5i3r7sr40fnh36ml6wf9vqpmxic1akwa9zff8y"))))
|
||||||
|
(build-system meson-build-system)
|
||||||
|
(arguments
|
||||||
|
(list #:build-type "release"
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(add-after 'unpack 'prepare-for-build
|
||||||
|
(lambda _
|
||||||
|
;; Adjust import paths for STB headers packaged in Guix.
|
||||||
|
(substitute* (find-files "." "\\.cpp$|^meson\\.build$")
|
||||||
|
(("\\bstb/stb_") "stb_"))
|
||||||
|
;; Reproducibility.
|
||||||
|
(substitute* "meson.build"
|
||||||
|
(("'-march=native', '-mtune=native',") ""))
|
||||||
|
;; Patch build-time references.
|
||||||
|
(substitute* "tests/greeter_login_flow_test.py"
|
||||||
|
(("/bin/sh") (which "sh"))))))))
|
||||||
|
(native-inputs (list pkg-config wayland))
|
||||||
|
(inputs
|
||||||
|
(list cairo
|
||||||
|
fontconfig
|
||||||
|
freetype
|
||||||
|
glib
|
||||||
|
harfbuzz
|
||||||
|
jemalloc
|
||||||
|
libjxl
|
||||||
|
(librsvg-for-system)
|
||||||
|
libwebp
|
||||||
|
libxkbcommon
|
||||||
|
libxml2
|
||||||
|
mesa
|
||||||
|
nlohmann-json
|
||||||
|
pango
|
||||||
|
stb-image-resize2
|
||||||
|
tomlplusplus
|
||||||
|
wayland
|
||||||
|
wayland-protocols
|
||||||
|
wlroots))
|
||||||
|
(home-page "https://noctalia.dev/")
|
||||||
|
(synopsis "Login greeter for greetd")
|
||||||
|
(description
|
||||||
|
"Noctalia Greeter is a minimal login greeter for greetd that matches the
|
||||||
|
look and feel of Noctalia Shell")
|
||||||
|
(license license:expat)))
|
||||||
@@ -1,14 +1,17 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal packages xorg)
|
(define-module (rosenthal packages xorg)
|
||||||
#:use-module ((guix licenses) #:prefix license:)
|
;; Utilities
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix git-download)
|
|
||||||
#:use-module (guix build-system cargo)
|
|
||||||
#:use-module (rosenthal utils cargo)
|
#:use-module (rosenthal utils cargo)
|
||||||
|
;; Guix origin methods
|
||||||
|
#:use-module (guix git-download)
|
||||||
|
;; Guix build systems
|
||||||
|
#:use-module (guix build-system cargo)
|
||||||
|
;; Guix packages
|
||||||
#:use-module (gnu packages llvm)
|
#:use-module (gnu packages llvm)
|
||||||
#:use-module (gnu packages pkg-config)
|
#:use-module (gnu packages pkg-config)
|
||||||
#:use-module (gnu packages xorg))
|
#:use-module (gnu packages xorg))
|
||||||
@@ -1,24 +1,123 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal services base)
|
(define-module (rosenthal services base)
|
||||||
|
;; Utilities
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix records)
|
#:use-module (guix records)
|
||||||
|
#:use-module (rosenthal utils contract combinators)
|
||||||
|
#:use-module (rosenthal utils file)
|
||||||
|
#:use-module (rosenthal utils records)
|
||||||
#:use-module (rosenthal utils packages)
|
#:use-module (rosenthal utils packages)
|
||||||
|
;; Guix System
|
||||||
|
#:use-module (gnu system keyboard)
|
||||||
|
;; Guix System - services
|
||||||
|
#:use-module (gnu services)
|
||||||
#:use-module (gnu services base)
|
#:use-module (gnu services base)
|
||||||
|
#:use-module (gnu services dbus)
|
||||||
|
;; Guix packages
|
||||||
|
#:use-module (gnu packages admin)
|
||||||
#:use-module (gnu packages bash)
|
#:use-module (gnu packages bash)
|
||||||
#:use-module (rosenthal packages admin)
|
#:use-module (rosenthal packages admin)
|
||||||
#:export (greetd-tuigreet-session))
|
#:use-module (rosenthal packages wm)
|
||||||
|
#:export (noctalia-greeter-configuration
|
||||||
|
noctalia-greeter-service-type
|
||||||
|
greetd-noctalia-greeter-session
|
||||||
|
|
||||||
|
greetd-tuigreet-session))
|
||||||
|
|
||||||
|
|
||||||
|
;;;
|
||||||
|
;;; noctalia-greeter
|
||||||
|
;;;
|
||||||
|
|
||||||
|
(define-record-type/dolly <noctalia-greeter-configuration>
|
||||||
|
noctalia-greeter-configuration
|
||||||
|
make-noctalia-greeter-configuration
|
||||||
|
noctalia-greeter-configuration?
|
||||||
|
this-noctalia-greeter-configuration
|
||||||
|
(package
|
||||||
|
noctalia-greeter-configuration-package
|
||||||
|
(default noctalia-greeter)
|
||||||
|
(contract file-like?)
|
||||||
|
(documentation
|
||||||
|
"Noctalia greeter package."))
|
||||||
|
(keyboard-layout
|
||||||
|
noctalia-greeter-configuration-keyboard-layout
|
||||||
|
(default #f)
|
||||||
|
(contract (or/c #f keyboard-layout?))
|
||||||
|
(documentation
|
||||||
|
"Keyboard layout to use in a Noctalia greeter session.")))
|
||||||
|
|
||||||
|
(define (noctalia-greeter-activation-service _)
|
||||||
|
#~(mkdir-p/perms "/var/lib/noctalia-greeter" (getpwnam "greeter") #o750))
|
||||||
|
|
||||||
|
(define noctalia-greeter-special-files-service
|
||||||
|
(match-record-lambda/dolly <noctalia-greeter-configuration>
|
||||||
|
(keyboard-layout)
|
||||||
|
(if keyboard-layout
|
||||||
|
(let* ((name (keyboard-layout-name keyboard-layout))
|
||||||
|
(variant (keyboard-layout-variant keyboard-layout))
|
||||||
|
(options (keyboard-layout-options keyboard-layout))
|
||||||
|
(layout
|
||||||
|
`(("layout" . ,name)
|
||||||
|
,@(if variant
|
||||||
|
`(("variant" . ,variant))
|
||||||
|
'())
|
||||||
|
,@(if (null? options)
|
||||||
|
'()
|
||||||
|
`(("options" . ,(string-join options ",")))))))
|
||||||
|
`(("/var/lib/noctalia-greeter/greeter.toml"
|
||||||
|
,(toml-file "greeter.toml"
|
||||||
|
`(("keyboard" . ,layout))))))
|
||||||
|
'())))
|
||||||
|
|
||||||
|
(define noctalia-greeter-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'noctalia-greeter)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension activation-service-type
|
||||||
|
noctalia-greeter-activation-service)
|
||||||
|
(service-extension special-files-service-type
|
||||||
|
noctalia-greeter-special-files-service)
|
||||||
|
(service-extension polkit-service-type
|
||||||
|
(compose list noctalia-greeter-configuration-package))
|
||||||
|
(service-extension profile-service-type
|
||||||
|
(compose list noctalia-greeter-configuration-package))))
|
||||||
|
(default-value (noctalia-greeter-configuration))
|
||||||
|
(description "Set up environment for @command{noctalia-greeter-session}.")))
|
||||||
|
|
||||||
|
(define-record-type/dolly <greetd-noctalia-greeter-session>
|
||||||
|
greetd-noctalia-greeter-session
|
||||||
|
make-greetd-noctalia-greeter-session
|
||||||
|
greetd-noctalia-greeter-session?
|
||||||
|
this-greetd-noctalia-greeter-session
|
||||||
|
(noctalia-greeter-session
|
||||||
|
greetd-noctalia-greeter-session-noctalia-greeter-session
|
||||||
|
(default (file-append noctalia-greeter "/bin/noctalia-greeter-session"))
|
||||||
|
(contract (or/c file-like? string?))
|
||||||
|
(documentation
|
||||||
|
"@command{noctalia-greeter-session} executable file.")))
|
||||||
|
|
||||||
|
(define-gexp-compiler (greetd-noctalia-greeter-session-compiler
|
||||||
|
(session <greetd-noctalia-greeter-session>)
|
||||||
|
system target)
|
||||||
|
(match-record/dolly session <greetd-noctalia-greeter-session> (noctalia-greeter-session)
|
||||||
|
(lower-object
|
||||||
|
(program-file "noctalia-greeter-wrapper"
|
||||||
|
#~(execl #$noctalia-greeter-session #$noctalia-greeter-session)))))
|
||||||
|
|
||||||
|
|
||||||
|
;;;
|
||||||
|
;;; tuigreet
|
||||||
|
;;;
|
||||||
|
|
||||||
(define-record-type* <greetd-tuigreet-session>
|
(define-record-type* <greetd-tuigreet-session>
|
||||||
greetd-tuigreet-session make-greetd-tuigreet-session
|
greetd-tuigreet-session make-greetd-tuigreet-session
|
||||||
greetd-tuigreet-session?
|
greetd-tuigreet-session?
|
||||||
this-greetd-tuigreet-session
|
this-greetd-tuigreet-session
|
||||||
(tuigreet greetd-tuigreet-session-tuigreet
|
(tuigreet greetd-tuigreet-session-tuigreet
|
||||||
(default (spec->pkg "tuigreet")))
|
(default tuigreet))
|
||||||
(args greetd-tuigreet-session-args
|
(args greetd-tuigreet-session-args
|
||||||
(default '("--issue"
|
(default '("--issue"
|
||||||
"--time"
|
"--time"
|
||||||
|
|||||||
@@ -1,19 +1,25 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2022, 2023 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2022, 2023 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal services bittorrent)
|
(define-module (rosenthal services bittorrent)
|
||||||
|
;; Guile builtins
|
||||||
#:use-module (ice-9 format)
|
#:use-module (ice-9 format)
|
||||||
|
;; Utilities
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix records)
|
#:use-module (guix records)
|
||||||
#:use-module (gnu packages admin)
|
#:use-module (rosenthal utils predicates)
|
||||||
#:use-module (gnu packages bittorrent)
|
;; Guix System
|
||||||
|
#:use-module (gnu system shadow)
|
||||||
|
;; Guix System - services
|
||||||
#:use-module (gnu services)
|
#:use-module (gnu services)
|
||||||
#:use-module (gnu services configuration)
|
#:use-module (gnu services configuration)
|
||||||
#:use-module (gnu services shepherd)
|
#:use-module (gnu services shepherd)
|
||||||
|
;; Guix Home - services
|
||||||
#:use-module (gnu home services)
|
#:use-module (gnu home services)
|
||||||
#:use-module (gnu home services shepherd)
|
#:use-module (gnu home services shepherd)
|
||||||
#:use-module (gnu system shadow)
|
;; Guix packages
|
||||||
|
#:use-module (gnu packages admin)
|
||||||
|
#:use-module (gnu packages bittorrent)
|
||||||
#:export (qbittorrent-configuration
|
#:export (qbittorrent-configuration
|
||||||
qbittorrent-service-type
|
qbittorrent-service-type
|
||||||
home-qbittorrent-service-type))
|
home-qbittorrent-service-type))
|
||||||
@@ -36,17 +42,30 @@
|
|||||||
(extra-options
|
(extra-options
|
||||||
(list-of-strings '())
|
(list-of-strings '())
|
||||||
"List of extra options.")
|
"List of extra options.")
|
||||||
|
;; Account
|
||||||
|
(group-id
|
||||||
|
(user-and-group-id #f)
|
||||||
|
"")
|
||||||
|
(user-id
|
||||||
|
(user-and-group-id #f)
|
||||||
|
"")
|
||||||
(no-serialization))
|
(no-serialization))
|
||||||
|
|
||||||
(define %qbittorrent-accounts
|
(define qbittorrent-account
|
||||||
(list (user-group (name "qbittorrent") (system? #t))
|
(match-record-lambda <qbittorrent-configuration>
|
||||||
(user-account
|
(group-id user-id)
|
||||||
(name "qbittorrent")
|
(list (user-group
|
||||||
(group "qbittorrent")
|
(name "qbittorrent")
|
||||||
(system? #t)
|
(id group-id)
|
||||||
(comment "qBittorrent user")
|
(system? #t))
|
||||||
(home-directory "/var/empty")
|
(user-account
|
||||||
(shell (file-append shadow "/sbin/nologin")))))
|
(name "qbittorrent")
|
||||||
|
(group "qbittorrent")
|
||||||
|
(uid user-id)
|
||||||
|
(system? #t)
|
||||||
|
(comment "qBittorrent user")
|
||||||
|
(home-directory "/var/empty")
|
||||||
|
(shell (file-append shadow "/sbin/nologin"))))))
|
||||||
|
|
||||||
;; Set default password to adminadmin
|
;; Set default password to adminadmin
|
||||||
(define %qbittorrent-default-config-file
|
(define %qbittorrent-default-config-file
|
||||||
@@ -106,7 +125,7 @@ WebUI\\Password_PBKDF2=\"@ByteArray(ARQ77eY1NUZaQsuDHbIMCA==:0WMRkYTUWVT9wVvdDtH
|
|||||||
(service-extension activation-service-type
|
(service-extension activation-service-type
|
||||||
qbittorrent-activation)
|
qbittorrent-activation)
|
||||||
(service-extension account-service-type
|
(service-extension account-service-type
|
||||||
(const %qbittorrent-accounts))))
|
qbittorrent-account)))
|
||||||
(default-value (qbittorrent-configuration))
|
(default-value (qbittorrent-configuration))
|
||||||
(description "Run qBittorrent daemon.")))
|
(description "Run qBittorrent daemon.")))
|
||||||
|
|
||||||
@@ -137,7 +156,7 @@ WebUI\\Password_PBKDF2=\"@ByteArray(ARQ77eY1NUZaQsuDHbIMCA==:0WMRkYTUWVT9wVvdDtH
|
|||||||
|
|
||||||
(define home-qbittorrent-service-type
|
(define home-qbittorrent-service-type
|
||||||
(service-type
|
(service-type
|
||||||
(name 'qbittorrent)
|
(name 'home-qbittorrent)
|
||||||
(extensions
|
(extensions
|
||||||
(list (service-extension home-activation-service-type
|
(list (service-extension home-activation-service-type
|
||||||
(const home-qbittorrent-activation))
|
(const home-qbittorrent-activation))
|
||||||
|
|||||||
@@ -1,23 +1,28 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2022, 2023 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2022, 2023 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal services child-error)
|
(define-module (rosenthal services child-error)
|
||||||
#:use-module (guix records)
|
;; Utilities
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module (gnu home services)
|
#:use-module (guix records)
|
||||||
#:use-module (gnu home services shepherd)
|
#:use-module (rosenthal utils file)
|
||||||
#:use-module (gnu packages admin)
|
#:use-module (rosenthal utils predicates)
|
||||||
#:use-module (gnu packages web)
|
;; Guix System
|
||||||
|
#:use-module (gnu system shadow)
|
||||||
|
;; Guix System - services
|
||||||
#:use-module (gnu services)
|
#:use-module (gnu services)
|
||||||
#:use-module (gnu services admin)
|
#:use-module (gnu services admin)
|
||||||
#:use-module (gnu services configuration)
|
#:use-module (gnu services configuration)
|
||||||
#:use-module (gnu services databases)
|
#:use-module (gnu services databases)
|
||||||
#:use-module (gnu services shepherd)
|
#:use-module (gnu services shepherd)
|
||||||
#:use-module (gnu system shadow)
|
;; Guix Home - services
|
||||||
|
#:use-module (gnu home services)
|
||||||
|
#:use-module (gnu home services shepherd)
|
||||||
|
;; Guix packages
|
||||||
|
#:use-module (gnu packages admin)
|
||||||
|
#:use-module (gnu packages web)
|
||||||
#:use-module (rosenthal packages binaries)
|
#:use-module (rosenthal packages binaries)
|
||||||
#:use-module (rosenthal packages networking)
|
#:use-module (rosenthal packages networking)
|
||||||
#:use-module (rosenthal utils serializers yaml)
|
|
||||||
#:export (clash-configuration
|
#:export (clash-configuration
|
||||||
clash-service-type
|
clash-service-type
|
||||||
|
|
||||||
@@ -60,14 +65,23 @@
|
|||||||
(config
|
(config
|
||||||
(file-like (plain-file "empty" ""))
|
(file-like (plain-file "empty" ""))
|
||||||
"Clash configuration file.")
|
"Clash configuration file.")
|
||||||
|
;; Account
|
||||||
|
(group-id
|
||||||
|
(user-and-group-id #f)
|
||||||
|
"")
|
||||||
|
;; Shepherd
|
||||||
(shepherd-provision
|
(shepherd-provision
|
||||||
(list '(clash))
|
(list '(clash))
|
||||||
"A list of Shepherd service names (symbols) provided by this service.")
|
"A list of Shepherd service names (symbols) provided by this service.")
|
||||||
(no-serialization))
|
(no-serialization))
|
||||||
|
|
||||||
(define %clash-accounts
|
(define clash-account
|
||||||
(list (user-group (name "clash") (system? #t))))
|
(match-record-lambda <clash-configuration>
|
||||||
|
(group-id)
|
||||||
|
(list (user-group
|
||||||
|
(name "clash")
|
||||||
|
(id group-id)
|
||||||
|
(system? #t)))))
|
||||||
|
|
||||||
(define clash-activation
|
(define clash-activation
|
||||||
(match-record-lambda <clash-configuration>
|
(match-record-lambda <clash-configuration>
|
||||||
@@ -112,9 +126,7 @@
|
|||||||
(service-extension activation-service-type
|
(service-extension activation-service-type
|
||||||
clash-activation)
|
clash-activation)
|
||||||
(service-extension account-service-type
|
(service-extension account-service-type
|
||||||
(const %clash-accounts))
|
clash-account)))
|
||||||
(service-extension log-rotation-service-type
|
|
||||||
(compose list clash-configuration-log-file))))
|
|
||||||
(default-value (clash-configuration))
|
(default-value (clash-configuration))
|
||||||
(description "Run Clash.")))
|
(description "Run Clash.")))
|
||||||
|
|
||||||
@@ -155,16 +167,23 @@ headers. This can expose sensitive information in your logs.")
|
|||||||
(extra-options
|
(extra-options
|
||||||
(list-of-strings '())
|
(list-of-strings '())
|
||||||
"List of extra options.")
|
"List of extra options.")
|
||||||
|
;; Account
|
||||||
|
(user-id
|
||||||
|
(user-and-group-id #f)
|
||||||
|
"")
|
||||||
(no-serialization))
|
(no-serialization))
|
||||||
|
|
||||||
(define %cloudflare-tunnel-accounts
|
(define cloudflare-tunnel-account
|
||||||
(list (user-account
|
(match-record-lambda <cloudflare-tunnel-configuration>
|
||||||
(name "cloudflared")
|
(user-id)
|
||||||
(group "nogroup")
|
(list (user-account
|
||||||
(system? #t)
|
(name "cloudflared")
|
||||||
(home-directory "/var/empty")
|
(group "nogroup")
|
||||||
(create-home-directory? #f)
|
(uid user-id)
|
||||||
(shell (file-append shadow "/sbin/nologin")))))
|
(system? #t)
|
||||||
|
(home-directory "/var/empty")
|
||||||
|
(create-home-directory? #f)
|
||||||
|
(shell (file-append shadow "/sbin/nologin"))))))
|
||||||
|
|
||||||
(define cloudflare-tunnel-shepherd-service
|
(define cloudflare-tunnel-shepherd-service
|
||||||
(match-record-lambda <cloudflare-tunnel-configuration>
|
(match-record-lambda <cloudflare-tunnel-configuration>
|
||||||
@@ -203,9 +222,7 @@ headers. This can expose sensitive information in your logs.")
|
|||||||
(list (service-extension shepherd-root-service-type
|
(list (service-extension shepherd-root-service-type
|
||||||
cloudflare-tunnel-shepherd-service)
|
cloudflare-tunnel-shepherd-service)
|
||||||
(service-extension account-service-type
|
(service-extension account-service-type
|
||||||
(const %cloudflare-tunnel-accounts))
|
cloudflare-tunnel-account)))
|
||||||
(service-extension log-rotation-service-type
|
|
||||||
(compose list cloudflare-tunnel-configuration-log-file))))
|
|
||||||
(default-value (cloudflare-tunnel-configuration))
|
(default-value (cloudflare-tunnel-configuration))
|
||||||
(description "Run cloudflared, the Cloudflare Tunnel daemon.")))
|
(description "Run cloudflared, the Cloudflare Tunnel daemon.")))
|
||||||
|
|
||||||
@@ -257,16 +274,17 @@ headers. This can expose sensitive information in your logs.")
|
|||||||
(file-like wakapi-bin)
|
(file-like wakapi-bin)
|
||||||
"The wakapi package.")
|
"The wakapi package.")
|
||||||
(config
|
(config
|
||||||
(yaml-config '())
|
file-object-or-file-config
|
||||||
"Association list of Wakapi configurations.")
|
"Association list of Wakapi configurations.")
|
||||||
(no-serialization))
|
(no-serialization))
|
||||||
|
|
||||||
(define home-wakapi-shepherd-service
|
(define home-wakapi-shepherd-service
|
||||||
(match-record-lambda <home-wakapi-configuration>
|
(match-record-lambda <home-wakapi-configuration>
|
||||||
(wakapi config)
|
(wakapi config)
|
||||||
(let ((config-file (mixed-text-file
|
(let ((config-file
|
||||||
"wakapi.yaml"
|
(if (file-config? config)
|
||||||
#~(string-append #$@(yaml-serialize config) "\n"))))
|
(yaml-file "wakapi.yaml" config)
|
||||||
|
config)))
|
||||||
(list (shepherd-service
|
(list (shepherd-service
|
||||||
(documentation "Run wakapi.")
|
(documentation "Run wakapi.")
|
||||||
(provision '(wakapi))
|
(provision '(wakapi))
|
||||||
@@ -282,7 +300,6 @@ headers. This can expose sensitive information in your logs.")
|
|||||||
(extensions
|
(extensions
|
||||||
(list (service-extension home-shepherd-service-type
|
(list (service-extension home-shepherd-service-type
|
||||||
home-wakapi-shepherd-service)))
|
home-wakapi-shepherd-service)))
|
||||||
(default-value (home-wakapi-configuration))
|
|
||||||
(description "Run Wakapi, a self-hosted WakaTime-compatible backend.")))
|
(description "Run Wakapi, a self-hosted WakaTime-compatible backend.")))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,31 +1,32 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal services cuirass)
|
(define-module (rosenthal services cuirass)
|
||||||
|
;; Guile builtins
|
||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
#:use-module (srfi srfi-26)
|
#:use-module (srfi srfi-26)
|
||||||
|
;; Utilities
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix modules)
|
#:use-module (guix modules)
|
||||||
#:use-module (guix records)
|
#:use-module (guix records)
|
||||||
#:use-module (guix store)
|
#:use-module (guix store)
|
||||||
#:use-module (rosenthal utils packages)
|
#:use-module (rosenthal utils packages)
|
||||||
|
;; Guix System
|
||||||
#:use-module (gnu bootloader)
|
|
||||||
#:use-module (gnu bootloader grub)
|
|
||||||
#:use-module (gnu system)
|
#:use-module (gnu system)
|
||||||
#:use-module (gnu system linux-container)
|
#:use-module (gnu system linux-container)
|
||||||
#:use-module (gnu system file-systems)
|
#:use-module (gnu system file-systems)
|
||||||
#:use-module (gnu system shadow)
|
#:use-module (gnu system shadow)
|
||||||
|
;; Guix System - bootloaders
|
||||||
|
#:use-module (gnu bootloader)
|
||||||
|
#:use-module (gnu bootloader grub)
|
||||||
|
;; Guix System - services
|
||||||
#:use-module (gnu services)
|
#:use-module (gnu services)
|
||||||
#:use-module (gnu services admin)
|
#:use-module (gnu services admin)
|
||||||
#:use-module (gnu services base)
|
#:use-module (gnu services base)
|
||||||
#:use-module (gnu services cuirass)
|
#:use-module (gnu services cuirass)
|
||||||
#:use-module (gnu services databases)
|
#:use-module (gnu services databases)
|
||||||
#:use-module (gnu services shepherd)
|
#:use-module (gnu services shepherd)
|
||||||
|
;; Guix packages
|
||||||
#:use-module (gnu packages linux)
|
#:use-module (gnu packages linux)
|
||||||
#:use-module (rosenthal packages ci)
|
#:use-module (rosenthal packages ci)
|
||||||
#:export (cuirass-worker-container-service-type
|
#:export (cuirass-worker-container-service-type
|
||||||
@@ -164,7 +165,6 @@
|
|||||||
(services
|
(services
|
||||||
(cons (service cuirass-remote-worker-for-container
|
(cons (service cuirass-remote-worker-for-container
|
||||||
(cuirass-remote-worker-configuration
|
(cuirass-remote-worker-configuration
|
||||||
(cuirass cuirass/hako)
|
|
||||||
(workers workers)
|
(workers workers)
|
||||||
(server server)
|
(server server)
|
||||||
(systems supported-systems)
|
(systems supported-systems)
|
||||||
|
|||||||
@@ -1,37 +1,56 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal services desktop)
|
(define-module (rosenthal services desktop)
|
||||||
|
;; Utilities
|
||||||
|
#:use-module (guix deprecation)
|
||||||
|
#:use-module (guix diagnostics)
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix i18n)
|
||||||
#:use-module (guix modules)
|
#:use-module (guix modules)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix records)
|
#:use-module (guix records)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
#:use-module (rosenthal utils file)
|
#:use-module (rosenthal utils file)
|
||||||
#:use-module (rosenthal utils packages)
|
#:use-module (rosenthal utils packages)
|
||||||
|
;; Guix build systems
|
||||||
#:use-module (guix build-system copy)
|
#:use-module (guix build-system copy)
|
||||||
|
;; Guix System
|
||||||
#:use-module (gnu system)
|
#:use-module (gnu system)
|
||||||
#:use-module (gnu system shadow)
|
#:use-module (gnu system shadow)
|
||||||
|
;; Guix System - services
|
||||||
#:use-module (gnu services)
|
#:use-module (gnu services)
|
||||||
#:use-module (gnu services base)
|
#:use-module (gnu services base)
|
||||||
#:use-module (gnu services configuration)
|
#:use-module (gnu services configuration)
|
||||||
#:use-module (gnu services desktop)
|
#:use-module (gnu services desktop)
|
||||||
|
#:use-module (gnu services pm)
|
||||||
#:use-module (gnu services sddm)
|
#:use-module (gnu services sddm)
|
||||||
#:use-module (gnu services xorg)
|
#:use-module (gnu services xorg)
|
||||||
#:use-module (rosenthal services base)
|
#:use-module (rosenthal services base)
|
||||||
|
#:use-module (rosenthal services networking)
|
||||||
|
;; Guix Home - services
|
||||||
#:use-module (gnu home)
|
#:use-module (gnu home)
|
||||||
#:use-module (gnu home services)
|
#:use-module (gnu home services)
|
||||||
#:use-module (gnu home services desktop)
|
#:use-module (gnu home services desktop)
|
||||||
#:use-module (gnu home services shepherd)
|
#:use-module (gnu home services shepherd)
|
||||||
#:use-module (gnu home services sound)
|
#:use-module (gnu home services sound)
|
||||||
|
#:use-module (rosenthal home services desktop)
|
||||||
#:use-module (rosenthal packages xorg)
|
#:use-module (rosenthal home services gtk)
|
||||||
|
;; Guix packages
|
||||||
|
#:use-module (gnu packages fcitx5)
|
||||||
|
#:use-module (gnu packages fonts)
|
||||||
|
#:autoload (gnu packages glib) (glib)
|
||||||
|
#:use-module (gnu packages gnome)
|
||||||
|
#:use-module (gnu packages guile)
|
||||||
|
#:use-module (gnu packages hardware)
|
||||||
|
#:use-module (gnu packages linux)
|
||||||
|
#:use-module (gnu packages networking)
|
||||||
|
#:use-module (gnu packages polkit)
|
||||||
|
#:use-module (gnu packages qt)
|
||||||
|
#:use-module (gnu packages window-management)
|
||||||
|
#:use-module (gnu packages xorg)
|
||||||
|
#:use-module (rosenthal packages authentication)
|
||||||
|
#:use-module (rosenthal packages wm)
|
||||||
#:export (home-blueman-applet-configuration
|
#:export (home-blueman-applet-configuration
|
||||||
home-blueman-applet-service-type
|
home-blueman-applet-service-type
|
||||||
|
|
||||||
@@ -47,6 +66,9 @@
|
|||||||
home-niri-configuration
|
home-niri-configuration
|
||||||
home-niri-service-type
|
home-niri-service-type
|
||||||
|
|
||||||
|
home-bb-auth-service-type
|
||||||
|
home-polkit-gnome-service-type
|
||||||
|
|
||||||
home-rofi-configuration
|
home-rofi-configuration
|
||||||
home-rofi-service-type
|
home-rofi-service-type
|
||||||
|
|
||||||
@@ -59,9 +81,15 @@
|
|||||||
home-waybar-configuration
|
home-waybar-configuration
|
||||||
home-waybar-service-type
|
home-waybar-service-type
|
||||||
|
|
||||||
%rosenthal-set-keymap
|
|
||||||
%rosenthal-skeletons
|
%rosenthal-skeletons
|
||||||
%rosenthal-desktop-services
|
%rosenthal-skeletons-installer
|
||||||
|
%rosenthal-desktop-services/base
|
||||||
|
%rosenthal-desktop-services/gdm
|
||||||
|
%rosenthal-desktop-services/tuigreet
|
||||||
|
|
||||||
|
%rosenthal-desktop-services-gdm ;deprecated
|
||||||
|
%rosenthal-desktop-services ;deprecated
|
||||||
|
|
||||||
%rosenthal-desktop-home-services))
|
%rosenthal-desktop-home-services))
|
||||||
|
|
||||||
|
|
||||||
@@ -71,7 +99,7 @@
|
|||||||
|
|
||||||
(define-configuration/no-serialization home-blueman-applet-configuration
|
(define-configuration/no-serialization home-blueman-applet-configuration
|
||||||
(blueman
|
(blueman
|
||||||
(file-like (spec->pkg+out "blueman"))
|
(file-like blueman)
|
||||||
""))
|
""))
|
||||||
|
|
||||||
(define %home-blueman-applet-shepherd
|
(define %home-blueman-applet-shepherd
|
||||||
@@ -80,14 +108,19 @@
|
|||||||
(list (shepherd-service
|
(list (shepherd-service
|
||||||
(documentation "Start blueman applet.")
|
(documentation "Start blueman applet.")
|
||||||
(provision '(blueman-applet))
|
(provision '(blueman-applet))
|
||||||
|
(requirement '(graphical-session))
|
||||||
(start
|
(start
|
||||||
#~(make-forkexec-constructor
|
#~(lambda args
|
||||||
(list #$(file-append blueman "/bin/blueman-applet"))))
|
((make-forkexec-constructor
|
||||||
|
(list #$(file-append blueman "/bin/blueman-applet"))
|
||||||
|
;; Inherit graphical session environment.
|
||||||
|
#:environment-variables (environ))
|
||||||
|
args)))
|
||||||
(stop #~(make-kill-destructor))))))
|
(stop #~(make-kill-destructor))))))
|
||||||
|
|
||||||
(define home-blueman-applet-service-type
|
(define home-blueman-applet-service-type
|
||||||
(service-type
|
(service-type
|
||||||
(name 'blueman-applet)
|
(name 'home-blueman-applet)
|
||||||
(extensions
|
(extensions
|
||||||
(list (service-extension home-profile-service-type
|
(list (service-extension home-profile-service-type
|
||||||
(compose list home-blueman-applet-configuration-blueman))
|
(compose list home-blueman-applet-configuration-blueman))
|
||||||
@@ -104,13 +137,14 @@
|
|||||||
(define list-of-file-likes?
|
(define list-of-file-likes?
|
||||||
(list-of file-like?))
|
(list-of file-like?))
|
||||||
(define-maybe file-like)
|
(define-maybe file-like)
|
||||||
|
(define-maybe boolean)
|
||||||
|
|
||||||
(define-configuration/no-serialization home-fcitx5-configuration
|
(define-configuration/no-serialization home-fcitx5-configuration
|
||||||
(fcitx5
|
(fcitx5
|
||||||
(file-like (spec->pkg "fcitx5"))
|
(file-like fcitx5)
|
||||||
"")
|
"")
|
||||||
(utilities
|
(utilities
|
||||||
(list-of-file-likes (specs->pkgs "fcitx5-configtool"))
|
(list-of-file-likes (list fcitx5-configtool))
|
||||||
"")
|
"")
|
||||||
(themes
|
(themes
|
||||||
(list-of-file-likes '())
|
(list-of-file-likes '())
|
||||||
@@ -118,65 +152,112 @@
|
|||||||
(input-method-editors
|
(input-method-editors
|
||||||
(list-of-file-likes '())
|
(list-of-file-likes '())
|
||||||
"")
|
"")
|
||||||
|
(wayland-frontend?
|
||||||
|
(boolean #f)
|
||||||
|
"")
|
||||||
|
;; deprecated
|
||||||
(gtk-im-module?
|
(gtk-im-module?
|
||||||
(boolean #f)
|
maybe-boolean
|
||||||
"")
|
""
|
||||||
|
(sanitizer
|
||||||
|
(lambda (config)
|
||||||
|
(if (maybe-value-set? config)
|
||||||
|
(warning
|
||||||
|
(G_ "'~a': option '~a' is deprecated, please use '~a' instead.~%")
|
||||||
|
"home-fcitx5-configuration"
|
||||||
|
"gtk-im-module?"
|
||||||
|
"wayland-frontend?")))))
|
||||||
(qt-im-module?
|
(qt-im-module?
|
||||||
(boolean #f)
|
maybe-boolean
|
||||||
"")
|
""
|
||||||
|
(sanitizer
|
||||||
|
(lambda (config)
|
||||||
|
(if (maybe-value-set? config)
|
||||||
|
(warning
|
||||||
|
(G_ "'~a': option '~a' is deprecated, please use '~a' instead.~%")
|
||||||
|
"home-fcitx5-configuration"
|
||||||
|
"qt-im-module?"
|
||||||
|
"wayland-frontend?")))))
|
||||||
(xim?
|
(xim?
|
||||||
(boolean #t)
|
maybe-boolean
|
||||||
""))
|
""
|
||||||
|
(sanitizer
|
||||||
|
(lambda (config)
|
||||||
|
(if (maybe-value-set? config)
|
||||||
|
(warning
|
||||||
|
(G_ "'~a': option '~a' is deprecated.~%")
|
||||||
|
"home-fcitx5-configuration"
|
||||||
|
"xim?"))))))
|
||||||
|
|
||||||
(define %home-fcitx5-environment-variables
|
;; https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland
|
||||||
|
(define home-fcitx5-environment-variables-service
|
||||||
(match-record-lambda <home-fcitx5-configuration>
|
(match-record-lambda <home-fcitx5-configuration>
|
||||||
(gtk-im-module? qt-im-module? xim?)
|
(wayland-frontend?)
|
||||||
`(,@(if gtk-im-module?
|
`(("XMODIFIERS" . "@im=fcitx")
|
||||||
'(("GTK_IM_MODULE" . "fcitx"))
|
("QT_IM_MODULE" . "fcitx")
|
||||||
'())
|
,@(if wayland-frontend?
|
||||||
,@(if qt-im-module?
|
'(("QT_IM_MODULES" . "wayland;fcitx"))
|
||||||
'(("QT_IM_MODULE" . "fcitx"))
|
'(("GTK_IM_MODULE" . "fcitx"))))))
|
||||||
'())
|
|
||||||
,@(if xim?
|
|
||||||
'(("XMODIFIERS" . "@im=fcitx"))
|
|
||||||
'()))))
|
|
||||||
|
|
||||||
(define %home-fcitx5-profile
|
(define home-fcitx5-gtk2-service
|
||||||
(match-record-lambda <home-fcitx5-configuration>
|
(match-record-lambda <home-fcitx5-configuration>
|
||||||
(fcitx5 utilities themes input-method-editors gtk-im-module? qt-im-module?)
|
(wayland-frontend?)
|
||||||
(append (list fcitx5)
|
(if wayland-frontend?
|
||||||
|
`(("gtk-im-module" . ,(format #f "~s" "fcitx")))
|
||||||
|
'())))
|
||||||
|
|
||||||
|
(define home-fcitx5-gtk3-service
|
||||||
|
(match-record-lambda <home-fcitx5-configuration>
|
||||||
|
(wayland-frontend?)
|
||||||
|
(if wayland-frontend?
|
||||||
|
`(("gtk-im-module" . "fcitx"))
|
||||||
|
'())))
|
||||||
|
|
||||||
|
(define home-fcitx5-profile-service
|
||||||
|
(match-record-lambda <home-fcitx5-configuration>
|
||||||
|
(fcitx5 utilities themes input-method-editors wayland-frontend?)
|
||||||
|
(append (list fcitx5 fcitx5-gtk fcitx5-qt)
|
||||||
|
(if wayland-frontend?
|
||||||
|
'()
|
||||||
|
(list `(,fcitx5-gtk "gtk2")
|
||||||
|
`(,fcitx5-gtk "gtk3")
|
||||||
|
fcitx5-gtk4))
|
||||||
utilities
|
utilities
|
||||||
themes
|
themes
|
||||||
input-method-editors
|
input-method-editors)))
|
||||||
(if gtk-im-module?
|
|
||||||
(list (spec->pkg "fcitx5-gtk"))
|
|
||||||
'())
|
|
||||||
(if qt-im-module?
|
|
||||||
(list (spec->pkg "fcitx5-qt"))
|
|
||||||
'()))))
|
|
||||||
|
|
||||||
(define %home-fcitx5-shepherd
|
(define home-fcitx5-shepherd-service
|
||||||
(match-record-lambda <home-fcitx5-configuration>
|
(match-record-lambda <home-fcitx5-configuration>
|
||||||
(fcitx5)
|
(fcitx5)
|
||||||
(list (shepherd-service
|
(list (shepherd-service
|
||||||
(documentation "Start fcitx5.")
|
(documentation "Start fcitx5.")
|
||||||
(provision '(fcitx5))
|
(provision '(fcitx5))
|
||||||
(requirement '(dbus))
|
(requirement '(dbus graphical-session))
|
||||||
(start
|
(start
|
||||||
#~(make-forkexec-constructor
|
#~(lambda args
|
||||||
(list #$(file-append fcitx5 "/bin/fcitx5"))))
|
((make-forkexec-constructor
|
||||||
|
(list #$(file-append fcitx5 "/bin/fcitx5"))
|
||||||
|
;; Inherit graphical session environment.
|
||||||
|
#:environment-variables (environ))
|
||||||
|
args)))
|
||||||
(stop #~(make-kill-destructor))))))
|
(stop #~(make-kill-destructor))))))
|
||||||
|
|
||||||
(define home-fcitx5-service-type
|
(define home-fcitx5-service-type
|
||||||
(service-type
|
(service-type
|
||||||
(name 'fcitx5)
|
(name 'home-fcitx5)
|
||||||
(extensions
|
(extensions
|
||||||
(list (service-extension home-environment-variables-service-type
|
(list (service-extension home-environment-variables-service-type
|
||||||
%home-fcitx5-environment-variables)
|
home-fcitx5-environment-variables-service)
|
||||||
|
(service-extension home-gtk2-service-type
|
||||||
|
home-fcitx5-gtk2-service)
|
||||||
|
(service-extension home-gtk3-service-type
|
||||||
|
home-fcitx5-gtk3-service)
|
||||||
|
(service-extension home-gtk4-service-type
|
||||||
|
home-fcitx5-gtk3-service)
|
||||||
(service-extension home-profile-service-type
|
(service-extension home-profile-service-type
|
||||||
%home-fcitx5-profile)
|
home-fcitx5-profile-service)
|
||||||
(service-extension home-shepherd-service-type
|
(service-extension home-shepherd-service-type
|
||||||
%home-fcitx5-shepherd)))
|
home-fcitx5-shepherd-service)))
|
||||||
(default-value (home-fcitx5-configuration))
|
(default-value (home-fcitx5-configuration))
|
||||||
(description "Run fcitx5, an input method framework.")))
|
(description "Run fcitx5, an input method framework.")))
|
||||||
|
|
||||||
@@ -187,7 +268,7 @@
|
|||||||
|
|
||||||
(define-configuration/no-serialization home-mako-configuration
|
(define-configuration/no-serialization home-mako-configuration
|
||||||
(mako
|
(mako
|
||||||
(file-like (spec->pkg "mako"))
|
(file-like mako)
|
||||||
"")
|
"")
|
||||||
(config
|
(config
|
||||||
maybe-file-like
|
maybe-file-like
|
||||||
@@ -207,19 +288,26 @@
|
|||||||
(list (shepherd-service
|
(list (shepherd-service
|
||||||
(documentation "Start mako.")
|
(documentation "Start mako.")
|
||||||
(provision '(mako))
|
(provision '(mako))
|
||||||
|
(requirement '(graphical-session))
|
||||||
(start
|
(start
|
||||||
#~(make-forkexec-constructor
|
#~(lambda args
|
||||||
(list #$(file-append mako "/bin/mako"))))
|
((make-forkexec-constructor
|
||||||
|
(list #$(file-append mako "/bin/mako"))
|
||||||
|
;; Inherit graphical session environment.
|
||||||
|
#:environment-variables (environ))
|
||||||
|
args)))
|
||||||
(stop #~(make-kill-destructor))))))
|
(stop #~(make-kill-destructor))))))
|
||||||
|
|
||||||
(define home-mako-service-type
|
(define home-mako-service-type
|
||||||
(service-type
|
(service-type
|
||||||
(name 'mako)
|
(name 'home-mako)
|
||||||
(extensions
|
(extensions
|
||||||
(list (service-extension home-xdg-configuration-files-service-type
|
(list (service-extension home-xdg-configuration-files-service-type
|
||||||
%home-mako-xdg-config)
|
%home-mako-xdg-config)
|
||||||
(service-extension home-shepherd-service-type
|
(service-extension home-shepherd-service-type
|
||||||
%home-mako-shepherd)))
|
%home-mako-shepherd)
|
||||||
|
(service-extension home-graphical-session-service-type
|
||||||
|
(const 'wayland))))
|
||||||
(default-value (home-mako-configuration))
|
(default-value (home-mako-configuration))
|
||||||
(description "Run mako, a notification daemon.")))
|
(description "Run mako, a notification daemon.")))
|
||||||
|
|
||||||
@@ -230,7 +318,7 @@
|
|||||||
|
|
||||||
(define-configuration/no-serialization home-network-manager-applet-configuration
|
(define-configuration/no-serialization home-network-manager-applet-configuration
|
||||||
(network-manager-applet
|
(network-manager-applet
|
||||||
(file-like (spec->pkg "network-manager-applet"))
|
(file-like network-manager-applet)
|
||||||
""))
|
""))
|
||||||
|
|
||||||
(define %home-network-manager-applet-shepherd
|
(define %home-network-manager-applet-shepherd
|
||||||
@@ -239,14 +327,19 @@
|
|||||||
(list (shepherd-service
|
(list (shepherd-service
|
||||||
(documentation "Start network manager applet.")
|
(documentation "Start network manager applet.")
|
||||||
(provision '(network-manager-applet))
|
(provision '(network-manager-applet))
|
||||||
|
(requirement '(graphical-session))
|
||||||
(start
|
(start
|
||||||
#~(make-forkexec-constructor
|
#~(lambda args
|
||||||
(list #$(file-append network-manager-applet "/bin/nm-applet"))))
|
((make-forkexec-constructor
|
||||||
|
(list #$(file-append network-manager-applet "/bin/nm-applet"))
|
||||||
|
;; Inherit graphical session environment.
|
||||||
|
#:environment-variables (environ))
|
||||||
|
args)))
|
||||||
(stop #~(make-kill-destructor))))))
|
(stop #~(make-kill-destructor))))))
|
||||||
|
|
||||||
(define home-network-manager-applet-service-type
|
(define home-network-manager-applet-service-type
|
||||||
(service-type
|
(service-type
|
||||||
(name 'network-manager-applet)
|
(name 'home-network-manager-applet)
|
||||||
(extensions
|
(extensions
|
||||||
(list (service-extension home-profile-service-type
|
(list (service-extension home-profile-service-type
|
||||||
(compose list home-network-manager-applet-configuration-network-manager-applet))
|
(compose list home-network-manager-applet-configuration-network-manager-applet))
|
||||||
@@ -261,28 +354,107 @@
|
|||||||
;;;
|
;;;
|
||||||
|
|
||||||
(define-configuration/no-serialization home-niri-configuration
|
(define-configuration/no-serialization home-niri-configuration
|
||||||
|
(niri
|
||||||
|
(file-like niri)
|
||||||
|
"")
|
||||||
(config
|
(config
|
||||||
maybe-file-like
|
maybe-file-like
|
||||||
""))
|
""))
|
||||||
|
|
||||||
|
(define (validated-niri-config niri file)
|
||||||
|
(computed-file "niri.kdl"
|
||||||
|
(with-imported-modules '((guix build utils))
|
||||||
|
#~(begin
|
||||||
|
(use-modules (guix build utils))
|
||||||
|
(invoke #+(file-append niri "/bin/niri") "validate"
|
||||||
|
"--config" #$file)
|
||||||
|
(copy-file #$file #$output)))))
|
||||||
|
|
||||||
(define %home-niri-xdg-config
|
(define %home-niri-xdg-config
|
||||||
(match-record-lambda <home-niri-configuration>
|
(match-record-lambda <home-niri-configuration>
|
||||||
(config)
|
(niri config)
|
||||||
(if (maybe-value-set? config)
|
(if (maybe-value-set? config)
|
||||||
`(("niri/config.kdl" ,config))
|
`(("niri/config.kdl" ,(validated-niri-config niri config)))
|
||||||
'())))
|
'())))
|
||||||
|
|
||||||
(define home-niri-service-type
|
(define home-niri-service-type
|
||||||
(service-type
|
(service-type
|
||||||
(name 'niri)
|
(name 'home-niri)
|
||||||
(extensions
|
(extensions
|
||||||
(list (service-extension home-xdg-configuration-files-service-type
|
(list (service-extension home-profile-service-type
|
||||||
|
(compose list home-niri-configuration-niri))
|
||||||
|
(service-extension home-xdg-configuration-files-service-type
|
||||||
%home-niri-xdg-config)))
|
%home-niri-xdg-config)))
|
||||||
(default-value (home-niri-configuration))
|
(default-value (home-niri-configuration))
|
||||||
(description
|
(description
|
||||||
"Set up configuration file for niri, a scrollable-tiling Wayland
|
"Set up configuration file for niri, a scrollable-tiling Wayland
|
||||||
compositor.")))
|
compositor.")))
|
||||||
|
|
||||||
|
|
||||||
|
;;;
|
||||||
|
;;; Noctalia
|
||||||
|
;;;
|
||||||
|
|
||||||
|
(define-deprecated/public-alias home-noctalia-shell-configuration
|
||||||
|
(@ (rosenthal home services desktop) home-noctalia-configuration))
|
||||||
|
|
||||||
|
(define-deprecated/public-alias home-noctalia-shell-service-type
|
||||||
|
(@ (rosenthal home services desktop) home-noctalia-service-type))
|
||||||
|
|
||||||
|
|
||||||
|
;;;
|
||||||
|
;;; bb-auth
|
||||||
|
;;;
|
||||||
|
|
||||||
|
(define (%home-bb-auth-shepherd _)
|
||||||
|
(list (shepherd-service
|
||||||
|
(provision '(bb-auth))
|
||||||
|
(requirement '(graphical-session))
|
||||||
|
(start
|
||||||
|
#~(lambda args
|
||||||
|
((make-forkexec-constructor
|
||||||
|
(list #$(file-append bb-auth "/libexec/bb-auth") "--daemon")
|
||||||
|
;; Inherit graphical session environment.
|
||||||
|
#:environment-variables (environ))
|
||||||
|
args)))
|
||||||
|
(stop #~(make-kill-destructor)))))
|
||||||
|
|
||||||
|
(define home-bb-auth-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'home-bb-auth)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension home-shepherd-service-type
|
||||||
|
%home-bb-auth-shepherd)))
|
||||||
|
(default-value #f)
|
||||||
|
(description "Run @command{bb-auth} daemon.")))
|
||||||
|
|
||||||
|
|
||||||
|
;;;
|
||||||
|
;;; polkit-gnome
|
||||||
|
;;;
|
||||||
|
|
||||||
|
(define (%home-polkit-gnome-shepherd _)
|
||||||
|
(list (shepherd-service
|
||||||
|
(provision '(polkit-gnome))
|
||||||
|
(requirement '(graphical-session))
|
||||||
|
(start
|
||||||
|
#~(lambda args
|
||||||
|
((make-forkexec-constructor
|
||||||
|
(list #$(file-append polkit-gnome "/libexec/polkit-gnome-authentication-agent-1"))
|
||||||
|
;; Inherit graphical session environment.
|
||||||
|
#:environment-variables (environ))
|
||||||
|
args)))
|
||||||
|
(stop #~(make-kill-destructor)))))
|
||||||
|
|
||||||
|
(define home-polkit-gnome-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'home-polkit-gnome)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension home-shepherd-service-type
|
||||||
|
%home-polkit-gnome-shepherd)))
|
||||||
|
(default-value #f)
|
||||||
|
(description "")))
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;;; rofi
|
;;; rofi
|
||||||
@@ -302,7 +474,7 @@ compositor.")))
|
|||||||
|
|
||||||
(define home-rofi-service-type
|
(define home-rofi-service-type
|
||||||
(service-type
|
(service-type
|
||||||
(name 'rofi)
|
(name 'home-rofi)
|
||||||
(extensions
|
(extensions
|
||||||
(list (service-extension home-xdg-configuration-files-service-type
|
(list (service-extension home-xdg-configuration-files-service-type
|
||||||
%home-rofi-xdg-config)))
|
%home-rofi-xdg-config)))
|
||||||
@@ -317,7 +489,7 @@ compositor.")))
|
|||||||
|
|
||||||
(define-configuration/no-serialization home-swaybg-configuration
|
(define-configuration/no-serialization home-swaybg-configuration
|
||||||
(swaybg
|
(swaybg
|
||||||
(file-like (spec->pkg "swaybg"))
|
(file-like swaybg)
|
||||||
"")
|
"")
|
||||||
(background
|
(background
|
||||||
(file-like (local-file "../examples/wallpaper.jpg"))
|
(file-like (local-file "../examples/wallpaper.jpg"))
|
||||||
@@ -329,18 +501,25 @@ compositor.")))
|
|||||||
(list (shepherd-service
|
(list (shepherd-service
|
||||||
(documentation "Start swaybg.")
|
(documentation "Start swaybg.")
|
||||||
(provision '(swaybg))
|
(provision '(swaybg))
|
||||||
|
(requirement '(graphical-session))
|
||||||
(start
|
(start
|
||||||
#~(make-forkexec-constructor
|
#~(lambda args
|
||||||
(list #$(file-append swaybg "/bin/swaybg") "--mode" "fill"
|
((make-forkexec-constructor
|
||||||
"--image" #$background)))
|
(list #$(file-append swaybg "/bin/swaybg") "--mode" "fill"
|
||||||
|
"--image" #$background)
|
||||||
|
;; Inherit graphical session environment.
|
||||||
|
#:environment-variables (environ))
|
||||||
|
args)))
|
||||||
(stop #~(make-kill-destructor))))))
|
(stop #~(make-kill-destructor))))))
|
||||||
|
|
||||||
(define home-swaybg-service-type
|
(define home-swaybg-service-type
|
||||||
(service-type
|
(service-type
|
||||||
(name 'swaybg)
|
(name 'home-swaybg)
|
||||||
(extensions
|
(extensions
|
||||||
(list (service-extension home-shepherd-service-type
|
(list (service-extension home-shepherd-service-type
|
||||||
%home-swaybg-shepherd)))
|
%home-swaybg-shepherd)
|
||||||
|
(service-extension home-graphical-session-service-type
|
||||||
|
(const 'wayland))))
|
||||||
(default-value (home-swaybg-configuration))
|
(default-value (home-swaybg-configuration))
|
||||||
(description
|
(description
|
||||||
"Run swaybg, a screen wallpaper utility for Wayland compositors.")))
|
"Run swaybg, a screen wallpaper utility for Wayland compositors.")))
|
||||||
@@ -358,7 +537,7 @@ compositor.")))
|
|||||||
(string "Adwaita")
|
(string "Adwaita")
|
||||||
"")
|
"")
|
||||||
(font
|
(font
|
||||||
(string "Sans")
|
(string "sans-serif 11")
|
||||||
"")
|
"")
|
||||||
(cursor-theme
|
(cursor-theme
|
||||||
(string "Adwaita")
|
(string "Adwaita")
|
||||||
@@ -370,6 +549,14 @@ compositor.")))
|
|||||||
(string "Default")
|
(string "Default")
|
||||||
""))
|
""))
|
||||||
|
|
||||||
|
(define home-theme-activation-service
|
||||||
|
(match-record-lambda <home-theme-configuration>
|
||||||
|
(icon-theme cursor-theme font)
|
||||||
|
#~(let ((gsettings #$(file-append (gexp-input glib "bin") "/bin/gsettings")))
|
||||||
|
(system* gsettings "set" "org.gnome.desktop.interface" "icon-theme" #$icon-theme)
|
||||||
|
(system* gsettings "set" "org.gnome.desktop.interface" "cursor-theme" #$cursor-theme)
|
||||||
|
(system* gsettings "set" "org.gnome.desktop.interface" "font-name" #$font))))
|
||||||
|
|
||||||
(define (%home-theme-environment-variables _)
|
(define (%home-theme-environment-variables _)
|
||||||
'(("QT_QPA_PLATFORMTHEME" . "gtk3")
|
'(("QT_QPA_PLATFORMTHEME" . "gtk3")
|
||||||
("QT_WAYLAND_DECORATION" . "adwaita")))
|
("QT_WAYLAND_DECORATION" . "adwaita")))
|
||||||
@@ -377,48 +564,73 @@ compositor.")))
|
|||||||
(define %home-theme-profile
|
(define %home-theme-profile
|
||||||
(match-record-lambda <home-theme-configuration>
|
(match-record-lambda <home-theme-configuration>
|
||||||
(packages)
|
(packages)
|
||||||
(append (specs->pkgs "adwaita-icon-theme"
|
(cons* adwaita-icon-theme
|
||||||
"hicolor-icon-theme"
|
packages)))
|
||||||
"qtwayland")
|
|
||||||
packages)))
|
|
||||||
|
|
||||||
(define %home-theme-files
|
(define home-theme-icons-config
|
||||||
(match-record-lambda <home-theme-configuration>
|
(match-record-lambda <home-theme-configuration>
|
||||||
(icon-theme)
|
(icon-theme)
|
||||||
`((".icons/default/index.theme"
|
(ini-file "index.theme"
|
||||||
,(plain-file "index.theme"
|
#~'(("icon theme"
|
||||||
(format #f "\
|
. (("Inherits" . #$icon-theme)))))))
|
||||||
[icon theme]
|
|
||||||
Inherits = ~a~%"
|
|
||||||
icon-theme))))))
|
|
||||||
|
|
||||||
(define %home-theme-xdg-config
|
(define (home-theme-files config)
|
||||||
|
`((".icons/default/index.theme"
|
||||||
|
,(home-theme-icons-config config))))
|
||||||
|
|
||||||
|
(define (home-theme-xdg-data-files config)
|
||||||
|
`(("icons/default/index.theme"
|
||||||
|
,(home-theme-icons-config config))))
|
||||||
|
|
||||||
|
(define home-theme-gtk2
|
||||||
(match-record-lambda <home-theme-configuration>
|
(match-record-lambda <home-theme-configuration>
|
||||||
(icon-theme font cursor-theme cursor-size key-theme)
|
(icon-theme font cursor-theme cursor-size key-theme)
|
||||||
`(("gtk-3.0/settings.ini"
|
`(("gtk-theme-name" . ,(format #f "~s" "Adwaita"))
|
||||||
,(plain-file "settings.ini"
|
("gtk-icon-theme-name" . ,(format #f "~s" icon-theme))
|
||||||
(format #f "\
|
("gtk-font-name" . ,(format #f "~s" font))
|
||||||
[Settings]
|
("gtk-cursor-theme-name" . ,(format #f "~s" cursor-theme))
|
||||||
gtk-theme-name = Adwaita
|
("gtk-cursor-theme-size" . ,cursor-size)
|
||||||
gtk-icon-theme-name = ~a
|
("gtk-key-theme-name" . ,(format #f "~s" key-theme)))))
|
||||||
gtk-font-name = ~a
|
|
||||||
gtk-cursor-theme-name = ~a
|
(define home-theme-gtk3
|
||||||
gtk-cursor-theme-size = ~a
|
(match-record-lambda <home-theme-configuration>
|
||||||
gtk-key-theme-name = ~a~%"
|
(icon-theme font cursor-theme cursor-size key-theme)
|
||||||
icon-theme font cursor-theme cursor-size key-theme))))))
|
`(("gtk-theme-name" . "Adwaita")
|
||||||
|
("gtk-icon-theme-name" . ,icon-theme)
|
||||||
|
("gtk-font-name" . ,font)
|
||||||
|
("gtk-cursor-theme-name" . ,cursor-theme)
|
||||||
|
("gtk-cursor-theme-size" . ,cursor-size)
|
||||||
|
("gtk-key-theme-name" . ,key-theme))))
|
||||||
|
|
||||||
|
(define home-theme-gtk4
|
||||||
|
(match-record-lambda <home-theme-configuration>
|
||||||
|
(icon-theme font cursor-theme cursor-size key-theme)
|
||||||
|
`(("gtk-theme-name" . "Adwaita")
|
||||||
|
("gtk-icon-theme-name" . ,icon-theme)
|
||||||
|
("gtk-font-name" . ,font)
|
||||||
|
("gtk-cursor-theme-name" . ,cursor-theme)
|
||||||
|
("gtk-cursor-theme-size" . ,cursor-size))))
|
||||||
|
|
||||||
(define home-theme-service-type
|
(define home-theme-service-type
|
||||||
(service-type
|
(service-type
|
||||||
(name 'theme)
|
(name 'home-theme)
|
||||||
(extensions
|
(extensions
|
||||||
(list (service-extension home-environment-variables-service-type
|
(list (service-extension home-activation-service-type
|
||||||
|
home-theme-activation-service)
|
||||||
|
(service-extension home-environment-variables-service-type
|
||||||
%home-theme-environment-variables)
|
%home-theme-environment-variables)
|
||||||
(service-extension home-profile-service-type
|
(service-extension home-profile-service-type
|
||||||
%home-theme-profile)
|
%home-theme-profile)
|
||||||
(service-extension home-files-service-type
|
(service-extension home-files-service-type
|
||||||
%home-theme-files)
|
home-theme-files)
|
||||||
(service-extension home-xdg-configuration-files-service-type
|
(service-extension home-xdg-data-files-service-type
|
||||||
%home-theme-xdg-config)))
|
home-theme-xdg-data-files)
|
||||||
|
(service-extension home-gtk2-service-type
|
||||||
|
home-theme-gtk2)
|
||||||
|
(service-extension home-gtk3-service-type
|
||||||
|
home-theme-gtk3)
|
||||||
|
(service-extension home-gtk4-service-type
|
||||||
|
home-theme-gtk4)))
|
||||||
(default-value (home-theme-configuration))
|
(default-value (home-theme-configuration))
|
||||||
(description "Set up desktop themes.")))
|
(description "Set up desktop themes.")))
|
||||||
|
|
||||||
@@ -429,7 +641,7 @@ gtk-key-theme-name = ~a~%"
|
|||||||
|
|
||||||
(define-configuration/no-serialization home-waybar-configuration
|
(define-configuration/no-serialization home-waybar-configuration
|
||||||
(waybar
|
(waybar
|
||||||
(file-like (spec->pkg "waybar"))
|
(file-like waybar)
|
||||||
"")
|
"")
|
||||||
(config
|
(config
|
||||||
maybe-file-like
|
maybe-file-like
|
||||||
@@ -454,19 +666,26 @@ gtk-key-theme-name = ~a~%"
|
|||||||
(list (shepherd-service
|
(list (shepherd-service
|
||||||
(documentation "Start waybar.")
|
(documentation "Start waybar.")
|
||||||
(provision '(waybar))
|
(provision '(waybar))
|
||||||
|
(requirement '(graphical-session))
|
||||||
(start
|
(start
|
||||||
#~(make-forkexec-constructor
|
#~(lambda args
|
||||||
(list #$(file-append waybar "/bin/waybar"))))
|
((make-forkexec-constructor
|
||||||
|
(list #$(file-append waybar "/bin/waybar"))
|
||||||
|
;; Inherit graphical session environment.
|
||||||
|
#:environment-variables (environ))
|
||||||
|
args)))
|
||||||
(stop #~(make-kill-destructor))))))
|
(stop #~(make-kill-destructor))))))
|
||||||
|
|
||||||
(define home-waybar-service-type
|
(define home-waybar-service-type
|
||||||
(service-type
|
(service-type
|
||||||
(name 'waybar)
|
(name 'home-waybar)
|
||||||
(extensions
|
(extensions
|
||||||
(list (service-extension home-xdg-configuration-files-service-type
|
(list (service-extension home-xdg-configuration-files-service-type
|
||||||
%home-waybar-xdg-config)
|
%home-waybar-xdg-config)
|
||||||
(service-extension home-shepherd-service-type
|
(service-extension home-shepherd-service-type
|
||||||
%home-waybar-shepherd)))
|
%home-waybar-shepherd)
|
||||||
|
(service-extension home-graphical-session-service-type
|
||||||
|
(const 'wayland))))
|
||||||
(default-value (home-waybar-configuration))
|
(default-value (home-waybar-configuration))
|
||||||
(description "Run waybar, a status bar for Wayland compositors.")))
|
(description "Run waybar, a status bar for Wayland compositors.")))
|
||||||
|
|
||||||
@@ -475,153 +694,85 @@ gtk-key-theme-name = ~a~%"
|
|||||||
;;; Configuration file presets.
|
;;; Configuration file presets.
|
||||||
;;;
|
;;;
|
||||||
|
|
||||||
(define %rosenthal-set-keymap-script
|
|
||||||
(program-file "set-keymap"
|
|
||||||
(with-imported-modules (source-module-closure '((guix build utils)))
|
|
||||||
#~(begin
|
|
||||||
(use-modules (srfi srfi-1)
|
|
||||||
(srfi srfi-26)
|
|
||||||
(srfi srfi-37)
|
|
||||||
(ice-9 match)
|
|
||||||
(ice-9 popen)
|
|
||||||
(guix build utils))
|
|
||||||
|
|
||||||
(define* (build-keyboard-layout file layout #:optional variant #:key model options)
|
|
||||||
(define pipe
|
|
||||||
(apply open-pipe* OPEN_READ
|
|
||||||
#$(file-append (spec->pkg "console-setup") "/bin/ckbcomp")
|
|
||||||
(string-append "-I" #$(spec->pkg "xkeyboard-config") "/share/X11/xkb")
|
|
||||||
"-rules" "base"
|
|
||||||
`(,@(if model
|
|
||||||
'("-model" ,model)
|
|
||||||
'())
|
|
||||||
,layout
|
|
||||||
,(or variant "")
|
|
||||||
,(string-join options ","))))
|
|
||||||
(mkdir-p (dirname file))
|
|
||||||
(call-with-output-file file
|
|
||||||
(lambda (output)
|
|
||||||
(dump-port pipe output))))
|
|
||||||
|
|
||||||
(define* (set-keyboard-layout layout #:optional variant #:key model options)
|
|
||||||
(define file-name "/tmp/keymaps/console-keymap")
|
|
||||||
(build-keyboard-layout file-name layout variant #:model model #:options options)
|
|
||||||
(invoke "sudo" #$(file-append (spec->pkg "kbd") "/bin/loadkeys") file-name)
|
|
||||||
(when (getenv "WAYLAND_DISPLAY")
|
|
||||||
(substitute* (in-vicinity (getenv "XDG_CONFIG_HOME") "niri/config.kdl")
|
|
||||||
(("^ (layout|variant|model|options) .*") "")
|
|
||||||
(("^ xkb \\{.*" line)
|
|
||||||
(string-append
|
|
||||||
line
|
|
||||||
(format #f " layout ~s~%" layout)
|
|
||||||
(if variant (format #f " variant ~s~%" variant) "")
|
|
||||||
(if model (format #f " model ~s~%" model) "")
|
|
||||||
(format #f " options ~s~%" (string-join options ",")))))))
|
|
||||||
|
|
||||||
(define (show-help-and-exit)
|
|
||||||
(display "\
|
|
||||||
Usage: set-keymap LAYOUT [VARIANT] [-m MODEL] [-o OPTIONS]
|
|
||||||
|
|
||||||
OPTIONS are comma-separated e.g. \"ctrl:nocaps,grp:alt_shift_toggle\"
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
set-keymap us
|
|
||||||
set-keymap us dvorak
|
|
||||||
set-keymap us dvorak -o ctrl:nocaps\n")
|
|
||||||
(quit))
|
|
||||||
|
|
||||||
(define (parse-options)
|
|
||||||
(args-fold (cdr (program-arguments))
|
|
||||||
(list (option '(#\m "model") #t #f
|
|
||||||
(lambda (opt name arg result)
|
|
||||||
(alist-cons 'model arg result)))
|
|
||||||
(option '(#\o "options") #t #f
|
|
||||||
(lambda (opt name arg result)
|
|
||||||
(alist-cons 'options (string-split arg #\,)
|
|
||||||
result)))
|
|
||||||
(option '("help") #f #f
|
|
||||||
(lambda _
|
|
||||||
(show-help-and-exit))))
|
|
||||||
(lambda (opt name arg loads)
|
|
||||||
(error "Unrecognized option `~A'" name))
|
|
||||||
(lambda (opt loads) (cons opt loads))
|
|
||||||
'()))
|
|
||||||
|
|
||||||
(let* ((opts (parse-options))
|
|
||||||
(model (assoc-ref opts 'model))
|
|
||||||
(options (or (assoc-ref opts 'options) '()))
|
|
||||||
(args (remove pair? (reverse opts))))
|
|
||||||
(match args
|
|
||||||
((layout)
|
|
||||||
(set-keyboard-layout layout #:model model #:options options))
|
|
||||||
((layout variant)
|
|
||||||
(set-keyboard-layout layout variant #:model model #:options options))
|
|
||||||
(_
|
|
||||||
(show-help-and-exit))))))))
|
|
||||||
|
|
||||||
(define %rosenthal-set-keymap
|
|
||||||
(hidden-package
|
|
||||||
(package
|
|
||||||
(name "rosenthal-set-keymap")
|
|
||||||
(version "0.0.0")
|
|
||||||
(source %rosenthal-set-keymap-script)
|
|
||||||
(build-system copy-build-system)
|
|
||||||
(arguments
|
|
||||||
(list
|
|
||||||
#:phases
|
|
||||||
#~(modify-phases %standard-phases
|
|
||||||
(replace 'install
|
|
||||||
(lambda _
|
|
||||||
(install-file "set-keymap" (in-vicinity #$output "bin")))))))
|
|
||||||
(home-page "")
|
|
||||||
(synopsis "")
|
|
||||||
(description "")
|
|
||||||
(license #f))))
|
|
||||||
|
|
||||||
(define %rosenthal-skeletons
|
(define %rosenthal-skeletons
|
||||||
`((".config/emacs/fonts.el"
|
`((".config/emacs/init.el"
|
||||||
,(local-file "../examples/emacs/fonts.el"))
|
|
||||||
(".config/emacs/init.el"
|
|
||||||
,(local-file "../examples/emacs/init.el"))
|
,(local-file "../examples/emacs/init.el"))
|
||||||
(".config/foot/foot.ini"
|
(".config/fcitx5/config"
|
||||||
,(plain-file "foot.ini" "font=monospace:size=12\n"))
|
,(local-file "../examples/dot-config/fcitx5/config"))
|
||||||
(".config/mako/config"
|
(".config/htop/htoprc"
|
||||||
,(local-file "../examples/mako.conf"))
|
,(local-file "../examples/dot-config/htop/htoprc"))
|
||||||
(".config/niri/config.kdl"
|
(".config/niri/config.kdl"
|
||||||
,(local-file "../examples/niri.kdl"))
|
,(local-file "../examples/dot-config/niri/config.kdl"))
|
||||||
(".config/rofi/config.rasi"
|
|
||||||
,(plain-file "rofi.rasi" "\
|
|
||||||
configuration {
|
|
||||||
icon-theme: \"Qogir\";
|
|
||||||
}
|
|
||||||
@theme \"/run/current-system/profile/share/rofi/themes/fullscreen-preview.rasi\"\n"))
|
|
||||||
(".config/waybar/config.jsonc"
|
|
||||||
,(local-file "../examples/waybar/config.jsonc"))
|
|
||||||
(".config/waybar/style.css"
|
|
||||||
,(local-file "../examples/waybar/style.css"))
|
|
||||||
(".config/xfce4/helpers.rc"
|
(".config/xfce4/helpers.rc"
|
||||||
,(plain-file "helpers.rc" "TerminalEmulator=rofi-sensible-terminal\n"))
|
,(local-file "../examples/dot-config/xfce4/helpers.rc"))
|
||||||
;; Selected from the default skeletons.
|
|
||||||
(".config/gdb/gdbinit" ,%default-gdbinit)
|
,@(default-skeletons)))
|
||||||
(".config/nano/nanorc" ,%default-nanorc)
|
|
||||||
(".guile" ,%default-dotguile)))
|
(define %rosenthal-skeletons-installer
|
||||||
|
`((".local/state/noctalia/.setup-complete"
|
||||||
|
,(plain-file "empty" ""))
|
||||||
|
(".local/state/noctalia/settings.toml"
|
||||||
|
,(local-file "../examples/dot-config/noctalia/settings.toml"))
|
||||||
|
(".config/wezterm/wezterm.lua"
|
||||||
|
,(local-file "../examples/dot-config/wezterm/wezterm.lua"))
|
||||||
|
,@%rosenthal-skeletons))
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;;; Service presets.
|
;;; Service presets.
|
||||||
;;;
|
;;;
|
||||||
|
|
||||||
(define* (rosenthal-desktop-services-for-system
|
(define* (base-rosenthal-desktop-services
|
||||||
#:optional (system (or (%current-target-system)
|
#:optional (system (or (%current-target-system)
|
||||||
(%current-system))))
|
(%current-system))))
|
||||||
|
|
||||||
(define %display-manager-service-type
|
(define %display-manager-service-type
|
||||||
(if (string-prefix? "x86_64" system)
|
(if (target-64bit? system)
|
||||||
gdm-service-type
|
gdm-service-type
|
||||||
sddm-service-type))
|
sddm-service-type))
|
||||||
|
|
||||||
(define %term-font
|
(cons* (service bluetooth-service-type
|
||||||
(file-append (spec->pkg "font-terminus") "/share/consolefonts/ter-132n"))
|
(bluetooth-configuration
|
||||||
|
(auto-enable? #t)))
|
||||||
|
|
||||||
|
(service gvfs-service-type)
|
||||||
|
|
||||||
|
(service power-profiles-daemon-service-type)
|
||||||
|
|
||||||
|
;; Screen lockers for Wayland environment. No dependencies are pulled
|
||||||
|
;; in since we're using empty files.
|
||||||
|
(service screen-locker-service-type
|
||||||
|
(screen-locker-configuration
|
||||||
|
(name "swaylock")
|
||||||
|
(program (plain-file "empty" "")) ;Not used.
|
||||||
|
(using-setuid? #f)))
|
||||||
|
(service screen-locker-service-type
|
||||||
|
(screen-locker-configuration
|
||||||
|
(name "waylock")
|
||||||
|
(program (plain-file "empty" "")) ;Not used.
|
||||||
|
(using-setuid? #f)))
|
||||||
|
|
||||||
|
;; Add udev rules for backlight control.
|
||||||
|
(simple-service 'backlight udev-service-type (list ddcutil light))
|
||||||
|
|
||||||
|
(modify-services %desktop-services
|
||||||
|
(delete %display-manager-service-type)
|
||||||
|
;; Use a font suitable for HiDPI monitors.
|
||||||
|
(console-font-service-type
|
||||||
|
_ => (map (lambda (num)
|
||||||
|
(cons (string-append "tty" (number->string num))
|
||||||
|
(file-append font-terminus
|
||||||
|
"/share/consolefonts/ter-132n")))
|
||||||
|
(iota 6 1))))))
|
||||||
|
|
||||||
|
(define-syntax %rosenthal-desktop-services/base
|
||||||
|
(identifier-syntax (base-rosenthal-desktop-services)))
|
||||||
|
|
||||||
|
(define %rosenthal-desktop-services/gdm
|
||||||
|
(cons* (service gdm-service-type)
|
||||||
|
%rosenthal-desktop-services/base))
|
||||||
|
|
||||||
|
(define %rosenthal-desktop-services/tuigreet
|
||||||
(cons* (service greetd-service-type
|
(cons* (service greetd-service-type
|
||||||
(greetd-configuration
|
(greetd-configuration
|
||||||
(greeter-supplementary-groups '("video" "input"))
|
(greeter-supplementary-groups '("video" "input"))
|
||||||
@@ -640,55 +791,13 @@ configuration {
|
|||||||
(greetd-user-session
|
(greetd-user-session
|
||||||
(command #~(getenv "SHELL"))))))))))
|
(command #~(getenv "SHELL"))))))))))
|
||||||
(iota 6 1)))))
|
(iota 6 1)))))
|
||||||
|
(modify-services %rosenthal-desktop-services/base
|
||||||
|
(delete mingetty-service-type))))
|
||||||
|
|
||||||
(service bluetooth-service-type
|
(define-deprecated %rosenthal-desktop-services-gdm %rosenthal-desktop-services/gdm)
|
||||||
(bluetooth-configuration
|
(define-deprecated %rosenthal-desktop-services %rosenthal-desktop-services/tuigreet)
|
||||||
(auto-enable? #t)))
|
|
||||||
|
|
||||||
(service gvfs-service-type)
|
|
||||||
|
|
||||||
;; Screen lockers for Wayland environment. No dependencies are pulled
|
|
||||||
;; in since we're using empty files.
|
|
||||||
(service screen-locker-service-type
|
|
||||||
(screen-locker-configuration
|
|
||||||
(name "swaylock")
|
|
||||||
(program (plain-file "empty" "")) ;Not used.
|
|
||||||
(using-setuid? #f)))
|
|
||||||
(service screen-locker-service-type
|
|
||||||
(screen-locker-configuration
|
|
||||||
(name "waylock")
|
|
||||||
(program (plain-file "empty" "")) ;Not used.
|
|
||||||
(using-setuid? #f)))
|
|
||||||
|
|
||||||
;; Add udev rules for backlight control.
|
|
||||||
(simple-service 'backlight udev-service-type (specs->pkgs "light"))
|
|
||||||
|
|
||||||
(modify-services %desktop-services
|
|
||||||
(delete mingetty-service-type)
|
|
||||||
(delete %display-manager-service-type)
|
|
||||||
(delete screen-locker-service-type)
|
|
||||||
|
|
||||||
;; Use a font suitable for HiDPI monitors.
|
|
||||||
(console-font-service-type
|
|
||||||
_ => (map (lambda (num)
|
|
||||||
(cons (string-append "tty" (number->string num))
|
|
||||||
%term-font))
|
|
||||||
(iota 6 1))))))
|
|
||||||
|
|
||||||
(define-syntax %rosenthal-desktop-services
|
|
||||||
(identifier-syntax (rosenthal-desktop-services-for-system)))
|
|
||||||
|
|
||||||
(define %rosenthal-desktop-home-services
|
(define %rosenthal-desktop-home-services
|
||||||
(cons* (service home-shepherd-service-type
|
(cons* (service home-dbus-service-type)
|
||||||
(home-shepherd-configuration
|
|
||||||
;; Start by WM to inherit environment variables for graphical session.
|
|
||||||
(auto-start? #f)
|
|
||||||
(daemonize? #f)))
|
|
||||||
|
|
||||||
(service home-dbus-service-type)
|
|
||||||
(service home-pipewire-service-type)
|
(service home-pipewire-service-type)
|
||||||
|
|
||||||
(service home-blueman-applet-service-type)
|
|
||||||
(service home-network-manager-applet-service-type)
|
|
||||||
|
|
||||||
%base-home-services))
|
%base-home-services))
|
||||||
@@ -1,14 +1,16 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2022, 2023 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2022, 2023 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal services dns)
|
(define-module (rosenthal services dns)
|
||||||
|
;; Utilities
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix records)
|
#:use-module (guix records)
|
||||||
|
;; Guix System - services
|
||||||
#:use-module (gnu services)
|
#:use-module (gnu services)
|
||||||
#:use-module (gnu services configuration)
|
#:use-module (gnu services configuration)
|
||||||
#:use-module (gnu packages dns)
|
|
||||||
#:use-module (gnu services shepherd)
|
#:use-module (gnu services shepherd)
|
||||||
|
;; Guix packages
|
||||||
|
#:use-module (gnu packages dns)
|
||||||
#:export (smartdns-configuration
|
#:export (smartdns-configuration
|
||||||
smartdns-service-type))
|
smartdns-service-type))
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,23 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2024, 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2024, 2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal services file-systems)
|
(define-module (rosenthal services file-systems)
|
||||||
|
;; Utilities
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix records)
|
#:use-module (guix records)
|
||||||
#:use-module (gnu packages backup)
|
;; Guix System
|
||||||
#:use-module (gnu packages file-systems)
|
#:use-module (gnu system pam)
|
||||||
#:use-module (rosenthal packages admin)
|
;; Guix System - services
|
||||||
#:use-module (gnu services)
|
#:use-module (gnu services)
|
||||||
#:use-module (gnu services base)
|
#:use-module (gnu services base)
|
||||||
#:use-module (gnu services configuration)
|
#:use-module (gnu services configuration)
|
||||||
#:use-module (gnu services linux)
|
#:use-module (gnu services linux)
|
||||||
#:use-module (gnu services mcron)
|
#:use-module (gnu services mcron)
|
||||||
#:use-module (gnu services shepherd)
|
#:use-module (gnu services shepherd)
|
||||||
#:use-module (gnu system pam)
|
;; Guix packages
|
||||||
|
#:use-module (gnu packages backup)
|
||||||
|
#:use-module (gnu packages file-systems)
|
||||||
|
#:use-module (rosenthal packages admin)
|
||||||
#:export (btrbk-service-type
|
#:export (btrbk-service-type
|
||||||
btrbk-configuration
|
btrbk-configuration
|
||||||
|
|
||||||
@@ -104,77 +107,95 @@
|
|||||||
;;;
|
;;;
|
||||||
|
|
||||||
(define-configuration/no-serialization zfs-configuration
|
(define-configuration/no-serialization zfs-configuration
|
||||||
|
(zfs
|
||||||
|
(file-like zfs)
|
||||||
|
"ZFS package to use.")
|
||||||
|
(kernel-has-zfs-module?
|
||||||
|
(boolean #f)
|
||||||
|
"Whether ZFS module has already been built into the kernel.")
|
||||||
(volumes?
|
(volumes?
|
||||||
(boolean #f)
|
(boolean #f)
|
||||||
"")
|
"Wait for ZFS volumes to show up.")
|
||||||
(auto-mount?
|
(auto-mount?
|
||||||
(boolean #t)
|
(boolean #t)
|
||||||
""))
|
"Auto-mount ZFS datasets."))
|
||||||
|
|
||||||
(define zfs-shepherd
|
(define zfs-linux-loadable-module-service
|
||||||
(match-record-lambda <zfs-configuration>
|
(match-record-lambda <zfs-configuration>
|
||||||
(volumes? auto-mount?)
|
(zfs kernel-has-zfs-module?)
|
||||||
(append
|
(if kernel-has-zfs-module?
|
||||||
(list
|
'()
|
||||||
(shepherd-service
|
(list `(,zfs "module")))))
|
||||||
(provision '(file-system-zfs))
|
|
||||||
(requirement
|
(define add-zfs-package
|
||||||
`(zfs-import
|
(match-record-lambda <zfs-configuration>
|
||||||
,@(if volumes? '(zfs-volumes) '())
|
(zfs)
|
||||||
,@(if auto-mount? '(zfs-mount) '())))
|
(list zfs)))
|
||||||
(start #~(const #t))
|
|
||||||
(stop #~(const #f)))
|
(define zfs-shepherd-service
|
||||||
(shepherd-service
|
(match-record-lambda <zfs-configuration>
|
||||||
(provision '(zfs-import))
|
(zfs volumes? auto-mount?)
|
||||||
(requirement '(kernel-module-loader))
|
`(,(shepherd-service
|
||||||
(start
|
(provision '(zfs-import))
|
||||||
#~(make-system-constructor
|
(requirement '(udev))
|
||||||
(string-join
|
(documentation "Import ZFS storage pools.")
|
||||||
(list #$(file-append zfs "/sbin/zpool") "import" "-a" "-N"))))
|
(start
|
||||||
(stop #~(const #f))))
|
#~(make-system-constructor
|
||||||
(if volumes?
|
(string-join
|
||||||
(list
|
(list #$(file-append zfs "/sbin/zpool") "import" "-a" "-N"))))
|
||||||
(shepherd-service
|
(stop #~(const #f)))
|
||||||
(provision '(zfs-volumes))
|
,@(if volumes?
|
||||||
(requirement '(zfs-import))
|
(list
|
||||||
(start
|
(shepherd-service
|
||||||
#~(make-system-constructor
|
(provision '(zfs-volumes))
|
||||||
(string-join
|
(requirement '(zfs-import))
|
||||||
;; TODO: Patch references within zfs package instead.
|
(documentation "Wait for ZFS volume links to appear in /dev.")
|
||||||
(list "PATH=/run/current-system/profile/bin:/run/current-system/profile/sbin"
|
(start
|
||||||
#$(file-append zfs "/bin/zvol_wait")))))
|
#~(make-system-constructor
|
||||||
(stop #~(const #f))))
|
(string-join
|
||||||
'())
|
;; TODO: Patch references within zfs package instead.
|
||||||
(if auto-mount?
|
(list "PATH=/run/current-system/profile/bin:/run/current-system/profile/sbin"
|
||||||
(list
|
#$(file-append zfs "/bin/zvol_wait")))))
|
||||||
(shepherd-service
|
(stop #~(const #f))))
|
||||||
(provision '(zfs-mount))
|
'())
|
||||||
(requirement '(zfs-import))
|
,@(if auto-mount?
|
||||||
(start
|
(list
|
||||||
#~(make-system-constructor
|
(shepherd-service
|
||||||
(string-join
|
(provision '(zfs-mount))
|
||||||
(list #$(file-append zfs "/sbin/zfs") "mount" "-a" "-l"))))
|
(requirement '(zfs-import))
|
||||||
(stop
|
(documentation "Mount all available ZFS file systems.")
|
||||||
#~(make-system-destructor
|
(start
|
||||||
(string-join
|
#~(make-system-constructor
|
||||||
(list #$(file-append zfs "/sbin/zfs") "unmount" "-a"))))))
|
(string-join
|
||||||
'()))))
|
(list #$(file-append zfs "/sbin/zfs") "mount" "-a" "-l"))))
|
||||||
|
(stop
|
||||||
|
#~(make-system-destructor
|
||||||
|
(string-join
|
||||||
|
(list #$(file-append zfs "/sbin/zfs") "unmount" "-a"))))))
|
||||||
|
'())
|
||||||
|
,(shepherd-service
|
||||||
|
(provision '(file-system-zfs))
|
||||||
|
(requirement
|
||||||
|
`(zfs-import
|
||||||
|
,@(if volumes? '(zfs-volumes) '())
|
||||||
|
,@(if auto-mount? '(zfs-mount) '())))
|
||||||
|
(documentation "Take care of ZFS file systems.")
|
||||||
|
(start #~(const #t))
|
||||||
|
(stop #~(const #f))))))
|
||||||
|
|
||||||
(define zfs-service-type
|
(define zfs-service-type
|
||||||
(service-type
|
(service-type
|
||||||
(name 'zfs)
|
(name 'zfs)
|
||||||
(extensions
|
(extensions
|
||||||
(list (service-extension linux-loadable-module-service-type
|
(list (service-extension linux-loadable-module-service-type
|
||||||
(const (list `(,zfs "module"))))
|
zfs-linux-loadable-module-service)
|
||||||
(service-extension udev-service-type
|
(service-extension udev-service-type
|
||||||
(const (list zfs)))
|
add-zfs-package)
|
||||||
(service-extension kernel-module-loader-service-type
|
|
||||||
(const '("zfs")))
|
|
||||||
(service-extension shepherd-root-service-type
|
|
||||||
zfs-shepherd)
|
|
||||||
(service-extension user-processes-service-type
|
|
||||||
(const '(file-system-zfs)))
|
|
||||||
(service-extension profile-service-type
|
(service-extension profile-service-type
|
||||||
(const (list zfs)))))
|
add-zfs-package)
|
||||||
|
(service-extension shepherd-root-service-type
|
||||||
|
zfs-shepherd-service)
|
||||||
|
(service-extension user-processes-service-type
|
||||||
|
(const '(file-system-zfs)))))
|
||||||
(default-value (zfs-configuration))
|
(default-value (zfs-configuration))
|
||||||
(description "")))
|
(description "")))
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2026 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
|
(define-module (rosenthal services games)
|
||||||
|
;; Utilities
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix records)
|
||||||
|
#:use-module (rosenthal utils file)
|
||||||
|
#:use-module (rosenthal utils predicates)
|
||||||
|
;; Guix System
|
||||||
|
#:use-module (gnu system accounts)
|
||||||
|
#:use-module (gnu system shadow)
|
||||||
|
;; Guix System - services
|
||||||
|
#:use-module (gnu services)
|
||||||
|
#:use-module (gnu services configuration)
|
||||||
|
#:use-module (gnu services dbus)
|
||||||
|
;; Guix packages
|
||||||
|
#:use-module (gnu packages linux)
|
||||||
|
#:export (gamemode-service-type
|
||||||
|
gamemode-configuration))
|
||||||
|
|
||||||
|
(define-maybe file-object-or-file-config)
|
||||||
|
|
||||||
|
(define-configuration/no-serialization gamemode-configuration
|
||||||
|
(gamemode
|
||||||
|
(file-like gamemode)
|
||||||
|
"@code{gamemode} package to use.")
|
||||||
|
(config
|
||||||
|
maybe-file-object-or-file-config
|
||||||
|
""))
|
||||||
|
|
||||||
|
(define (gamemode-account-service config)
|
||||||
|
(list (user-group
|
||||||
|
(system? #t)
|
||||||
|
(name "gamemode"))))
|
||||||
|
|
||||||
|
(define gamemode-etc-service
|
||||||
|
(match-record-lambda <gamemode-configuration>
|
||||||
|
(gamemode config)
|
||||||
|
`(("gamemode.ini"
|
||||||
|
,(if (maybe-value-set? config)
|
||||||
|
(if (file-config? config)
|
||||||
|
(ini-file "gamemode.ini" config)
|
||||||
|
config)
|
||||||
|
(file-append (package-source gamemode) "/example/gamemode.ini")))
|
||||||
|
("security/limits.d/10-gamemode.conf"
|
||||||
|
,(file-append gamemode "/etc/security/limits.d/10-gamemode.conf")))))
|
||||||
|
|
||||||
|
(define gamemode-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'gamemode)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension profile-service-type
|
||||||
|
(compose list gamemode-configuration-gamemode))
|
||||||
|
(service-extension account-service-type
|
||||||
|
gamemode-account-service)
|
||||||
|
(service-extension etc-service-type
|
||||||
|
gamemode-etc-service)
|
||||||
|
(service-extension dbus-root-service-type
|
||||||
|
(compose list gamemode-configuration-gamemode))
|
||||||
|
(service-extension polkit-service-type
|
||||||
|
(compose list gamemode-configuration-gamemode))))
|
||||||
|
(default-value (gamemode-configuration))
|
||||||
|
(description "Set up Guix System environment for gamemode.")))
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2021 Andrew Tropin <andrew@trop.in>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2021 Andrew Tropin <andrew@trop.in>
|
||||||
|
|
||||||
(define-module (rosenthal services keyboard)
|
(define-module (rosenthal services keyboard)
|
||||||
|
;; Guix System
|
||||||
#:use-module (gnu system keyboard)
|
#:use-module (gnu system keyboard)
|
||||||
|
;; Guix Home - services
|
||||||
#:use-module (gnu home services)
|
#:use-module (gnu home services)
|
||||||
#:export (home-keyboard-service-type))
|
#:export (home-keyboard-service-type))
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,25 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2024, 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2024, 2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal services mail)
|
(define-module (rosenthal services mail)
|
||||||
|
;; Guile builtins
|
||||||
#:use-module (srfi srfi-26)
|
#:use-module (srfi srfi-26)
|
||||||
|
;; Utilities
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix records)
|
#:use-module (guix records)
|
||||||
#:use-module (rosenthal utils serializers yaml)
|
#:use-module (rosenthal utils file)
|
||||||
|
#:use-module (rosenthal utils predicates)
|
||||||
|
;; Guix System - services
|
||||||
#:use-module (gnu services)
|
#:use-module (gnu services)
|
||||||
#:use-module (gnu services admin)
|
#:use-module (gnu services admin)
|
||||||
#:use-module (gnu services configuration)
|
#:use-module (gnu services configuration)
|
||||||
|
#:use-module (gnu services containers)
|
||||||
#:use-module (gnu services docker)
|
#:use-module (gnu services docker)
|
||||||
#:use-module (gnu services shepherd)
|
#:use-module (gnu services shepherd)
|
||||||
|
;; Guix Home - services
|
||||||
#:use-module (gnu home services)
|
#:use-module (gnu home services)
|
||||||
#:use-module (gnu home services shepherd)
|
#:use-module (gnu home services shepherd)
|
||||||
|
;; Guix packages
|
||||||
#:use-module (gnu packages mail)
|
#:use-module (gnu packages mail)
|
||||||
#:export (docker-mailserver-configuration
|
#:export (docker-mailserver-configuration
|
||||||
docker-mailserver-service-type
|
docker-mailserver-service-type
|
||||||
@@ -45,34 +51,34 @@
|
|||||||
"List of extra Docker arguments.")
|
"List of extra Docker arguments.")
|
||||||
(no-serialization))
|
(no-serialization))
|
||||||
|
|
||||||
(define docker-mailserver-oci-containers
|
(define docker-mailserver-oci
|
||||||
(match-record-lambda <docker-mailserver-configuration>
|
(match-record-lambda <docker-mailserver-configuration>
|
||||||
(data-directory log-file shepherd-requirement options extra-arguments)
|
(data-directory log-file shepherd-requirement options extra-arguments)
|
||||||
(let ((docker-mailserver-path
|
(let ((docker-mailserver-path
|
||||||
(cut string-append data-directory <>)))
|
(cut string-append data-directory <>)))
|
||||||
(list (oci-container-configuration
|
(oci-extension
|
||||||
(environment options)
|
(containers
|
||||||
(image "ghcr.io/docker-mailserver/docker-mailserver:latest")
|
(list (oci-container-configuration
|
||||||
(provision "docker-mailserver")
|
(environment options)
|
||||||
(requirement shepherd-requirement)
|
(image "ghcr.io/docker-mailserver/docker-mailserver:latest")
|
||||||
(log-file log-file)
|
(provision "docker-mailserver")
|
||||||
(network "host")
|
(requirement shepherd-requirement)
|
||||||
(volumes
|
(log-file log-file)
|
||||||
`((,(docker-mailserver-path "/data") . "/var/mail")
|
(network "host")
|
||||||
(,(docker-mailserver-path "/state") . "/var/mail-state")
|
(volumes
|
||||||
(,(docker-mailserver-path "/logs") . "/var/log/mail")
|
`((,(docker-mailserver-path "/data") . "/var/mail")
|
||||||
(,(docker-mailserver-path "/config") . "/tmp/docker-mailserver")
|
(,(docker-mailserver-path "/state") . "/var/mail-state")
|
||||||
("/etc/localtime" . "/etc/localtime:ro")))
|
(,(docker-mailserver-path "/logs") . "/var/log/mail")
|
||||||
(extra-arguments extra-arguments))))))
|
(,(docker-mailserver-path "/config") . "/tmp/docker-mailserver")
|
||||||
|
("/etc/localtime" . "/etc/localtime:ro")))
|
||||||
|
(extra-arguments extra-arguments))))))))
|
||||||
|
|
||||||
(define docker-mailserver-service-type
|
(define docker-mailserver-service-type
|
||||||
(service-type
|
(service-type
|
||||||
(name 'docker-mailserver)
|
(name 'docker-mailserver)
|
||||||
(extensions
|
(extensions
|
||||||
(list (service-extension oci-container-service-type
|
(list (service-extension oci-service-type
|
||||||
docker-mailserver-oci-containers)
|
docker-mailserver-oci)))
|
||||||
(service-extension log-rotation-service-type
|
|
||||||
(compose list docker-mailserver-configuration-log-file))))
|
|
||||||
(default-value (docker-mailserver-configuration))
|
(default-value (docker-mailserver-configuration))
|
||||||
(description "Run Docker Mailserver.")))
|
(description "Run Docker Mailserver.")))
|
||||||
|
|
||||||
@@ -86,7 +92,7 @@
|
|||||||
(file-like goimapnotify)
|
(file-like goimapnotify)
|
||||||
"")
|
"")
|
||||||
(config
|
(config
|
||||||
yaml-config
|
file-object-or-file-config
|
||||||
"")
|
"")
|
||||||
(wait
|
(wait
|
||||||
(integer 1)
|
(integer 1)
|
||||||
@@ -105,7 +111,9 @@
|
|||||||
(match-record-lambda <home-goimapnotify-configuration>
|
(match-record-lambda <home-goimapnotify-configuration>
|
||||||
(goimapnotify config wait shepherd-provision shepherd-requirement auto-start?)
|
(goimapnotify config wait shepherd-provision shepherd-requirement auto-start?)
|
||||||
(let ((config-file
|
(let ((config-file
|
||||||
(mixed-text-file "goimapnotify.yaml" (yaml-serialize config))))
|
(if (file-config? config)
|
||||||
|
(yaml-file "goimapnotify.yaml" config)
|
||||||
|
config)))
|
||||||
(list (shepherd-service
|
(list (shepherd-service
|
||||||
(provision shepherd-provision)
|
(provision shepherd-provision)
|
||||||
(requirement shepherd-requirement)
|
(requirement shepherd-requirement)
|
||||||
|
|||||||
@@ -0,0 +1,192 @@
|
|||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
|
(define-module (rosenthal services messaging)
|
||||||
|
;; Utilities
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix modules)
|
||||||
|
#:use-module (guix records)
|
||||||
|
#:use-module (rosenthal utils file)
|
||||||
|
#:use-module (rosenthal utils predicates)
|
||||||
|
;; Guix System
|
||||||
|
#:use-module (gnu system shadow)
|
||||||
|
;; Guix System - services
|
||||||
|
#:use-module (gnu services)
|
||||||
|
#:use-module (gnu services configuration)
|
||||||
|
#:use-module (gnu services databases)
|
||||||
|
#:use-module (gnu services shepherd)
|
||||||
|
;; Guix packages
|
||||||
|
#:use-module (rosenthal packages messaging)
|
||||||
|
#:export (heisenbridge-service-type
|
||||||
|
heisenbridge-configuration
|
||||||
|
|
||||||
|
mautrix-telegram-service-type
|
||||||
|
mautrix-telegram-configuration))
|
||||||
|
|
||||||
|
;;;
|
||||||
|
;;; Heisenbridge
|
||||||
|
;;;
|
||||||
|
|
||||||
|
(define-configuration/no-serialization heisenbridge-configuration
|
||||||
|
(heisenbridge
|
||||||
|
(file-like heisenbridge)
|
||||||
|
"")
|
||||||
|
(homeserver
|
||||||
|
(string "http://localhost:8008")
|
||||||
|
"")
|
||||||
|
(config
|
||||||
|
file-object-or-file-config
|
||||||
|
"")
|
||||||
|
(group-id
|
||||||
|
(user-and-group-id #f)
|
||||||
|
"")
|
||||||
|
(user-id
|
||||||
|
(user-and-group-id #f)
|
||||||
|
"")
|
||||||
|
(shepherd-provision
|
||||||
|
(list-of-symbols '(heisenbridge))
|
||||||
|
"")
|
||||||
|
(shepherd-requirement
|
||||||
|
(list-of-symbols '())
|
||||||
|
"")
|
||||||
|
(auto-start?
|
||||||
|
(boolean #t)
|
||||||
|
""))
|
||||||
|
|
||||||
|
(define heisenbridge-account
|
||||||
|
(match-record-lambda <heisenbridge-configuration>
|
||||||
|
(group-id user-id)
|
||||||
|
(list (user-group
|
||||||
|
(name "heisenbridge")
|
||||||
|
(id group-id)
|
||||||
|
(system? #t))
|
||||||
|
(user-account
|
||||||
|
(name "heisenbridge")
|
||||||
|
(group "heisenbridge")
|
||||||
|
(uid user-id)
|
||||||
|
(system? #t)
|
||||||
|
(home-directory "/var/empty")))))
|
||||||
|
|
||||||
|
(define heisenbridge-shepherd
|
||||||
|
(match-record-lambda <heisenbridge-configuration>
|
||||||
|
(heisenbridge config homeserver shepherd-provision shepherd-requirement auto-start?)
|
||||||
|
(let ((config-file
|
||||||
|
(if (file-config? config)
|
||||||
|
(yaml-file "heisenbridge.yaml" config)
|
||||||
|
config)))
|
||||||
|
(list (shepherd-service
|
||||||
|
(provision shepherd-provision)
|
||||||
|
(requirement `(user-processes networking ,@shepherd-requirement))
|
||||||
|
(start
|
||||||
|
#~(make-forkexec-constructor
|
||||||
|
(list #$(file-append heisenbridge "/bin/heisenbridge")
|
||||||
|
"--config" #$config-file #$homeserver)
|
||||||
|
#:user "heisenbridge"
|
||||||
|
#:group "heisenbridge"
|
||||||
|
#:environment-variables
|
||||||
|
'("PATH=/run/current-system/profile/bin"
|
||||||
|
"SSL_CERT_DIR=/run/current-system/profile/etc/ssl/certs"
|
||||||
|
"SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt")))
|
||||||
|
(stop #~(make-kill-destructor))
|
||||||
|
(auto-start? auto-start?)
|
||||||
|
(actions (list (shepherd-configuration-action config-file))))))))
|
||||||
|
|
||||||
|
(define heisenbridge-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'heisenbridge)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension account-service-type
|
||||||
|
heisenbridge-account)
|
||||||
|
(service-extension shepherd-root-service-type
|
||||||
|
heisenbridge-shepherd)))
|
||||||
|
(description "")))
|
||||||
|
|
||||||
|
|
||||||
|
;;;
|
||||||
|
;;; Mautrix Telegram
|
||||||
|
;;;
|
||||||
|
|
||||||
|
(define-configuration/no-serialization mautrix-telegram-configuration
|
||||||
|
(mautrix-telegram
|
||||||
|
(file-like mautrix-telegram)
|
||||||
|
"")
|
||||||
|
(config
|
||||||
|
file-object-or-file-config
|
||||||
|
"")
|
||||||
|
(group-id
|
||||||
|
(user-and-group-id #f)
|
||||||
|
"")
|
||||||
|
(user-id
|
||||||
|
(user-and-group-id #f)
|
||||||
|
"")
|
||||||
|
(shepherd-provision
|
||||||
|
(list-of-symbols '(mautrix-telegram))
|
||||||
|
"")
|
||||||
|
(shepherd-requirement
|
||||||
|
(list-of-symbols '())
|
||||||
|
"")
|
||||||
|
(auto-start?
|
||||||
|
(boolean #t)
|
||||||
|
""))
|
||||||
|
|
||||||
|
(define mautrix-telegram-account
|
||||||
|
(match-record-lambda <mautrix-telegram-configuration>
|
||||||
|
(group-id user-id)
|
||||||
|
(list (user-group
|
||||||
|
(name "mautrix-telegram")
|
||||||
|
(id group-id)
|
||||||
|
(system? #t))
|
||||||
|
(user-account
|
||||||
|
(name "mautrix-telegram")
|
||||||
|
(group "mautrix-telegram")
|
||||||
|
(uid user-id)
|
||||||
|
(system? #t)
|
||||||
|
(home-directory "/var/lib/mautrix-telegram")))))
|
||||||
|
|
||||||
|
(define mautrix-telegram-activation
|
||||||
|
(with-imported-modules (source-module-closure '((gnu build activation)))
|
||||||
|
#~(begin
|
||||||
|
(use-modules (gnu build activation))
|
||||||
|
(let ((user (getpwnam "mautrix-telegram")))
|
||||||
|
(mkdir-p/perms "/var/lib/mautrix-telegram" user #o700)))))
|
||||||
|
|
||||||
|
(define mautrix-telegram-postgresql-role
|
||||||
|
(list (postgresql-role
|
||||||
|
(name "mautrix-telegram")
|
||||||
|
(create-database? #t))))
|
||||||
|
|
||||||
|
(define mautrix-telegram-shepherd
|
||||||
|
(match-record-lambda <mautrix-telegram-configuration>
|
||||||
|
(mautrix-telegram config shepherd-provision shepherd-requirement auto-start?)
|
||||||
|
(let ((config-file
|
||||||
|
(if (file-config? config)
|
||||||
|
(yaml-file "mautrix-telegram.yaml" config)
|
||||||
|
config)))
|
||||||
|
(list (shepherd-service
|
||||||
|
(provision shepherd-provision)
|
||||||
|
(requirement
|
||||||
|
`(user-processes networking postgresql ,@shepherd-requirement))
|
||||||
|
(start
|
||||||
|
#~(make-forkexec-constructor
|
||||||
|
(list #$(file-append mautrix-telegram "/bin/mautrix-telegram")
|
||||||
|
"--no-update" "--config" #$config-file)
|
||||||
|
#:user "mautrix-telegram"
|
||||||
|
#:group "mautrix-telegram"
|
||||||
|
#:directory "/var/lib/mautrix-telegram"))
|
||||||
|
(stop #~(make-kill-destructor))
|
||||||
|
(auto-start? auto-start?)
|
||||||
|
(actions (list (shepherd-configuration-action config-file))))))))
|
||||||
|
|
||||||
|
(define mautrix-telegram-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'mautrix-telegram)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension account-service-type
|
||||||
|
mautrix-telegram-account)
|
||||||
|
(service-extension activation-service-type
|
||||||
|
(const mautrix-telegram-activation))
|
||||||
|
(service-extension postgresql-role-service-type
|
||||||
|
(const mautrix-telegram-postgresql-role))
|
||||||
|
(service-extension shepherd-root-service-type
|
||||||
|
mautrix-telegram-shepherd)))
|
||||||
|
(description "")))
|
||||||
@@ -1,18 +1,22 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal services monitoring)
|
(define-module (rosenthal services monitoring)
|
||||||
|
;; Utilities
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix modules)
|
#:use-module (guix modules)
|
||||||
#:use-module (guix records)
|
#:use-module (guix records)
|
||||||
#:use-module (rosenthal utils serializers ini)
|
#:use-module (rosenthal utils file)
|
||||||
#:use-module (rosenthal utils serializers yaml)
|
#:use-module (rosenthal utils predicates)
|
||||||
|
;; Guix System
|
||||||
#:use-module (gnu system shadow)
|
#:use-module (gnu system shadow)
|
||||||
|
;; Guix System - services
|
||||||
#:use-module (gnu services)
|
#:use-module (gnu services)
|
||||||
|
#:use-module (gnu services admin)
|
||||||
#:use-module (gnu services configuration)
|
#:use-module (gnu services configuration)
|
||||||
#:use-module (gnu services databases)
|
#:use-module (gnu services databases)
|
||||||
#:use-module (gnu services shepherd)
|
#:use-module (gnu services shepherd)
|
||||||
|
;; Guix packages
|
||||||
#:use-module (gnu packages guile-xyz)
|
#:use-module (gnu packages guile-xyz)
|
||||||
#:use-module (rosenthal packages binaries)
|
#:use-module (rosenthal packages binaries)
|
||||||
#:export (alloy-configuration
|
#:export (alloy-configuration
|
||||||
@@ -94,11 +98,17 @@
|
|||||||
(file-like grafana-bin)
|
(file-like grafana-bin)
|
||||||
"")
|
"")
|
||||||
(config
|
(config
|
||||||
ini-config
|
file-object-or-file-config
|
||||||
"")
|
"")
|
||||||
(postgresql-password-file
|
(postgresql-password-file
|
||||||
string
|
string
|
||||||
"")
|
"")
|
||||||
|
(group-id
|
||||||
|
(user-and-group-id #f)
|
||||||
|
"")
|
||||||
|
(user-id
|
||||||
|
(user-and-group-id #f)
|
||||||
|
"")
|
||||||
(shepherd-provision
|
(shepherd-provision
|
||||||
(list-of-symbols '(grafana))
|
(list-of-symbols '(grafana))
|
||||||
"")
|
"")
|
||||||
@@ -110,11 +120,16 @@
|
|||||||
""))
|
""))
|
||||||
|
|
||||||
(define grafana-account
|
(define grafana-account
|
||||||
(lambda _
|
(match-record-lambda <grafana-configuration>
|
||||||
(list (user-group (name "grafana") (system? #t))
|
(group-id user-id)
|
||||||
|
(list (user-group
|
||||||
|
(name "grafana")
|
||||||
|
(id group-id)
|
||||||
|
(system? #t))
|
||||||
(user-account
|
(user-account
|
||||||
(name "grafana")
|
(name "grafana")
|
||||||
(group "grafana")
|
(group "grafana")
|
||||||
|
(uid user-id)
|
||||||
(system? #t)
|
(system? #t)
|
||||||
(comment "Grafana user")
|
(comment "Grafana user")
|
||||||
(home-directory "/var/lib/grafana")))))
|
(home-directory "/var/lib/grafana")))))
|
||||||
@@ -143,12 +158,9 @@
|
|||||||
(match-record-lambda <grafana-configuration>
|
(match-record-lambda <grafana-configuration>
|
||||||
(grafana config shepherd-provision shepherd-requirement auto-start?)
|
(grafana config shepherd-provision shepherd-requirement auto-start?)
|
||||||
(let ((config-file
|
(let ((config-file
|
||||||
(computed-file "grafana.ini"
|
(if (file-config? config)
|
||||||
(with-extensions (list guile-ini guile-lib guile-smc)
|
(ini-file "grafana.ini" config)
|
||||||
#~(begin
|
config)))
|
||||||
(use-modules (srfi srfi-26) (ini))
|
|
||||||
(call-with-output-file #$output
|
|
||||||
(cut scm->ini '#$config #:port <>)))))))
|
|
||||||
(list (shepherd-service
|
(list (shepherd-service
|
||||||
(provision shepherd-provision)
|
(provision shepherd-provision)
|
||||||
(requirement `(loopback postgresql user-processes
|
(requirement `(loopback postgresql user-processes
|
||||||
@@ -188,7 +200,13 @@
|
|||||||
(file-like loki-bin)
|
(file-like loki-bin)
|
||||||
"")
|
"")
|
||||||
(config
|
(config
|
||||||
yaml-config
|
file-object-or-file-config
|
||||||
|
"")
|
||||||
|
(group-id
|
||||||
|
(user-and-group-id #f)
|
||||||
|
"")
|
||||||
|
(user-id
|
||||||
|
(user-and-group-id #f)
|
||||||
"")
|
"")
|
||||||
(shepherd-provision
|
(shepherd-provision
|
||||||
(list-of-symbols '(loki))
|
(list-of-symbols '(loki))
|
||||||
@@ -201,11 +219,16 @@
|
|||||||
""))
|
""))
|
||||||
|
|
||||||
(define loki-account
|
(define loki-account
|
||||||
(lambda _
|
(match-record-lambda <loki-configuration>
|
||||||
(list (user-group (name "loki") (system? #t))
|
(group-id user-id)
|
||||||
|
(list (user-group
|
||||||
|
(name "loki")
|
||||||
|
(id group-id)
|
||||||
|
(system? #t))
|
||||||
(user-account
|
(user-account
|
||||||
(name "loki")
|
(name "loki")
|
||||||
(group "loki")
|
(group "loki")
|
||||||
|
(uid user-id)
|
||||||
(system? #t)
|
(system? #t)
|
||||||
(comment "Loki user")
|
(comment "Loki user")
|
||||||
(home-directory "/var/lib/loki")))))
|
(home-directory "/var/lib/loki")))))
|
||||||
@@ -225,15 +248,9 @@
|
|||||||
(match-record-lambda <loki-configuration>
|
(match-record-lambda <loki-configuration>
|
||||||
(loki config shepherd-provision shepherd-requirement auto-start?)
|
(loki config shepherd-provision shepherd-requirement auto-start?)
|
||||||
(let ((config-file
|
(let ((config-file
|
||||||
(computed-file "loki.yaml"
|
(if (file-config? config)
|
||||||
(with-extensions (list guile-yamlpp)
|
(yaml-file "loki.yaml" config)
|
||||||
#~(begin
|
config)))
|
||||||
(use-modules (yamlpp))
|
|
||||||
(call-with-output-file #$output
|
|
||||||
(lambda (port)
|
|
||||||
(let ((emitter (make-yaml-emitter)))
|
|
||||||
(yaml-emit! emitter '#$config)
|
|
||||||
(display (yaml-emitter-string emitter) port)))))))))
|
|
||||||
(list (shepherd-service
|
(list (shepherd-service
|
||||||
(provision shepherd-provision)
|
(provision shepherd-provision)
|
||||||
(requirement `(loopback user-processes ,@shepherd-requirement))
|
(requirement `(loopback user-processes ,@shepherd-requirement))
|
||||||
@@ -270,7 +287,13 @@
|
|||||||
(file-like mimir-bin)
|
(file-like mimir-bin)
|
||||||
"")
|
"")
|
||||||
(config
|
(config
|
||||||
yaml-config
|
file-object-or-file-config
|
||||||
|
"")
|
||||||
|
(group-id
|
||||||
|
(user-and-group-id #f)
|
||||||
|
"")
|
||||||
|
(user-id
|
||||||
|
(user-and-group-id #f)
|
||||||
"")
|
"")
|
||||||
(shepherd-provision
|
(shepherd-provision
|
||||||
(list-of-symbols '(mimir))
|
(list-of-symbols '(mimir))
|
||||||
@@ -283,11 +306,16 @@
|
|||||||
""))
|
""))
|
||||||
|
|
||||||
(define mimir-account
|
(define mimir-account
|
||||||
(lambda _
|
(match-record-lambda <mimir-configuration>
|
||||||
(list (user-group (name "mimir") (system? #t))
|
(group-id user-id)
|
||||||
|
(list (user-group
|
||||||
|
(name "mimir")
|
||||||
|
(id group-id)
|
||||||
|
(system? #t))
|
||||||
(user-account
|
(user-account
|
||||||
(name "mimir")
|
(name "mimir")
|
||||||
(group "mimir")
|
(group "mimir")
|
||||||
|
(uid user-id)
|
||||||
(system? #t)
|
(system? #t)
|
||||||
(comment "Mimir user")
|
(comment "Mimir user")
|
||||||
(home-directory "/var/lib/mimir")))))
|
(home-directory "/var/lib/mimir")))))
|
||||||
@@ -307,15 +335,9 @@
|
|||||||
(match-record-lambda <mimir-configuration>
|
(match-record-lambda <mimir-configuration>
|
||||||
(mimir config shepherd-provision shepherd-requirement auto-start?)
|
(mimir config shepherd-provision shepherd-requirement auto-start?)
|
||||||
(let ((config-file
|
(let ((config-file
|
||||||
(computed-file "mimir.yaml"
|
(if (file-config? config)
|
||||||
(with-extensions (list guile-yamlpp)
|
(yaml-file "mimir.yaml" config)
|
||||||
#~(begin
|
config)))
|
||||||
(use-modules (yamlpp))
|
|
||||||
(call-with-output-file #$output
|
|
||||||
(lambda (port)
|
|
||||||
(let ((emitter (make-yaml-emitter)))
|
|
||||||
(yaml-emit! emitter '#$config)
|
|
||||||
(display (yaml-emitter-string emitter) port)))))))))
|
|
||||||
(list (shepherd-service
|
(list (shepherd-service
|
||||||
(provision shepherd-provision)
|
(provision shepherd-provision)
|
||||||
(requirement `(loopback user-processes ,@shepherd-requirement))
|
(requirement `(loopback user-processes ,@shepherd-requirement))
|
||||||
@@ -355,7 +377,13 @@
|
|||||||
(string "0.0.0.0:9090")
|
(string "0.0.0.0:9090")
|
||||||
"")
|
"")
|
||||||
(config
|
(config
|
||||||
yaml-config
|
file-object-or-file-config
|
||||||
|
"")
|
||||||
|
(group-id
|
||||||
|
(user-and-group-id #f)
|
||||||
|
"")
|
||||||
|
(user-id
|
||||||
|
(user-and-group-id #f)
|
||||||
"")
|
"")
|
||||||
(shepherd-provision
|
(shepherd-provision
|
||||||
(list-of-symbols '(prometheus))
|
(list-of-symbols '(prometheus))
|
||||||
@@ -368,11 +396,16 @@
|
|||||||
""))
|
""))
|
||||||
|
|
||||||
(define prometheus-account
|
(define prometheus-account
|
||||||
(lambda _
|
(match-record-lambda <prometheus-configuration>
|
||||||
(list (user-group (name "prometheus") (system? #t))
|
(group-id user-id)
|
||||||
|
(list (user-group
|
||||||
|
(name "prometheus")
|
||||||
|
(id group-id)
|
||||||
|
(system? #t))
|
||||||
(user-account
|
(user-account
|
||||||
(name "prometheus")
|
(name "prometheus")
|
||||||
(group "prometheus")
|
(group "prometheus")
|
||||||
|
(uid user-id)
|
||||||
(system? #t)
|
(system? #t)
|
||||||
(comment "Prometheus user")
|
(comment "Prometheus user")
|
||||||
(home-directory "/var/lib/prometheus")))))
|
(home-directory "/var/lib/prometheus")))))
|
||||||
@@ -392,15 +425,9 @@
|
|||||||
(match-record-lambda <prometheus-configuration>
|
(match-record-lambda <prometheus-configuration>
|
||||||
(prometheus listen-address config shepherd-provision shepherd-requirement auto-start?)
|
(prometheus listen-address config shepherd-provision shepherd-requirement auto-start?)
|
||||||
(let ((config-file
|
(let ((config-file
|
||||||
(computed-file "prometheus.yml"
|
(if (file-config? config)
|
||||||
(with-extensions (list guile-yamlpp)
|
(yaml-file "prometheus.yml" config)
|
||||||
#~(begin
|
config)))
|
||||||
(use-modules (yamlpp))
|
|
||||||
(call-with-output-file #$output
|
|
||||||
(lambda (port)
|
|
||||||
(let ((emitter (make-yaml-emitter)))
|
|
||||||
(yaml-emit! emitter '#$config)
|
|
||||||
(display (yaml-emitter-string emitter) port)))))))))
|
|
||||||
(list (shepherd-service
|
(list (shepherd-service
|
||||||
(provision shepherd-provision)
|
(provision shepherd-provision)
|
||||||
(requirement `(loopback user-processes ,@shepherd-requirement))
|
(requirement `(loopback user-processes ,@shepherd-requirement))
|
||||||
|
|||||||
@@ -1,45 +1,118 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2023 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2023 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal services networking)
|
(define-module (rosenthal services networking)
|
||||||
#:use-module (srfi srfi-1)
|
;; Guile builtins
|
||||||
#:use-module (ice-9 match)
|
#:use-module (ice-9 match)
|
||||||
|
#:use-module (srfi srfi-1)
|
||||||
|
#:use-module (srfi srfi-26)
|
||||||
|
;; Utilities
|
||||||
|
#:use-module (guix diagnostics)
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix i18n)
|
||||||
#:use-module (guix records)
|
#:use-module (guix records)
|
||||||
#:use-module (gnu packages linux)
|
#:use-module (rosenthal utils predicates)
|
||||||
#:use-module (gnu packages networking)
|
;; Guix System
|
||||||
#:use-module (rosenthal packages networking)
|
#:use-module (gnu system shadow)
|
||||||
|
;; Guix System - services
|
||||||
#:use-module (gnu services)
|
#:use-module (gnu services)
|
||||||
#:use-module (gnu services admin)
|
#:use-module (gnu services admin)
|
||||||
#:use-module (gnu services configuration)
|
#:use-module (gnu services configuration)
|
||||||
#:use-module (gnu services dbus)
|
#:use-module (gnu services dbus)
|
||||||
#:use-module (gnu services shepherd)
|
#:use-module (gnu services shepherd)
|
||||||
#:use-module (gnu system shadow)
|
;; Guix Home - services
|
||||||
#:export (sing-box-service-type
|
#:use-module (gnu home services)
|
||||||
|
#:use-module (gnu home services shepherd)
|
||||||
|
;; Guix packages
|
||||||
|
#:use-module (gnu packages admin)
|
||||||
|
#:use-module (gnu packages base)
|
||||||
|
#:use-module (gnu packages bash)
|
||||||
|
#:use-module (gnu packages linux)
|
||||||
|
#:use-module (gnu packages networking)
|
||||||
|
#:use-module (rosenthal packages networking)
|
||||||
|
#:export (network-online-service-type
|
||||||
|
home-network-online-service-type
|
||||||
|
|
||||||
|
sing-box-service-type
|
||||||
sing-box-configuration
|
sing-box-configuration
|
||||||
|
|
||||||
tailscale-configuration
|
tailscale-configuration
|
||||||
tailscale-service-type))
|
tailscale-service-type))
|
||||||
|
|
||||||
|
|
||||||
|
;;;
|
||||||
|
;;; network-online (https://codeberg.org/guix/guix/issues/838#issue-1886438)
|
||||||
|
;;;
|
||||||
|
|
||||||
|
(define* (%network-online-shepherd _ #:key home-service?)
|
||||||
|
(list (shepherd-service
|
||||||
|
(requirement (if home-service? '() '(networking)))
|
||||||
|
(provision '(network-online))
|
||||||
|
(documentation "Wait for the network to come up.")
|
||||||
|
(one-shot? #t)
|
||||||
|
(start
|
||||||
|
#~(lambda _
|
||||||
|
(let ((timeout #$(file-append coreutils-minimal "/bin/timeout"))
|
||||||
|
(sleep #$(file-append coreutils-minimal "/bin/sleep"))
|
||||||
|
(sh #$(file-append bash-minimal "/bin/sh"))
|
||||||
|
(ping (if #$home-service?
|
||||||
|
"ping"
|
||||||
|
#$(file-append inetutils "/bin/ping"))))
|
||||||
|
(zero?
|
||||||
|
(system* timeout "60" sh "-c"
|
||||||
|
(format #f "\
|
||||||
|
until ~a -qc1 -W1 example.org
|
||||||
|
do
|
||||||
|
~a 1
|
||||||
|
done"
|
||||||
|
ping
|
||||||
|
sleep)))))))))
|
||||||
|
|
||||||
|
(define network-online-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'network-online)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension shepherd-root-service-type
|
||||||
|
%network-online-shepherd)))
|
||||||
|
(default-value #f)
|
||||||
|
(description "Wait for the network to come up.")))
|
||||||
|
|
||||||
|
(define home-network-online-service-type
|
||||||
|
(service-type
|
||||||
|
(inherit network-online-service-type)
|
||||||
|
(name 'home-network-online)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension home-shepherd-service-type
|
||||||
|
(cut %network-online-shepherd <> #:home-service? #t))))))
|
||||||
|
|
||||||
|
(define-service-type-mapping
|
||||||
|
network-online-service-type => home-network-online-service-type)
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;;; sing-box
|
;;; sing-box
|
||||||
;;;
|
;;;
|
||||||
|
|
||||||
(define (file-object? val)
|
(define-maybe file-object)
|
||||||
(or (string? val)
|
(define-maybe string)
|
||||||
(file-like? val)))
|
|
||||||
|
|
||||||
(define-configuration/no-serialization sing-box-configuration
|
(define-configuration/no-serialization sing-box-configuration
|
||||||
(sing-box
|
(sing-box
|
||||||
(file-like sing-box)
|
(file-like sing-box)
|
||||||
"")
|
"")
|
||||||
(config-file
|
(config-file
|
||||||
file-object
|
maybe-file-object
|
||||||
|
"")
|
||||||
|
(config-directory
|
||||||
|
maybe-string
|
||||||
"")
|
"")
|
||||||
(data-directory
|
(data-directory
|
||||||
(string "/var/lib/sing-box")
|
(string "/var/lib/sing-box")
|
||||||
"")
|
"")
|
||||||
|
;; Account
|
||||||
|
(group-id
|
||||||
|
(user-and-group-id #f)
|
||||||
|
"")
|
||||||
;; Shepherd
|
;; Shepherd
|
||||||
(shepherd-provision
|
(shepherd-provision
|
||||||
(list-of-symbols '(sing-box))
|
(list-of-symbols '(sing-box))
|
||||||
@@ -55,7 +128,12 @@
|
|||||||
""))
|
""))
|
||||||
|
|
||||||
(define sing-box-account
|
(define sing-box-account
|
||||||
(list (user-group (name "sing-box") (system? #t))))
|
(match-record-lambda <sing-box-configuration>
|
||||||
|
(group-id)
|
||||||
|
(list (user-group
|
||||||
|
(name "sing-box")
|
||||||
|
(id group-id)
|
||||||
|
(system? #t)))))
|
||||||
|
|
||||||
(define sing-box-activation
|
(define sing-box-activation
|
||||||
(match-record-lambda <sing-box-configuration>
|
(match-record-lambda <sing-box-configuration>
|
||||||
@@ -66,34 +144,44 @@
|
|||||||
|
|
||||||
(define sing-box-shepherd-service
|
(define sing-box-shepherd-service
|
||||||
(match-record-lambda <sing-box-configuration>
|
(match-record-lambda <sing-box-configuration>
|
||||||
(sing-box data-directory config-file
|
(sing-box data-directory config-file config-directory
|
||||||
shepherd-provision shepherd-requirement log-file auto-start?)
|
shepherd-provision shepherd-requirement log-file auto-start?)
|
||||||
(list (shepherd-service
|
(let ((config-file-set? (maybe-value-set? config-file))
|
||||||
(provision shepherd-provision)
|
(config-dir-set? (maybe-value-set? config-directory)))
|
||||||
(requirement `(user-processes ,@shepherd-requirement))
|
(when (eqv? config-file-set? config-dir-set?)
|
||||||
(start
|
(leave (G_ "'~a': exactly one of '~a' or '~a' must be set~%")
|
||||||
#~(make-forkexec-constructor
|
"sing-box-configuration"
|
||||||
(list #$(file-append sing-box "/bin/sing-box")
|
"config-file"
|
||||||
"--config" #$config-file
|
"config-directory"))
|
||||||
"--directory" #$data-directory
|
(list (shepherd-service
|
||||||
"--disable-color"
|
(provision shepherd-provision)
|
||||||
"run")
|
(requirement `(user-processes ,@shepherd-requirement))
|
||||||
#:log-file #$log-file))
|
(start
|
||||||
(stop #~(make-kill-destructor))
|
#~(make-forkexec-constructor
|
||||||
(auto-start? auto-start?)))))
|
(list #$(file-append sing-box "/bin/sing-box")
|
||||||
|
#$@(if config-file-set?
|
||||||
|
(list "--config" config-file)
|
||||||
|
'())
|
||||||
|
#$@(if config-dir-set?
|
||||||
|
(list "--config-directory" config-directory)
|
||||||
|
'())
|
||||||
|
"--directory" #$data-directory
|
||||||
|
"--disable-color"
|
||||||
|
"run")
|
||||||
|
#:log-file #$log-file))
|
||||||
|
(stop #~(make-kill-destructor))
|
||||||
|
(auto-start? auto-start?))))))
|
||||||
|
|
||||||
(define sing-box-service-type
|
(define sing-box-service-type
|
||||||
(service-type
|
(service-type
|
||||||
(name 'sing-box)
|
(name 'sing-box)
|
||||||
(extensions
|
(extensions
|
||||||
(list (service-extension account-service-type
|
(list (service-extension account-service-type
|
||||||
(const sing-box-account))
|
sing-box-account)
|
||||||
(service-extension activation-service-type
|
(service-extension activation-service-type
|
||||||
sing-box-activation)
|
sing-box-activation)
|
||||||
(service-extension shepherd-root-service-type
|
(service-extension shepherd-root-service-type
|
||||||
sing-box-shepherd-service)
|
sing-box-shepherd-service)))
|
||||||
(service-extension log-rotation-service-type
|
|
||||||
(compose list sing-box-configuration-log-file))))
|
|
||||||
(description "")))
|
(description "")))
|
||||||
|
|
||||||
|
|
||||||
@@ -164,8 +252,6 @@ to #f.")
|
|||||||
(list (service-extension shepherd-root-service-type
|
(list (service-extension shepherd-root-service-type
|
||||||
tailscale-shepherd-service)
|
tailscale-shepherd-service)
|
||||||
(service-extension profile-service-type
|
(service-extension profile-service-type
|
||||||
(compose list tailscale-configuration-tailscale))
|
(compose list tailscale-configuration-tailscale))))
|
||||||
(service-extension log-rotation-service-type
|
|
||||||
(compose list tailscale-configuration-log-file))))
|
|
||||||
(default-value (tailscale-configuration))
|
(default-value (tailscale-configuration))
|
||||||
(description "Run tailscaled.")))
|
(description "Run tailscaled.")))
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2026 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
|
(define-module (rosenthal services nix)
|
||||||
|
;; Utilities
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
;; Guix System
|
||||||
|
#:use-module (gnu system pam)
|
||||||
|
;; Guix System - services
|
||||||
|
#:use-module (gnu services)
|
||||||
|
#:use-module (gnu services shepherd)
|
||||||
|
;; Guix Home - services
|
||||||
|
#:use-module (gnu home services)
|
||||||
|
#:use-module (gnu home services shells)
|
||||||
|
#:use-module (gnu home services shepherd)
|
||||||
|
;; Guix packages
|
||||||
|
#:autoload (gnu packages package-management) (guix)
|
||||||
|
#:export (nix-search-paths-service-type
|
||||||
|
home-nix-search-paths-service-type))
|
||||||
|
|
||||||
|
(define (nix-search-paths-activation config)
|
||||||
|
(with-imported-modules '((guix build utils))
|
||||||
|
#~(begin
|
||||||
|
(use-modules (guix build utils))
|
||||||
|
(mkdir-p (dirname #$config)))))
|
||||||
|
|
||||||
|
(define (nix-search-paths-environment-extension config)
|
||||||
|
`(("LOCALE_ARCHIVE" . ,(in-vicinity config "lib/locale/locale-archive"))))
|
||||||
|
|
||||||
|
(define* (nix-search-paths-shepherd-extension #:key home?)
|
||||||
|
(lambda (config)
|
||||||
|
(list (shepherd-service
|
||||||
|
(documentation
|
||||||
|
"Build Nix profile and symlink it to the specified path.")
|
||||||
|
(requirement
|
||||||
|
(if home?
|
||||||
|
'()
|
||||||
|
'(user-processes nix-daemon networking)))
|
||||||
|
(provision '(build-nix-profile))
|
||||||
|
(one-shot? #t)
|
||||||
|
(start
|
||||||
|
#~(make-forkexec-constructor
|
||||||
|
(list #$(if home?
|
||||||
|
"build-nix-profile"
|
||||||
|
"/run/current-system/profile/bin/build-nix-profile")
|
||||||
|
#$config)))))))
|
||||||
|
|
||||||
|
;; TODO: Avoid duplicating search paths from the system profile.
|
||||||
|
(define* (nix-search-paths-profile-extension #:key home?)
|
||||||
|
(lambda (config)
|
||||||
|
(list (mixed-text-file "nix-search-paths.sh" "\
|
||||||
|
eval \"$(" guix "/bin/guix package --search-paths=suffix"
|
||||||
|
" -p " (if home?
|
||||||
|
"~/.guix-home/profile"
|
||||||
|
"/run/current-system/profile")
|
||||||
|
" -p " config ")\""))))
|
||||||
|
|
||||||
|
(define nix-search-paths-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'nix-search-paths)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension session-environment-service-type
|
||||||
|
nix-search-paths-environment-extension)
|
||||||
|
(service-extension activation-service-type
|
||||||
|
nix-search-paths-activation)
|
||||||
|
(service-extension shepherd-root-service-type
|
||||||
|
(nix-search-paths-shepherd-extension))
|
||||||
|
(service-extension etc-profile-d-service-type
|
||||||
|
(nix-search-paths-profile-extension))))
|
||||||
|
(default-value "/nix/var/nix/profiles/guix-system-nix-profile")
|
||||||
|
(description "Set up search paths for @code{with-nix-profile}.")))
|
||||||
|
|
||||||
|
(define home-nix-search-paths-service-type
|
||||||
|
(service-type
|
||||||
|
(inherit nix-search-paths-service-type)
|
||||||
|
(name 'home-nix-search-paths)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension home-environment-variables-service-type
|
||||||
|
nix-search-paths-environment-extension)
|
||||||
|
(service-extension home-activation-service-type
|
||||||
|
nix-search-paths-activation)
|
||||||
|
(service-extension home-shepherd-service-type
|
||||||
|
(nix-search-paths-shepherd-extension #:home? #t))
|
||||||
|
(service-extension home-shell-profile-service-type
|
||||||
|
(nix-search-paths-profile-extension #:home? #t))))
|
||||||
|
(default-value "/var/tmp/guix-home-nix-profile")))
|
||||||
|
|
||||||
|
(define-service-type-mapping
|
||||||
|
nix-search-paths-service-type => home-nix-search-paths-service-type)
|
||||||
@@ -1,31 +1,36 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal services shellutils)
|
(define-module (rosenthal services shellutils)
|
||||||
|
;; Guile builtins
|
||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
#:use-module (srfi srfi-26)
|
#:use-module (srfi srfi-26)
|
||||||
|
;; Utilities
|
||||||
#:use-module (guix deprecation)
|
#:use-module (guix deprecation)
|
||||||
#:use-module (guix diagnostics)
|
#:use-module (guix diagnostics)
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix i18n)
|
#:use-module (guix i18n)
|
||||||
#:use-module (guix records)
|
#:use-module (guix records)
|
||||||
#:use-module (rosenthal utils packages)
|
#:use-module (rosenthal utils packages)
|
||||||
|
#:use-module (rosenthal utils records)
|
||||||
|
;; Guix System - services
|
||||||
#:use-module (gnu services)
|
#:use-module (gnu services)
|
||||||
#:use-module (gnu services configuration)
|
#:use-module (gnu services configuration)
|
||||||
|
;; Guix Home - services
|
||||||
#:use-module (gnu home services shells)
|
#:use-module (gnu home services shells)
|
||||||
|
;; Guix packages
|
||||||
#:use-module (rosenthal packages rust-apps)
|
#:use-module (gnu packages rust-apps)
|
||||||
|
#:use-module (gnu packages shellutils)
|
||||||
|
#:use-module (rosenthal packages shellutils)
|
||||||
#:export (home-fish-plugin-atuin-service-type
|
#:export (home-fish-plugin-atuin-service-type
|
||||||
home-atuin-configuration
|
home-atuin-configuration
|
||||||
|
|
||||||
home-fish-plugin-direnv-service-type
|
home-fish-plugin-direnv-service-type
|
||||||
home-direnv-configuration
|
home-direnv-configuration
|
||||||
|
|
||||||
|
home-fish-plugin-stinkpot-service-type
|
||||||
|
home-stinkpot-configuration
|
||||||
|
|
||||||
home-fish-plugin-zoxide-service-type
|
home-fish-plugin-zoxide-service-type
|
||||||
home-zoxide-configuration))
|
home-zoxide-configuration))
|
||||||
|
|
||||||
@@ -53,12 +58,15 @@
|
|||||||
(atuin)
|
(atuin)
|
||||||
(home-fish-extension
|
(home-fish-extension
|
||||||
(config
|
(config
|
||||||
(list (mixed-text-file "atuin.fish"
|
(list (mixed-text-file "atuin.fish" "\
|
||||||
atuin "/bin/atuin init fish | source\n"))))))
|
status is-interactive
|
||||||
|
and begin
|
||||||
|
" atuin "/bin/atuin init fish | source
|
||||||
|
end\n"))))))
|
||||||
|
|
||||||
(define home-fish-plugin-atuin-service-type
|
(define home-fish-plugin-atuin-service-type
|
||||||
(service-type
|
(service-type
|
||||||
(name 'atuin)
|
(name 'home-atuin)
|
||||||
(extensions
|
(extensions
|
||||||
(list (service-extension home-fish-service-type
|
(list (service-extension home-fish-service-type
|
||||||
%home-atuin-fish)))
|
%home-atuin-fish)))
|
||||||
@@ -75,7 +83,7 @@
|
|||||||
|
|
||||||
(define-configuration/no-serialization home-direnv-configuration
|
(define-configuration/no-serialization home-direnv-configuration
|
||||||
(direnv
|
(direnv
|
||||||
(file-like (spec->pkg "direnv"))
|
(file-like direnv)
|
||||||
"")
|
"")
|
||||||
(shells
|
(shells
|
||||||
list
|
list
|
||||||
@@ -87,12 +95,15 @@
|
|||||||
(direnv)
|
(direnv)
|
||||||
(home-fish-extension
|
(home-fish-extension
|
||||||
(config
|
(config
|
||||||
(list (mixed-text-file "direnv.fish"
|
(list (mixed-text-file "direnv.fish" "\
|
||||||
direnv "/bin/direnv hook fish | source\n"))))))
|
status is-interactive
|
||||||
|
and begin
|
||||||
|
" direnv "/bin/direnv hook fish | source
|
||||||
|
end\n"))))))
|
||||||
|
|
||||||
(define home-fish-plugin-direnv-service-type
|
(define home-fish-plugin-direnv-service-type
|
||||||
(service-type
|
(service-type
|
||||||
(name 'direnv)
|
(name 'home-direnv)
|
||||||
(extensions
|
(extensions
|
||||||
(list (service-extension home-fish-service-type
|
(list (service-extension home-fish-service-type
|
||||||
%home-direnv-fish)))
|
%home-direnv-fish)))
|
||||||
@@ -102,6 +113,41 @@
|
|||||||
(define-deprecated/public-alias home-direnv-service-type
|
(define-deprecated/public-alias home-direnv-service-type
|
||||||
home-fish-plugin-direnv-service-type)
|
home-fish-plugin-direnv-service-type)
|
||||||
|
|
||||||
|
|
||||||
|
;;;
|
||||||
|
;;; stinkpot
|
||||||
|
;;;
|
||||||
|
|
||||||
|
(define-record-type/dolly <home-stinkpot-configuration>
|
||||||
|
home-stinkpot-configuration
|
||||||
|
make-home-stinkpot-configuration
|
||||||
|
home-stinkpot-configuration?
|
||||||
|
this-home-stinkpot-configuration
|
||||||
|
(stinkpot
|
||||||
|
home-stinkpot-configuration-stinkpot
|
||||||
|
(default stinkpot)
|
||||||
|
(contract file-like?)))
|
||||||
|
|
||||||
|
(define home-stinkpot-fish-service
|
||||||
|
(match-record-lambda/dolly <home-stinkpot-configuration>
|
||||||
|
(stinkpot)
|
||||||
|
(home-fish-extension
|
||||||
|
(config
|
||||||
|
(list (mixed-text-file "stinkpot.fish" "\
|
||||||
|
status is-interactive
|
||||||
|
and begin
|
||||||
|
" stinkpot "/bin/stinkpot init fish | source
|
||||||
|
end\n"))))))
|
||||||
|
|
||||||
|
(define home-fish-plugin-stinkpot-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'home-stinkpot)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension home-fish-service-type
|
||||||
|
home-stinkpot-fish-service)))
|
||||||
|
(default-value (home-stinkpot-configuration))
|
||||||
|
(description "Set up @command{stinkpot} for Fish shell.")))
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;;; zoxide
|
;;; zoxide
|
||||||
@@ -109,7 +155,7 @@
|
|||||||
|
|
||||||
(define-configuration/no-serialization home-zoxide-configuration
|
(define-configuration/no-serialization home-zoxide-configuration
|
||||||
(zoxide
|
(zoxide
|
||||||
(file-like (spec->pkg "zoxide"))
|
(file-like zoxide)
|
||||||
"")
|
"")
|
||||||
(shells
|
(shells
|
||||||
list
|
list
|
||||||
@@ -121,12 +167,15 @@
|
|||||||
(zoxide)
|
(zoxide)
|
||||||
(home-fish-extension
|
(home-fish-extension
|
||||||
(config
|
(config
|
||||||
(list (mixed-text-file "zoxide.fish"
|
(list (mixed-text-file "zoxide.fish" "\
|
||||||
zoxide "/bin/zoxide init --cmd cd fish | source\n"))))))
|
status is-interactive
|
||||||
|
and begin
|
||||||
|
" zoxide "/bin/zoxide init --cmd cd fish | source
|
||||||
|
end\n"))))))
|
||||||
|
|
||||||
(define home-fish-plugin-zoxide-service-type
|
(define home-fish-plugin-zoxide-service-type
|
||||||
(service-type
|
(service-type
|
||||||
(name 'zoxide)
|
(name 'home-zoxide)
|
||||||
(extensions
|
(extensions
|
||||||
(list (service-extension home-fish-service-type
|
(list (service-extension home-fish-service-type
|
||||||
%home-zoxide-fish)))
|
%home-zoxide-fish)))
|
||||||
|
|||||||
+610
-268
File diff suppressed because it is too large.
Load diff
@@ -1,9 +1,10 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal utils cargo)
|
(define-module (rosenthal utils cargo)
|
||||||
|
;; Guile builtins
|
||||||
#:use-module (srfi srfi-26)
|
#:use-module (srfi srfi-26)
|
||||||
|
;; Guix build systems
|
||||||
#:use-module (guix build-system cargo)
|
#:use-module (guix build-system cargo)
|
||||||
#:export (rosenthal-cargo-inputs))
|
#:export (rosenthal-cargo-inputs))
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,97 @@
|
|||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2026 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
|
(define-module (rosenthal utils contract)
|
||||||
|
#:use-module (ice-9 match)
|
||||||
|
#:use-module (srfi srfi-1)
|
||||||
|
#:use-module (srfi srfi-26)
|
||||||
|
#:use-module (guix colors)
|
||||||
|
#:use-module (guix diagnostics)
|
||||||
|
#:use-module (rosenthal utils contract impl)
|
||||||
|
#:use-module (rosenthal utils contract blame)
|
||||||
|
#:use-module (rosenthal utils contract combinators)
|
||||||
|
#:export (apply-contract/guix-record-field
|
||||||
|
contract
|
||||||
|
define/contract))
|
||||||
|
|
||||||
|
#|
|
||||||
|
|
||||||
|
Helpers to attach contracts to values and functions.
|
||||||
|
|
||||||
|
See (rosenthal utils contract impl) for more information.
|
||||||
|
|
||||||
|
|#
|
||||||
|
|
||||||
|
(define (src->location-str src)
|
||||||
|
(match src
|
||||||
|
((_ _ _)
|
||||||
|
(let ((location (source-properties->location src)))
|
||||||
|
(if (supports-hyperlinks? (guix-warning-port))
|
||||||
|
(location->hyperlink location)
|
||||||
|
(location->string location))))
|
||||||
|
(_ #f)))
|
||||||
|
|
||||||
|
(define* (apply-contract contract value positive negative name location
|
||||||
|
#:key context-limit)
|
||||||
|
(let* ((ctc (->contract contract))
|
||||||
|
(ctc-name (contract-name ctc))
|
||||||
|
(checker (contract-checker ctc))
|
||||||
|
(blame
|
||||||
|
(make-blame*
|
||||||
|
#:source location
|
||||||
|
#:value name
|
||||||
|
#:build-name (lambda () ctc-name)
|
||||||
|
#:positive positive
|
||||||
|
#:negative #f
|
||||||
|
#:original? #t
|
||||||
|
#:context-limit context-limit)))
|
||||||
|
(cond
|
||||||
|
(checker
|
||||||
|
(if (checker value)
|
||||||
|
value
|
||||||
|
(raise-blame-error
|
||||||
|
blame #:missing-party negative
|
||||||
|
`(expected: "~a" got: "~s") ctc-name value)))
|
||||||
|
(else
|
||||||
|
(((contract-enforcer ctc) blame) value negative)))))
|
||||||
|
|
||||||
|
(define-syntax apply-contract/guix-record-field
|
||||||
|
(lambda (stx)
|
||||||
|
(syntax-case stx ()
|
||||||
|
((_ ctc value record-name field-name)
|
||||||
|
(with-syntax ((field-name #'(format #f "(field: ~a)" field-name))
|
||||||
|
(location (src->location-str (syntax-source stx))))
|
||||||
|
;; Use field-name for both positive and negative parties, to ensure the
|
||||||
|
;; error message is always "contract violation".
|
||||||
|
#'(apply-contract ctc value field-name field-name record-name location))))))
|
||||||
|
|
||||||
|
(define-syntax contract
|
||||||
|
(lambda (stx)
|
||||||
|
(syntax-case stx ()
|
||||||
|
((_ ctc value positive negative name location #:context-limit context-limit)
|
||||||
|
#'(apply-contract ctc value positive negative name location #:context-limit context-limit))
|
||||||
|
((_ ctc value positive negative name location)
|
||||||
|
#'(contract ctc value positive negative name location #:context-limit #f))
|
||||||
|
((_ ctc value positive negative name)
|
||||||
|
(with-syntax ((location (src->location-str (syntax-source stx))))
|
||||||
|
#'(contract ctc value positive negative name location)))
|
||||||
|
((_ ctc value positive negative)
|
||||||
|
#'(contract ctc value positive negative positive))
|
||||||
|
((_ ctc value)
|
||||||
|
#'(contract ctc value 'unknown-definition 'caller)))))
|
||||||
|
|
||||||
|
(define-syntax define/contract
|
||||||
|
(lambda (stx)
|
||||||
|
(syntax-case stx ()
|
||||||
|
((_ (name . args) ctc body ...)
|
||||||
|
(if (null? #'(body ...))
|
||||||
|
(syntax-violation 'define/contract "missing body" stx)
|
||||||
|
(with-syntax ((value #'(lambda* args body ...)))
|
||||||
|
#'(define name
|
||||||
|
(contract ctc value '(definition: name) 'caller 'name)))))
|
||||||
|
((_ name ctc body ...)
|
||||||
|
(if (null? #'(body ...))
|
||||||
|
(syntax-violation 'define/contract "missing body" stx)
|
||||||
|
(with-syntax ((value #'(begin body ...)))
|
||||||
|
#'(define name
|
||||||
|
(contract ctc value '(definition: name) 'caller 'name))))))))
|
||||||
@@ -0,0 +1,704 @@
|
|||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2026 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
|
;;; https://github.com/racket/racket/blob/master/racket/collects/racket/contract/private/blame.rkt
|
||||||
|
;;; Copyright © 2010-2019, 2021, 2024 Racket authors
|
||||||
|
;;; Ported from Racket, original copyright notice below:
|
||||||
|
;;;
|
||||||
|
;;; Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
;;; of this software and associated documentation files (the "Software"), to
|
||||||
|
;;; deal in the Software without restriction, including without limitation the
|
||||||
|
;;; rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
;;; sell copies of the Software, and to permit persons to whom the Software is
|
||||||
|
;;; furnished to do so, subject to the following conditions:
|
||||||
|
;;;
|
||||||
|
;;; The above copyright notice and this permission notice shall be included in
|
||||||
|
;;; all copies or substantial portions of the Software.
|
||||||
|
;;;
|
||||||
|
;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
;;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
;;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
;;; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
;;; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
;;; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||||
|
;;; IN THE SOFTWARE.
|
||||||
|
|
||||||
|
(define-module (rosenthal utils contract blame)
|
||||||
|
#:use-module (ice-9 format)
|
||||||
|
#:use-module (ice-9 match)
|
||||||
|
#:use-module (ice-9 regex)
|
||||||
|
#:use-module (ice-9 string-fun)
|
||||||
|
#:use-module (srfi srfi-1)
|
||||||
|
#:use-module (srfi srfi-9)
|
||||||
|
#:use-module (srfi srfi-26)
|
||||||
|
#:use-module (srfi srfi-34)
|
||||||
|
#:use-module (srfi srfi-35)
|
||||||
|
#:use-module (srfi srfi-71)
|
||||||
|
#:export (blame?
|
||||||
|
make-blame
|
||||||
|
blame-source
|
||||||
|
blame-positive
|
||||||
|
blame-negative
|
||||||
|
blame-contract
|
||||||
|
blame-value
|
||||||
|
blame-original?
|
||||||
|
blame-swapped?
|
||||||
|
blame-swap
|
||||||
|
blame-replace-negative ;used for indy blame
|
||||||
|
blame-replaced-negative? ;used for indy blame
|
||||||
|
blame-update ;used for option contract transfers
|
||||||
|
blame-add-context
|
||||||
|
;; blame-add-unknown-context
|
||||||
|
blame-context
|
||||||
|
blame-replaced-negative?
|
||||||
|
|
||||||
|
blame-add-missing-party
|
||||||
|
blame-missing-party?
|
||||||
|
;; blame-add-extra-field
|
||||||
|
|
||||||
|
raise-blame-error
|
||||||
|
;; current-blame-format
|
||||||
|
;; exn:fail:contract:blame
|
||||||
|
;; blame-fmt->-string
|
||||||
|
|
||||||
|
;; invariant-assertion-party
|
||||||
|
|
||||||
|
;; NOTE: New interfaces.
|
||||||
|
contract-violation?
|
||||||
|
make-blame*))
|
||||||
|
|
||||||
|
#|
|
||||||
|
|
||||||
|
Blame provides error reporting for the contract system. This module implements
|
||||||
|
its structure and APIs, and currently follows Racket error message conventions.
|
||||||
|
See also:
|
||||||
|
https://docs.racket-lang.org/reference/exns.html#(part._err-msg-conventions)
|
||||||
|
|
||||||
|
|
||||||
|
Blame has a linked structure of <blame> -> <blame> -> ... -> <all-the-info>.
|
||||||
|
|
||||||
|
<all-the-info> records contract information and each <blame> node adds extra
|
||||||
|
context to it. The extra context is combinator-specific (e.g. "the #1 element
|
||||||
|
of"). For higher-order functions, it also includes whether the positive party
|
||||||
|
and negative party are swapped.
|
||||||
|
|
||||||
|
|
||||||
|
The positive party provides a definition, and the negative party uses it. For
|
||||||
|
contracts on higher-order functions, both parties are swapped for function
|
||||||
|
arguments.
|
||||||
|
|
||||||
|
For example, consider the following definition:
|
||||||
|
|
||||||
|
(define/contract (example f)
|
||||||
|
(->/c (->/c number? number?) number?)
|
||||||
|
...)
|
||||||
|
|
||||||
|
The positive party and negative party for ‘example’ will be ‘example’ and
|
||||||
|
‘caller’, respectively.
|
||||||
|
|
||||||
|
‘f’ has a function contract ‘(->/c number? number?)’. As an argument of
|
||||||
|
‘example’, it initially gets ‘example’ for positive and ‘caller’ for negative.
|
||||||
|
|
||||||
|
However the definition of ‘f’ is provided by the caller, so both parties should
|
||||||
|
be swapped: ‘caller’ for positive, and ‘example’ for negative.
|
||||||
|
|
||||||
|
|##|
|
||||||
|
|
||||||
|
‘make-blame’ constructs a blame. (<blame> -> <all-the-info>)
|
||||||
|
|
||||||
|
(define b1
|
||||||
|
(make-blame*
|
||||||
|
#:source #f
|
||||||
|
#:value 'my-function
|
||||||
|
#:build-name (const "(listof/c (listof/c number?))")
|
||||||
|
#:positive 'my-function
|
||||||
|
#:negative 'caller
|
||||||
|
#:original? #t))
|
||||||
|
|
||||||
|
b1
|
||||||
|
=> #<<blame>
|
||||||
|
context-frame: #f
|
||||||
|
swapped?: #f
|
||||||
|
and-more: #<<all-the-info> ...>
|
||||||
|
(blame-swapped? b1)
|
||||||
|
=> #f
|
||||||
|
(blame-positive b1)
|
||||||
|
=> 'my-function
|
||||||
|
(blame-negative b1)
|
||||||
|
=> 'caller
|
||||||
|
(blame-context b1)
|
||||||
|
=> '()
|
||||||
|
(blame-contract b1)
|
||||||
|
=> "(listof/c (listof/c number?))"
|
||||||
|
|
||||||
|
‘blame-add-context’ adds a new head node with extra context. (<blame> -> ...)
|
||||||
|
|
||||||
|
(define b2
|
||||||
|
(blame-add-context b1 "an element of" #:swap? #t))
|
||||||
|
|
||||||
|
b2
|
||||||
|
=> #<<blame>
|
||||||
|
context-frame: "an element of"
|
||||||
|
swapped? #t
|
||||||
|
and-more: #<<blame>
|
||||||
|
context-frame: #f
|
||||||
|
swapped?: #f
|
||||||
|
and-more: #<<all-the-info> ...>>
|
||||||
|
(blame-swapped? b2)
|
||||||
|
=> #t
|
||||||
|
(blame-positive b2)
|
||||||
|
=> 'caller
|
||||||
|
(blame-negative b2)
|
||||||
|
=> 'my-function
|
||||||
|
(blame-context b2)
|
||||||
|
=> '("an element of")
|
||||||
|
(blame-contract b2)
|
||||||
|
=> "(listof/c (listof/c number?))"
|
||||||
|
|
||||||
|
(define b3
|
||||||
|
(blame-add-context b2 "the #1 element of" #:swap? #t))
|
||||||
|
|
||||||
|
b3
|
||||||
|
=> #<<blame>
|
||||||
|
context-frame: "the #1 element of"
|
||||||
|
swapped? #t
|
||||||
|
and-more: #<<blame>
|
||||||
|
context-frame: "an element of"
|
||||||
|
swapped? #t
|
||||||
|
and-more: #<<blame>
|
||||||
|
context-frame: #f
|
||||||
|
swapped?: #f
|
||||||
|
and-more: #<<all-the-info> ...>>
|
||||||
|
(blame-swapped? b3)
|
||||||
|
=> #f
|
||||||
|
(blame-positive b3)
|
||||||
|
=> 'my-function
|
||||||
|
(blame-negative b3)
|
||||||
|
=> 'caller
|
||||||
|
(blame-context b3)
|
||||||
|
=> '("the #1 element of" "an element of")
|
||||||
|
(blame-contract b3)
|
||||||
|
=> "(listof/c (listof/c number?))"
|
||||||
|
|
||||||
|
|#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(define-condition-type &contract-violation &message
|
||||||
|
contract-violation?)
|
||||||
|
|
||||||
|
(define-record-type <important>
|
||||||
|
(make-important name sense-swapped?)
|
||||||
|
important?
|
||||||
|
(name important-name) ; any/c
|
||||||
|
(sense-swapped? important-sense-swapped?)) ; boolean?
|
||||||
|
|
||||||
|
(define-record-type <all-the-info>
|
||||||
|
(make-all-the-info positive negative source value build-name important
|
||||||
|
missing-party? context-limit replaced-negative?)
|
||||||
|
all-the-info?
|
||||||
|
(positive all-the-info-positive) ; (or/c #f (listof/c any/c))
|
||||||
|
(negative all-the-info-negative) ; (or/c #f (listof/c any/c))
|
||||||
|
(source all-the-info-source) ; (or/c #f string?)
|
||||||
|
(value all-the-info-value) ; any/c
|
||||||
|
(build-name all-the-info-build-name) ; (->/c string?)
|
||||||
|
(important all-the-info-important) ; important?
|
||||||
|
(missing-party? all-the-info-missing-party?) ; boolean?
|
||||||
|
(context-limit all-the-info-context-limit) ; (or/c #f (and/c integer? (not/c negative?)))
|
||||||
|
(replaced-negative? all-the-info-replaced-negative?)) ; boolean?
|
||||||
|
|
||||||
|
(define (all-the-info-replace-positive all-the-info new-pos)
|
||||||
|
(make-all-the-info
|
||||||
|
(all-the-info-positive new-pos)
|
||||||
|
(all-the-info-negative all-the-info)
|
||||||
|
(all-the-info-source all-the-info)
|
||||||
|
(all-the-info-value all-the-info)
|
||||||
|
(all-the-info-build-name all-the-info)
|
||||||
|
(all-the-info-important all-the-info)
|
||||||
|
(all-the-info-missing-party? all-the-info)
|
||||||
|
(all-the-info-context-limit all-the-info)
|
||||||
|
(all-the-info-replaced-negative? all-the-info)))
|
||||||
|
|
||||||
|
(define (all-the-info-replace-negative all-the-info new-neg)
|
||||||
|
(make-all-the-info
|
||||||
|
(all-the-info-positive all-the-info)
|
||||||
|
(all-the-info-negative new-neg)
|
||||||
|
(all-the-info-source all-the-info)
|
||||||
|
(all-the-info-value all-the-info)
|
||||||
|
(all-the-info-build-name all-the-info)
|
||||||
|
(all-the-info-important all-the-info)
|
||||||
|
(all-the-info-missing-party? all-the-info)
|
||||||
|
(all-the-info-context-limit all-the-info)
|
||||||
|
(all-the-info-replaced-negative? all-the-info)))
|
||||||
|
|
||||||
|
(define-record-type <blame>
|
||||||
|
(%make-blame context-frame swapped? and-more)
|
||||||
|
blame?
|
||||||
|
(context-frame %blame-context-frame) ; (or/c #f string?)
|
||||||
|
(swapped? %blame-swapped?) ; boolean?
|
||||||
|
(and-more %blame-and-more)) ; (or/c blame? all-the-info?)
|
||||||
|
|
||||||
|
(define* (make-blame source value build-name positive negative original?
|
||||||
|
#:key (context-limit #f))
|
||||||
|
(define build/memo-name
|
||||||
|
(let ((name (delay (build-name))))
|
||||||
|
(lambda ()
|
||||||
|
(force name))))
|
||||||
|
|
||||||
|
(define all-the-info
|
||||||
|
(make-all-the-info
|
||||||
|
(and positive (list positive))
|
||||||
|
(and negative (list negative))
|
||||||
|
source
|
||||||
|
value
|
||||||
|
build/memo-name
|
||||||
|
#f
|
||||||
|
(not (and positive negative))
|
||||||
|
context-limit
|
||||||
|
#f))
|
||||||
|
|
||||||
|
(%make-blame
|
||||||
|
#f
|
||||||
|
(not original?)
|
||||||
|
all-the-info))
|
||||||
|
|
||||||
|
(define* (make-blame* #:key source value build-name positive negative original?
|
||||||
|
(context-limit #f))
|
||||||
|
(make-blame source value build-name positive negative original?
|
||||||
|
#:context-limit context-limit))
|
||||||
|
|
||||||
|
(define (blame->all-the-info blame)
|
||||||
|
(let loop ((b blame))
|
||||||
|
(if (blame? b)
|
||||||
|
(loop (%blame-and-more b))
|
||||||
|
b)))
|
||||||
|
|
||||||
|
(define blame-source
|
||||||
|
(compose all-the-info-source blame->all-the-info))
|
||||||
|
(define blame-value
|
||||||
|
(compose all-the-info-value blame->all-the-info))
|
||||||
|
(define (blame-contract blame)
|
||||||
|
((all-the-info-build-name (blame->all-the-info blame))))
|
||||||
|
(define blame-important
|
||||||
|
(compose all-the-info-important blame->all-the-info))
|
||||||
|
(define blame-missing-party?
|
||||||
|
(compose all-the-info-missing-party? blame->all-the-info))
|
||||||
|
(define blame-context-limit
|
||||||
|
(compose all-the-info-context-limit blame->all-the-info))
|
||||||
|
(define blame-replaced-negative?
|
||||||
|
(compose all-the-info-replaced-negative? blame->all-the-info))
|
||||||
|
|
||||||
|
(define (blame-get-info blame getter)
|
||||||
|
(let loop ((b blame)
|
||||||
|
(swapped? #f))
|
||||||
|
(if (blame? b)
|
||||||
|
(loop (%blame-and-more b)
|
||||||
|
(if (%blame-swapped? b)
|
||||||
|
(not swapped?)
|
||||||
|
swapped?))
|
||||||
|
(getter b swapped?))))
|
||||||
|
|
||||||
|
(define (blame-set-info blame setter)
|
||||||
|
(let loop ((b blame)
|
||||||
|
(swap? #f))
|
||||||
|
(if (blame? b)
|
||||||
|
(%make-blame
|
||||||
|
(%blame-context-frame b)
|
||||||
|
(%blame-swapped? b)
|
||||||
|
(loop (%blame-and-more b)
|
||||||
|
(if (%blame-swapped? b)
|
||||||
|
(not swap?)
|
||||||
|
swap?)))
|
||||||
|
(setter b swap?))))
|
||||||
|
|
||||||
|
(define (%blame-positive blame)
|
||||||
|
(blame-get-info
|
||||||
|
blame
|
||||||
|
(lambda (all-the-info swapped?)
|
||||||
|
(if swapped?
|
||||||
|
(all-the-info-negative all-the-info)
|
||||||
|
(all-the-info-positive all-the-info)))))
|
||||||
|
|
||||||
|
(define (%blame-negative blame)
|
||||||
|
(blame-get-info
|
||||||
|
blame
|
||||||
|
(lambda (all-the-info swapped?)
|
||||||
|
(if swapped?
|
||||||
|
(all-the-info-positive all-the-info)
|
||||||
|
(all-the-info-negative all-the-info)))))
|
||||||
|
|
||||||
|
(define (show-blame accessor blame)
|
||||||
|
(match (accessor blame)
|
||||||
|
((x) x)
|
||||||
|
(x x)))
|
||||||
|
(define blame-positive
|
||||||
|
(cut show-blame %blame-positive <>))
|
||||||
|
(define blame-negative
|
||||||
|
(cut show-blame %blame-negative <>))
|
||||||
|
|
||||||
|
(define (ensure-blame-known who blame)
|
||||||
|
(unless (and (%blame-positive blame)
|
||||||
|
(%blame-negative blame))
|
||||||
|
(error who "blame info is not known; positive ~s negative ~s"
|
||||||
|
(%blame-positive blame)
|
||||||
|
(%blame-negative blame))))
|
||||||
|
|
||||||
|
(define (blame-update blame extra-positive extra-negative)
|
||||||
|
(ensure-blame-known 'blame-update blame)
|
||||||
|
(blame-set-info
|
||||||
|
blame
|
||||||
|
(lambda (all-the-info swap?)
|
||||||
|
(if swap?
|
||||||
|
(make-all-the-info
|
||||||
|
(cons extra-negative
|
||||||
|
(all-the-info-positive all-the-info))
|
||||||
|
(cons extra-positive
|
||||||
|
(all-the-info-negative all-the-info))
|
||||||
|
(all-the-info-source all-the-info)
|
||||||
|
(all-the-info-value all-the-info)
|
||||||
|
(all-the-info-build-name all-the-info)
|
||||||
|
(all-the-info-important all-the-info)
|
||||||
|
(all-the-info-missing-party? all-the-info)
|
||||||
|
(all-the-info-context-limit all-the-info)
|
||||||
|
(all-the-info-replaced-negative? all-the-info))
|
||||||
|
(make-all-the-info
|
||||||
|
(cons extra-positive
|
||||||
|
(all-the-info-positive all-the-info))
|
||||||
|
(cons extra-negative
|
||||||
|
(all-the-info-negative all-the-info))
|
||||||
|
(all-the-info-source all-the-info)
|
||||||
|
(all-the-info-value all-the-info)
|
||||||
|
(all-the-info-build-name all-the-info)
|
||||||
|
(all-the-info-important all-the-info)
|
||||||
|
(all-the-info-missing-party? all-the-info)
|
||||||
|
(all-the-info-context-limit all-the-info)
|
||||||
|
(all-the-info-replaced-negative? all-the-info))))))
|
||||||
|
|
||||||
|
(define (blame-swap blame)
|
||||||
|
(%make-blame
|
||||||
|
(%blame-context-frame blame)
|
||||||
|
(not (%blame-swapped? blame))
|
||||||
|
(%blame-and-more blame)))
|
||||||
|
|
||||||
|
(define (blame-swapped? blame)
|
||||||
|
(blame-get-info
|
||||||
|
blame
|
||||||
|
(lambda (_ swapped?) swapped?)))
|
||||||
|
|
||||||
|
(define blame-original?
|
||||||
|
(negate blame-swapped?))
|
||||||
|
|
||||||
|
(define (blame/important-original? blame)
|
||||||
|
(let ((important (blame-important blame)))
|
||||||
|
(cond
|
||||||
|
((equal? (%blame-positive blame)
|
||||||
|
(%blame-negative blame))
|
||||||
|
#f)
|
||||||
|
(important
|
||||||
|
(equal? (important-sense-swapped? important)
|
||||||
|
(blame-original? blame)))
|
||||||
|
(else
|
||||||
|
(blame-original? blame)))))
|
||||||
|
|
||||||
|
(define (blame-replace-negative blame new-neg)
|
||||||
|
(blame-set-info
|
||||||
|
blame
|
||||||
|
(lambda (all-the-info swap?)
|
||||||
|
(if swap?
|
||||||
|
(all-the-info-replace-positive all-the-info new-neg)
|
||||||
|
(all-the-info-replace-negative all-the-info new-neg)))))
|
||||||
|
|
||||||
|
(define (blame-add-missing-party blame missing-party)
|
||||||
|
(if missing-party
|
||||||
|
(begin
|
||||||
|
(unless (blame-missing-party? blame)
|
||||||
|
(error 'blame-add-missing-party "already have the party: ~s; trying to add ~s"
|
||||||
|
(if (blame-swapped? blame)
|
||||||
|
(%blame-positive blame)
|
||||||
|
(%blame-negative blame))
|
||||||
|
missing-party))
|
||||||
|
(blame-set-info
|
||||||
|
blame
|
||||||
|
(lambda (all-the-info _)
|
||||||
|
(make-all-the-info
|
||||||
|
(or (all-the-info-positive all-the-info)
|
||||||
|
(list missing-party))
|
||||||
|
(or (all-the-info-negative all-the-info)
|
||||||
|
(list missing-party))
|
||||||
|
(all-the-info-source all-the-info)
|
||||||
|
(all-the-info-value all-the-info)
|
||||||
|
(all-the-info-build-name all-the-info)
|
||||||
|
(all-the-info-important all-the-info)
|
||||||
|
#f
|
||||||
|
(all-the-info-context-limit all-the-info)
|
||||||
|
(all-the-info-replaced-negative? all-the-info)))))
|
||||||
|
blame))
|
||||||
|
|
||||||
|
(define (blame-context blame)
|
||||||
|
(let loop ((top (%blame-context-frame blame))
|
||||||
|
(b (%blame-and-more blame)))
|
||||||
|
(cond
|
||||||
|
((all-the-info? b)
|
||||||
|
(if top
|
||||||
|
(list top)
|
||||||
|
'()))
|
||||||
|
(else
|
||||||
|
(cons top
|
||||||
|
(loop (%blame-context-frame b)
|
||||||
|
(%blame-and-more b)))))))
|
||||||
|
|
||||||
|
(define* (blame-add-context blame context #:key important swap?)
|
||||||
|
(let ((context-limit (blame-context-limit blame)))
|
||||||
|
(if context-limit
|
||||||
|
(cond
|
||||||
|
((not (zero? context-limit))
|
||||||
|
(let ((limited-blame
|
||||||
|
dropped-swap?
|
||||||
|
(drop-to-limit blame context-limit)))
|
||||||
|
(%make-blame
|
||||||
|
context
|
||||||
|
(not (equal? dropped-swap? swap?))
|
||||||
|
limited-blame)))
|
||||||
|
(swap?
|
||||||
|
(%make-blame
|
||||||
|
(%blame-context-frame blame)
|
||||||
|
(not (%blame-swapped? blame))
|
||||||
|
(%blame-and-more blame)))
|
||||||
|
(else blame))
|
||||||
|
(%make-blame
|
||||||
|
context
|
||||||
|
swap?
|
||||||
|
(if important
|
||||||
|
(let loop ((b blame))
|
||||||
|
(if (blame? b)
|
||||||
|
(%make-blame
|
||||||
|
(%blame-context-frame b)
|
||||||
|
(%blame-swapped? b)
|
||||||
|
(loop (%blame-and-more b)))
|
||||||
|
(make-all-the-info
|
||||||
|
(all-the-info-positive b)
|
||||||
|
(all-the-info-negative b)
|
||||||
|
(all-the-info-source b)
|
||||||
|
(all-the-info-value b)
|
||||||
|
(all-the-info-build-name b)
|
||||||
|
(make-important
|
||||||
|
important
|
||||||
|
(if swap?
|
||||||
|
(not (blame-original? b))
|
||||||
|
(blame-original? b)))
|
||||||
|
(all-the-info-missing-party? b)
|
||||||
|
(all-the-info-context-limit b)
|
||||||
|
(all-the-info-replaced-negative? b))))
|
||||||
|
blame)))))
|
||||||
|
|
||||||
|
(define (drop-to-limit blame context-limit)
|
||||||
|
(define short-enough?
|
||||||
|
(let loop ((b blame)
|
||||||
|
(n (- context-limit 1)))
|
||||||
|
(or (all-the-info? b)
|
||||||
|
(if (zero? n)
|
||||||
|
#f
|
||||||
|
(loop (%blame-and-more b)
|
||||||
|
(- n 1))))))
|
||||||
|
|
||||||
|
(if short-enough?
|
||||||
|
(values blame #f)
|
||||||
|
(let ()
|
||||||
|
(define swapped? #f)
|
||||||
|
(define limited-blame
|
||||||
|
(let outer-loop ((outer-b blame)
|
||||||
|
(n (- context-limit 1)))
|
||||||
|
(if (zero? n)
|
||||||
|
(let inner-loop ((inner-b outer-b)
|
||||||
|
(swap? #f))
|
||||||
|
(if (blame? inner-b)
|
||||||
|
(inner-loop (%blame-and-more inner-b)
|
||||||
|
(if (%blame-swapped? inner-b)
|
||||||
|
(not swap?)
|
||||||
|
swap?))
|
||||||
|
(begin
|
||||||
|
(set! swapped? swap?)
|
||||||
|
inner-b)))
|
||||||
|
(%make-blame
|
||||||
|
(%blame-context-frame outer-b)
|
||||||
|
(%blame-swapped? outer-b)
|
||||||
|
(outer-loop (%blame-and-more outer-b)
|
||||||
|
(- n 1))))))
|
||||||
|
(values limited-blame swapped?))))
|
||||||
|
|
||||||
|
(define* (raise-blame-error raw-blame #:optional x #:key (missing-party #f)
|
||||||
|
#:rest fmt+args)
|
||||||
|
(define blame
|
||||||
|
(if (and (blame-original? raw-blame)
|
||||||
|
(not missing-party))
|
||||||
|
raw-blame
|
||||||
|
(blame-add-missing-party raw-blame missing-party)))
|
||||||
|
|
||||||
|
(define start-of-message
|
||||||
|
(let ((self-or-not
|
||||||
|
(if (blame/important-original? blame)
|
||||||
|
"broke its own contract"
|
||||||
|
"contract violation")))
|
||||||
|
(cond
|
||||||
|
((blame-important blame)
|
||||||
|
(format #f "~a: ~a" (important-name (blame-important blame)) self-or-not))
|
||||||
|
((blame-value blame)
|
||||||
|
(format #f "~a: ~a" (blame-value blame) self-or-not))
|
||||||
|
(else
|
||||||
|
(format #f "~a" self-or-not)))))
|
||||||
|
|
||||||
|
(define custom-message
|
||||||
|
(let loop ((args fmt+args))
|
||||||
|
(match args
|
||||||
|
;; Keyword arguments will be added to #:rest as well, strip them.
|
||||||
|
(((? keyword? kw) arg . rest)
|
||||||
|
(loop rest))
|
||||||
|
((fmt . fmt-args)
|
||||||
|
;; When formatting outputs, please use ~s to mimic Racket ~e.
|
||||||
|
;;
|
||||||
|
;; XXX: ~s doesn't directly map to Racket ~e. With symbol 'x, ~s
|
||||||
|
;; gives ‘x’ but Racket ~e gives ‘'x’, for example.
|
||||||
|
(apply format #f (blame-fmt->string blame fmt) fmt-args)))))
|
||||||
|
|
||||||
|
(define context-lines
|
||||||
|
(let ((context (blame-context blame)))
|
||||||
|
(or (and context
|
||||||
|
(not (null? context))
|
||||||
|
(let loop ((ctx context)
|
||||||
|
(idx 0)
|
||||||
|
(res '()))
|
||||||
|
(if (null? ctx)
|
||||||
|
(reverse res)
|
||||||
|
(loop (cdr ctx)
|
||||||
|
(1+ idx)
|
||||||
|
(cons (if (zero? idx)
|
||||||
|
(format #f " in: ~a~%" (car ctx))
|
||||||
|
(format #f " ~a~%" (car ctx)))
|
||||||
|
res)))))
|
||||||
|
'())))
|
||||||
|
|
||||||
|
(define contract-line
|
||||||
|
(format #f " ~a ~a~%"
|
||||||
|
(if (null? context-lines) "in:" " ")
|
||||||
|
(blame-contract blame)))
|
||||||
|
|
||||||
|
(define from-line
|
||||||
|
(format #f " contract from: ~a~%"
|
||||||
|
(if (blame-original? blame)
|
||||||
|
(last (%blame-positive blame))
|
||||||
|
(last (%blame-negative blame)))))
|
||||||
|
|
||||||
|
(define on-line
|
||||||
|
(or (and (blame-important blame)
|
||||||
|
(blame-value blame)
|
||||||
|
(format #f " contract on: ~a~%" (blame-value blame)))
|
||||||
|
""))
|
||||||
|
|
||||||
|
(define blaming-line
|
||||||
|
(let ((blame-parties (%blame-positive blame)))
|
||||||
|
(match blame-parties
|
||||||
|
((one-party)
|
||||||
|
(format #f " blaming: ~a~%" one-party))
|
||||||
|
((multiple-parties ...)
|
||||||
|
(format #f " blaming multiple parties: ~{~a~%~}~%" multiple-parties)))))
|
||||||
|
|
||||||
|
(define assumption-line
|
||||||
|
" (assuming the contract is correct)")
|
||||||
|
|
||||||
|
(define at-line
|
||||||
|
(or (and=> (blame-source blame)
|
||||||
|
(cut format #f "~% at: ~a" <>))
|
||||||
|
""))
|
||||||
|
|
||||||
|
(raise
|
||||||
|
(condition
|
||||||
|
(&contract-violation
|
||||||
|
(message
|
||||||
|
(format #f "~%~a~a~{~a~}~a~a~a~a~a~a"
|
||||||
|
start-of-message
|
||||||
|
(if (string-null? custom-message) "~%" custom-message)
|
||||||
|
context-lines
|
||||||
|
contract-line
|
||||||
|
from-line
|
||||||
|
on-line
|
||||||
|
blaming-line
|
||||||
|
assumption-line
|
||||||
|
at-line))))))
|
||||||
|
|
||||||
|
(define (blame-fmt->string blame fmt)
|
||||||
|
(define original?
|
||||||
|
(blame/important-original? blame))
|
||||||
|
|
||||||
|
(define (tag->str+newline? key val)
|
||||||
|
(define* (kv->str key val)
|
||||||
|
(string-append key " " val))
|
||||||
|
|
||||||
|
(match key
|
||||||
|
;; Racket doesn't use ‘got’, but ‘expected’ vs ‘got’ sounds more natural
|
||||||
|
;; considering directions.
|
||||||
|
((or 'given: 'got:)
|
||||||
|
(values (kv->str (if original? "produced:" "given:") val)
|
||||||
|
#t))
|
||||||
|
((or 'given 'got)
|
||||||
|
(values (kv->str (if original? "produced" "given") val)
|
||||||
|
#f))
|
||||||
|
('expected:
|
||||||
|
(values (kv->str (if original? "promised:" "expected:") val)
|
||||||
|
#t))
|
||||||
|
('expected
|
||||||
|
(values (kv->str (if original? "promised" "expected") val)
|
||||||
|
#f))
|
||||||
|
('received:
|
||||||
|
(values (kv->str (if original? "supplied:" "received:") val)
|
||||||
|
#t))))
|
||||||
|
|
||||||
|
(define (normalize-continued-error-message str)
|
||||||
|
"If STR contains newline (unless at the end), ensure there's a space next to
|
||||||
|
it."
|
||||||
|
(define (not-space? x)
|
||||||
|
(not (equal? x #\space)))
|
||||||
|
|
||||||
|
(define str-newline-normalized
|
||||||
|
(string-replace-substring str "~%" "\n"))
|
||||||
|
|
||||||
|
(if (string-contains str-newline-normalized "\n")
|
||||||
|
(let loop ((chars (string->list str-newline-normalized))
|
||||||
|
(result '()))
|
||||||
|
(if (null? chars)
|
||||||
|
(list->string (reverse result))
|
||||||
|
(match chars
|
||||||
|
((#\newline (? not-space? next) . rest)
|
||||||
|
(loop rest
|
||||||
|
(append (reverse (list #\newline #\space next))
|
||||||
|
result)))
|
||||||
|
((first . rest)
|
||||||
|
(loop rest
|
||||||
|
(cons first result))))))
|
||||||
|
str-newline-normalized))
|
||||||
|
|
||||||
|
(define (build-string old new newline?)
|
||||||
|
(if newline?
|
||||||
|
(string-append old "\n " new)
|
||||||
|
(let ((old (if (string-null? old) ";\n" old))
|
||||||
|
(new (normalize-continued-error-message new)))
|
||||||
|
(if (or (string-suffix? " " old)
|
||||||
|
(string-match "^[\n ]" new))
|
||||||
|
(string-append old new)
|
||||||
|
(string-append old " " new)))))
|
||||||
|
|
||||||
|
(if (string? fmt)
|
||||||
|
fmt
|
||||||
|
(let loop ((strs fmt)
|
||||||
|
(result ""))
|
||||||
|
(if (null? strs)
|
||||||
|
(if (string-null? result)
|
||||||
|
result
|
||||||
|
(string-append result "\n"))
|
||||||
|
(match strs
|
||||||
|
(((? symbol? key) (? string? val) . rest)
|
||||||
|
(let ((str newline? (tag->str+newline? key val)))
|
||||||
|
(loop rest
|
||||||
|
(build-string result str newline?))))
|
||||||
|
((str . rest)
|
||||||
|
(loop rest
|
||||||
|
(build-string result str #f))))))))
|
||||||
@@ -0,0 +1,158 @@
|
|||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2026 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
|
(define-module (rosenthal utils contract combinators)
|
||||||
|
#:use-module (ice-9 match)
|
||||||
|
#:autoload (rnrs bytevectors) (bytevector?)
|
||||||
|
#:use-module (srfi srfi-1)
|
||||||
|
#:use-module (srfi srfi-26)
|
||||||
|
#:use-module (srfi srfi-34)
|
||||||
|
#:use-module (srfi srfi-35)
|
||||||
|
#:use-module (guix memoization)
|
||||||
|
#:use-module (rosenthal utils contract impl)
|
||||||
|
#:use-module (rosenthal utils contract blame)
|
||||||
|
#:export (any/c
|
||||||
|
none/c
|
||||||
|
or/c
|
||||||
|
listof/c
|
||||||
|
->/c
|
||||||
|
|
||||||
|
->contract))
|
||||||
|
|
||||||
|
#|
|
||||||
|
|
||||||
|
This module implements contract combinators. To avoid name collisions, all
|
||||||
|
combinator names have a ‘/c’ suffix.
|
||||||
|
|
||||||
|
|#
|
||||||
|
|
||||||
|
(define any/c
|
||||||
|
(make-contract
|
||||||
|
#:name "any/c"
|
||||||
|
#:checker (const #t)))
|
||||||
|
|
||||||
|
(define none/c
|
||||||
|
(make-contract
|
||||||
|
#:name "none/c"
|
||||||
|
#:checker (const #f)))
|
||||||
|
|
||||||
|
(define or/c
|
||||||
|
(memoize
|
||||||
|
(lambda (. ctcs)
|
||||||
|
(let* ((contracts (map ->contract ctcs))
|
||||||
|
(enforcers (map contract-enforcer contracts))
|
||||||
|
(name (compound-contract-name "or/c" contracts) ))
|
||||||
|
(make-contract
|
||||||
|
#:name name
|
||||||
|
#:enforcer
|
||||||
|
(lambda (blame)
|
||||||
|
(define procs
|
||||||
|
(map (lambda (enforcer)
|
||||||
|
(enforcer blame))
|
||||||
|
enforcers))
|
||||||
|
(lambda (val neg-party)
|
||||||
|
(let loop ((procs procs))
|
||||||
|
(if (null? procs)
|
||||||
|
(raise-blame-error blame #:missing-party neg-party
|
||||||
|
'(expected: "~a" got: "~s")
|
||||||
|
name val)
|
||||||
|
(match procs
|
||||||
|
((proc . rest)
|
||||||
|
(guard (c ((contract-violation? c)
|
||||||
|
(loop rest)))
|
||||||
|
(proc val neg-party)))))))))))))
|
||||||
|
|
||||||
|
(define listof/c
|
||||||
|
(mlambda (ctc)
|
||||||
|
(let* ((contract (->contract ctc))
|
||||||
|
(enforcer (contract-enforcer contract)))
|
||||||
|
(make-contract
|
||||||
|
#:name (compound-contract-name "listof/c" (list contract))
|
||||||
|
#:enforcer
|
||||||
|
(lambda (blame)
|
||||||
|
(define proc
|
||||||
|
(enforcer (blame-add-context blame "an element of")))
|
||||||
|
(lambda (val neg-party)
|
||||||
|
(unless (list? val)
|
||||||
|
(raise-blame-error blame #:missing-party neg-party
|
||||||
|
'(expected: "a list of ~a" got: "~s")
|
||||||
|
(contract-name contract)
|
||||||
|
val))
|
||||||
|
(map (lambda (element)
|
||||||
|
(proc element neg-party))
|
||||||
|
val)))))))
|
||||||
|
|
||||||
|
;; TODO: Rewrite as a macro to support define*, multiple return values, and
|
||||||
|
;; ‘any’.
|
||||||
|
(define ->/c
|
||||||
|
(memoize
|
||||||
|
(lambda (. ctcs)
|
||||||
|
(let* ((contracts (map ->contract ctcs))
|
||||||
|
(domain-contracts (drop-right contracts 1))
|
||||||
|
(range-contract (last contracts))
|
||||||
|
(contract-arity (length domain-contracts)))
|
||||||
|
(make-contract
|
||||||
|
#:name (compound-contract-name "->/c" contracts)
|
||||||
|
#:enforcer
|
||||||
|
(lambda (blame)
|
||||||
|
(define domain-blames
|
||||||
|
(map (lambda (index)
|
||||||
|
(let ((position (format #f "the #~a argument of" index)))
|
||||||
|
(blame-add-context blame position #:swap? #t)))
|
||||||
|
(iota contract-arity 1)))
|
||||||
|
(define domain-enforcers
|
||||||
|
(map contract-enforcer domain-contracts))
|
||||||
|
(define range-proc
|
||||||
|
(let ((range-blame (blame-add-context blame "the range of")))
|
||||||
|
((contract-enforcer range-contract) range-blame)))
|
||||||
|
(lambda (val neg-party)
|
||||||
|
(unless (procedure? val)
|
||||||
|
(raise-blame-error blame #:missing-party neg-party
|
||||||
|
'(expected: "a procedure" got: "~s") val))
|
||||||
|
(match (procedure-minimum-arity val)
|
||||||
|
((required optional rest?)
|
||||||
|
(unless (= required contract-arity)
|
||||||
|
(raise-blame-error
|
||||||
|
blame #:missing-party neg-party
|
||||||
|
`(expected: "a procedure that accepts ~a non-keyword argument(s)"
|
||||||
|
got: "~a~%"
|
||||||
|
"which accepts ~a argument(s)")
|
||||||
|
contract-arity
|
||||||
|
val
|
||||||
|
required))))
|
||||||
|
(lambda args
|
||||||
|
(define args*
|
||||||
|
(map (lambda (arg blame enforcer)
|
||||||
|
((enforcer blame) arg neg-party))
|
||||||
|
args
|
||||||
|
domain-blames
|
||||||
|
domain-enforcers))
|
||||||
|
(range-proc (apply val args*) neg-party)))))))))
|
||||||
|
|
||||||
|
|
||||||
|
(define ->contract
|
||||||
|
(mlambda (x)
|
||||||
|
(match x
|
||||||
|
((? contract?) x)
|
||||||
|
((? procedure?)
|
||||||
|
(make-contract
|
||||||
|
#:name (format #f "~s" (or (procedure-name x) '???))
|
||||||
|
#:checker x))
|
||||||
|
((or (? symbol?)
|
||||||
|
(? boolean?)
|
||||||
|
(? keyword?))
|
||||||
|
(make-contract
|
||||||
|
#:name (format #f "~s" x)
|
||||||
|
#:checker (cut eq? x <>)))
|
||||||
|
((or (? string?)
|
||||||
|
(? bytevector?)
|
||||||
|
(? char?)
|
||||||
|
+nan.0)
|
||||||
|
(make-contract
|
||||||
|
#:name (format #f "~s" x)
|
||||||
|
#:checker (cut equal? x <>)))
|
||||||
|
((? number?)
|
||||||
|
(make-contract
|
||||||
|
#:name (format #f "~s" x)
|
||||||
|
#:checker (cut = x <>)))
|
||||||
|
(_ (error (format #f "cannot use as contract: ~s" x))))))
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2026 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
|
(define-module (rosenthal utils contract impl)
|
||||||
|
#:use-module (srfi srfi-9)
|
||||||
|
#:use-module (rosenthal utils contract blame)
|
||||||
|
#:export (contract?
|
||||||
|
make-contract
|
||||||
|
contract-name
|
||||||
|
contract-checker
|
||||||
|
contract-enforcer
|
||||||
|
compound-contract-name))
|
||||||
|
|
||||||
|
#|
|
||||||
|
|
||||||
|
This module provides the data representation of contracts.
|
||||||
|
|
||||||
|
When constructing a contract via ‘make-contract’, at least one of a checker or
|
||||||
|
an enforcer must be specified.
|
||||||
|
|
||||||
|
A checker is a predicate function. An enforcer is a function that actually
|
||||||
|
performs the check and either returns the value or raises an error with extra
|
||||||
|
context. If only a checker is provided, an enforcer will be automatically
|
||||||
|
created.
|
||||||
|
|
||||||
|
Note that checkers should only be provided when values can be checked
|
||||||
|
immediately (e.g. checking a value is a number). Checkers don't work well for
|
||||||
|
things like a list of numbers, since we won't know the location and context of a
|
||||||
|
failure.
|
||||||
|
|
||||||
|
Contract combinators may rely on checkers' availability for optimizations.
|
||||||
|
|
||||||
|
Enforcers are "late neg projections" in Racket, which look like the following:
|
||||||
|
|
||||||
|
(lambda (blame)
|
||||||
|
(lambda (val neg-party)
|
||||||
|
...))
|
||||||
|
|
||||||
|
This allows a contract to be partially applied when it's constructed and
|
||||||
|
attached, before the value is actually checked.
|
||||||
|
|
||||||
|
See also (rosenthal utils contract combinators) for more examples, and
|
||||||
|
(rosenthal utils contract combinators) for error reporting of contracts.
|
||||||
|
|
||||||
|
|#
|
||||||
|
|
||||||
|
|
||||||
|
(define-record-type <contract>
|
||||||
|
(%make-contract name checker enforcer)
|
||||||
|
contract?
|
||||||
|
(name contract-name) ; string?
|
||||||
|
(checker contract-checker) ; (or/c #f (->/c any/c boolean?))
|
||||||
|
(enforcer contract-enforcer)) ; (->/c blame? (->/c any/c any/c any/c))
|
||||||
|
|
||||||
|
(define* (make-contract #:key name checker enforcer)
|
||||||
|
(%make-contract
|
||||||
|
name
|
||||||
|
checker
|
||||||
|
(or enforcer
|
||||||
|
(lambda (blame)
|
||||||
|
(lambda (val neg-party)
|
||||||
|
(if (checker val)
|
||||||
|
val
|
||||||
|
(raise-blame-error blame #:missing-party neg-party
|
||||||
|
`(expected: "~a" got: "~s") name val)))))))
|
||||||
|
|
||||||
|
(define (compound-contract-name name ctcs)
|
||||||
|
(format #f "(~a ~a)"
|
||||||
|
name
|
||||||
|
(string-join (map contract-name ctcs) " ")))
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
;;; SPDX-FileCopyrightText: 2025 Hilton Chain <hako@ultrarare.space>
|
|
||||||
;;;
|
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
;;; Copyright © 2025 Hilton Chain <hako@ultrarare.space>
|
||||||
|
|
||||||
(define-module (rosenthal utils download)
|
(define-module (rosenthal utils download)
|
||||||
|
;; Utilities
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
|
;; Guix build systems
|
||||||
#:use-module (guix build-system gnu)
|
#:use-module (guix build-system gnu)
|
||||||
#:export (go-mod-vendor))
|
#:export (go-mod-vendor))
|
||||||
|
|
||||||
@@ -14,6 +15,11 @@
|
|||||||
|
|
||||||
(define* (go-mod-vendor #:key go)
|
(define* (go-mod-vendor #:key go)
|
||||||
(lambda* (src hash-algo hash #:optional name #:key (system (%current-system)))
|
(lambda* (src hash-algo hash #:optional name #:key (system (%current-system)))
|
||||||
|
"Return a fixed-output derivation to run \"go mod vendor\" against SRC and
|
||||||
|
use the produced \"vendor\" directory as the result. The derivation is expected
|
||||||
|
to have HASH of type HASH-ALGO (a symbol). File name of the derivation defaults
|
||||||
|
to \"vendored-go-dependencies\" and can be specified by NAME."
|
||||||
|
|
||||||
(define nss-certs
|
(define nss-certs
|
||||||
(module-ref (resolve-interface '(gnu packages nss)) 'nss-certs))
|
(module-ref (resolve-interface '(gnu packages nss)) 'nss-certs))
|
||||||
|
|
||||||
@@ -25,7 +31,9 @@
|
|||||||
(guix build utils))
|
(guix build utils))
|
||||||
;; Support Unicode in file name.
|
;; Support Unicode in file name.
|
||||||
(setlocale LC_ALL "C.UTF-8")
|
(setlocale LC_ALL "C.UTF-8")
|
||||||
;; For HTTPS support.
|
;; Use our bundled Go toolchain.
|
||||||
|
(setenv "GOTOOLCHAIN" "local")
|
||||||
|
;; HTTPS support.
|
||||||
(setenv "SSL_CERT_DIR" #+(file-append nss-certs "/etc/ssl/certs"))
|
(setenv "SSL_CERT_DIR" #+(file-append nss-certs "/etc/ssl/certs"))
|
||||||
|
|
||||||
((assoc-ref %standard-phases 'unpack) #:source #+src)
|
((assoc-ref %standard-phases 'unpack) #:source #+src)
|
||||||
@@ -36,11 +44,12 @@
|
|||||||
#:hash hash
|
#:hash hash
|
||||||
;; Is a directory.
|
;; Is a directory.
|
||||||
#:recursive? #t
|
#:recursive? #t
|
||||||
#:env-vars '(("GOCACHE" . "/tmp/go-cache")
|
#:env-vars
|
||||||
("GOPATH" . "/tmp/go"))
|
'(("GOCACHE" . "/tmp/go-cache")
|
||||||
|
("GOPATH" . "/tmp/go"))
|
||||||
;; Honor the user's proxy and locale settings.
|
;; Honor the user's proxy and locale settings.
|
||||||
#:leaked-env-vars '("GOPROXY"
|
#:leaked-env-vars
|
||||||
"http_proxy" "https_proxy"
|
'("GOPROXY"
|
||||||
"LC_ALL" "LC_MESSAGES" "LANG"
|
"http_proxy" "https_proxy"
|
||||||
"COLUMNS")
|
"LC_ALL" "LC_MESSAGES" "LANG"
|
||||||
#:local-build? #t)))
|
"COLUMNS"))))
|
||||||
Loaded 100 of 113 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user