mirror of
https://codeberg.org/hako/Rosenthal.git
synced 2026-11-30 07:08:09 +00:00
Compare commits
517
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7986b5d58 | ||
|
|
79f92602d6 | ||
|
|
f559aee629 | ||
|
|
162defb838 | ||
|
|
342349de15 | ||
|
|
5cb609ce31 | ||
|
|
a072092d6f | ||
|
|
04ad9e3b30 | ||
|
|
d219e6e520 | ||
|
|
61f7bbcdf5 | ||
|
|
f45687f13b | ||
|
|
c2a899bd7d | ||
|
|
7d9214d18e | ||
|
|
38e2be2728 | ||
|
|
97b9e2436a | ||
|
|
e52520cbaa | ||
|
|
2eb66f8bad | ||
|
|
2888e95b2a | ||
|
|
afe3c41f96 | ||
|
|
2cbf87a1b5 | ||
|
|
7e970f49e4 | ||
|
|
ad9f05d5da | ||
|
|
966d4ac483 | ||
|
|
fb0a73108e | ||
|
|
bcf1b0c464 | ||
|
|
b5f9128798 | ||
|
|
e4b84dfa2c | ||
|
|
1014d146c0 | ||
|
|
64f925e075 | ||
|
|
1deb97ada4 | ||
|
|
fa1bcd5018 | ||
|
|
21ba2f200f | ||
|
|
bd6508000e | ||
|
|
a367c5c974 | ||
|
|
7409288c70 | ||
|
|
1d40787105 | ||
|
|
f42f8e258b | ||
|
|
f9dc2afc50 | ||
|
|
82619c24fe | ||
|
|
81d1a87938 | ||
|
|
4c0e2a3166 | ||
|
|
58d385b258 | ||
|
|
94a2591d70 | ||
|
|
8a32229ee0 | ||
|
|
7ca7964b79 | ||
|
|
2315a3cd5f | ||
|
|
277ddb85fa | ||
|
|
f031e3cb29 | ||
|
|
a73d01c657 | ||
|
|
764c01831d | ||
|
|
ca386c52be | ||
|
|
517b8c15a2 | ||
|
|
ef4bf83d65 | ||
|
|
02535ef82c | ||
|
|
eeea0186f9 | ||
|
|
7217382971 | ||
|
|
fb9b069154 | ||
|
|
8ca24e4559 | ||
|
|
f8f12cd8ba | ||
|
|
40a7a02e3e | ||
|
|
0c81e2e430 | ||
|
|
0f6d2fad45 | ||
|
|
2a5957880e | ||
|
|
cf00c09e23 | ||
|
|
d42e3a531c | ||
|
|
35c7ec3d5f | ||
|
|
a2b89574ff | ||
|
|
a28767296f | ||
|
|
63fe2d3dfb | ||
|
|
3097fc1888 | ||
|
|
d2ef9be9e2 | ||
|
|
dd4e21f1d0 | ||
|
|
72839719d4 | ||
|
|
32aeafcd6b | ||
|
|
f49fdfe799 | ||
|
|
c202ed2037 | ||
|
|
06eb07b022 | ||
|
|
8db5f08afd | ||
|
|
2c967e048f | ||
|
|
a233498094 | ||
|
|
21dd77b5bb | ||
|
|
187aca7883 | ||
|
|
5b3388f59c | ||
|
|
828e3cf99e | ||
|
|
4c6496f269 | ||
|
|
d27d9217f2 | ||
|
|
b6f31cd035 | ||
|
|
0e31205d73 | ||
|
|
a9f3f17922 | ||
|
|
a158d18681 | ||
|
|
1cffca962d | ||
|
|
c408907454 | ||
|
|
1ce1e67bc2 | ||
|
|
2fa86ce45a | ||
|
|
2ea774f9ed | ||
|
|
8e379d1d94 | ||
|
|
731e01de85 | ||
|
|
192d3d0ba5 | ||
|
|
657f2055f9 | ||
|
|
a079a438da | ||
|
|
23c15e0785 | ||
|
|
9cbf42e01f | ||
|
|
d29af10233 | ||
|
|
f0c3bba1ec | ||
|
|
af9372339a | ||
|
|
7433409450 | ||
|
|
e307f037d9 | ||
|
|
c1936d42cf | ||
|
|
4539e364fe | ||
|
|
98f58fc2fe | ||
|
|
3d8dbdb97b | ||
|
|
477c3df102 | ||
|
|
f077a7aa55 | ||
|
|
b05ab57766 | ||
|
|
2eff1e3ec2 | ||
|
|
f887e0fd8a | ||
|
|
a8af080932 | ||
|
|
1825c484c4 | ||
|
|
56a4ff8d10 | ||
|
|
2c20cd4eff | ||
|
|
b5befb0b7c | ||
|
|
10e484ab4e | ||
|
|
5df5b533ad | ||
|
|
3af3a15130 | ||
|
|
0d789becf6 | ||
|
|
934f6521d6 | ||
|
|
1d8fa9db37 | ||
|
|
8e2fa8cb08 | ||
|
|
befe81a423 | ||
|
|
9ca1896dc9 | ||
|
|
c90ec31fef | ||
|
|
bb3538a937 | ||
|
|
59bf0214ba | ||
|
|
c3bfcc39f6 | ||
|
|
9343dca3cf | ||
|
|
7bfe230793 | ||
|
|
f29a65440d | ||
|
|
11e3fde3fe | ||
|
|
1109aed83b | ||
|
|
7944d2b25c | ||
|
|
eda1456a74 | ||
|
|
08c2d38b09 | ||
|
|
73e4ea9ae0 | ||
|
|
356e06bd51 | ||
|
|
df1b070693 | ||
|
|
de09e5adc6 | ||
|
|
95393955f1 | ||
|
|
bf0c5dc70b | ||
|
|
bcde595503 | ||
|
|
fd28e17494 | ||
|
|
d39f8ce07a | ||
|
|
033e890a25 | ||
|
|
ee4fab769b | ||
|
|
a3d7639ccd | ||
|
|
1c50972d30 | ||
|
|
f84002986f | ||
|
|
7c331b0bb4 | ||
|
|
7445fb02e3 | ||
|
|
e83b06538e | ||
|
|
6cfd8be802 | ||
|
|
16ab4f71da | ||
|
|
417dd04e82 | ||
|
|
6673d31eee | ||
|
|
9591b4adc9 | ||
|
|
fb068ad2ef | ||
|
|
890efd83e7 | ||
|
|
2e0478eb72 | ||
|
|
8cf9a52584 | ||
|
|
dc908f3819 | ||
|
|
a907681d0e | ||
|
|
e8f4d10e52 | ||
|
|
46b0642ed1 | ||
|
|
2e3affd193 | ||
|
|
d47daea1e4 | ||
|
|
d2342204fd | ||
|
|
05aadcc245 | ||
|
|
71a580d429 | ||
|
|
5dbef96272 | ||
|
|
6b1a540e24 | ||
|
|
6eaca1aa9f | ||
|
|
67f1999817 | ||
|
|
00c10e204c | ||
|
|
1c7ae40607 | ||
|
|
d49f5adb51 | ||
|
|
e217e5d0b4 | ||
|
|
47c14d4cd5 | ||
|
|
9b8194cc7f | ||
|
|
194a081a28 | ||
|
|
628de5b81a | ||
|
|
6d827c6a2d | ||
|
|
846441ba04 | ||
|
|
55bd3067f0 | ||
|
|
8a3260ecb0 | ||
|
|
644184344d | ||
|
|
03b1da5d9e | ||
|
|
58ad8f96b6 | ||
|
|
5f5fa3d81d | ||
|
|
280a64270c | ||
|
|
42035556fa | ||
|
|
f0c920f5be | ||
|
|
d3c51cfe7a | ||
|
|
ebb9a4e88e | ||
|
|
bd96a46416 | ||
|
|
8d4e983bd3 | ||
|
|
c77c367149 | ||
|
|
5e2dea2d52 | ||
|
|
23376685b9 | ||
|
|
3753e7ad1c | ||
|
|
5b8aa7cfda | ||
|
|
f8b6295e90 | ||
|
|
ee0975705c | ||
|
|
6d1ae3d2c0 | ||
|
|
79cbe6d5a2 | ||
|
|
7a6d037315 | ||
|
|
f303f6b00a | ||
|
|
c7dc95c293 | ||
|
|
939ec4a7c4 | ||
|
|
1eb4642a73 | ||
|
|
0ef5c4c2eb | ||
|
|
8f3a6b5ee9 | ||
|
|
fc26b38cbb | ||
|
|
d29f278c2d | ||
|
|
060204c29e | ||
|
|
b1fc64d837 | ||
|
|
129ca6fe16 | ||
|
|
f2ed29ac95 | ||
|
|
b9eb466764 | ||
|
|
1505b2d7b3 | ||
|
|
87db633fab | ||
|
|
c8c4a6f991 | ||
|
|
3fc6f0e46f | ||
|
|
2fcd23369b | ||
|
|
62db72e49f | ||
|
|
2ba2f5a117 | ||
|
|
a2c164d008 | ||
|
|
b48529e7e4 | ||
|
|
5289be88a7 | ||
|
|
c13a7498b5 | ||
|
|
d8a88b3fae | ||
|
|
4cfd770031 | ||
|
|
c06db22c7c | ||
|
|
c9a8ae39d4 | ||
|
|
8dfefb0ef0 | ||
|
|
db117efdda | ||
|
|
bf8cd7341a | ||
|
|
d091a0f624 | ||
|
|
74ad534cc6 | ||
|
|
d9762b66ac | ||
|
|
e1ece8946d | ||
|
|
4424b36680 | ||
|
|
67fe9b6ef8 | ||
|
|
b629fa832c | ||
|
|
f24ac6493e | ||
|
|
99dfeaf2d7 | ||
|
|
47e6b72e60 | ||
|
|
2c594e3fac | ||
|
|
091c21ec8b | ||
|
|
a07833bbc0 | ||
|
|
a954fccc99 | ||
|
|
7171134718 | ||
|
|
5b132c8844 | ||
|
|
b717b87fcd | ||
|
|
b810c93083 | ||
|
|
c609c50603 | ||
|
|
ed1058c688 | ||
|
|
f668b716b6 | ||
|
|
7e9fe5760b | ||
|
|
17106e7ed3 | ||
|
|
e545bc545d | ||
|
|
ece7f31eb3 | ||
|
|
766732fa64 | ||
|
|
c1187b9188 | ||
|
|
b23c4c6f50 | ||
|
|
a999008749 | ||
|
|
b829115cda | ||
|
|
5ae5900f2d | ||
|
|
45061dd211 | ||
|
|
ceb36522f0 | ||
|
|
fbdaac770a | ||
|
|
b3aa69459f | ||
|
|
5cf7452091 | ||
|
|
c3ed521085 | ||
|
|
002ad35d6e | ||
|
|
4c5dfa0583 | ||
|
|
bf089a2d2e | ||
|
|
aa6d2d652c | ||
|
|
1423079db1 | ||
|
|
8aa643c684 | ||
|
|
8e4b2f23fe | ||
|
|
f8115b491c | ||
|
|
5791ad387d | ||
|
|
99ad73db4f | ||
|
|
ee5b6600e5 | ||
|
|
7d16b8f5bc | ||
|
|
a7fb74617e | ||
|
|
18b5f4779c | ||
|
|
cbe04c1d70 | ||
|
|
6e8ceea382 | ||
|
|
92ba09a173 | ||
|
|
d9f338e021 | ||
|
|
a0264444b6 | ||
|
|
bc54704728 | ||
|
|
9e54a74bf1 | ||
|
|
1adba81d3f | ||
|
|
f6fdb520ca | ||
|
|
43e374a2dd | ||
|
|
35a4bc0849 | ||
|
|
14c41f9400 | ||
|
|
a963a388b1 | ||
|
|
b47c1ca746 | ||
|
|
a8b892dd6e | ||
|
|
cdce2bb0b9 | ||
|
|
6ce35403a5 | ||
|
|
26653dae61 | ||
|
|
d3b50c0dac | ||
|
|
1e8702cf45 | ||
|
|
7e5d525a7e | ||
|
|
c1c35204fd | ||
|
|
5d51859314 | ||
|
|
5817ee9def | ||
|
|
255bb1d632 | ||
|
|
8140782823 | ||
|
|
8efad93dcf | ||
|
|
b79cf7e9a1 | ||
|
|
3fcebc74ab | ||
|
|
3add85fda0 | ||
|
|
4cc33d3370 | ||
|
|
246150d862 | ||
|
|
c4a4ba04a6 | ||
|
|
41aa2300a6 | ||
|
|
b18bdcc4af | ||
|
|
b4cb000495 | ||
|
|
fb04d47f46 | ||
|
|
77cfc7b05b | ||
|
|
1852de97f6 | ||
|
|
ab00ea374c | ||
|
|
c84648b1e1 | ||
|
|
4b8c8963ff | ||
|
|
2f85fae959 | ||
|
|
ecac695859 | ||
|
|
cae796ef1c | ||
|
|
287d6c9b64 | ||
|
|
f5447aac23 | ||
|
|
cdb60de596 | ||
|
|
698731e230 | ||
|
|
7d0593aad1 | ||
|
|
ff43bbbca8 | ||
|
|
91d880f371 | ||
|
|
4716f4de90 | ||
|
|
9f839a51ea | ||
|
|
368106c421 | ||
|
|
66025a538f | ||
|
|
44c7908c53 | ||
|
|
fa49f7f272 | ||
|
|
77658f8519 | ||
|
|
5d1063ae60 | ||
|
|
ba07b209c4 | ||
|
|
e3ed83a22a | ||
|
|
e16ddf7be9 | ||
|
|
a33c77f33d | ||
|
|
a7f3db40a7 | ||
|
|
4be45cb381 | ||
|
|
2399087de9 | ||
|
|
5d8b51d469 | ||
|
|
ac3c17adb3 | ||
|
|
4f5322927d | ||
|
|
14e9955727 | ||
|
|
e7bd509970 | ||
|
|
4c7542d973 | ||
|
|
431a808aa5 | ||
|
|
f6e5c1866c | ||
|
|
962a589fec | ||
|
|
4b82e7f2c8 | ||
|
|
02e58caf7f | ||
|
|
7be40aad14 | ||
|
|
efab3058a8 | ||
|
|
fcf02ccc93 | ||
|
|
92bc6f73cc | ||
|
|
dc5f6b65b3 | ||
|
|
2cec4f4718 | ||
|
|
8a7ea1a8bd | ||
|
|
cd9db13a31 | ||
|
|
fed616e5e6 | ||
|
|
eb96e484f5 | ||
|
|
38290070c5 | ||
|
|
06cf49842f | ||
|
|
1c1b79d2f1 | ||
|
|
c78aa90232 | ||
|
|
eac46630f9 | ||
|
|
96893ace38 | ||
|
|
36f746614f | ||
|
|
46e8c75db0 | ||
|
|
bb2da8f6ef | ||
|
|
62adfd2225 | ||
|
|
ce5d53d4a8 | ||
|
|
dd3a4f1c4f | ||
|
|
5c7721f208 | ||
|
|
daf971cba2 | ||
|
|
3227d2a0e3 | ||
|
|
69ac40bc3e | ||
|
|
ea8fd51d9b | ||
|
|
cb389fa771 | ||
|
|
78b1fc864a | ||
|
|
81d3200c84 | ||
|
|
2d423a6615 | ||
|
|
2372c7a34c | ||
|
|
46fdf0991b | ||
|
|
a461de806b | ||
|
|
a2733bb2de | ||
|
|
1ebbc475b9 | ||
|
|
43c39fa355 | ||
|
|
b79f9092f3 | ||
|
|
158cd0c5a1 | ||
|
|
46d5a25ae0 | ||
|
|
945d8c0764 | ||
|
|
2421ac75ee | ||
|
|
034f499178 | ||
|
|
8181b7fb4e | ||
|
|
16a443b30d | ||
|
|
717945c98e | ||
|
|
4c19ddeb48 | ||
|
|
37d9e02d76 | ||
|
|
93fa311070 | ||
|
|
60da81067c | ||
|
|
be9036707e | ||
|
|
302f06ca61 | ||
|
|
6e43046913 | ||
|
|
2c5d1f4588 | ||
|
|
5469ef7ff2 | ||
|
|
e30e13349f | ||
|
|
f3953bfad3 | ||
|
|
8fc703dc04 | ||
|
|
b041068595 | ||
|
|
224c3307fa | ||
|
|
633d63c485 | ||
|
|
1f7ca21826 | ||
|
|
5c02d87d3b | ||
|
|
257c5c56ec | ||
|
|
6f9173ca3d | ||
|
|
e660229753 | ||
|
|
caa37db34a | ||
|
|
e7f392448d | ||
|
|
a1e7e1df3c | ||
|
|
5e809cd80d | ||
|
|
f8aacd14fa | ||
|
|
74501fd33a | ||
|
|
4b6fab01ca | ||
|
|
0b31c973e8 | ||
|
|
4c0227fb4a | ||
|
|
f1d89d66f0 | ||
|
|
8b741c241e | ||
|
|
9660dc4e92 | ||
|
|
1f31dedb6f | ||
|
|
5478467f96 | ||
|
|
5f28176ab8 | ||
|
|
f96276ca08 | ||
|
|
abeacc8731 | ||
|
|
6f168bc772 | ||
|
|
6dc8bbfa04 | ||
|
|
0c0571462b | ||
|
|
2370498264 | ||
|
|
c41676ed0d | ||
|
|
08744e6b0e | ||
|
|
b8dc8360e3 | ||
|
|
6cb376d52e | ||
|
|
93baac80be | ||
|
|
5dfcd408b7 | ||
|
|
d4a52bd492 | ||
|
|
029d265317 | ||
|
|
7916cbb6fe | ||
|
|
1be5726510 | ||
|
|
2bc27145b3 | ||
|
|
0dff44354a | ||
|
|
76acf97ec6 | ||
|
|
2b8d1603a7 | ||
|
|
bbbdd6afec | ||
|
|
b61194a46b | ||
|
|
0b597e65c6 | ||
|
|
4c36462bef | ||
|
|
9be629c953 | ||
|
|
3702505c9c | ||
|
|
ecd7d744e4 | ||
|
|
6e6d098eb9 | ||
|
|
bfee3c2dd3 | ||
|
|
24b3016230 | ||
|
|
8794ae8697 | ||
|
|
2f2deb4d77 | ||
|
|
142f7c1b20 | ||
|
|
c062a2eecf | ||
|
|
145ebf94aa | ||
|
|
bd4f4e7da0 | ||
|
|
8496689f75 | ||
|
|
282ce91a06 | ||
|
|
8c82286bfc | ||
|
|
b953b1c7e9 | ||
|
|
146bc7f068 | ||
|
|
7fbe28af8b | ||
|
|
65b564a33c | ||
|
|
d6c5ca89f7 | ||
|
|
84837df370 | ||
|
|
62921a9228 | ||
|
|
02dcbbf930 | ||
|
|
16ea01ca3c | ||
|
|
6acd6d64a1 | ||
|
|
0029ca1592 | ||
|
|
340bdd232f | ||
|
|
17fd8f49f1 | ||
|
|
d67cb6b312 | ||
|
|
61d6698fbf | ||
|
|
b94ca27982 | ||
|
|
6c9c8abcae | ||
|
|
dd0b4c69d1 | ||
|
|
771fd649a3 | ||
|
|
579e2b36bb | ||
|
|
c0d8f03cb9 | ||
|
|
fe77624a03 | ||
|
|
7677db7633 |
No files matched your search
@@ -0,0 +1,3 @@
|
|||||||
|
*.scm diff=scheme
|
||||||
|
*.scm.in diff=scheme
|
||||||
|
*.texi diff=texinfo
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
;; -*- mode: scheme -*-
|
||||||
|
(authorizations
|
||||||
|
(version 0)
|
||||||
|
(;; primary: "220F 98D9 5E86 204C 0036 DA7B 6DEC 4360 408B 4185"
|
||||||
|
("F4C2 D1DF 3FDE EA63 D1D3 0776 ACC6 6D09 CA52 8292"
|
||||||
|
(name "Hilton Chain"))))
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
;; -*- mode: scheme -*-
|
||||||
|
(channel
|
||||||
|
(version 0)
|
||||||
|
(keyring-reference "keyring")
|
||||||
|
(url "https://codeberg.org/hako/rosenthal.git")
|
||||||
|
(news-file "NEWS"))
|
||||||
@@ -0,0 +1,674 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
|
or can get the source code. And you must show them these terms so they
|
||||||
|
know their rights.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program 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.
|
||||||
|
|
||||||
|
This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
<program> Copyright (C) <year> <name of author>
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU General Public License does not permit incorporating your program
|
||||||
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License. But first, please read
|
||||||
|
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
;; -*- mode: scheme -*-
|
||||||
|
;; SPDX-FileCopyrightText: 2023 Hilton Chain <hako@ultrarare.space>
|
||||||
|
;;
|
||||||
|
;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
(channel-news
|
||||||
|
(version 0)
|
||||||
|
|
||||||
|
(entry ;2024-12-08
|
||||||
|
(commit "162defb8388b4099f6ae8699ec8872f845a2481e")
|
||||||
|
(title (en "Hyprland upstreamed")
|
||||||
|
(en "Hyprland 已合併至上游"))
|
||||||
|
(body (en "All Hyprland packages have been upstreamed to Guix and deleted in
|
||||||
|
Rosenthal.")
|
||||||
|
(zh "所有 Hyprland 相關軟件包已合併至 Guix 上游並在 Rosenthal 中刪除。")))
|
||||||
|
|
||||||
|
(entry ;2023-07-01
|
||||||
|
(commit "ed1058c688a2655521beeba3e6295db2c0c1f274")
|
||||||
|
(title (en "@code{qbittorrent-enhanced} upstreamed")
|
||||||
|
(zh "@code{qbittorrent-enhanced} 已合併至上游"))
|
||||||
|
(body (en "Packages @code{qbittorrent-enhanced} and
|
||||||
|
@code{qbittorrent-enhanced-nox} are upstreamed to Guix, they are now available
|
||||||
|
in module @code{(gnu packages bittorrent)}. Previously deprecated packages
|
||||||
|
@code{qbittorrent-enhanced-edition} and @code{qbittorrent-enhanced-edition-nox}
|
||||||
|
are no longer available.")
|
||||||
|
(zh "@code{qbittorrent-enhanced} 與 @code{qbittorrent-enhanced-nox}
|
||||||
|
已合併至 Guix 上游 @code{(gnu packages bittorrent)} 模塊。先前標記爲棄用的軟件包
|
||||||
|
@code{qbittorrent-enhanced-edition} 及 @code{qbittorrent-enhanced-edition-nox}
|
||||||
|
已不再可用。")))
|
||||||
|
|
||||||
|
(entry ;2023-07-01
|
||||||
|
(commit "17106e7ed3d21544dfd80e77aa785e1e5781fb1c")
|
||||||
|
(title (en "@code{linux-xanmod} merged to Nonguix")
|
||||||
|
(zh "@code{linux-xanmod} 已合併至 Nonguix"))
|
||||||
|
(body (en "Package @code{linux-xanmod} has been merged to channel
|
||||||
|
@url{https://gitlab.com/nonguix/nonguix, Nonguix}, it's not available in
|
||||||
|
Rosenthal any more.")
|
||||||
|
(zh "@code{linux-xanmod} 已移出 Rosenthal,合併至
|
||||||
|
@url{https://gitlab.com/nonguix/nonguix, Nonguix} 頻道。")))
|
||||||
|
|
||||||
|
(entry ;2023-06-17
|
||||||
|
(commit "c3ed521085962524d78f4c7007e7d77535ae085e")
|
||||||
|
(title (en "Channel moved to Codeberg")
|
||||||
|
(zh "頻道已移至 Codeberg"))
|
||||||
|
(body (en "Rosenthal has been moved to Codeberg and the GitHub repository
|
||||||
|
will remain as a mirror. Changing the URL in your @file{channels.scm} to
|
||||||
|
@url{https://codeberg.org/hako/rosenthal.git} is recommended.")
|
||||||
|
(zh "Rosenthal 頻道已移至 Codeberg,先前的 GitHub 倉庫將用作鏡像。建議修改
|
||||||
|
@file{channels.scm} 內 URL 爲 @url{https://codeberg.org/hako/rosenthal.git}。"))))
|
||||||
+156
@@ -0,0 +1,156 @@
|
|||||||
|
#+TITLE: Rosenthal - A certain Guix channel
|
||||||
|
|
||||||
|
** About / 關於
|
||||||
|
[[https://codeberg.org/hako/Rosenthal][Rosenthal]] is a [[https://guix.gnu.org/en/manual/devel/en/html_node/Channels.html][Guix channel]].
|
||||||
|
|
||||||
|
This channel was created for experiments, it currently holds some packages not ready for upstreaming to [[https://guix.gnu.org/][GNU Guix]].
|
||||||
|
|
||||||
|
You can search for packages and services in Rosenthal and other channels with the [[https://toys.whereis.みんな/][toys]] instance maintained by [[https://sr.ht/~whereiseveryone/][WhereIsEveryone]] community.
|
||||||
|
|
||||||
|
Unstable contents: packages not publicly exported, packages with a suffix like =-dev=, =-for-<some package>= or =-<full version>=, and all services are considered unstable. They are subject to change and may be deleted at any time.
|
||||||
|
|
||||||
|
[[https://codeberg.org/hako/Rosenthal][Rosenthal]] 是一個 [[https://guix.gnu.org/en/manual/devel/zh-cn/html_node/Tong-Dao-.html][Guix 頻道]]。該頻道因試驗而起,如今存有一些還算有趣,但尚未準備好加入 [[https://guix.gnu.org/zh-CN/][GNU Guix]] 上游的軟件包。
|
||||||
|
|
||||||
|
[[https://sr.ht/~whereiseveryone/][WhereIsEveryone]] 社區維護的 [[https://toys.whereis.みんな/][toys]] 實例,可用以檢索來自 Rosenthal 及其他 Guix 頻道的軟件包與服務。
|
||||||
|
|
||||||
|
頻道內所有 Guix 服務,及名稱以 =-dev= 、 =-for-<某軟件包>= 或 =-<版本號>= 結尾的軟件包,均無穩定保證,隨時可能刪改。
|
||||||
|
|
||||||
|
** Usage / 用法
|
||||||
|
To update Rosenthal along with Guix via =guix pull=, write the following definition to =~/.config/guix/channels.scm=,
|
||||||
|
#+begin_src scheme
|
||||||
|
(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"))))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
for example:
|
||||||
|
#+begin_src scheme
|
||||||
|
;; ~/.config/guix/channels.scm
|
||||||
|
(cons* (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"))))
|
||||||
|
%default-channels)
|
||||||
|
;; channels.scm ends here.
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
If you are a [[https://guix.gnu.org/en/manual/devel/en/html_node/Home-Configuration.html][Guix Home]] user, check out the =home-channels-service-type=.
|
||||||
|
|
||||||
|
Alternatively, Rosenthal can be used seperately with the following steps:
|
||||||
|
|
||||||
|
Clone the repository.
|
||||||
|
#+begin_src shell
|
||||||
|
git clone https://codeberg.org/hako/rosenthal.git rosenthal
|
||||||
|
cd rosenthal
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
Prefix guix commands with the =pre-inst-env= script.
|
||||||
|
#+begin_src shell
|
||||||
|
./pre-inst-env guix <command>
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
Rosenthal 頻道定義如下,將其加入 =~/.config/guix/channels.scm= 以由 =guix pull= 接收更新。
|
||||||
|
#+begin_src scheme
|
||||||
|
(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"))))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
加入後 =channels.scm= 示例如下:
|
||||||
|
#+begin_src scheme
|
||||||
|
;; ~/.config/guix/channels.scm
|
||||||
|
(cons* (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"))))
|
||||||
|
%default-channels)
|
||||||
|
;; channels.scm 在此結束。
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
[[https://guix.gnu.org/en/manual/devel/zh-cn/html_node/Home-Configuration.html][Guix Home]] 用戶亦參見服務 =home-channels-service-type= 。
|
||||||
|
|
||||||
|
若想獨立於 =channels.scm= 使用頻道,可由如下步驟:
|
||||||
|
|
||||||
|
首先克隆 git 倉庫
|
||||||
|
#+begin_src shell
|
||||||
|
git clone https://codeberg.org/hako/rosenthal.git rosenthal
|
||||||
|
cd rosenthal
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
再由倉庫內 =pre-inst-env= 腳本執行 Guix 命令。
|
||||||
|
#+begin_src shell
|
||||||
|
./pre-inst-env guix <命令>
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Content / 內容
|
||||||
|
*** Packages / 軟件包
|
||||||
|
+ cloudflared
|
||||||
|
+ dnsmasq-china-list
|
||||||
|
+ emacs-pcmpl-tailscale
|
||||||
|
+ emacs-wakatime-mode
|
||||||
|
+ grub-efi-luks2
|
||||||
|
+ socks2http
|
||||||
|
+ tree-sitter-yaml
|
||||||
|
|
||||||
|
Binary Packages / 二進制包:
|
||||||
|
+ atuin-bin
|
||||||
|
+ clash-bin
|
||||||
|
+ hugo-bin
|
||||||
|
+ mihomo-bin
|
||||||
|
+ miniflux-injector-icecat
|
||||||
|
+ shadow-tls-bin
|
||||||
|
+ sidebery-icecat
|
||||||
|
+ sing-box-bin
|
||||||
|
+ tailscale-bin
|
||||||
|
+ wakapi-bin
|
||||||
|
+ wakatime-cli-bin
|
||||||
|
|
||||||
|
Nonfree Software / 非自由軟件:
|
||||||
|
+ cloudflare-warp-bin
|
||||||
|
|
||||||
|
*** Services / 服務
|
||||||
|
+ btrbk-service-type
|
||||||
|
+ clash-service-type
|
||||||
|
+ docker-mailserver-service-type
|
||||||
|
+ iwd-service-type
|
||||||
|
+ jellyfin-service-type
|
||||||
|
+ miniflux-service-type
|
||||||
|
+ misskey-service-type
|
||||||
|
+ qbittorrent-service-type
|
||||||
|
+ shadow-tls-service-type
|
||||||
|
+ smartdns-service-type
|
||||||
|
+ vaultwarden-service-type
|
||||||
|
|
||||||
|
+ home-qbittorrent-service-type
|
||||||
|
+ home-shadow-tls-service-type
|
||||||
|
+ home-socks2http-service-type
|
||||||
|
+ home-wakapi-service-type
|
||||||
|
|
||||||
|
Nonfree Network Services / 非自由網絡服務:
|
||||||
|
+ cloudflare-tunnel-service-type
|
||||||
|
+ tailscale-service-type
|
||||||
|
|
||||||
|
Nonfree Software / 非自由軟件:
|
||||||
|
+ cloudflare-warp-service-type
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
|
||||||
|
|
||||||
mDMEX0JnRRYJKwYBBAHaRw8BAQdAAVK4rxRUJLcuJmVczYnjdU5wMzhTM2SDY42y
|
|
||||||
yRpMXtGIeAQgFggAIBYhBBPnbNbmScKMM4VN9V5apmVhSRf3BQJjvuJxAh0BAAoJ
|
|
||||||
EF5apmVhSRf33kYBAKvz1BKp+SWiKnAF4xCCdktj+yK8dWWjgd8BzXMZukgKAQDY
|
|
||||||
f9RErqLzQxzsNIkiAN16oAS0hRvpXa5fOUJAADxgBLQjSGlsdG9uIENoYWluIDxo
|
|
||||||
YWtvQHVsdHJhcmFyZS5zcGFjZT6IkAQTFgoAOAIbAwULCQgHAgYVCgkICwIEFgID
|
|
||||||
AQIeAQIXgBYhBBPnbNbmScKMM4VN9V5apmVhSRf3BQJjvqgrAAoJEF5apmVhSRf3
|
|
||||||
9FIA/1G9sWit+1LFvqoc5ZS3UJrS8SjqUKktQPtuuUvD76RWAQC8gP2/UlLa1gk5
|
|
||||||
PLyJewPNIytwfS5rYqw9mO3LKF5zBLg4BF9CZ0USCisGAQQBl1UBBQEBB0DaXDt5
|
|
||||||
85Mvfi/YJZhYraDRmJNCV4MYht1tzIucwzAaBAMBCAeIfgQYFgoAJgIbDBYhBBPn
|
|
||||||
bNbmScKMM4VN9V5apmVhSRf3BQJjvYE2BQkGXE1xAAoJEF5apmVhSRf3vmIBAN/R
|
|
||||||
VVu/GXAcoMbycaHGNrfv953wr3+gkuA1EHpOYSzPAP9e7tAoZS/9koBP77qHTfFv
|
|
||||||
qlB8VrlT8kC1xUUTSqtZDLkCDQRfSK4lARAAsn6zp01vZhXtk9OAG27HXXcxVEyC
|
|
||||||
d8Rc3aK7npUaojrQmmwgxnpc91Mu21QweYuOL06mJmYVnH0waTD+jjJekVBM2J4Z
|
|
||||||
EINVzB9SqrBRBbzQfGnIZxNSnJB0mJh0f38vDzetdB/SVAA4XOH4xnhsYoe68diE
|
|
||||||
FI+gr7LTxT4vH41rO058jm+YrY1CNWYGUtMCymJOLXzOHErPOl5AbXgyci3bcU4U
|
|
||||||
47Wbe2hW6ZXUXl6rbOxqTtcrgSQyqvmEaoE/5e9E1KgTm2BtrqHnk08PVVQwtG9n
|
|
||||||
TkUN67abrVDXzob44bJzQahwhRSN0+NbzQIxrxtgzVm7R2kGwVIz3LG6R2PpuPU5
|
|
||||||
DVisTVmCH2xSz2AB9CpC6Ka3m/rI9eSnB8jLYMIuZlx4HIlmR6LWwlafQ6R8FT/4
|
|
||||||
45lW7su13v8VOmQsxo0Rbt3qcpfq/+Xqv7klgJePy7+Bl+3mQHu2dDFBv6B+RC8K
|
|
||||||
IrThJKwYFI4ueqpJyTQxG5D2hBDtCY4Ir4lZt/skR52YkowTNVfraIEzFZtXZKKa
|
|
||||||
wn73vC9VXezWw8Y7KjXJoDsSDqJeiLar+yNHialGzUXCRZPpdjmd8gGsVXlR19cO
|
|
||||||
LpXgHT1nvxEJ46v7HPgth//qfslzymnLIKB0Fv2oQ9FF0fHRkI4n4WWDuGTYH2ow
|
|
||||||
fU6kV03lOICQH3MAEQEAAYh+BBgWCgAmAhsgFiEEE+ds1uZJwowzhU31XlqmZWFJ
|
|
||||||
F/cFAmO9gTYFCQZWBpEACgkQXlqmZWFJF/c3aQEA8KmcNz8Qoq7Se3sWBIiC5pkI
|
|
||||||
SfQok5Xx0Bj0G5oxHO0BAN8NBPgBWaiFuMPzlfGYZRvgNT11yJWImiEd8US7kDAM
|
|
||||||
=C6KE
|
|
||||||
-----END PGP PUBLIC KEY BLOCK-----
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
|
||||||
|
|
||||||
mDMEY76vuxYJKwYBBAHaRw8BAQdAAPIY7wvHRRZ+OoHYHErO6mago//xW3q2K2dk
|
|
||||||
aCBt/Y+0I0hpbHRvbiBDaGFpbiA8aGFrb0B1bHRyYXJhcmUuc3BhY2U+iJAEExYI
|
|
||||||
ADgWIQQiD5jZXoYgTAA22ntt7ENgQItBhQUCY76vuwIbAQULCQgHAgYVCgkICwIE
|
|
||||||
FgIDAQIeAQIXgAAKCRBt7ENgQItBhTwwAP9oCOAPHWXX1nncKKanSFXmg0Iu4DRk
|
|
||||||
PLp6HTn2nCjVUgEAgq3clIMpcxufXJUL1ivA54jV/kRaPMYZ2059tC2GRwOIdQQQ
|
|
||||||
FggAHRYhBBPnbNbmScKMM4VN9V5apmVhSRf3BQJjvtMBAAoJEF5apmVhSRf3NnUA
|
|
||||||
/Al++sCYE50J88GEIpUycQ+A+P0371tdPaNmgzKge6yLAP9DMFiLjZb1q5mp1Kxr
|
|
||||||
nEW7SziKiZSXbm+dxY3EPyg3C7gzBGO+0cwWCSsGAQQB2kcPAQEHQDocmVXQu4sG
|
|
||||||
1nY5GrIQuVOlTLTpUxvk2r2vQNCr+gOKiPUEGBYIACYCGwIWIQQiD5jZXoYgTAA2
|
|
||||||
2ntt7ENgQItBhQUCY77SGgUJAeEzzgCBdiAEGRYIAB0WIQT0wtHfP97qY9HTB3as
|
|
||||||
xm0JylKCkgUCY77RzAAKCRCsxm0JylKCkjfsAQC+jPs2l5O1jxHBIJSF+Lba9yO8
|
|
||||||
2snyTGm7puf7TkunIQD+Kph74xJ9/a89sKEQb1fU9C/LfI+Q7y8k/paa5p5XCA0J
|
|
||||||
EG3sQ2BAi0GF8qwBAONLPS+PqncyxOfKLcK28pG9Xrmt12Tt8sEgyhJwj56SAP4v
|
|
||||||
H5SBgrnwFdWeSbiA9WzaUHIUwTGA1JWR7f2zV0RwALg4BGO+0eUSCisGAQQBl1UB
|
|
||||||
BQEBB0CR+twFCJIziLy4YIqdBNWw+D4PmntXZdg6CyseZNEvDQMBCAeIfgQYFggA
|
|
||||||
JgIbDBYhBCIPmNlehiBMADbae23sQ2BAi0GFBQJjvtIkBQkB4TO1AAoJEG3sQ2BA
|
|
||||||
i0GF5bgA/iExz0yLH+PflRVVusfHWv4ThDFHnHuxrwC4YytaFhr1AQC50TIvLxHD
|
|
||||||
rlBvCb53tk6aCBY2xcuEQ5DNbIhmRv9MArgzBGO+0fkWCSsGAQQB2kcPAQEHQFcT
|
|
||||||
j1N3cL/bh2Uvwh5/YubhZplPFnvGk/iVHQs3FWV2iH4EGBYIACYCGyAWIQQiD5jZ
|
|
||||||
XoYgTAA22ntt7ENgQItBhQUCY77SJAUJAeEzoQAKCRBt7ENgQItBhQLOAP433Y//
|
|
||||||
b4tMpPrr3DlD3kxNxpQ7kcpIkKaajI/rby/qjQD+JAGjhGut4/x9MYPXLbNW/wqo
|
|
||||||
D+UMrp0bQ/Lkc72J3gM=
|
|
||||||
=AqnV
|
|
||||||
-----END PGP PUBLIC KEY BLOCK-----
|
|
||||||
Executable
+10
@@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
abs_rosenthal_dir="$(dirname "$(realpath "$0")")"
|
||||||
|
|
||||||
|
GUILE_LOAD_PATH="${abs_rosenthal_dir}${GUILE_LOAD_PATH:+:}${GUILE_LOAD_PATH}"
|
||||||
|
GUIX_PACKAGE_PATH="${abs_rosenthal_dir}${GUIX_PACKAGE_PATH:+:}${GUIX_PACKAGE_PATH}"
|
||||||
|
|
||||||
|
export GUILE_LOAD_PATH GUIX_PACKAGE_PATH
|
||||||
|
|
||||||
|
exec "$@"
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
;; SPDX-FileCopyrightText: 2023 Hilton Chain <hako@ultrarare.space>
|
||||||
|
;;
|
||||||
|
;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
(define-module (rosenthal bootloader grub)
|
||||||
|
#:use-module (gnu bootloader)
|
||||||
|
#:use-module (gnu bootloader grub)
|
||||||
|
#:use-module (rosenthal packages bootloaders)
|
||||||
|
#:export (grub-efi-luks2-bootloader
|
||||||
|
grub-efi-luks2-removable-bootloader))
|
||||||
|
|
||||||
|
(define grub-efi-luks2-bootloader
|
||||||
|
(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,33 @@
|
|||||||
|
;; SPDX-FileCopyrightText: 2022 Hilton Chain <hako@ultrarare.space>
|
||||||
|
;;
|
||||||
|
;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
(define-module (rosenthal packages admin)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix utils)
|
||||||
|
#:use-module (gnu packages admin))
|
||||||
|
|
||||||
|
(define-public libseat-sans-logind
|
||||||
|
(let ((base libseat))
|
||||||
|
(package
|
||||||
|
(inherit base)
|
||||||
|
(name "libseat-sans-logind")
|
||||||
|
(arguments
|
||||||
|
(substitute-keyword-arguments (package-arguments base)
|
||||||
|
((#:configure-flags configure-flags)
|
||||||
|
#~(append #$configure-flags
|
||||||
|
(list "-Dlibseat-logind=disabled")))))
|
||||||
|
(propagated-inputs '()))))
|
||||||
|
|
||||||
|
(define-public seatd-sans-logind
|
||||||
|
(let ((base seatd))
|
||||||
|
(package
|
||||||
|
(inherit base)
|
||||||
|
(name "seatd-sans-logind")
|
||||||
|
(arguments
|
||||||
|
(substitute-keyword-arguments (package-arguments base)
|
||||||
|
((#:configure-flags configure-flags)
|
||||||
|
#~(append #$configure-flags
|
||||||
|
(list "-Dlibseat-logind=disabled")))))
|
||||||
|
(propagated-inputs '()))))
|
||||||
@@ -0,0 +1,430 @@
|
|||||||
|
;; SPDX-FileCopyrightText: 2023-2024 Hilton Chain <hako@ultrarare.space>
|
||||||
|
;;
|
||||||
|
;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
(define-module (rosenthal packages binaries)
|
||||||
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix download)
|
||||||
|
#:use-module (guix build-system copy)
|
||||||
|
#:use-module (gnu build icecat-extension)
|
||||||
|
#:use-module (gnu packages base)
|
||||||
|
#:use-module (gnu packages bootstrap)
|
||||||
|
#:use-module (gnu packages compression)
|
||||||
|
#:use-module (gnu packages elf)
|
||||||
|
#:use-module (gnu packages gcc)
|
||||||
|
#:use-module (gnu packages glib)
|
||||||
|
#:use-module (gnu packages nss))
|
||||||
|
|
||||||
|
(define license
|
||||||
|
(@@ (guix licenses) license))
|
||||||
|
|
||||||
|
(define-public atuin-bin
|
||||||
|
(package
|
||||||
|
(name "atuin-bin")
|
||||||
|
(version "18.3.0")
|
||||||
|
(source (origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (string-append
|
||||||
|
"https://github.com/atuinsh/atuin/releases/download/v"
|
||||||
|
version "/atuin-x86_64-unknown-linux-gnu.tar.gz"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"14hp673i8in9adahg01bldlwyip7kg5vdnqi5jczinv8ibxnswg3"))))
|
||||||
|
(build-system copy-build-system)
|
||||||
|
(arguments
|
||||||
|
(list #:install-plan #~'(("atuin" "bin/"))
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(add-after 'install 'patch-elf
|
||||||
|
(lambda _
|
||||||
|
(let ((ld.so (string-append #$(this-package-input "glibc")
|
||||||
|
#$(glibc-dynamic-linker)))
|
||||||
|
(runpath (string-join
|
||||||
|
(list
|
||||||
|
(string-append
|
||||||
|
(ungexp
|
||||||
|
(this-package-input "gcc") "lib") "/lib")
|
||||||
|
(string-append
|
||||||
|
#$(this-package-input "glibc") "/lib"))
|
||||||
|
":")))
|
||||||
|
(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" runpath file)
|
||||||
|
(display " done\n"))
|
||||||
|
(for-each (lambda (file)
|
||||||
|
(patch-elf file))
|
||||||
|
(find-files
|
||||||
|
(string-append #$output "/bin")))))))))
|
||||||
|
(supported-systems '("x86_64-linux"))
|
||||||
|
(native-inputs (list patchelf-0.16))
|
||||||
|
(inputs (list `(,gcc "lib") glibc))
|
||||||
|
(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:gpl3)))
|
||||||
|
|
||||||
|
(define-public clash-bin
|
||||||
|
(package
|
||||||
|
(name "clash-bin")
|
||||||
|
(version "1.18.0")
|
||||||
|
(source (origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (string-append
|
||||||
|
"https://github.com/Dreamacro/clash/releases/download/v"
|
||||||
|
version "/clash-linux-amd64-v3-v" version ".gz"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"0gchpc4pvy24dvhb5nk08g97rswjqr1ic6i405f1ba5snfv8i5z8"))))
|
||||||
|
(build-system copy-build-system)
|
||||||
|
(arguments
|
||||||
|
(list #:install-plan
|
||||||
|
#~'((#$(format #f "clash-linux-amd64-v3-v~a" version) "bin/clash"))
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(add-after 'install 'fix-permission
|
||||||
|
(lambda _
|
||||||
|
(chmod (string-append #$output "/bin/clash") #o555))))))
|
||||||
|
(supported-systems '("x86_64-linux"))
|
||||||
|
(home-page "https://github.com/Dreamacro/clash")
|
||||||
|
(synopsis "Rule-based tunnel in Go")
|
||||||
|
(description
|
||||||
|
"Clash is a cross-platform rule-based proxy utility that runs on the
|
||||||
|
network and application layer, supporting various proxy and anti-censorship
|
||||||
|
protocols out-of-the-box.")
|
||||||
|
(license license:gpl3)))
|
||||||
|
|
||||||
|
(define-public mihomo-bin
|
||||||
|
(package
|
||||||
|
(name "mihomo-bin")
|
||||||
|
(version "1.18.9")
|
||||||
|
(source (origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (string-append
|
||||||
|
"https://github.com/MetaCubeX/mihomo/releases/download/v"
|
||||||
|
version "/mihomo-linux-amd64-v" version ".gz"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"0xq2baqcfd6hnyl1h3q34ymqd227dm06r7dz76s46k7mx7yz7jsb"))))
|
||||||
|
(build-system copy-build-system)
|
||||||
|
(arguments
|
||||||
|
(list #:install-plan
|
||||||
|
#~'((#$(string-append
|
||||||
|
"mihomo-linux-amd64-v" (package-version this-package))
|
||||||
|
"bin/mihomo"))
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(add-after 'install 'fix-permission
|
||||||
|
(lambda _
|
||||||
|
(chmod (string-append #$output "/bin/mihomo") #o555))))))
|
||||||
|
(supported-systems '("x86_64-linux"))
|
||||||
|
(home-page "https://wiki.metacubex.one/")
|
||||||
|
(synopsis "Rule-based tunnel in Go")
|
||||||
|
(description
|
||||||
|
"This package provides @command{mihomo}, another @code{clash} kernel.")
|
||||||
|
(license license:gpl3)))
|
||||||
|
|
||||||
|
(define-public clash-meta-bin
|
||||||
|
(deprecated-package "clash-meta-bin" mihomo-bin))
|
||||||
|
|
||||||
|
(define-public cloudflare-warp-bin
|
||||||
|
(package
|
||||||
|
(name "cloudflare-warp-bin")
|
||||||
|
(version "2024.9.346.0")
|
||||||
|
(source (origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (string-append "https://pkg.cloudflareclient.com"
|
||||||
|
"/pool/bookworm/main/c/cloudflare-warp/"
|
||||||
|
"cloudflare-warp_" version "_amd64.deb"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"1jrvhb4ka6j0fn9ymnpz1j4anljhl3b15h54np40x0p2d5c28czi"))))
|
||||||
|
(build-system copy-build-system)
|
||||||
|
(arguments
|
||||||
|
(list #:install-plan
|
||||||
|
#~'(("bin" "bin" #:include ("warp-cli" "warp-svc")))
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(add-after 'unpack 'unpack-deb
|
||||||
|
(lambda* (#:key source #:allow-other-keys)
|
||||||
|
(invoke "ar" "-x" source)
|
||||||
|
(invoke "tar" "-xf" "data.tar.gz")))
|
||||||
|
(add-after 'install 'patch-elf
|
||||||
|
(lambda _
|
||||||
|
(let ((ld.so (string-append #$(this-package-input "glibc")
|
||||||
|
#$(glibc-dynamic-linker)))
|
||||||
|
(rpath (string-join
|
||||||
|
(list
|
||||||
|
(string-append
|
||||||
|
(ungexp
|
||||||
|
(this-package-input "gcc") "lib") "/lib")
|
||||||
|
(string-append
|
||||||
|
#$(this-package-input "dbus") "/lib")
|
||||||
|
(string-append
|
||||||
|
#$(this-package-input "glibc") "/lib")
|
||||||
|
(string-append
|
||||||
|
#$(this-package-input "nspr") "/lib")
|
||||||
|
(string-append
|
||||||
|
#$(this-package-input "nss") "/lib/nss"))
|
||||||
|
":")))
|
||||||
|
(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")))))))))
|
||||||
|
(supported-systems '("x86_64-linux"))
|
||||||
|
(native-inputs (list patchelf-0.16))
|
||||||
|
(inputs (list dbus `(,gcc "lib") glibc nspr nss))
|
||||||
|
(home-page "https://1.1.1.1/")
|
||||||
|
(synopsis "Cloudflare WARP client")
|
||||||
|
(description
|
||||||
|
"The Cloudflare WARP client allows individuals to have a faster, more
|
||||||
|
secure, and more private experience online. The WARP client sits between your
|
||||||
|
device and the Internet, and has several connection modes to better suit
|
||||||
|
different needs.")
|
||||||
|
(license
|
||||||
|
(license "Nonfree"
|
||||||
|
"https://www.cloudflare.com/application/terms/"
|
||||||
|
"This is a nonfree license. Check the URI for details."))))
|
||||||
|
|
||||||
|
(define-public hugo-bin
|
||||||
|
(package
|
||||||
|
(name "hugo-bin")
|
||||||
|
(version "0.136.5")
|
||||||
|
(source (origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (string-append
|
||||||
|
"https://github.com/gohugoio/hugo" "/releases/download/v"
|
||||||
|
version "/hugo_extended_" version "_linux-amd64.tar.gz"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"1zvhpyqad402ifa4gyin6apxmyhxg5ww8d7ng7h7q1qbpcd7rgmp"))))
|
||||||
|
(build-system copy-build-system)
|
||||||
|
(arguments
|
||||||
|
(list #:install-plan #~'(("hugo" "bin/"))
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(delete 'strip)
|
||||||
|
(add-after 'install 'patch-elf
|
||||||
|
(lambda _
|
||||||
|
(let ((hugo (string-append #$output "/bin/hugo")))
|
||||||
|
(invoke "patchelf" "--set-interpreter"
|
||||||
|
(string-append #$(this-package-input "glibc")
|
||||||
|
#$(glibc-dynamic-linker))
|
||||||
|
hugo)
|
||||||
|
(invoke "patchelf" "--set-rpath"
|
||||||
|
(string-append (ungexp (this-package-input "gcc")
|
||||||
|
"lib")
|
||||||
|
"/lib")
|
||||||
|
hugo)))))))
|
||||||
|
(supported-systems '("x86_64-linux"))
|
||||||
|
(native-inputs (list patchelf-0.16))
|
||||||
|
(inputs (list `(,gcc "lib") glibc))
|
||||||
|
(home-page "https://gohugo.io/")
|
||||||
|
(synopsis "Static site generator")
|
||||||
|
(description
|
||||||
|
"Hugo is a static site generator written in Go, optimized for speed and
|
||||||
|
designed for flexibility.")
|
||||||
|
(license license:asl2.0)))
|
||||||
|
|
||||||
|
(define miniflux-injector
|
||||||
|
(package
|
||||||
|
(name "miniflux-injector")
|
||||||
|
(version "2.3.3")
|
||||||
|
(properties '((addon-id . "{528ec801-2e29-4cb9-ae71-5a90503138d1}")))
|
||||||
|
(source
|
||||||
|
(origin
|
||||||
|
(method url-fetch/zipbomb)
|
||||||
|
(uri (string-append
|
||||||
|
"https://github.com/Sevichecc/miniflux-injector/releases/download"
|
||||||
|
"/v" version "/miniflux_injector-" version ".zip"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"199z441ak6dwy7skgbwc9aa4gfd2r4i22hxfm27s5k3rv7barbvs"))
|
||||||
|
(modules '((guix build utils)))
|
||||||
|
(snippet
|
||||||
|
#~(substitute* "manifest.json"
|
||||||
|
(("homepage_url.*" line)
|
||||||
|
(string-append line "\
|
||||||
|
\"browser_specific_settings\": {
|
||||||
|
\"gecko\": {
|
||||||
|
\"id\": \"" #$(assq-ref properties 'addon-id) "\"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"))))))
|
||||||
|
(build-system copy-build-system)
|
||||||
|
(arguments
|
||||||
|
(list
|
||||||
|
#:install-plan
|
||||||
|
#~'(("." #$(assq-ref (package-properties this-package) 'addon-id)))))
|
||||||
|
(home-page "https://github.com/Sevichecc/miniflux-injector")
|
||||||
|
(synopsis "Injects Miniflux search results into search page")
|
||||||
|
(description
|
||||||
|
"This package provides a browser extension to inject Miniflux search
|
||||||
|
results into search page. Search terms are sent to your Miniflux instance and
|
||||||
|
results are added in a sidebar next to search engine results.")
|
||||||
|
(license license:expat)))
|
||||||
|
|
||||||
|
(define-public miniflux-injector/icecat
|
||||||
|
(make-icecat-extension miniflux-injector))
|
||||||
|
|
||||||
|
(define-public shadow-tls-bin
|
||||||
|
(package
|
||||||
|
(name "shadow-tls-bin")
|
||||||
|
(version "0.2.25")
|
||||||
|
(source (origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (string-append
|
||||||
|
"https://github.com/ihciah/shadow-tls/releases/download/v"
|
||||||
|
version "/shadow-tls-x86_64-unknown-linux-musl"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"0chmqzfmyw5w8ybshkwigc3r25svq7fyw371d0dj2ibzsprgawx1"))))
|
||||||
|
(build-system copy-build-system)
|
||||||
|
(arguments
|
||||||
|
(list #:install-plan
|
||||||
|
#~'(("shadow-tls-x86_64-unknown-linux-musl" "bin/shadow-tls"))
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(add-after 'install 'fix-permission
|
||||||
|
(lambda _
|
||||||
|
(chmod (string-append #$output "/bin/shadow-tls") #o555))))))
|
||||||
|
(supported-systems '("x86_64-linux"))
|
||||||
|
(home-page "https://www.ihcblog.com/a-better-tls-obfs-proxy/")
|
||||||
|
(synopsis "Proxy to expose real tls handshake to the firewall")
|
||||||
|
(description
|
||||||
|
"Shadow TLS is a proxy to expose real tls handshake to the @acronym{MITM,
|
||||||
|
monster-in-the-middle}.")
|
||||||
|
(license license:expat)))
|
||||||
|
|
||||||
|
(define sidebery
|
||||||
|
(package
|
||||||
|
(name "sidebery")
|
||||||
|
(version "5.2.0.9")
|
||||||
|
(source
|
||||||
|
(origin
|
||||||
|
(method url-fetch/zipbomb)
|
||||||
|
(uri (string-append
|
||||||
|
"https://github.com/mbnuqw/sidebery/releases/download/v"
|
||||||
|
(string-drop-right version 2) "/sidebery-" version ".xpi"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"0wb8rmq25sjnlig3pi1ix2kb8x91pilhh9ag4mk2yqsv9r4gcpw8"))))
|
||||||
|
(build-system copy-build-system)
|
||||||
|
(arguments
|
||||||
|
(list
|
||||||
|
#:install-plan
|
||||||
|
#~'(("." #$(assq-ref (package-properties this-package) 'addon-id)))))
|
||||||
|
(home-page "https://github.com/mbnuqw/sidebery")
|
||||||
|
(synopsis "Manage tabs and bookmarks in sidebar")
|
||||||
|
(description
|
||||||
|
"This package provides a browser extension for managing tabs and bookmarks
|
||||||
|
in sidebar.")
|
||||||
|
(license license:expat)
|
||||||
|
(properties '((addon-id . "{3c078156-979c-498b-8990-85f7987dd929}")))))
|
||||||
|
|
||||||
|
(define-public sidebery/icecat
|
||||||
|
(make-icecat-extension sidebery))
|
||||||
|
|
||||||
|
(define-public sing-box-bin
|
||||||
|
(package
|
||||||
|
(name "sing-box-bin")
|
||||||
|
(version "1.10.1")
|
||||||
|
(source (origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (string-append
|
||||||
|
"https://github.com/SagerNet/sing-box/releases/download/v"
|
||||||
|
version "/sing-box-" version "-linux-amd64.tar.gz"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"0cadcqisnfzzf9154bj29ik1sh829rhgqqsjjxa31mgzfzn5ghcy"))))
|
||||||
|
(build-system copy-build-system)
|
||||||
|
(arguments (list #:install-plan #~'(("sing-box" "bin/"))))
|
||||||
|
(supported-systems '("x86_64-linux"))
|
||||||
|
(home-page "https://sing-box.sagernet.org/")
|
||||||
|
(synopsis "Universal proxy platform")
|
||||||
|
(description
|
||||||
|
"This package provides @command{sing-box}, a universal proxy platform.")
|
||||||
|
(license license:gpl3+)))
|
||||||
|
|
||||||
|
(define-public tailscale-bin
|
||||||
|
(package
|
||||||
|
(name "tailscale-bin")
|
||||||
|
(version "1.76.6")
|
||||||
|
(source (origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (string-append "https://pkgs.tailscale.com"
|
||||||
|
"/stable/tailscale_" version "_amd64.tgz"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"1xv1zx171k2vh6dv8hn115r8il2ckhd273x2r88y9fgpg1xkgwh8"))))
|
||||||
|
(build-system copy-build-system)
|
||||||
|
(arguments
|
||||||
|
(list #:install-plan
|
||||||
|
#~'(("." "bin/" #:include ("tailscale" "tailscaled")))))
|
||||||
|
(supported-systems '("x86_64-linux"))
|
||||||
|
(home-page "https://tailscale.com/")
|
||||||
|
(synopsis "Private WireGuard® networks made easy")
|
||||||
|
(description
|
||||||
|
"This package provides @command{tailscale}, which brings an easy and secure
|
||||||
|
way to use WireGuard and 2FA.")
|
||||||
|
(license license:bsd-3)))
|
||||||
|
|
||||||
|
(define-public wakapi-bin
|
||||||
|
(package
|
||||||
|
(name "wakapi-bin")
|
||||||
|
(version "2.12.1")
|
||||||
|
(source (origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (string-append
|
||||||
|
"https://github.com/muety/wakapi/releases/download/"
|
||||||
|
version "/wakapi_linux_amd64.zip"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"0kfid6ii9y1sp2w1na55mybyjya1c2k0jgj9h4zf64kg7isv626w"))))
|
||||||
|
(build-system copy-build-system)
|
||||||
|
(arguments (list #:install-plan #~'(("wakapi" "bin/wakapi"))))
|
||||||
|
(supported-systems '("x86_64-linux"))
|
||||||
|
(native-inputs (list unzip))
|
||||||
|
(home-page "https://wakapi.dev/")
|
||||||
|
(synopsis "WakaTime-compatible backend")
|
||||||
|
(description
|
||||||
|
"This package provides @code{wakapi}, a WakaTime-compatible backend for
|
||||||
|
coding statistics.")
|
||||||
|
(license license:expat)))
|
||||||
|
|
||||||
|
(define-public wakatime-cli-bin
|
||||||
|
(package
|
||||||
|
(name "wakatime-cli-bin")
|
||||||
|
(version "1.102.4")
|
||||||
|
(source (origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (string-append "https://github.com/wakatime/wakatime-cli"
|
||||||
|
"/releases/download/v" version
|
||||||
|
"/wakatime-cli-linux-amd64.zip"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"0pdjvz3lk318ply7gz6bsvprav5b2nj5qd8rblvzc948snlmps1z"))))
|
||||||
|
(build-system copy-build-system)
|
||||||
|
(arguments
|
||||||
|
(list #:install-plan
|
||||||
|
#~'(("wakatime-cli-linux-amd64" "bin/wakatime-cli"))))
|
||||||
|
(supported-systems '("x86_64-linux"))
|
||||||
|
(native-inputs (list unzip))
|
||||||
|
(home-page "https://wakatime.com/plugins")
|
||||||
|
(synopsis "Command line interface to WakaTime")
|
||||||
|
(description
|
||||||
|
"This package provides @command{wakatime-cli}, the command line interface
|
||||||
|
to WakaTime, which is used by all WakaTime text editor plugins.")
|
||||||
|
(license license:bsd-3)))
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
;; SPDX-FileCopyrightText: 2023 Hilton Chain <hako@ultrarare.space>
|
||||||
|
;;
|
||||||
|
;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
(define-module (rosenthal packages bootloaders)
|
||||||
|
#:use-module (guix download)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix utils)
|
||||||
|
#:use-module (gnu packages autotools)
|
||||||
|
#:use-module (gnu packages bootloaders)
|
||||||
|
#:use-module (gnu packages python))
|
||||||
|
|
||||||
|
;; Patches obtained from:
|
||||||
|
;; <https://leo3418.github.io/collections/gentoo-config-luks2-grub-systemd/packages.html>
|
||||||
|
|
||||||
|
(define grub-luks2-argon2-support-patch
|
||||||
|
(origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (string-append "https://leo3418.github.io/"
|
||||||
|
"res/collections/gentoo-config-luks2-grub-systemd/"
|
||||||
|
"grub-2.12-luks2-argon2-v4.patch"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"02y15k6rd5vj2shfijyhq2nr2775vpa55ijfy6bb8irpnh8i2272"))))
|
||||||
|
|
||||||
|
(define-public grub-efi-luks2
|
||||||
|
(let ((base grub-efi))
|
||||||
|
(package
|
||||||
|
(inherit base)
|
||||||
|
(name "grub-efi-luks2")
|
||||||
|
(source
|
||||||
|
(let ((base (package-source base)))
|
||||||
|
(origin
|
||||||
|
(inherit base)
|
||||||
|
(patches
|
||||||
|
(append (origin-patches base)
|
||||||
|
(list grub-luks2-argon2-support-patch))))))
|
||||||
|
(arguments
|
||||||
|
(substitute-keyword-arguments (package-arguments base)
|
||||||
|
((#:configure-flags flags ''())
|
||||||
|
#~(append #$flags '("--disable-werror")))
|
||||||
|
((#:phases phases '%standard-phases)
|
||||||
|
#~(modify-phases #$phases
|
||||||
|
(add-after 'unpack 'delete-configure-script
|
||||||
|
(lambda _
|
||||||
|
(delete-file "configure")))))))
|
||||||
|
(native-inputs
|
||||||
|
(modify-inputs (package-native-inputs base)
|
||||||
|
(append autoconf automake python-minimal-wrapper))))))
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
;; SPDX-FileCopyrightText: 2022 Hilton Chain <hako@ultrarare.space>
|
||||||
|
;;
|
||||||
|
;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
(define-module (rosenthal packages busybox)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix utils)
|
||||||
|
#:use-module (gnu packages busybox))
|
||||||
|
|
||||||
|
(define-public busybox/static
|
||||||
|
(let ((base busybox))
|
||||||
|
(package
|
||||||
|
(inherit base)
|
||||||
|
(name "busybox-static")
|
||||||
|
(arguments
|
||||||
|
(substitute-keyword-arguments (package-arguments base)
|
||||||
|
((#:phases phases)
|
||||||
|
#~(modify-phases #$phases
|
||||||
|
(add-after 'configure 'static-build
|
||||||
|
(lambda _
|
||||||
|
(substitute* ".config"
|
||||||
|
(("# CONFIG_STATIC is not set")
|
||||||
|
"CONFIG_STATIC=y"))))
|
||||||
|
;; FIXME: All mdev tests fail when building staticly.
|
||||||
|
(add-before 'check 'disable-failing-tests
|
||||||
|
(lambda _
|
||||||
|
(delete-file "testsuite/mdev.tests"))))))))))
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
;; SPDX-FileCopyrightText: 2022-2024 Hilton Chain <hako@ultrarare.space>
|
||||||
|
;;
|
||||||
|
;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
(define-module (rosenthal packages dns)
|
||||||
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
|
#:use-module (guix build-system copy)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix git-download)
|
||||||
|
#:use-module (guix packages))
|
||||||
|
|
||||||
|
(define-public dnsmasq-china-list
|
||||||
|
;; No version.
|
||||||
|
(let ((commit "8c4858a70358734581c4803051ac8d06e70b9987")
|
||||||
|
(revision "17"))
|
||||||
|
(package
|
||||||
|
(name "dnsmasq-china-list")
|
||||||
|
(version (git-version "0" revision commit))
|
||||||
|
(source (origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/felixonmars/dnsmasq-china-list")
|
||||||
|
(commit commit)))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"1cy20fpz47d5s7ba4g8a826720sx0c0nq7jc9xc7l8vwl10nz5h5"))))
|
||||||
|
(build-system copy-build-system)
|
||||||
|
(arguments
|
||||||
|
(list #:install-plan
|
||||||
|
#~'(("." "share/dnsmasq-china-list/" #:include-regexp ("\\.conf")))
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(add-before 'install 'build
|
||||||
|
(lambda _
|
||||||
|
(for-each (lambda (target)
|
||||||
|
(invoke "make" target
|
||||||
|
"SERVER=domestic"
|
||||||
|
"SMARTDNS_SPEEDTEST_MODE=tcp:80"))
|
||||||
|
'("adguardhome"
|
||||||
|
"bind"
|
||||||
|
"coredns"
|
||||||
|
"dnscrypt-proxy"
|
||||||
|
"dnsforwarder6"
|
||||||
|
"dnsmasq"
|
||||||
|
"smartdns" "smartdns-domain-rules"
|
||||||
|
"unbound")))))))
|
||||||
|
(home-page "https://github.com/felixonmars/dnsmasq-china-list")
|
||||||
|
(synopsis "Chinese-specific DNS server configurations")
|
||||||
|
(description
|
||||||
|
"Chinese-specific configuration to improve your favorite DNS server.
|
||||||
|
Best partner for chnroutes.
|
||||||
|
|
||||||
|
@itemize
|
||||||
|
@item Improve resolve speed for Chinese domains.
|
||||||
|
@item Get the best CDN node near you whenever possible, but don't compromise
|
||||||
|
foreign CDN results so you also get best CDN node for your VPN at the same
|
||||||
|
time.
|
||||||
|
@item Block ISP ads on NXDOMAIN result (like 114so).
|
||||||
|
@end itemize")
|
||||||
|
(license license:wtfpl2))))
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
;; SPDX-FileCopyrightText: 2022-2024 Hilton Chain <hako@ultrarare.space>
|
||||||
|
;;
|
||||||
|
;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
(define-module (rosenthal packages emacs-xyz)
|
||||||
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
|
#:use-module (guix build-system emacs)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix git-download)
|
||||||
|
#:use-module (guix packages))
|
||||||
|
|
||||||
|
(define-public emacs-pcmpl-tailscale
|
||||||
|
(let ((commit "acd6bce54af506b0450cf6aa1068f63d4e25c8ce")
|
||||||
|
(revision "0"))
|
||||||
|
(package
|
||||||
|
(name "emacs-pcmpl-tailscale")
|
||||||
|
(version (git-version "0.0.1" revision commit))
|
||||||
|
(source
|
||||||
|
(origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://git.thanosapollo.org/pcmpl-tailscale")
|
||||||
|
(commit commit)))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32 "0lk808ahy8ckg2fr2pqk3p5if81nqrwsajrgqafv9hgn8w4l1x0p"))))
|
||||||
|
(build-system emacs-build-system)
|
||||||
|
(home-page "https://git.thanosapollo.org/pcmpl-tailscale")
|
||||||
|
(synopsis "Enhanced shell completions for tailscale")
|
||||||
|
(description
|
||||||
|
"This package provides enhanced completions for the tailscale command
|
||||||
|
and it's subcommands.")
|
||||||
|
(license license:gpl3+))))
|
||||||
|
|
||||||
|
;; https://issues.guix.gnu.org/59552
|
||||||
|
(define-public emacs-wakatime-mode
|
||||||
|
;; No release since May 5, 2015.
|
||||||
|
(let ((commit "1c5b2254dd72f2ff504d6a6189a8c10be03a98d1")
|
||||||
|
(revision "60"))
|
||||||
|
(package
|
||||||
|
(name "emacs-wakatime-mode")
|
||||||
|
;; 1.0.2 on commit 32a0154cd4bbd525d354997e6b12c6a9726d0b43, not tagged
|
||||||
|
(version (git-version "1.0.2" revision commit))
|
||||||
|
(source (origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/wakatime/wakatime-mode")
|
||||||
|
(commit commit)))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"00qv6b756qiaqrmfg1w03psnsdj0iaz3sp50ib4kmdm2g9vgxl1s"))))
|
||||||
|
(build-system emacs-build-system)
|
||||||
|
(arguments
|
||||||
|
(list #:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
;; XXX: WakaTime hasn't packaged in Guix yet.
|
||||||
|
(delete 'patch-el-files))))
|
||||||
|
(home-page "https://wakatime.com/emacs")
|
||||||
|
(synopsis "Automatic time tracking extension for Emacs using WakaTime")
|
||||||
|
(description
|
||||||
|
"WakaTime mode is an Emacs minor mode for automatic time tracking and
|
||||||
|
metrics generated from your programming activity.")
|
||||||
|
(license license:gpl3+))))
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
;; SPDX-FileCopyrightText: 2022 Hilton Chain <hako@ultrarare.space>
|
||||||
|
;;
|
||||||
|
;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
(define-module (rosenthal packages freedesktop)
|
||||||
|
#:use-module (guix git-download)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (gnu packages check)
|
||||||
|
#:use-module (gnu packages freedesktop)
|
||||||
|
#:use-module (gnu packages python))
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
;; SPDX-FileCopyrightText: 2022-2024 Hilton Chain <hako@ultrarare.space>
|
||||||
|
;;
|
||||||
|
;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
(define-module (rosenthal packages networking)
|
||||||
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
|
#:use-module (guix build-system go)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix git-download)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (gnu packages golang)
|
||||||
|
#:use-module (gnu packages golang-build))
|
||||||
|
|
||||||
|
(define-public cloudflared
|
||||||
|
(package
|
||||||
|
(name "cloudflared")
|
||||||
|
(version "2024.11.1")
|
||||||
|
(source (origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/cloudflare/cloudflared")
|
||||||
|
(commit version)))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
;; TODO: Unbundle vendored dependencies.
|
||||||
|
;; (modules '((guix build utils)))
|
||||||
|
;; (snippet '(delete-file-recursively "vendor"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"0dzknn06si0q8zqv9pwfvg7ypk46x1rl0fifwd8k0jyy47n92172"))))
|
||||||
|
(build-system go-build-system)
|
||||||
|
(arguments
|
||||||
|
(list #:go go-1.23
|
||||||
|
#:install-source? #f
|
||||||
|
#:import-path "github.com/cloudflare/cloudflared/cmd/cloudflared"
|
||||||
|
#:unpack-path "github.com/cloudflare/cloudflared"
|
||||||
|
#:build-flags
|
||||||
|
#~(list (string-append
|
||||||
|
"-ldflags="
|
||||||
|
" -X main.Version=" #$(package-version this-package)
|
||||||
|
" -X github.com/cloudflare/cloudflared/cmd/cloudflared/updater.BuiltForPackageManager=Guix"))
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(add-before 'build 'disable-cgo
|
||||||
|
(lambda _
|
||||||
|
(setenv "CGO_ENABLED" "0")))
|
||||||
|
(add-after 'install 'install-documentation
|
||||||
|
(lambda _
|
||||||
|
(let ((src "src/github.com/cloudflare/cloudflared/cloudflared_man_template")
|
||||||
|
(dst (string-append #$output "/share/man/man1/cloudflared.1")))
|
||||||
|
(substitute* src
|
||||||
|
(("\\$\\{VERSION\\}") #$(package-version this-package)))
|
||||||
|
(mkdir-p (dirname dst))
|
||||||
|
(copy-file src dst)))))))
|
||||||
|
(home-page "https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/")
|
||||||
|
(synopsis "Cloudflare Tunnel client")
|
||||||
|
(description
|
||||||
|
"This package provides the command-line client for Cloudflare Tunnel, a
|
||||||
|
tunneling daemon that proxies traffic from the Cloudflare network to your
|
||||||
|
origins. This daemon sits between Cloudflare network and your origin (e.g. a
|
||||||
|
webserver). Cloudflare attracts client requests and sends them to you via
|
||||||
|
this daemon, without requiring you to poke holes on your firewall --- your
|
||||||
|
origin can remain as closed as possible.")
|
||||||
|
(license license:asl2.0)))
|
||||||
|
|
||||||
|
(define-public socks2http
|
||||||
|
(package
|
||||||
|
(name "socks2http")
|
||||||
|
(version "0.0.0-20160712034938-bafa2cde8eb4")
|
||||||
|
(source (origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/zenhack/socks2http")
|
||||||
|
(commit (go-version->git-ref version))))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"0c388rir9d0cy5vxqxj7m72nra0w5cya4mmgqdcvqmnk2vawdyb9"))))
|
||||||
|
(build-system go-build-system)
|
||||||
|
(arguments
|
||||||
|
(list #:install-source? #f
|
||||||
|
#:import-path "github.com/zenhack/socks2http"))
|
||||||
|
(inputs (list go-golang-org-x-net))
|
||||||
|
(home-page "https://github.com/zenhack/socks2http")
|
||||||
|
(synopsis "SOCKS5 to HTTP proxy")
|
||||||
|
(description
|
||||||
|
"This package provides a simple tool to plumb HTTP proxy requests through
|
||||||
|
a SOCKS5 proxy.")
|
||||||
|
(license license:expat)))
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
;; SPDX-FileCopyrightText: 2022 Hilton Chain <hako@ultrarare.space>
|
||||||
|
;;
|
||||||
|
;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
(define-module (rosenthal packages ssh)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix utils)
|
||||||
|
#:use-module (gnu packages compression)
|
||||||
|
#:use-module (gnu packages multiprecision)
|
||||||
|
#:use-module (gnu packages ssh))
|
||||||
|
|
||||||
|
(define-public dropbear/static
|
||||||
|
(let ((base dropbear))
|
||||||
|
(package
|
||||||
|
(inherit dropbear)
|
||||||
|
(name "dropbear-static")
|
||||||
|
(arguments
|
||||||
|
(substitute-keyword-arguments (package-arguments base)
|
||||||
|
((#:configure-flags flags)
|
||||||
|
#~(append #$flags (list "--enable-static")))))
|
||||||
|
(inputs
|
||||||
|
(modify-inputs (package-inputs base)
|
||||||
|
(append `(,zlib "static"))
|
||||||
|
(replace "libtomcrypt" `(,libtomcrypt "static"))
|
||||||
|
(replace "libtommath" `(,libtommath "static")))))))
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
(define-module (rosenthal packages tree-sitter)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix packages))
|
||||||
|
|
||||||
|
(define tree-sitter-grammar
|
||||||
|
(@@ (gnu packages tree-sitter) tree-sitter-grammar))
|
||||||
|
|
||||||
|
(define-public tree-sitter-yaml
|
||||||
|
(let ((base
|
||||||
|
(tree-sitter-grammar
|
||||||
|
"yaml" "YAML"
|
||||||
|
"1bimf5fq85wn8dwlk665w15n2bj37fma5rsfxrph3i9yb0lvzi3q"
|
||||||
|
"0.5.0"
|
||||||
|
#:repository-url "https://github.com/ikatyang/tree-sitter-yaml"
|
||||||
|
#:get-cleanup-snippet
|
||||||
|
(lambda (grammar-directories)
|
||||||
|
#~(begin
|
||||||
|
(use-modules (guix build utils))
|
||||||
|
(delete-file-recursively "docs")
|
||||||
|
(delete-file "binding.gyp")
|
||||||
|
(delete-file-recursively "bindings")
|
||||||
|
(for-each
|
||||||
|
(lambda (lang)
|
||||||
|
(with-directory-excursion lang
|
||||||
|
(delete-file "src/grammar.json")
|
||||||
|
(delete-file "src/node-types.json")
|
||||||
|
(delete-file "src/parser.c")
|
||||||
|
(delete-file-recursively "src/tree_sitter")))
|
||||||
|
'#$grammar-directories))))))
|
||||||
|
(package
|
||||||
|
(inherit base)
|
||||||
|
(arguments
|
||||||
|
(append '(#:tests? #f) ;FIXME
|
||||||
|
(package-arguments base))))))
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
;; SPDX-FileCopyrightText: 2022 Hilton Chain <hako@ultrarare.space>
|
||||||
|
;;
|
||||||
|
;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
(define-module (rosenthal packages video)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix utils)
|
||||||
|
#:use-module (gnu packages video))
|
||||||
|
|
||||||
|
(define-public libva-nox
|
||||||
|
(let ((base libva))
|
||||||
|
(package
|
||||||
|
(inherit base)
|
||||||
|
(name "libva-nox")
|
||||||
|
(arguments
|
||||||
|
(substitute-keyword-arguments (package-arguments base)
|
||||||
|
((#:configure-flags configure-flags)
|
||||||
|
#~(append #$configure-flags (list "--disable-glx")))
|
||||||
|
((#:phases _) #~%standard-phases)))
|
||||||
|
(inputs
|
||||||
|
(modify-inputs (package-inputs base)
|
||||||
|
(delete "libx11" "libxext" "libxfixes"))))))
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
;; SPDX-FileCopyrightText: 2022 Hilton Chain <hako@ultrarare.space>
|
||||||
|
;;
|
||||||
|
;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
(define-module (rosenthal packages web)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix git-download)
|
||||||
|
#:use-module (gnu packages web))
|
||||||
|
|
||||||
|
(define-public buku-run-dev
|
||||||
|
(let ((revision "23")
|
||||||
|
(commit "54fcdd77fc1e8e657b785b7d4ca8dc915e5f336b"))
|
||||||
|
(package
|
||||||
|
(inherit buku-run)
|
||||||
|
(name "buku-run-dev")
|
||||||
|
(version (git-version "0.1.1" revision commit))
|
||||||
|
(source (origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/carnager/buku_run")
|
||||||
|
(commit commit)))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"079ygn39px71bypa54jn4z55iq24lxxcy7jv3ijy08iinqbfvldc")))))))
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
;; SPDX-FileCopyrightText: 2022-2023 Hilton Chain <hako@ultrarare.space>
|
||||||
|
;;
|
||||||
|
;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
(define-module (rosenthal packages wm)
|
||||||
|
#:use-module (srfi srfi-26)
|
||||||
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
|
#:use-module (guix download)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix git-download)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix build-system cmake)
|
||||||
|
#:use-module (guix build-system gnu)
|
||||||
|
#:use-module (guix build-system meson)
|
||||||
|
#:use-module (guix build-system qt)
|
||||||
|
#:use-module (gnu packages admin)
|
||||||
|
#:use-module (gnu packages autotools)
|
||||||
|
#:use-module (gnu packages base)
|
||||||
|
#:use-module (gnu packages bash)
|
||||||
|
#:use-module (gnu packages cmake)
|
||||||
|
#:use-module (gnu packages commencement)
|
||||||
|
#:use-module (gnu packages compression)
|
||||||
|
#:use-module (gnu packages cpp)
|
||||||
|
#:use-module (gnu packages freedesktop)
|
||||||
|
#:use-module (gnu packages gcc)
|
||||||
|
#:use-module (gnu packages gl)
|
||||||
|
#:use-module (gnu packages glib)
|
||||||
|
#:use-module (gnu packages gnome)
|
||||||
|
#:use-module (gnu packages gtk)
|
||||||
|
#:use-module (gnu packages guile)
|
||||||
|
#:use-module (gnu packages image)
|
||||||
|
#:use-module (gnu packages linux)
|
||||||
|
#:use-module (gnu packages man)
|
||||||
|
#:use-module (gnu packages pciutils)
|
||||||
|
#:use-module (gnu packages pkg-config)
|
||||||
|
#:use-module (gnu packages python)
|
||||||
|
#:use-module (gnu packages qt)
|
||||||
|
#:use-module (gnu packages web)
|
||||||
|
#:use-module (gnu packages wm)
|
||||||
|
#:use-module (gnu packages xdisorg)
|
||||||
|
#:use-module (gnu packages xml)
|
||||||
|
#:use-module (gnu packages xorg))
|
||||||
@@ -0,0 +1,148 @@
|
|||||||
|
;; SPDX-FileCopyrightText: 2022, 2023 Hilton Chain <hako@ultrarare.space>
|
||||||
|
;;
|
||||||
|
;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
(define-module (rosenthal services bittorrent)
|
||||||
|
#:use-module (ice-9 format)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix records)
|
||||||
|
#:use-module (gnu packages admin)
|
||||||
|
#:use-module (gnu packages bittorrent)
|
||||||
|
#:use-module (gnu services)
|
||||||
|
#:use-module (gnu services configuration)
|
||||||
|
#:use-module (gnu services shepherd)
|
||||||
|
#:use-module (gnu home services)
|
||||||
|
#:use-module (gnu home services shepherd)
|
||||||
|
#:use-module (gnu system shadow)
|
||||||
|
#:export (qbittorrent-configuration
|
||||||
|
qbittorrent-service-type
|
||||||
|
home-qbittorrent-service-type))
|
||||||
|
|
||||||
|
;;
|
||||||
|
;; qBittorrent
|
||||||
|
;;
|
||||||
|
|
||||||
|
|
||||||
|
(define-configuration qbittorrent-configuration
|
||||||
|
(qbittorrent
|
||||||
|
(file-like qbittorrent-nox)
|
||||||
|
"The qBittorrent package to use, we need @command{qbittorrent-nox}.")
|
||||||
|
(webui-port
|
||||||
|
(integer 8080)
|
||||||
|
"Change the Web UI port.")
|
||||||
|
(profile-directory
|
||||||
|
(string "/var/lib/qbittorrent")
|
||||||
|
"Directory to store configuration files in.")
|
||||||
|
(extra-options
|
||||||
|
(list-of-strings '())
|
||||||
|
"List of extra options.")
|
||||||
|
(no-serialization))
|
||||||
|
|
||||||
|
(define %qbittorrent-accounts
|
||||||
|
(list (user-group (name "qbittorrent") (system? #t))
|
||||||
|
(user-account
|
||||||
|
(name "qbittorrent")
|
||||||
|
(group "qbittorrent")
|
||||||
|
(system? #t)
|
||||||
|
(comment "qBittorrent user")
|
||||||
|
(home-directory "/var/empty")
|
||||||
|
(shell (file-append shadow "/sbin/nologin")))))
|
||||||
|
|
||||||
|
;; Set default password to adminadmin
|
||||||
|
(define %qbittorrent-default-config-file
|
||||||
|
(plain-file
|
||||||
|
"qBittorrent.conf"
|
||||||
|
(format #f "~
|
||||||
|
[LegalNotice]
|
||||||
|
Accepted=true
|
||||||
|
[Preferences]
|
||||||
|
WebUI\\Password_PBKDF2=\"@ByteArray(ARQ77eY1NUZaQsuDHbIMCA==:0WMRkYTUWVT9wVvdDtHAjU9b3b7uB8NR1Gur2hmQCvCDpm39Q+PsJRJPaCU51dEiz+dTzh8qbPsL8WkFljQYFQ==)\"~%")))
|
||||||
|
|
||||||
|
(define qbittorrent-activation
|
||||||
|
(match-record-lambda <qbittorrent-configuration>
|
||||||
|
(profile-directory)
|
||||||
|
#~(begin
|
||||||
|
(use-modules (srfi srfi-26)
|
||||||
|
(guix build utils))
|
||||||
|
(let ((user (getpwnam "qbittorrent"))
|
||||||
|
(config-file
|
||||||
|
(string-append
|
||||||
|
#$profile-directory "/qBittorrent/config/qBittorrent.conf")))
|
||||||
|
(unless (file-exists? config-file)
|
||||||
|
(mkdir-p (dirname config-file))
|
||||||
|
(copy-file #$%qbittorrent-default-config-file config-file)
|
||||||
|
(map (cut chown <> (passwd:uid user) (passwd:gid user))
|
||||||
|
(cons #$profile-directory
|
||||||
|
(find-files #$profile-directory #:directories? #t))))))))
|
||||||
|
|
||||||
|
(define qbittorrent-shepherd-service
|
||||||
|
(match-record-lambda <qbittorrent-configuration>
|
||||||
|
(qbittorrent webui-port profile-directory extra-options)
|
||||||
|
(list (shepherd-service
|
||||||
|
(documentation "Run qbittorrent.")
|
||||||
|
(provision '(qbittorrent))
|
||||||
|
(requirement '(networking))
|
||||||
|
(start #~(make-forkexec-constructor
|
||||||
|
(list #$(file-append qbittorrent "/bin/qbittorrent-nox")
|
||||||
|
#$(string-append "--webui-port="
|
||||||
|
(number->string webui-port))
|
||||||
|
#$(string-append "--profile=" profile-directory)
|
||||||
|
#$@extra-options)
|
||||||
|
#:user "qbittorrent"
|
||||||
|
#:group "qbittorrent"
|
||||||
|
#:resource-limits '((nofile 65536 65536))))
|
||||||
|
(stop #~(make-kill-destructor #:grace-period 1800))
|
||||||
|
(actions
|
||||||
|
(list (shepherd-configuration-action
|
||||||
|
(string-append profile-directory
|
||||||
|
"/qBittorrent/config/qBittorrent.conf"))))))))
|
||||||
|
|
||||||
|
(define qbittorrent-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'qbittorrent)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension shepherd-root-service-type
|
||||||
|
qbittorrent-shepherd-service)
|
||||||
|
(service-extension activation-service-type
|
||||||
|
qbittorrent-activation)
|
||||||
|
(service-extension account-service-type
|
||||||
|
(const %qbittorrent-accounts))))
|
||||||
|
(default-value (qbittorrent-configuration))
|
||||||
|
(description "Run qBittorrent daemon.")))
|
||||||
|
|
||||||
|
(define home-qbittorrent-activation
|
||||||
|
#~(let ((config-file
|
||||||
|
(string-append
|
||||||
|
(or (getenv "XDG_CONFIG_HOME")
|
||||||
|
(string-append user-homedir "/.config"))
|
||||||
|
"/qBittorrent/qBittorrent.conf")))
|
||||||
|
(unless (file-exists? config-file)
|
||||||
|
(mkdir-p (dirname config-file))
|
||||||
|
(copy-file #$%qbittorrent-default-config-file config-file))))
|
||||||
|
|
||||||
|
(define home-qbittorrent-shepherd-service
|
||||||
|
(match-record-lambda <qbittorrent-configuration>
|
||||||
|
(qbittorrent webui-port extra-options)
|
||||||
|
(list (shepherd-service
|
||||||
|
(documentation "Run qbittorrent.")
|
||||||
|
(provision '(qbittorrent))
|
||||||
|
(requirement '())
|
||||||
|
(start
|
||||||
|
#~(make-forkexec-constructor
|
||||||
|
(list
|
||||||
|
#$(file-append qbittorrent "/bin/qbittorrent-nox")
|
||||||
|
#$(string-append "--webui-port=" (number->string webui-port))
|
||||||
|
#$@extra-options)))
|
||||||
|
(stop #~(make-kill-destructor #:grace-period 1800))
|
||||||
|
(auto-start? #f)))))
|
||||||
|
|
||||||
|
(define home-qbittorrent-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'qbittorrent)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension home-activation-service-type
|
||||||
|
(const home-qbittorrent-activation))
|
||||||
|
(service-extension home-shepherd-service-type
|
||||||
|
home-qbittorrent-shepherd-service)))
|
||||||
|
(default-value (qbittorrent-configuration))
|
||||||
|
(description "Run qBittorrent daemon.")))
|
||||||
@@ -0,0 +1,554 @@
|
|||||||
|
;; SPDX-FileCopyrightText: 2022, 2023 Hilton Chain <hako@ultrarare.space>
|
||||||
|
;;
|
||||||
|
;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
(define-module (rosenthal services child-error)
|
||||||
|
#:use-module (guix records)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (gnu home services)
|
||||||
|
#:use-module (gnu home services shepherd)
|
||||||
|
#:use-module (gnu packages admin)
|
||||||
|
#:use-module (gnu packages web)
|
||||||
|
#:use-module (gnu services)
|
||||||
|
#:use-module (gnu services admin)
|
||||||
|
#:use-module (gnu services configuration)
|
||||||
|
#:use-module (gnu services databases)
|
||||||
|
#:use-module (gnu services shepherd)
|
||||||
|
#:use-module (gnu system shadow)
|
||||||
|
#:use-module (rosenthal packages binaries)
|
||||||
|
#:use-module (rosenthal packages networking)
|
||||||
|
#:use-module (rosenthal utils home-services-utils)
|
||||||
|
#:export (clash-configuration
|
||||||
|
clash-service-type
|
||||||
|
|
||||||
|
cloudflare-tunnel-configuration
|
||||||
|
cloudflare-tunnel-service-type
|
||||||
|
|
||||||
|
cloudflare-warp-configuration
|
||||||
|
cloudflare-warp-service-type
|
||||||
|
|
||||||
|
miniflux-configuration
|
||||||
|
miniflux-service-type
|
||||||
|
|
||||||
|
home-wakapi-configuration
|
||||||
|
home-wakapi-service-type
|
||||||
|
|
||||||
|
shadow-tls-configuration
|
||||||
|
shadow-tls-client-configuration
|
||||||
|
shadow-tls-server-configuration
|
||||||
|
shadow-tls-service-type
|
||||||
|
home-shadow-tls-service-type
|
||||||
|
|
||||||
|
home-socks2http-configuration
|
||||||
|
home-socks2http-service-type))
|
||||||
|
|
||||||
|
;;
|
||||||
|
;; Clash
|
||||||
|
;;
|
||||||
|
|
||||||
|
|
||||||
|
(define-configuration clash-configuration
|
||||||
|
(clash
|
||||||
|
(file-like mihomo-bin)
|
||||||
|
"The clash package.")
|
||||||
|
|
||||||
|
(log-file
|
||||||
|
(string "/var/log/clash.log")
|
||||||
|
"Where the logs go.")
|
||||||
|
|
||||||
|
(data-directory
|
||||||
|
(string "/var/lib/clash")
|
||||||
|
"Where to store data.")
|
||||||
|
|
||||||
|
(config
|
||||||
|
(file-like (plain-file "empty" ""))
|
||||||
|
"Clash configuration file.")
|
||||||
|
|
||||||
|
(shepherd-provision
|
||||||
|
(list '(clash))
|
||||||
|
"A list of Shepherd service names (symbols) provided by this service.")
|
||||||
|
(no-serialization))
|
||||||
|
|
||||||
|
(define %clash-accounts
|
||||||
|
(list (user-group (name "clash") (system? #t))))
|
||||||
|
|
||||||
|
(define clash-activation
|
||||||
|
(match-record-lambda <clash-configuration>
|
||||||
|
(data-directory config)
|
||||||
|
#~(begin
|
||||||
|
(use-modules (guix build utils))
|
||||||
|
(let ((config-dest (string-append #$data-directory "/config.yaml")))
|
||||||
|
(mkdir-p #$data-directory)
|
||||||
|
(if (file-exists? config-dest)
|
||||||
|
(delete-file config-dest))
|
||||||
|
(symlink #$config config-dest)))))
|
||||||
|
|
||||||
|
(define (clash-log-rotations config)
|
||||||
|
(list (log-rotation
|
||||||
|
(files (list (clash-configuration-log-file config))))))
|
||||||
|
|
||||||
|
(define clash-shepherd-service
|
||||||
|
(match-record-lambda <clash-configuration>
|
||||||
|
(clash log-file data-directory shepherd-provision)
|
||||||
|
(list (shepherd-service
|
||||||
|
(documentation "Run clash.")
|
||||||
|
(provision shepherd-provision)
|
||||||
|
(requirement '(loopback networking))
|
||||||
|
(start #~(make-forkexec-constructor
|
||||||
|
(list (let ((mihomo-cmd
|
||||||
|
#$(file-append clash "/bin/mihomo"))
|
||||||
|
(clash-cmd
|
||||||
|
#$(file-append clash "/bin/clash")))
|
||||||
|
(if (file-exists? mihomo-cmd)
|
||||||
|
mihomo-cmd
|
||||||
|
clash-cmd))
|
||||||
|
"-d" #$data-directory)
|
||||||
|
#:group "clash"
|
||||||
|
#:log-file #$log-file))
|
||||||
|
(stop #~(make-kill-destructor))
|
||||||
|
(actions
|
||||||
|
(list (shepherd-configuration-action
|
||||||
|
(string-append data-directory "/config.yaml"))))))))
|
||||||
|
|
||||||
|
(define clash-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'clash)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension shepherd-root-service-type
|
||||||
|
clash-shepherd-service)
|
||||||
|
(service-extension activation-service-type
|
||||||
|
clash-activation)
|
||||||
|
(service-extension account-service-type
|
||||||
|
(const %clash-accounts))
|
||||||
|
(service-extension rottlog-service-type
|
||||||
|
clash-log-rotations)))
|
||||||
|
(default-value (clash-configuration))
|
||||||
|
(description "Run Clash.")))
|
||||||
|
|
||||||
|
|
||||||
|
;;
|
||||||
|
;; Cloudflare Tunnel
|
||||||
|
;;
|
||||||
|
|
||||||
|
|
||||||
|
(define-configuration cloudflare-tunnel-configuration
|
||||||
|
(cloudflared
|
||||||
|
(file-like cloudflared)
|
||||||
|
"The cloudflared executable.")
|
||||||
|
|
||||||
|
;; Tunnel options
|
||||||
|
(log-level
|
||||||
|
(string "info")
|
||||||
|
"Application logging level (@code{debug}, @code{info}, @code{warn},
|
||||||
|
@code{error}, @code{fatal}). At debug level cloudflared will log request URL,
|
||||||
|
method, protocol, content length, as well as, all request and response
|
||||||
|
headers. This can expose sensitive information in your logs.")
|
||||||
|
(log-file
|
||||||
|
(string "/var/log/cloudflared.log")
|
||||||
|
"File path to store logs.")
|
||||||
|
(extra-tunnel-options
|
||||||
|
(list-of-strings '())
|
||||||
|
"List of extra tunnel options.")
|
||||||
|
|
||||||
|
;; Subcommand options
|
||||||
|
(token
|
||||||
|
(string "")
|
||||||
|
"The Tunnel token.")
|
||||||
|
(extra-options
|
||||||
|
(list-of-strings '())
|
||||||
|
"List of extra options.")
|
||||||
|
(no-serialization))
|
||||||
|
|
||||||
|
(define (cloudflare-tunnel-log-rotations config)
|
||||||
|
(list (log-rotation
|
||||||
|
(files (list (cloudflare-tunnel-configuration-log-file config))))))
|
||||||
|
|
||||||
|
(define cloudflare-tunnel-shepherd-service
|
||||||
|
(match-record-lambda <cloudflare-tunnel-configuration>
|
||||||
|
(cloudflared log-level log-file extra-tunnel-options
|
||||||
|
token extra-options)
|
||||||
|
(list (shepherd-service
|
||||||
|
(documentation "Run cloudflared.")
|
||||||
|
(provision '(cloudflare-tunnel))
|
||||||
|
(requirement '(loopback networking))
|
||||||
|
(start #~(make-forkexec-constructor
|
||||||
|
(list #$(file-append cloudflared "/bin/cloudflared")
|
||||||
|
"tunnel"
|
||||||
|
"--no-autoupdate"
|
||||||
|
"--loglevel" #$log-level
|
||||||
|
#$@extra-tunnel-options
|
||||||
|
"run"
|
||||||
|
#$@extra-options)
|
||||||
|
#:user "nobody"
|
||||||
|
#:group "nogroup"
|
||||||
|
#:log-file #$log-file
|
||||||
|
#:environment-variables
|
||||||
|
(list (format #f "TUNNEL_TOKEN=~a" #$token))))
|
||||||
|
(stop #~(make-kill-destructor))))))
|
||||||
|
|
||||||
|
(define cloudflare-tunnel-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'cloudflare-tunnel)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension shepherd-root-service-type
|
||||||
|
cloudflare-tunnel-shepherd-service)
|
||||||
|
(service-extension rottlog-service-type
|
||||||
|
cloudflare-tunnel-log-rotations)))
|
||||||
|
(default-value (cloudflare-tunnel-configuration))
|
||||||
|
(description "Run cloudflared, the Cloudflare Tunnel daemon.")))
|
||||||
|
|
||||||
|
|
||||||
|
;;
|
||||||
|
;; Cloudflare Warp
|
||||||
|
;;
|
||||||
|
|
||||||
|
|
||||||
|
(define-configuration cloudflare-warp-configuration
|
||||||
|
(cloudflare-warp
|
||||||
|
(file-like cloudflare-warp-bin)
|
||||||
|
"The Cloudflare Warp package.")
|
||||||
|
(no-serialization))
|
||||||
|
|
||||||
|
(define cloudflare-warp-shepherd-service
|
||||||
|
(match-record-lambda <cloudflare-warp-configuration>
|
||||||
|
(cloudflare-warp)
|
||||||
|
(list (shepherd-service
|
||||||
|
(documentation "Run warp-svc.")
|
||||||
|
(provision '(cloudflare-warp))
|
||||||
|
(start #~(make-forkexec-constructor
|
||||||
|
(list #$(file-append cloudflare-warp "/bin/warp-svc"))
|
||||||
|
;; Logs are written to
|
||||||
|
;; /var/lib/cloudflare-warp/cfwarp_service_log.txt.
|
||||||
|
#:log-file "/dev/null"))
|
||||||
|
(stop #~(make-kill-destructor))))))
|
||||||
|
|
||||||
|
(define cloudflare-warp-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'cloudflare-warp)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension shepherd-root-service-type
|
||||||
|
cloudflare-warp-shepherd-service)
|
||||||
|
(service-extension
|
||||||
|
profile-service-type
|
||||||
|
(compose list cloudflare-warp-configuration-cloudflare-warp))))
|
||||||
|
(default-value (cloudflare-warp-configuration))
|
||||||
|
(description "Run warp-svc, the Cloudflare Warp daemon.")))
|
||||||
|
|
||||||
|
|
||||||
|
;;
|
||||||
|
;; Miniflux
|
||||||
|
;;
|
||||||
|
|
||||||
|
|
||||||
|
(define-maybe string)
|
||||||
|
|
||||||
|
(define-configuration miniflux-configuration
|
||||||
|
(miniflux
|
||||||
|
(file-like miniflux)
|
||||||
|
"The miniflux package.")
|
||||||
|
(log-file
|
||||||
|
(string "/var/log/miniflux.log")
|
||||||
|
"Where the logs go.")
|
||||||
|
(proxy-url
|
||||||
|
maybe-string
|
||||||
|
"Proxy URL to use.")
|
||||||
|
(options
|
||||||
|
(alist '())
|
||||||
|
"Association list of miniflux configuration options.")
|
||||||
|
(no-serialization))
|
||||||
|
|
||||||
|
(define %miniflux-accounts
|
||||||
|
(list (user-account
|
||||||
|
(name "miniflux")
|
||||||
|
(group "nogroup")
|
||||||
|
(system? #t)
|
||||||
|
(home-directory "/var/empty")
|
||||||
|
(shell (file-append shadow "/sbin/nologin")))))
|
||||||
|
|
||||||
|
(define %miniflux-postgresql-role
|
||||||
|
(list (postgresql-role
|
||||||
|
(name "miniflux")
|
||||||
|
(create-database? #t))))
|
||||||
|
|
||||||
|
(define miniflux-shepherd-service
|
||||||
|
(match-record-lambda <miniflux-configuration>
|
||||||
|
(miniflux log-file proxy-url options)
|
||||||
|
(let ((config-file (mixed-text-file
|
||||||
|
"miniflux.conf"
|
||||||
|
(apply string-append
|
||||||
|
(map (lambda (option)
|
||||||
|
(format #f "~a=~a~%"
|
||||||
|
(car option) (cdr option)))
|
||||||
|
options)))))
|
||||||
|
(list (shepherd-service
|
||||||
|
(documentation "Run miniflux.")
|
||||||
|
(provision '(miniflux))
|
||||||
|
(requirement '(postgres user-processes))
|
||||||
|
(start #~(make-forkexec-constructor
|
||||||
|
(list #$(file-append miniflux "/bin/miniflux")
|
||||||
|
"-config-file" #$config-file)
|
||||||
|
#:user "miniflux"
|
||||||
|
#:group "nogroup"
|
||||||
|
#:log-file #$log-file
|
||||||
|
#:environment-variables
|
||||||
|
'#$(if (maybe-value-set? proxy-url)
|
||||||
|
(list (string-append "HTTP_PROXY=" proxy-url)
|
||||||
|
(string-append "HTTPS_PROXY=" proxy-url))
|
||||||
|
'())))
|
||||||
|
(stop #~(make-kill-destructor)))))))
|
||||||
|
|
||||||
|
(define miniflux-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'miniflux)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension account-service-type
|
||||||
|
(const %miniflux-accounts))
|
||||||
|
(service-extension postgresql-role-service-type
|
||||||
|
(const %miniflux-postgresql-role))
|
||||||
|
(service-extension shepherd-root-service-type
|
||||||
|
miniflux-shepherd-service)))
|
||||||
|
(default-value (miniflux-configuration))
|
||||||
|
(description "Run Miniflux, a minimalist and opinionated feed reader.")))
|
||||||
|
|
||||||
|
|
||||||
|
;;
|
||||||
|
;; Wakapi
|
||||||
|
;;
|
||||||
|
|
||||||
|
|
||||||
|
(define-configuration home-wakapi-configuration
|
||||||
|
(wakapi
|
||||||
|
(file-like wakapi-bin)
|
||||||
|
"The wakapi package.")
|
||||||
|
(config
|
||||||
|
(yaml-config '())
|
||||||
|
"Association list of Wakapi configurations.")
|
||||||
|
(no-serialization))
|
||||||
|
|
||||||
|
(define home-wakapi-shepherd-service
|
||||||
|
(match-record-lambda <home-wakapi-configuration>
|
||||||
|
(wakapi config)
|
||||||
|
(let ((config-file (mixed-text-file
|
||||||
|
"wakapi.yaml"
|
||||||
|
#~(string-append #$@(serialize-yaml-config config) "\n"))))
|
||||||
|
(list (shepherd-service
|
||||||
|
(documentation "Run wakapi.")
|
||||||
|
(provision '(wakapi))
|
||||||
|
(start #~(make-forkexec-constructor
|
||||||
|
(list #$(file-append wakapi "/bin/wakapi")
|
||||||
|
"-config" #$config-file)))
|
||||||
|
(stop #~(make-kill-destructor))
|
||||||
|
(actions (list (shepherd-configuration-action config-file))))))))
|
||||||
|
|
||||||
|
(define home-wakapi-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'home-wakapi)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension home-shepherd-service-type
|
||||||
|
home-wakapi-shepherd-service)))
|
||||||
|
(default-value (home-wakapi-configuration))
|
||||||
|
(description "Run Wakapi, a self-hosted WakaTime-compatible backend.")))
|
||||||
|
|
||||||
|
|
||||||
|
;;
|
||||||
|
;; ShadowTLS
|
||||||
|
;;
|
||||||
|
|
||||||
|
|
||||||
|
(define-maybe list-of-strings
|
||||||
|
(no-serialization))
|
||||||
|
|
||||||
|
(define-configuration shadow-tls-client-configuration
|
||||||
|
(listen-address
|
||||||
|
(string "")
|
||||||
|
"Listen address with port. Usually this port is used by Shadowsocks
|
||||||
|
client.")
|
||||||
|
(server-address
|
||||||
|
(string "")
|
||||||
|
"ShadowTLS server address with port.")
|
||||||
|
(sni-list
|
||||||
|
(list-of-strings '(""))
|
||||||
|
"SNI list.")
|
||||||
|
(password
|
||||||
|
(string "")
|
||||||
|
"Must be the same as the ShadowTLS server.")
|
||||||
|
(alpn
|
||||||
|
maybe-list-of-strings
|
||||||
|
"ALPN ext. Do not use unless you know what you are doing.")
|
||||||
|
(no-serialization))
|
||||||
|
|
||||||
|
(define-configuration shadow-tls-server-configuration
|
||||||
|
(listen-address
|
||||||
|
(string "")
|
||||||
|
"Listen address with port.")
|
||||||
|
(server-address
|
||||||
|
(string "")
|
||||||
|
"Data server address with port. Usually this port is listened by Shadowsocks
|
||||||
|
server.")
|
||||||
|
(tls-name-list
|
||||||
|
(list-of-strings '(""))
|
||||||
|
"TLS names. There must be a fallback server name at the last, and there can
|
||||||
|
be multiple mappings. Mappings can be represented as
|
||||||
|
@code{ServerName:Host:Port}. Host can be omitted, in this case
|
||||||
|
@code{ServerName} is used as @code{Host}. @code{Port} can be omitted too, which
|
||||||
|
is @code{443} by default")
|
||||||
|
(password
|
||||||
|
(string "")
|
||||||
|
"Must be the same as the ShadowTLS client.")
|
||||||
|
(no-serialization))
|
||||||
|
|
||||||
|
(define-record-type* <shadow-tls-configuration> shadow-tls-configuration
|
||||||
|
make-shadow-tls-configuration
|
||||||
|
shadow-tls-configuration?
|
||||||
|
this-shadow-tls-configuration
|
||||||
|
|
||||||
|
(shadow-tls shadow-tls-configuration-shadow-tls ;file-like
|
||||||
|
(default shadow-tls-bin))
|
||||||
|
(threads shadow-tls-configuration-threads ;integer | #f
|
||||||
|
(default #f))
|
||||||
|
(no-delay? shadow-tls-configuration-disable-no-delay? ;boolean
|
||||||
|
(default #t))
|
||||||
|
(v3-protocol? shadow-tls-configuration-v3-protocol? ;boolean
|
||||||
|
(default #f))
|
||||||
|
(log-level shadow-tls-configuration-log-level ;string
|
||||||
|
(default "info"))
|
||||||
|
(client shadow-tls-configuration-client ;<shadow-tls-client-configuration> | #f
|
||||||
|
(default #f))
|
||||||
|
(server shadow-tls-configuration-server ;<shadow-tls-server-configuration> | #f
|
||||||
|
(default #f))
|
||||||
|
(home-service? shadow-tls-configuration-home-service?
|
||||||
|
(default for-home?) (innate)))
|
||||||
|
|
||||||
|
(define shadow-tls-shepherd-service
|
||||||
|
(match-record-lambda <shadow-tls-configuration>
|
||||||
|
(shadow-tls threads no-delay? v3-protocol? log-level client server
|
||||||
|
home-service?)
|
||||||
|
(let ((common-options
|
||||||
|
(append (if threads
|
||||||
|
`("--threads" ,(number->string threads))
|
||||||
|
'())
|
||||||
|
(if no-delay?
|
||||||
|
'()
|
||||||
|
'("--disable-nodelay"))
|
||||||
|
(if v3-protocol?
|
||||||
|
'("--v3")
|
||||||
|
'()))))
|
||||||
|
(append
|
||||||
|
(if client
|
||||||
|
(match-record client
|
||||||
|
<shadow-tls-client-configuration>
|
||||||
|
(listen-address server-address sni-list password alpn)
|
||||||
|
(let ((log-file
|
||||||
|
(if home-service?
|
||||||
|
#~(string-append %user-log-dir "/shadow-tls-client.log")
|
||||||
|
"/var/log/shadow-tls-client.log")))
|
||||||
|
(list (shepherd-service
|
||||||
|
(documentation "Run shadow-tls client.")
|
||||||
|
(provision '(shadow-tls-client))
|
||||||
|
(requirement (if home-service? '() '(networking)))
|
||||||
|
(modules '((shepherd support)))
|
||||||
|
(start #~(make-forkexec-constructor
|
||||||
|
(list #$(file-append
|
||||||
|
shadow-tls "/bin/shadow-tls")
|
||||||
|
#$@common-options
|
||||||
|
"client"
|
||||||
|
"--listen" #$listen-address
|
||||||
|
"--server" #$server-address
|
||||||
|
"--sni" #$(string-join sni-list ";")
|
||||||
|
"--password" #$password
|
||||||
|
#$@(if (maybe-value-set? alpn)
|
||||||
|
`("--alpn" ,(string-join alpn ";"))
|
||||||
|
'()))
|
||||||
|
#:user #$(and (not home-service?) "nobody")
|
||||||
|
#:group #$(and (not home-service?) "nogroup")
|
||||||
|
#:log-file #$log-file
|
||||||
|
#:environment-variables
|
||||||
|
(list (string-append "RUST_LOG=" #$log-level))))
|
||||||
|
(stop #~(make-kill-destructor))))))
|
||||||
|
'())
|
||||||
|
(if server
|
||||||
|
(match-record server
|
||||||
|
<shadow-tls-server-configuration>
|
||||||
|
(listen-address server-address tls-name-list password)
|
||||||
|
(let ((log-file
|
||||||
|
(if home-service?
|
||||||
|
#~(string-append %user-log-dir "/shadow-tls-server.log")
|
||||||
|
"/var/log/shadow-tls-server.log")))
|
||||||
|
(list (shepherd-service
|
||||||
|
(documentation "Run shadow-tls server.")
|
||||||
|
(provision '(shadow-tls-server))
|
||||||
|
(requirement (if home-service? '() '(networking)))
|
||||||
|
(modules '((shepherd support)))
|
||||||
|
(start #~(make-forkexec-constructor
|
||||||
|
(list #$(file-append
|
||||||
|
shadow-tls "/bin/shadow-tls")
|
||||||
|
#$@common-options
|
||||||
|
"server"
|
||||||
|
"--listen" #$listen-address
|
||||||
|
"--server" #$server-address
|
||||||
|
"--tls" #$(string-join tls-name-list ";")
|
||||||
|
"--password" #$password)
|
||||||
|
#:user #$(and (not home-service?) "nobody")
|
||||||
|
#:group #$(and (not home-service?) "nogroup")
|
||||||
|
#:log-file #$log-file))
|
||||||
|
(stop #~(make-kill-destructor))))))
|
||||||
|
'())))))
|
||||||
|
|
||||||
|
(define shadow-tls-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'shadow-tls)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension shepherd-root-service-type
|
||||||
|
shadow-tls-shepherd-service)))
|
||||||
|
(default-value (shadow-tls-server-configuration))
|
||||||
|
(description "Run shadow-tls.")))
|
||||||
|
|
||||||
|
(define home-shadow-tls-service-type
|
||||||
|
(service-type
|
||||||
|
(inherit (system->home-service-type shadow-tls-service-type))
|
||||||
|
(default-value (for-home (shadow-tls-configuration)))))
|
||||||
|
|
||||||
|
|
||||||
|
;;
|
||||||
|
;; Socks2http
|
||||||
|
;;
|
||||||
|
|
||||||
|
|
||||||
|
(define-configuration home-socks2http-configuration
|
||||||
|
(socks2http
|
||||||
|
(file-like socks2http)
|
||||||
|
"Socks2http package to use.")
|
||||||
|
(socks-address
|
||||||
|
(string ":1080")
|
||||||
|
"SOCKS5 proxy address to connect to.")
|
||||||
|
(http-address
|
||||||
|
(string ":8000")
|
||||||
|
"HTTP proxy address to serve.")
|
||||||
|
(no-serialization))
|
||||||
|
|
||||||
|
(define home-socks2http-shepherd-service
|
||||||
|
(match-record-lambda <home-socks2http-configuration>
|
||||||
|
(socks2http socks-address http-address)
|
||||||
|
(list (shepherd-service
|
||||||
|
(documentation "Run socks2http.")
|
||||||
|
(provision '(socks2http))
|
||||||
|
(start #~(make-forkexec-constructor
|
||||||
|
(list #$(file-append socks2http "/bin/socks2http")
|
||||||
|
"-raddr" #$socks-address
|
||||||
|
"-laddr" #$http-address)))
|
||||||
|
(stop #~(make-kill-destructor))))))
|
||||||
|
|
||||||
|
(define home-socks2http-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'home-socks2http)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension home-shepherd-service-type
|
||||||
|
home-socks2http-shepherd-service)))
|
||||||
|
(default-value (home-socks2http-configuration))
|
||||||
|
(description "Run socks2http.")))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(define-service-type-mapping
|
||||||
|
shadow-tls-service-type => home-shadow-tls-service-type)
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
;; SPDX-FileCopyrightText: 2022, 2023 Hilton Chain <hako@ultrarare.space>
|
||||||
|
;;
|
||||||
|
;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
(define-module (rosenthal services dns)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix records)
|
||||||
|
#:use-module (gnu services)
|
||||||
|
#:use-module (gnu services configuration)
|
||||||
|
#:use-module (gnu packages dns)
|
||||||
|
#:use-module (gnu services shepherd)
|
||||||
|
#:export (smartdns-configuration
|
||||||
|
smartdns-service-type))
|
||||||
|
|
||||||
|
;;
|
||||||
|
;; Smartdns
|
||||||
|
;;
|
||||||
|
|
||||||
|
|
||||||
|
(define-configuration smartdns-configuration
|
||||||
|
(smartdns
|
||||||
|
(file-like smartdns)
|
||||||
|
"The Smartdns package.")
|
||||||
|
(config-file
|
||||||
|
(file-like (plain-file "empty" ""))
|
||||||
|
"Configuration file for Smartdns.")
|
||||||
|
(no-serialization))
|
||||||
|
|
||||||
|
(define smartdns-shepherd-service
|
||||||
|
(match-record-lambda <smartdns-configuration>
|
||||||
|
(smartdns config-file)
|
||||||
|
(list (shepherd-service
|
||||||
|
(documentation "Run smartdns.")
|
||||||
|
(provision '(smartdns dns))
|
||||||
|
(requirement '(loopback networking))
|
||||||
|
(start #~(make-forkexec-constructor
|
||||||
|
(list #$(file-append smartdns "/sbin/smartdns")
|
||||||
|
"-f" "-c" #$(file-append config-file))))
|
||||||
|
(stop #~(make-kill-destructor))))))
|
||||||
|
|
||||||
|
(define smartdns-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'smartdns)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension shepherd-root-service-type
|
||||||
|
smartdns-shepherd-service)))
|
||||||
|
(default-value (smartdns-configuration))
|
||||||
|
(description "Run Smartdns daemon.")))
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
(define-module (rosenthal services file-systems)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (gnu packages backup)
|
||||||
|
#:use-module (gnu services)
|
||||||
|
#:use-module (gnu services configuration)
|
||||||
|
#:use-module (gnu services mcron)
|
||||||
|
#:export (btrbk-service-type
|
||||||
|
btrbk-configuration))
|
||||||
|
|
||||||
|
|
||||||
|
;;
|
||||||
|
;; Btrbk
|
||||||
|
;;
|
||||||
|
|
||||||
|
|
||||||
|
(define-configuration btrbk-configuration
|
||||||
|
(btrbk
|
||||||
|
(file-like btrbk)
|
||||||
|
"@code{btrbk} package to use.")
|
||||||
|
(config-file
|
||||||
|
(file-like (plain-file "empty" ""))
|
||||||
|
"File-like object for btrbk configuration, see also @code{btrbk.conf(5)}.")
|
||||||
|
(no-serialization))
|
||||||
|
|
||||||
|
(define (btrbk-etc-service config)
|
||||||
|
`(("btrbk/btrbk.conf" ,(btrbk-configuration-config-file config))))
|
||||||
|
|
||||||
|
(define (btrbk-mcron-jobs config)
|
||||||
|
(list #~(job next-hour-from
|
||||||
|
#$(file-append (btrbk-configuration-btrbk config)
|
||||||
|
"/bin/btrbk run --quiet"))))
|
||||||
|
|
||||||
|
(define btrbk-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'btrbk)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension etc-service-type
|
||||||
|
btrbk-etc-service)
|
||||||
|
(service-extension mcron-service-type
|
||||||
|
btrbk-mcron-jobs)))
|
||||||
|
(default-value (btrbk-configuration))
|
||||||
|
(description "Configure and run btrbk hourly.")))
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
;; SPDX-FileCopyrightText: 2024 Hilton Chain <hako@ultrarare.space>
|
||||||
|
;;
|
||||||
|
;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
(define-module (rosenthal services mail)
|
||||||
|
#:use-module (srfi srfi-26)
|
||||||
|
#:use-module (guix records)
|
||||||
|
#:use-module (gnu services)
|
||||||
|
#:use-module (gnu services admin)
|
||||||
|
#:use-module (gnu services configuration)
|
||||||
|
#:use-module (gnu services docker)
|
||||||
|
#:export (docker-mailserver-configuration
|
||||||
|
docker-mailserver-service-type))
|
||||||
|
|
||||||
|
;;;
|
||||||
|
;;; Docker Mailserver
|
||||||
|
;;; https://docker-mailserver.github.io/docker-mailserver/latest/
|
||||||
|
;;;
|
||||||
|
|
||||||
|
(define-configuration docker-mailserver-configuration
|
||||||
|
(data-directory
|
||||||
|
(string "/var/lib/docker-mailserver")
|
||||||
|
"Directory to store Docker Mailserver data.")
|
||||||
|
(log-file
|
||||||
|
(string "/var/log/docker-mailserver.log")
|
||||||
|
"Path to log file.")
|
||||||
|
(shepherd-requirement
|
||||||
|
(list-of-symbols '())
|
||||||
|
"List of Shepherd service dependencies.")
|
||||||
|
(options
|
||||||
|
(alist '())
|
||||||
|
"Alist of Docker Mailserver configuration. See also
|
||||||
|
@url{https://docker-mailserver.github.io/docker-mailserver/latest/config/environment/}.")
|
||||||
|
(extra-arguments
|
||||||
|
(list '())
|
||||||
|
"List of extra Docker arguments.")
|
||||||
|
(no-serialization))
|
||||||
|
|
||||||
|
(define docker-mailserver-log-rotations
|
||||||
|
(match-record-lambda <docker-mailserver-configuration>
|
||||||
|
(log-file)
|
||||||
|
(list (log-rotation
|
||||||
|
(files (list log-file))))))
|
||||||
|
|
||||||
|
(define docker-mailserver-oci-containers
|
||||||
|
(match-record-lambda <docker-mailserver-configuration>
|
||||||
|
(data-directory log-file shepherd-requirement options extra-arguments)
|
||||||
|
(let ((docker-mailserver-path
|
||||||
|
(cut string-append data-directory <>)))
|
||||||
|
(list (oci-container-configuration
|
||||||
|
(environment options)
|
||||||
|
(image "ghcr.io/docker-mailserver/docker-mailserver:latest")
|
||||||
|
(provision "docker-mailserver")
|
||||||
|
(requirement shepherd-requirement)
|
||||||
|
(log-file log-file)
|
||||||
|
(network "host")
|
||||||
|
(volumes
|
||||||
|
`((,(docker-mailserver-path "/data") . "/var/mail")
|
||||||
|
(,(docker-mailserver-path "/state") . "/var/mail-state")
|
||||||
|
(,(docker-mailserver-path "/logs") . "/var/log/mail")
|
||||||
|
(,(docker-mailserver-path "/config") . "/tmp/docker-mailserver")
|
||||||
|
("/etc/localtime" . "/etc/localtime:ro")))
|
||||||
|
(extra-arguments extra-arguments))))))
|
||||||
|
|
||||||
|
(define docker-mailserver-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'docker-mailserver)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension oci-container-service-type
|
||||||
|
docker-mailserver-oci-containers)
|
||||||
|
(service-extension rottlog-service-type
|
||||||
|
docker-mailserver-log-rotations)))
|
||||||
|
(default-value (docker-mailserver-configuration))
|
||||||
|
(description "Run Docker Mailserver.")))
|
||||||
@@ -0,0 +1,453 @@
|
|||||||
|
;; SPDX-FileCopyrightText: 2023 Hilton Chain <hako@ultrarare.space>
|
||||||
|
;;
|
||||||
|
;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
(define-module (rosenthal services networking)
|
||||||
|
#:use-module (srfi srfi-1)
|
||||||
|
#:use-module (ice-9 match)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix records)
|
||||||
|
#:use-module (gnu packages linux)
|
||||||
|
#:use-module (gnu packages networking)
|
||||||
|
#:use-module (gnu services)
|
||||||
|
#:use-module (gnu services admin)
|
||||||
|
#:use-module (gnu services configuration)
|
||||||
|
#:use-module (gnu services dbus)
|
||||||
|
#:use-module (gnu services shepherd)
|
||||||
|
#:use-module (rosenthal packages binaries)
|
||||||
|
#:export (iwd-configuration
|
||||||
|
iwd-service-type
|
||||||
|
|
||||||
|
tailscale-configuration
|
||||||
|
tailscale-service-type))
|
||||||
|
|
||||||
|
;;
|
||||||
|
;; iwd
|
||||||
|
;;
|
||||||
|
|
||||||
|
|
||||||
|
(define %iwd-config-general
|
||||||
|
'(enable-network-configuration?
|
||||||
|
use-default-interface?
|
||||||
|
address-randomization
|
||||||
|
address-randomization-range
|
||||||
|
roam-threshold
|
||||||
|
roam-threshold-5g
|
||||||
|
roam-retry-interval
|
||||||
|
management-frame-protection
|
||||||
|
control-port-over-nl80211?
|
||||||
|
disable-anqp?
|
||||||
|
disable-ocv?
|
||||||
|
country))
|
||||||
|
|
||||||
|
(define %iwd-config-network
|
||||||
|
'(enable-ipv6?
|
||||||
|
name-resolving-service
|
||||||
|
route-priority-offset))
|
||||||
|
|
||||||
|
(define %iwd-config-blacklist
|
||||||
|
'(initial-timeout
|
||||||
|
multiplier
|
||||||
|
maximum-timeout))
|
||||||
|
|
||||||
|
(define %iwd-config-rank
|
||||||
|
'(band-modifier-5ghz
|
||||||
|
band-modifier-6ghz))
|
||||||
|
|
||||||
|
(define %iwd-config-scan
|
||||||
|
'(disable-periodic-scan?
|
||||||
|
initial-periodic-scan-interval
|
||||||
|
maximum-periodic-scan-interval
|
||||||
|
disable-roaming-scan?))
|
||||||
|
|
||||||
|
(define %iwd-config-ipv4
|
||||||
|
'(ap-address-pool))
|
||||||
|
|
||||||
|
(define %iwd-config-driver-quirks
|
||||||
|
'(default-interface
|
||||||
|
force-pae
|
||||||
|
power-save-disable))
|
||||||
|
|
||||||
|
(define (uglify-field-name field-name)
|
||||||
|
(case field-name
|
||||||
|
((control-port-over-nl80211?) "ControlPortOverNL80211")
|
||||||
|
((disable-anqp?) "DisableANQP")
|
||||||
|
((disable-ocv?) "DisableOCV")
|
||||||
|
((enable-ipv6?) "EnableIPv6")
|
||||||
|
((ap-address-pool) "APAddressPool")
|
||||||
|
(else (string-delete char-set:punctuation
|
||||||
|
(string-capitalize (symbol->string field-name))))))
|
||||||
|
|
||||||
|
(define (serialize-field field-name val)
|
||||||
|
(format #f "~a = ~a~%" (uglify-field-name field-name) val))
|
||||||
|
|
||||||
|
(define serialize-string serialize-field)
|
||||||
|
|
||||||
|
(define-maybe string)
|
||||||
|
|
||||||
|
(define (serialize-boolean field-name val)
|
||||||
|
(serialize-field field-name (if val "true" "false")))
|
||||||
|
|
||||||
|
(define cidr4? (@@ (gnu services vpn) cidr4?))
|
||||||
|
|
||||||
|
(define serialize-cidr4 serialize-field)
|
||||||
|
|
||||||
|
(define-maybe cidr4)
|
||||||
|
|
||||||
|
(define (randomization-method? val)
|
||||||
|
(memv val '(#f once network)))
|
||||||
|
|
||||||
|
(define (serialize-randomization-method field-name val)
|
||||||
|
(serialize-field field-name (or val 'disabled)))
|
||||||
|
|
||||||
|
(define (randomization-range? val)
|
||||||
|
(memv val '(full nic)))
|
||||||
|
|
||||||
|
(define serialize-randomization-range serialize-field)
|
||||||
|
|
||||||
|
(define (signal-strength? val)
|
||||||
|
(and (number? val)
|
||||||
|
(>= val -100)
|
||||||
|
(<= val 1)))
|
||||||
|
|
||||||
|
(define serialize-signal-strength serialize-field)
|
||||||
|
|
||||||
|
(define (seconds? val)
|
||||||
|
(and (integer? val)
|
||||||
|
(not (negative? val))))
|
||||||
|
|
||||||
|
(define serialize-seconds serialize-field)
|
||||||
|
|
||||||
|
(define (protection-mode? val)
|
||||||
|
(memv val '(0 1 2)))
|
||||||
|
|
||||||
|
(define serialize-protection-mode serialize-field)
|
||||||
|
|
||||||
|
(define (resolution-method? val)
|
||||||
|
(memv val '(#f resolvconf)))
|
||||||
|
|
||||||
|
(define (serialize-resolution-method field-name val)
|
||||||
|
(serialize-field field-name (or val 'none)))
|
||||||
|
|
||||||
|
(define serialize-integer serialize-field)
|
||||||
|
|
||||||
|
(define serialize-number serialize-field)
|
||||||
|
|
||||||
|
(define (serialize-list-of-strings field-name val)
|
||||||
|
(serialize-field field-name (string-join val ",")))
|
||||||
|
|
||||||
|
(define-maybe list-of-strings)
|
||||||
|
|
||||||
|
(define list-of-cidr4? (list-of cidr4?))
|
||||||
|
|
||||||
|
(define serialize-list-of-cidr4 serialize-list-of-strings)
|
||||||
|
|
||||||
|
(define-configuration iwd-configuration
|
||||||
|
(iwd
|
||||||
|
(file-like iwd)
|
||||||
|
"The iwd package to use.")
|
||||||
|
|
||||||
|
(log-file
|
||||||
|
(string "/var/log/iwd.log")
|
||||||
|
"Log file location.")
|
||||||
|
|
||||||
|
;; General
|
||||||
|
(enable-network-configuration?
|
||||||
|
(boolean #f)
|
||||||
|
"Enable network configuration.")
|
||||||
|
|
||||||
|
(use-default-interface?
|
||||||
|
(boolean #f)
|
||||||
|
"Do not allow iwd to destroy / recreate wireless interfaces at startup,
|
||||||
|
including default interfaces.")
|
||||||
|
|
||||||
|
(address-randomization
|
||||||
|
(randomization-method #f)
|
||||||
|
"Available values are @code{#f}, @code{once} and @code{network}. @code{#f}
|
||||||
|
for default kernel behavior, @code{once} to randomize the MAC address when iwd
|
||||||
|
starts or the hardware is detected for the first time, @code{network} to
|
||||||
|
randomize the MAC address on each connection to a network (the MAC address is
|
||||||
|
generated based on the SSID and permanent address of the adapter).")
|
||||||
|
|
||||||
|
(address-randomization-range
|
||||||
|
(randomization-range 'full)
|
||||||
|
"Available values are @code{nic} and @code{full}. @code{nic} to only
|
||||||
|
randomize the NIC specific octets (last 3 ones), @code{full} to randomize all
|
||||||
|
6 octets of the address.")
|
||||||
|
|
||||||
|
(roam-threshold
|
||||||
|
(signal-strength -70)
|
||||||
|
"Value in dBm, control how aggressively iwd roams when connected to a 2.4Ghz
|
||||||
|
access point.")
|
||||||
|
|
||||||
|
(roam-threshold-5g
|
||||||
|
(signal-strength -76)
|
||||||
|
"Value in dBm, control how aggressively iwd roams when connected to a 5Ghz
|
||||||
|
access point.")
|
||||||
|
|
||||||
|
(roam-retry-interval
|
||||||
|
(seconds 60)
|
||||||
|
"How long to wait before attempting to roam again if the last roam attempt
|
||||||
|
failed, or if the signal of the newly connected BSS is still considered weak.")
|
||||||
|
|
||||||
|
(management-frame-protection
|
||||||
|
(protection-mode 1)
|
||||||
|
"Available values are @code{0}, @code{1} and @code{2}. @code{0} to
|
||||||
|
completely turn off MFP (even if the hardware is capable), @code{1} to enable
|
||||||
|
MFP if the local hardware and remote AP both support it, @code{2} to always
|
||||||
|
require MFP.")
|
||||||
|
|
||||||
|
(control-port-over-nl80211?
|
||||||
|
(boolean #t)
|
||||||
|
"Enable sending EAPoL packets over NL80211.")
|
||||||
|
|
||||||
|
(disable-anqp?
|
||||||
|
(boolean #t)
|
||||||
|
"Disable ANQP queries.")
|
||||||
|
|
||||||
|
(disable-ocv?
|
||||||
|
(boolean #f)
|
||||||
|
"Disable Operating Channel Validation.")
|
||||||
|
|
||||||
|
(country
|
||||||
|
maybe-string
|
||||||
|
"ISO Alpha-2 Country Code. Request the country to be set for the system.")
|
||||||
|
|
||||||
|
;; Network
|
||||||
|
(enable-ipv6?
|
||||||
|
(boolean #t)
|
||||||
|
"Configure IPv6 addresses and routes.")
|
||||||
|
|
||||||
|
(name-resolving-service
|
||||||
|
(resolution-method 'resolvconf)
|
||||||
|
"Available values are @code{resolvconf} and @code{#f}. Configure a DNS
|
||||||
|
resolution method used by the system and must be used in conjunction with
|
||||||
|
@code{enable-network-configuration?}. @code{#f} to ignore DNS and domain name
|
||||||
|
information.")
|
||||||
|
|
||||||
|
(route-priority-offset
|
||||||
|
(integer 300)
|
||||||
|
"Configure a route priority offset used by the system to prioritize the
|
||||||
|
default routes. The route with lower priority offset is preferred.")
|
||||||
|
|
||||||
|
;; Blacklist
|
||||||
|
(initial-timeout
|
||||||
|
(seconds 60)
|
||||||
|
"The initial time that a BSS spends on the blacklist.")
|
||||||
|
|
||||||
|
(multiplier
|
||||||
|
(integer 30)
|
||||||
|
"If the BSS was blacklisted previously and another connection attempt has
|
||||||
|
failed after the initial timeout has expired, then the BSS blacklist time will
|
||||||
|
be extended by a multiple of @code{multiplier} for each unsuccessful attempt up
|
||||||
|
to @code{maximum-timeout} time.")
|
||||||
|
|
||||||
|
(maximum-timeout
|
||||||
|
(seconds 86400)
|
||||||
|
"Maximum time that a BSS is blacklisted.")
|
||||||
|
|
||||||
|
;; Rank
|
||||||
|
(band-modifier-5ghz
|
||||||
|
(number 1.0)
|
||||||
|
"Increase or decrease the preference for 5GHz access points by increasing or
|
||||||
|
decreasing the value of this modifier.")
|
||||||
|
|
||||||
|
(band-modifier-6ghz
|
||||||
|
(number 1.0)
|
||||||
|
"Increase or decrease the preference for 6GHz access points by increasing or
|
||||||
|
decreasing the value of this modifier.")
|
||||||
|
|
||||||
|
;; Scan
|
||||||
|
(disable-periodic-scan?
|
||||||
|
(boolean #f)
|
||||||
|
"Disable periodic scan.")
|
||||||
|
|
||||||
|
(initial-periodic-scan-interval
|
||||||
|
(seconds 10)
|
||||||
|
"The initial periodic scan interval upon disconnect.")
|
||||||
|
|
||||||
|
(maximum-periodic-scan-interval
|
||||||
|
(seconds 300)
|
||||||
|
"The maximum periodic scan interval.")
|
||||||
|
|
||||||
|
(disable-roaming-scan?
|
||||||
|
(boolean #f)
|
||||||
|
"Disable roaming scan.")
|
||||||
|
|
||||||
|
;; IPv4
|
||||||
|
(ap-address-pool
|
||||||
|
(list-of-cidr4 '("192.168.0.0/16"))
|
||||||
|
"Define the space of IPs used for the AP mode subnet addresses and the DHCP
|
||||||
|
server.")
|
||||||
|
|
||||||
|
;; DriverQuirks
|
||||||
|
(default-interface
|
||||||
|
maybe-list-of-strings
|
||||||
|
"List of drivers or glob matches. If a driver in use matches one in this
|
||||||
|
list, IWD will not attempt to remove and re-create the default interface.")
|
||||||
|
|
||||||
|
(force-pae
|
||||||
|
maybe-list-of-strings
|
||||||
|
"List of drivers or glob matches. If a driver in use matches one in this
|
||||||
|
list, @code{control-port-over-nl80211?} will not be used, and PAE will be used
|
||||||
|
instead.")
|
||||||
|
|
||||||
|
(power-save-disable
|
||||||
|
maybe-list-of-strings
|
||||||
|
"List of drivers or glob matches. If a driver in use matches one in this
|
||||||
|
list, power save will be disabled."))
|
||||||
|
|
||||||
|
(define (serialize-iwd-configuration config)
|
||||||
|
(apply mixed-text-file "main.conf"
|
||||||
|
(append-map
|
||||||
|
(match-lambda
|
||||||
|
((section . fields)
|
||||||
|
(list "[" section "]\n"
|
||||||
|
(serialize-configuration
|
||||||
|
config
|
||||||
|
(filter-configuration-fields
|
||||||
|
iwd-configuration-fields
|
||||||
|
fields)))))
|
||||||
|
`(("General" . ,%iwd-config-general)
|
||||||
|
("Network" . ,%iwd-config-network)
|
||||||
|
("Blacklist" . ,%iwd-config-blacklist)
|
||||||
|
("Rank" . ,%iwd-config-rank)
|
||||||
|
("Scan" . ,%iwd-config-scan)
|
||||||
|
("IPv4" . ,%iwd-config-ipv4)
|
||||||
|
("DriverQuirks" . ,%iwd-config-driver-quirks)))))
|
||||||
|
|
||||||
|
(define (add-iwd-config-file config)
|
||||||
|
`(("iwd/main.conf"
|
||||||
|
,(serialize-iwd-configuration config))))
|
||||||
|
|
||||||
|
(define add-iwd-package
|
||||||
|
(compose list iwd-configuration-iwd))
|
||||||
|
|
||||||
|
(define (iwd-log-rotations config)
|
||||||
|
(list (log-rotation
|
||||||
|
(files (list (iwd-configuration-log-file config))))))
|
||||||
|
|
||||||
|
(define (iwd-shepherd-service config)
|
||||||
|
(match-record config <iwd-configuration>
|
||||||
|
(iwd log-file
|
||||||
|
enable-network-configuration? name-resolving-service)
|
||||||
|
(let ((conf (serialize-iwd-configuration config)))
|
||||||
|
(list (shepherd-service
|
||||||
|
(documentation "Run iwd")
|
||||||
|
(provision `(,@(if enable-network-configuration?
|
||||||
|
'(networking)
|
||||||
|
'())
|
||||||
|
iwd))
|
||||||
|
(requirement '(user-processes dbus-system))
|
||||||
|
(start #~(make-forkexec-constructor
|
||||||
|
(list (string-append #$iwd "/libexec/iwd"))
|
||||||
|
#:log-file #$log-file))
|
||||||
|
(stop #~(make-kill-destructor))
|
||||||
|
(actions
|
||||||
|
(list (shepherd-configuration-action "/etc/iwd/main.conf"))))))))
|
||||||
|
|
||||||
|
(define iwd-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'iwd)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension shepherd-root-service-type
|
||||||
|
iwd-shepherd-service)
|
||||||
|
(service-extension dbus-root-service-type
|
||||||
|
add-iwd-package)
|
||||||
|
(service-extension etc-service-type
|
||||||
|
add-iwd-config-file)
|
||||||
|
(service-extension profile-service-type
|
||||||
|
add-iwd-package)
|
||||||
|
(service-extension rottlog-service-type
|
||||||
|
iwd-log-rotations)))
|
||||||
|
(default-value (iwd-configuration))
|
||||||
|
(description "Run iwd, the iNet wireless daemon.")))
|
||||||
|
|
||||||
|
|
||||||
|
;;
|
||||||
|
;; Tailscale
|
||||||
|
;;
|
||||||
|
|
||||||
|
|
||||||
|
(define-configuration tailscale-configuration
|
||||||
|
(tailscale
|
||||||
|
(file-like tailscale-bin)
|
||||||
|
"The tailscale package to use.")
|
||||||
|
|
||||||
|
(iptables
|
||||||
|
(file-like iptables-nft)
|
||||||
|
"The iptables package to use.")
|
||||||
|
|
||||||
|
(log-file
|
||||||
|
(string "/var/log/tailscaled.log")
|
||||||
|
"Path to log file.")
|
||||||
|
|
||||||
|
(socket
|
||||||
|
(string "/var/run/tailscale/tailscaled.sock")
|
||||||
|
"Path of the service UNIX socket.")
|
||||||
|
|
||||||
|
(state-directory
|
||||||
|
(string "/var/lib/tailscale")
|
||||||
|
"Path to directory for storage of config state, TLS certs, temporary incoming
|
||||||
|
Taildrop files, etc. If empty, it's derived from @code{state-file} when
|
||||||
|
possible.")
|
||||||
|
|
||||||
|
(upload-log?
|
||||||
|
(boolean #f)
|
||||||
|
"Whether to upload logs or not, technical support is also disabled when set
|
||||||
|
to #f.")
|
||||||
|
|
||||||
|
(verbosity
|
||||||
|
(integer 0)
|
||||||
|
"Log verbosity level; 0 is default, 1 or higher are increasingly verbose.")
|
||||||
|
|
||||||
|
(extra-options
|
||||||
|
(list-of-strings '())
|
||||||
|
"List of extra options.")
|
||||||
|
(no-serialization))
|
||||||
|
|
||||||
|
(define (tailscale-log-rotations config)
|
||||||
|
(list (log-rotation
|
||||||
|
(files (list (tailscale-configuration-log-file config))))))
|
||||||
|
|
||||||
|
(define tailscale-shepherd-service
|
||||||
|
(match-record-lambda <tailscale-configuration>
|
||||||
|
(tailscale iptables log-file socket state-directory
|
||||||
|
upload-log? verbosity extra-options)
|
||||||
|
(let ((environment
|
||||||
|
#~(list (string-append "PATH="
|
||||||
|
(string-join
|
||||||
|
'(#$(file-append iptables "/sbin")
|
||||||
|
#$(file-append iproute "/sbin"))
|
||||||
|
":")))))
|
||||||
|
(list (shepherd-service
|
||||||
|
(documentation "Run tailscaled")
|
||||||
|
(provision '(tailscaled))
|
||||||
|
(requirement '(user-processes))
|
||||||
|
(start
|
||||||
|
#~(make-forkexec-constructor
|
||||||
|
(list
|
||||||
|
#$(file-append tailscale "/bin/tailscaled")
|
||||||
|
#$@(if upload-log?
|
||||||
|
'()
|
||||||
|
'("-no-logs-no-support"))
|
||||||
|
"-socket" #$socket
|
||||||
|
"-statedir" #$state-directory
|
||||||
|
"-verbose" #$(number->string verbosity)
|
||||||
|
#$@extra-options)
|
||||||
|
#:environment-variables #$environment
|
||||||
|
#:log-file #$log-file))
|
||||||
|
(stop #~(make-kill-destructor)))))))
|
||||||
|
|
||||||
|
(define tailscale-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'tailscaled)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension shepherd-root-service-type
|
||||||
|
tailscale-shepherd-service)
|
||||||
|
(service-extension profile-service-type
|
||||||
|
(compose list tailscale-configuration-tailscale))
|
||||||
|
(service-extension rottlog-service-type
|
||||||
|
tailscale-log-rotations)))
|
||||||
|
(default-value (tailscale-configuration))
|
||||||
|
(description "Run tailscaled.")))
|
||||||
@@ -0,0 +1,316 @@
|
|||||||
|
;; SPDX-FileCopyrightText: 2024 Hilton Chain <hako@ultrarare.space>
|
||||||
|
;;
|
||||||
|
;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
(define-module (rosenthal services web)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix records)
|
||||||
|
#:use-module (gnu packages admin)
|
||||||
|
#:use-module (gnu services)
|
||||||
|
#:use-module (gnu services admin)
|
||||||
|
#:use-module (gnu services configuration)
|
||||||
|
#:use-module (gnu services databases)
|
||||||
|
#:use-module (gnu services docker)
|
||||||
|
#:use-module (gnu system shadow)
|
||||||
|
#:use-module (rosenthal utils home-services-utils)
|
||||||
|
#:export (jellyfin-configuration
|
||||||
|
jellyfin-service-type
|
||||||
|
|
||||||
|
misskey-configuration
|
||||||
|
misskey-service-type
|
||||||
|
|
||||||
|
vaultwarden-configuration
|
||||||
|
vaultwarden-service-type))
|
||||||
|
|
||||||
|
;;
|
||||||
|
;; Jellyfin
|
||||||
|
;;
|
||||||
|
|
||||||
|
|
||||||
|
(define-maybe string)
|
||||||
|
|
||||||
|
(define-configuration jellyfin-configuration
|
||||||
|
(cache-directory
|
||||||
|
(string "/var/cache/jellyfin")
|
||||||
|
"Path to cache directory.")
|
||||||
|
(config-directory
|
||||||
|
(string "/var/lib/jellyfin")
|
||||||
|
"Path to configuration directory.")
|
||||||
|
(proxy-url
|
||||||
|
maybe-string
|
||||||
|
"Proxy URL.")
|
||||||
|
(log-file
|
||||||
|
(string "/var/log/jellyfin.log")
|
||||||
|
"Path to log file.")
|
||||||
|
(auto-start?
|
||||||
|
(boolean #t)
|
||||||
|
"Whether to start automatically.")
|
||||||
|
(extra-options
|
||||||
|
(list '())
|
||||||
|
"List of extra options.")
|
||||||
|
(no-serialization))
|
||||||
|
|
||||||
|
(define %jellyfin-accounts
|
||||||
|
(list (user-account
|
||||||
|
(name "jellyfin")
|
||||||
|
(group "docker")
|
||||||
|
(system? #t)
|
||||||
|
(home-directory "/var/empty")
|
||||||
|
(shell (file-append shadow "/sbin/nologin")))))
|
||||||
|
|
||||||
|
(define jellyfin-log-rotations
|
||||||
|
(match-record-lambda <jellyfin-configuration>
|
||||||
|
(log-file)
|
||||||
|
(list (log-rotation
|
||||||
|
(files (list log-file))))))
|
||||||
|
|
||||||
|
(define jellyfin-activation
|
||||||
|
(match-record-lambda <jellyfin-configuration>
|
||||||
|
(cache-directory config-directory)
|
||||||
|
#~(let ((user (getpwnam "jellyfin")))
|
||||||
|
(for-each
|
||||||
|
(lambda (directory)
|
||||||
|
(unless (file-exists? directory)
|
||||||
|
(mkdir-p directory)
|
||||||
|
(chown directory (passwd:uid user) (passwd:gid user))))
|
||||||
|
'#$(list cache-directory config-directory)))))
|
||||||
|
|
||||||
|
(define jellyfin-oci-containers
|
||||||
|
(match-record-lambda <jellyfin-configuration>
|
||||||
|
(cache-directory config-directory
|
||||||
|
proxy-url log-file auto-start? extra-options)
|
||||||
|
(list (oci-container-configuration
|
||||||
|
(user "jellyfin")
|
||||||
|
(group "docker")
|
||||||
|
(environment
|
||||||
|
(if (maybe-value-set? proxy-url)
|
||||||
|
`(("http_proxy" . ,proxy-url)
|
||||||
|
("https_proxy" . ,proxy-url))
|
||||||
|
'()))
|
||||||
|
(image "jellyfin/jellyfin:latest")
|
||||||
|
(provision "jellyfin")
|
||||||
|
(log-file log-file)
|
||||||
|
(auto-start? auto-start?)
|
||||||
|
(respawn? #t)
|
||||||
|
(network "host")
|
||||||
|
(volumes
|
||||||
|
`((,cache-directory . "/cache")
|
||||||
|
(,config-directory . "/config")))
|
||||||
|
(extra-arguments extra-options)))))
|
||||||
|
|
||||||
|
(define jellyfin-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'jellyfin)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension account-service-type
|
||||||
|
(const %jellyfin-accounts))
|
||||||
|
(service-extension activation-service-type
|
||||||
|
jellyfin-activation)
|
||||||
|
(service-extension rottlog-service-type
|
||||||
|
jellyfin-log-rotations)
|
||||||
|
(service-extension oci-container-service-type
|
||||||
|
jellyfin-oci-containers)))
|
||||||
|
(default-value (jellyfin-configuration))
|
||||||
|
(description "Run Jellyfin, a media system.")))
|
||||||
|
|
||||||
|
|
||||||
|
;;
|
||||||
|
;; Misskey
|
||||||
|
;;
|
||||||
|
|
||||||
|
|
||||||
|
(define-configuration misskey-configuration
|
||||||
|
(image
|
||||||
|
(string "misskey/misskey:latest")
|
||||||
|
"Misskey docker image to use.")
|
||||||
|
(config
|
||||||
|
(yaml-config '())
|
||||||
|
"Alist of Misskey configuration, to be serialized to YAML format.")
|
||||||
|
(data-directory
|
||||||
|
(string "/var/lib/misskey")
|
||||||
|
"Directory to store @file{files} in.")
|
||||||
|
(log-file
|
||||||
|
(string "/var/log/misskey.log")
|
||||||
|
"Log file to use.")
|
||||||
|
(no-serialization))
|
||||||
|
|
||||||
|
(define %misskey-accounts
|
||||||
|
(list (user-account
|
||||||
|
(name "misskey")
|
||||||
|
(group "docker")
|
||||||
|
(system? #t)
|
||||||
|
(home-directory "/var/empty")
|
||||||
|
(shell (file-append shadow "/sbin/nologin")))))
|
||||||
|
|
||||||
|
(define %misskey-postgresql-role
|
||||||
|
(list (postgresql-role
|
||||||
|
(name "misskey")
|
||||||
|
(create-database? #t))))
|
||||||
|
|
||||||
|
(define misskey-log-rotations
|
||||||
|
(match-record-lambda <misskey-configuration>
|
||||||
|
(log-file)
|
||||||
|
(list (log-rotation
|
||||||
|
(files (list log-file))))))
|
||||||
|
|
||||||
|
(define misskey-activation
|
||||||
|
(match-record-lambda <misskey-configuration>
|
||||||
|
(data-directory)
|
||||||
|
#~(begin
|
||||||
|
(use-modules (guix build utils))
|
||||||
|
(let ((user (getpwnam "misskey")))
|
||||||
|
(unless (file-exists? #$data-directory)
|
||||||
|
(mkdir-p #$data-directory)
|
||||||
|
(chown #$data-directory (passwd:uid user) (passwd:gid user)))))))
|
||||||
|
|
||||||
|
(define misskey-oci-containers
|
||||||
|
(match-record-lambda <misskey-configuration>
|
||||||
|
(image config data-directory log-file )
|
||||||
|
(let ((config-file
|
||||||
|
(mixed-text-file
|
||||||
|
"misskey.yaml"
|
||||||
|
#~(string-append #$@(serialize-yaml-config config) "\n"))))
|
||||||
|
(list (oci-container-configuration
|
||||||
|
(user "misskey")
|
||||||
|
(group "docker")
|
||||||
|
(image image)
|
||||||
|
(provision "misskey")
|
||||||
|
(requirement '(postgresql redis))
|
||||||
|
(log-file log-file)
|
||||||
|
(respawn? #t)
|
||||||
|
(network "host")
|
||||||
|
(volumes
|
||||||
|
`((,(string-append data-directory "/files") . "/misskey/files")
|
||||||
|
(,config-file . "/misskey/.config/default.yml"))))))))
|
||||||
|
|
||||||
|
(define misskey-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'misskey)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension account-service-type
|
||||||
|
(const %misskey-accounts))
|
||||||
|
(service-extension postgresql-role-service-type
|
||||||
|
(const %misskey-postgresql-role))
|
||||||
|
(service-extension rottlog-service-type
|
||||||
|
misskey-log-rotations)
|
||||||
|
(service-extension activation-service-type
|
||||||
|
misskey-activation)
|
||||||
|
(service-extension oci-container-service-type
|
||||||
|
misskey-oci-containers)))
|
||||||
|
(default-value (misskey-configuration))
|
||||||
|
(description "Run Misskey, an interplanetary microblogging platform.")))
|
||||||
|
|
||||||
|
|
||||||
|
;;
|
||||||
|
;; Vaultwarden
|
||||||
|
;;
|
||||||
|
|
||||||
|
|
||||||
|
(define-configuration vaultwarden-configuration
|
||||||
|
(admin-token
|
||||||
|
maybe-string
|
||||||
|
"Token for the admin interface, preferably an Argon2 PCH string.")
|
||||||
|
(database-url
|
||||||
|
(string "postgresql://user:password@host:port/database")
|
||||||
|
"Database URL.")
|
||||||
|
(port
|
||||||
|
(integer 8000)
|
||||||
|
"Port to listen on.")
|
||||||
|
(data-directory
|
||||||
|
(string "/var/lib/vaultwarden")
|
||||||
|
"Main data folder.")
|
||||||
|
(log-file
|
||||||
|
(string "/var/log/vaultwarden.log")
|
||||||
|
"Logging to this file.")
|
||||||
|
(proxy-url
|
||||||
|
maybe-string
|
||||||
|
"Proxy URL to use.")
|
||||||
|
(extra-options
|
||||||
|
(alist '())
|
||||||
|
"Extra options.")
|
||||||
|
(no-serialization))
|
||||||
|
|
||||||
|
(define %vaultwarden-accounts
|
||||||
|
(list (user-account
|
||||||
|
(name "vaultwarden")
|
||||||
|
(group "docker")
|
||||||
|
(system? #t)
|
||||||
|
(home-directory "/var/empty")
|
||||||
|
(shell (file-append shadow "/sbin/nologin")))))
|
||||||
|
|
||||||
|
(define %vaultwarden-postgresql-role
|
||||||
|
(list (postgresql-role
|
||||||
|
(name "vaultwarden")
|
||||||
|
(create-database? #t))))
|
||||||
|
|
||||||
|
(define vaultwarden-log-rotations
|
||||||
|
(match-record-lambda <vaultwarden-configuration>
|
||||||
|
(log-file)
|
||||||
|
(list (log-rotation
|
||||||
|
(files (list log-file))))))
|
||||||
|
|
||||||
|
(define vaultwarden-activation
|
||||||
|
(match-record-lambda <vaultwarden-configuration>
|
||||||
|
(data-directory log-file)
|
||||||
|
#~(begin
|
||||||
|
(use-modules (guix build utils))
|
||||||
|
(let ((user (getpwnam "vaultwarden")))
|
||||||
|
(unless (file-exists? #$data-directory)
|
||||||
|
(mkdir-p #$data-directory)
|
||||||
|
(chown #$data-directory (passwd:uid user) (passwd:gid user)))
|
||||||
|
(unless (file-exists? #$log-file)
|
||||||
|
(mkdir-p (dirname #$log-file))
|
||||||
|
(call-with-output-file #$log-file
|
||||||
|
(lambda (port)
|
||||||
|
(write-char #\newline port)))
|
||||||
|
(chown #$log-file (passwd:uid user) (passwd:gid user)))))))
|
||||||
|
|
||||||
|
(define vaultwarden-oci-containers
|
||||||
|
(match-record-lambda <vaultwarden-configuration>
|
||||||
|
(admin-token database-url port data-directory log-file proxy-url extra-options)
|
||||||
|
(list (oci-container-configuration
|
||||||
|
(user "vaultwarden")
|
||||||
|
(group "docker")
|
||||||
|
(host-environment
|
||||||
|
`(,@(if (maybe-value-set? admin-token)
|
||||||
|
`(("ADMIN_TOKEN" . ,admin-token))
|
||||||
|
'())
|
||||||
|
("DATABASE_URL" . ,database-url)))
|
||||||
|
(environment
|
||||||
|
`(,@(if (maybe-value-set? proxy-url)
|
||||||
|
`(("HTTP_PROXY" . ,proxy-url))
|
||||||
|
'())
|
||||||
|
("LOG_FILE" . "vaultwarden.log")
|
||||||
|
("ROCKET_PORT" . ,(number->string port))
|
||||||
|
("USE_SYSLOG" . "True")
|
||||||
|
,@extra-options))
|
||||||
|
(image "vaultwarden/server:latest-alpine")
|
||||||
|
(provision "vaultwarden")
|
||||||
|
(requirement '(postgresql))
|
||||||
|
(respawn? #t)
|
||||||
|
(network "host")
|
||||||
|
(volumes
|
||||||
|
`((,data-directory . "/data")
|
||||||
|
(,log-file . "/vaultwarden.log")))
|
||||||
|
(extra-arguments
|
||||||
|
`(,@(if (maybe-value-set? admin-token)
|
||||||
|
'("--env" "ADMIN_TOKEN")
|
||||||
|
'())
|
||||||
|
"--env" "DATABASE_URL"))))))
|
||||||
|
|
||||||
|
(define vaultwarden-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'vaultwarden)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension account-service-type
|
||||||
|
(const %vaultwarden-accounts))
|
||||||
|
(service-extension postgresql-role-service-type
|
||||||
|
(const %vaultwarden-postgresql-role))
|
||||||
|
(service-extension activation-service-type
|
||||||
|
vaultwarden-activation)
|
||||||
|
(service-extension rottlog-service-type
|
||||||
|
vaultwarden-log-rotations)
|
||||||
|
(service-extension oci-container-service-type
|
||||||
|
vaultwarden-oci-containers)))
|
||||||
|
(default-value (vaultwarden-configuration))
|
||||||
|
(description "Run Vaultwarden, a Bitwarden compatible server.")))
|
||||||
@@ -0,0 +1,441 @@
|
|||||||
|
;; SPDX-FileCopyrightText: 2021 Xinglu Chen <public@yoctocell.xyz>
|
||||||
|
;; SPDX-FileCopyrightText: 2021 Andrew Tropin <andrew@trop.in>
|
||||||
|
;;
|
||||||
|
;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
(define-module (rosenthal utils home-services-utils)
|
||||||
|
#:use-module (gnu services configuration)
|
||||||
|
#:use-module (gnu home services utils)
|
||||||
|
#:use-module (guix ui)
|
||||||
|
#:use-module (guix diagnostics)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix monads)
|
||||||
|
#:use-module (guix i18n)
|
||||||
|
#:use-module (guix profiles)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix build-system trivial)
|
||||||
|
#:use-module (guix deprecation)
|
||||||
|
|
||||||
|
#:use-module (ice-9 curried-definitions)
|
||||||
|
#:use-module (ice-9 match)
|
||||||
|
#:use-module (ice-9 string-fun)
|
||||||
|
#:use-module (srfi srfi-1)
|
||||||
|
#:use-module (srfi srfi-9)
|
||||||
|
#:use-module (srfi srfi-171)
|
||||||
|
#:use-module (srfi srfi-26)
|
||||||
|
#:use-module (srfi srfi-43)
|
||||||
|
|
||||||
|
#:re-export (filter-configuration-fields
|
||||||
|
|
||||||
|
list-of
|
||||||
|
|
||||||
|
list-of-strings?
|
||||||
|
alist?
|
||||||
|
text-config?
|
||||||
|
serialize-text-config
|
||||||
|
generic-serialize-alist-entry
|
||||||
|
generic-serialize-alist
|
||||||
|
|
||||||
|
maybe-object->string
|
||||||
|
object->snake-case-string
|
||||||
|
object->camel-case-string)
|
||||||
|
|
||||||
|
#:export (slurp-file-gexp
|
||||||
|
|
||||||
|
alist-entry->mixed-text
|
||||||
|
boolean->yes-or-no
|
||||||
|
boolean->true-or-false
|
||||||
|
list->human-readable-list
|
||||||
|
|
||||||
|
ini-config?
|
||||||
|
generic-serialize-ini-config
|
||||||
|
generic-serialize-git-ini-config
|
||||||
|
|
||||||
|
yaml-config?
|
||||||
|
serialize-yaml-config
|
||||||
|
|
||||||
|
string-or-gexp?
|
||||||
|
serialize-string-or-gexp
|
||||||
|
|
||||||
|
gexp-text-config?
|
||||||
|
serialize-gexp-text-config
|
||||||
|
|
||||||
|
rest
|
||||||
|
maybe-list
|
||||||
|
optional
|
||||||
|
wrap-package
|
||||||
|
|
||||||
|
define-enum
|
||||||
|
enum-name
|
||||||
|
enum-value))
|
||||||
|
|
||||||
|
|
||||||
|
;;;
|
||||||
|
;;; User's utils.
|
||||||
|
;;;
|
||||||
|
|
||||||
|
(define* (slurp-file-gexp file #:key (encoding "UTF-8"))
|
||||||
|
"Returns a gexp, which reads all the content of the FILE and returns
|
||||||
|
it as a string. FILE must be a file-like object."
|
||||||
|
(when (not (file-like? file))
|
||||||
|
(raise (formatted-message
|
||||||
|
(G_ "~a is not a file-like object.")
|
||||||
|
file)))
|
||||||
|
#~(call-with-input-file #$file
|
||||||
|
(@ (ice-9 textual-ports) get-string-all)
|
||||||
|
#:encoding #$encoding))
|
||||||
|
|
||||||
|
(define-deprecated/alias slurp-file-gexp slurp-file-like)
|
||||||
|
|
||||||
|
|
||||||
|
;;;
|
||||||
|
;;; Configuration related helpers.
|
||||||
|
;;;
|
||||||
|
|
||||||
|
(define* ((alist-entry->mixed-text prefix sep #:optional (suffix "\n"))
|
||||||
|
alist-entry)
|
||||||
|
"Create a list from ALIST-ENTRY, which can be used with
|
||||||
|
@code{mixed-text-file} for example to create key-value configuration
|
||||||
|
file or shell script.
|
||||||
|
|
||||||
|
PREFIX is the string to prefix the key-value pair with. For example,
|
||||||
|
@code{\"export\"} will return @code{'(\"export\" KEY SEP VALUE)},
|
||||||
|
where KEY is the first element of ALIST-ENTRY, and VALUE is the second
|
||||||
|
element of ALIST-ENTRY.
|
||||||
|
|
||||||
|
SEP is the separator between the key and the value.
|
||||||
|
|
||||||
|
SUFFIX is the optional argument, default to newline.
|
||||||
|
|
||||||
|
Different things will happen depending on the value of VALUE:
|
||||||
|
@itemize @bullet
|
||||||
|
@item If VALUE is #f, ignore everything in the entry and just return
|
||||||
|
an empty list.
|
||||||
|
|
||||||
|
@item If VALUE is #t or not provided (empty list), ignore the VALUE
|
||||||
|
and SEP and just return a list of PREFIX and KEY followed by a
|
||||||
|
SUFFIX.
|
||||||
|
|
||||||
|
@item If VALUE is a flat list, it will get added to the resulting
|
||||||
|
list. If not flat the exception will be raised.
|
||||||
|
|
||||||
|
@item If VALUE is not a list (string, file-like object, etc), return a
|
||||||
|
list of PREFIX, KEY, SEP and VALUE followed by a SUFFIX.
|
||||||
|
|
||||||
|
The following code
|
||||||
|
@lisp
|
||||||
|
((alist-entry->mixed-text \"export \" \"=\") '(\"EDITOR\" . \"emacsclient\"))
|
||||||
|
((alist-entry->mixed-text \"export \" \"=\") '(\"EDITOR\" . #t))
|
||||||
|
((alist-entry->mixed-text \"export \" \"=\") '(\"EDITOR\"))
|
||||||
|
((alist-entry->mixed-text \"export \" \"=\") '(\"EDITOR\" . #f))
|
||||||
|
((alist-entry->mixed-text \"export \" \"=\") '(\"EDITOR\" . (\"emacsclient\" \"vim\")))
|
||||||
|
@end lisp
|
||||||
|
|
||||||
|
would yield
|
||||||
|
|
||||||
|
@example
|
||||||
|
(\"export \" \"EDITOR\" \"=\" \"emacsclient\" \"\n\")
|
||||||
|
(\"export \" \"EDITOR\" \"\n\")
|
||||||
|
(\"export \" \"EDITOR\" \"\n\")
|
||||||
|
()
|
||||||
|
(\"export \" \"EDITOR\" \"=\" \"emacsclient\" \"vim\" \"\n\")
|
||||||
|
@end example"
|
||||||
|
(define (not-alist-entry-error)
|
||||||
|
(raise (formatted-message
|
||||||
|
(G_ "~a has to be an association list entry")
|
||||||
|
alist-entry)))
|
||||||
|
(match alist-entry
|
||||||
|
((key . value)
|
||||||
|
(let* ((values (cond
|
||||||
|
((eq? value #f)
|
||||||
|
#f)
|
||||||
|
((or (eq? value #t) (null? value))
|
||||||
|
'(""))
|
||||||
|
((list? value)
|
||||||
|
(if (any list? value)
|
||||||
|
(raise (formatted-message
|
||||||
|
(G_ "~a is not a flat list")
|
||||||
|
value))
|
||||||
|
value))
|
||||||
|
(else
|
||||||
|
(list value))))
|
||||||
|
(sep (if (eq? values '(""))
|
||||||
|
""
|
||||||
|
sep)))
|
||||||
|
(if values
|
||||||
|
`(,prefix ,key ,sep ,@values ,suffix)
|
||||||
|
'())))
|
||||||
|
(_ (not-alist-entry-error))))
|
||||||
|
|
||||||
|
(define* (boolean->yes-or-no bool #:optional (capitalize? #f))
|
||||||
|
"Convert a boolean BOOL to \"yes\" or \"no\".
|
||||||
|
Setting CAPITALIZE? to @code{#t} will capitalize the word, it is set to
|
||||||
|
@code{#f} by default."
|
||||||
|
(let ((word (if (eq? bool #t) "yes" "no")))
|
||||||
|
(if capitalize?
|
||||||
|
(string-capitalize word)
|
||||||
|
word)))
|
||||||
|
|
||||||
|
(define* (boolean->true-or-false bool #:optional (capitalize? #f))
|
||||||
|
"Convert a boolean BOOL to \"true\" or \"false\".
|
||||||
|
Setting CAPITALIZE? to @code{#t} will capitalize the word, it is set to
|
||||||
|
@code{#f} by default."
|
||||||
|
(let ((word (if bool "true" "false")))
|
||||||
|
(if capitalize?
|
||||||
|
(string-capitalize word)
|
||||||
|
word)))
|
||||||
|
|
||||||
|
;; TODO: Remove once upstreamed
|
||||||
|
(define* (list->human-readable-list lst
|
||||||
|
#:key
|
||||||
|
(cumulative? #f)
|
||||||
|
(proc identity))
|
||||||
|
"Turn a list LST into a sequence of terms readable by humans.
|
||||||
|
If CUMULATIVE? is @code{#t}, use ``and'', otherwise use ``or'' before
|
||||||
|
the last term.
|
||||||
|
|
||||||
|
PROC is a procedure to apply to each of the elements of a list before
|
||||||
|
turning them into a single human readable string.
|
||||||
|
|
||||||
|
@example
|
||||||
|
(list->human-readable-list '(1 4 9) #:cumulative? #t #:proc sqrt)
|
||||||
|
@result{} \"1, 2, and 3\"
|
||||||
|
@end example
|
||||||
|
|
||||||
|
yields:"
|
||||||
|
(let* ((word (if cumulative? "and " "or "))
|
||||||
|
(init (append (drop-right lst 1))))
|
||||||
|
(format #f "~a" (string-append
|
||||||
|
(string-join
|
||||||
|
(map (compose maybe-object->string proc) init)
|
||||||
|
", " 'suffix)
|
||||||
|
word
|
||||||
|
(maybe-object->string (proc (last lst)))))))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;;;
|
||||||
|
;;; Serializers.
|
||||||
|
;;;
|
||||||
|
|
||||||
|
(define ini-config? list?)
|
||||||
|
(define (generic-serialize-ini-config-section section proc)
|
||||||
|
"Format a section from SECTION for an INI configuration.
|
||||||
|
Apply the procedure PROC on SECTION after it has been converted to a string"
|
||||||
|
(format #f "[~a]\n" (proc section)))
|
||||||
|
|
||||||
|
(define default-ini-format-section
|
||||||
|
(match-lambda
|
||||||
|
((section subsection)
|
||||||
|
(string-append (maybe-object->string section) " "
|
||||||
|
(maybe-object->string subsection)))
|
||||||
|
(section
|
||||||
|
(maybe-object->string section))))
|
||||||
|
|
||||||
|
(define* (generic-serialize-ini-config
|
||||||
|
#:key
|
||||||
|
(combine-ini string-join)
|
||||||
|
(combine-alist string-append)
|
||||||
|
(combine-section-alist string-append)
|
||||||
|
(format-section default-ini-format-section)
|
||||||
|
serialize-field
|
||||||
|
fields)
|
||||||
|
"Create an INI configuration from nested lists FIELDS. This uses
|
||||||
|
@code{generic-serialize-ini-config-section} and @{generic-serialize-alist} to
|
||||||
|
serialize the section and the association lists, respectively.
|
||||||
|
|
||||||
|
@example
|
||||||
|
(generic-serialize-ini-config
|
||||||
|
#:serialize-field (lambda (a b) (format #f \"~a = ~a\n\" a b))
|
||||||
|
#:format-section (compose string-capitalize symbol->string)
|
||||||
|
#:fields '((application ((key . value)))))
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@result{} \"[Application]\nkey = value\n\""
|
||||||
|
(combine-ini
|
||||||
|
(map (match-lambda
|
||||||
|
((section alist)
|
||||||
|
(combine-section-alist
|
||||||
|
(generic-serialize-ini-config-section section format-section)
|
||||||
|
(generic-serialize-alist combine-alist serialize-field alist))))
|
||||||
|
fields)
|
||||||
|
"\n"))
|
||||||
|
|
||||||
|
(define* (generic-serialize-git-ini-config
|
||||||
|
#:key
|
||||||
|
(combine-ini string-join)
|
||||||
|
(combine-alist string-append)
|
||||||
|
(combine-section-alist string-append)
|
||||||
|
(format-section default-ini-format-section)
|
||||||
|
serialize-field
|
||||||
|
fields)
|
||||||
|
"Like @code{generic-serialize-ini-config}, but the section can also
|
||||||
|
have a @dfn{subsection}. FORMAT-SECTION will take a list of two
|
||||||
|
elements: the section and the subsection."
|
||||||
|
(combine-ini
|
||||||
|
(map (match-lambda
|
||||||
|
((section subsection alist)
|
||||||
|
(combine-section-alist
|
||||||
|
(generic-serialize-ini-config-section
|
||||||
|
(list section subsection) format-section)
|
||||||
|
(generic-serialize-alist combine-alist serialize-field alist)))
|
||||||
|
((section alist)
|
||||||
|
(combine-section-alist
|
||||||
|
(generic-serialize-ini-config-section section format-section)
|
||||||
|
(generic-serialize-alist combine-alist serialize-field alist))))
|
||||||
|
fields)
|
||||||
|
"\n"))
|
||||||
|
|
||||||
|
(define yaml-config? list?)
|
||||||
|
(define (make-yaml-indent depth)
|
||||||
|
(make-string (* 2 depth) #\space))
|
||||||
|
|
||||||
|
(define ((serialize-yaml-value depth) value)
|
||||||
|
(let* ((tab (make-yaml-indent depth)))
|
||||||
|
(cond
|
||||||
|
((string? value)
|
||||||
|
(list (format #f "'~a'" value)))
|
||||||
|
((boolean? value)
|
||||||
|
(list (format #f "~a" (if value "true" "false"))))
|
||||||
|
((file-like? value)
|
||||||
|
(list value))
|
||||||
|
((alist? value)
|
||||||
|
(serialize-yaml-alist value #:depth (1+ depth)))
|
||||||
|
((vector? value)
|
||||||
|
(serialize-yaml-vector value #:depth depth))
|
||||||
|
(else (list (format #f "~a" value))))))
|
||||||
|
|
||||||
|
(define ((serialize-yaml-key depth) key)
|
||||||
|
(when (vector? key)
|
||||||
|
(raise (formatted-message
|
||||||
|
(G_ "Vector as key value are not supported by serializer, \
|
||||||
|
try to avoid them. ~a") key)))
|
||||||
|
((serialize-yaml-value depth) key))
|
||||||
|
|
||||||
|
(define ((serialize-yaml-key-value depth) key value)
|
||||||
|
(let ((tab (make-yaml-indent depth)))
|
||||||
|
`("\n"
|
||||||
|
,tab
|
||||||
|
,@((serialize-yaml-key depth) key) ": "
|
||||||
|
,@((serialize-yaml-value depth) value))))
|
||||||
|
|
||||||
|
(define ((serialize-yaml-vector-elem depth) elem)
|
||||||
|
(let ((tab (make-yaml-indent (1+ depth))))
|
||||||
|
(cons*
|
||||||
|
"\n" tab "- "
|
||||||
|
((serialize-yaml-value (1+ depth)) elem))))
|
||||||
|
|
||||||
|
(define* (serialize-yaml-vector vec #:key (depth 0))
|
||||||
|
(append-map (serialize-yaml-vector-elem depth) (vector->list vec)))
|
||||||
|
|
||||||
|
(define* (serialize-yaml-alist lst #:key (depth 0))
|
||||||
|
(generic-serialize-alist append (serialize-yaml-key-value depth) lst))
|
||||||
|
|
||||||
|
(define (serialize-yaml-config config)
|
||||||
|
"Simplified yaml serializer, which supports only a subset of yaml, use
|
||||||
|
it with caution."
|
||||||
|
(serialize-yaml-alist config))
|
||||||
|
|
||||||
|
(define (string-or-gexp? sg) (or (string? sg) (gexp? sg)))
|
||||||
|
(define (serialize-string-or-gexp field-name val) "")
|
||||||
|
|
||||||
|
;; Guix proper has a different version of text-config.
|
||||||
|
(define (gexp-text-config? config)
|
||||||
|
(and (list? config) (every string-or-gexp? config)))
|
||||||
|
(define (serialize-gexp-text-config field-name val)
|
||||||
|
#~(string-append #$@(interpose val "\n" 'suffix)))
|
||||||
|
|
||||||
|
;;;
|
||||||
|
;;; Miscellaneous.
|
||||||
|
;;;
|
||||||
|
|
||||||
|
(define rest cdr)
|
||||||
|
|
||||||
|
;; Confusing with maybe-list type.
|
||||||
|
(define (maybe-list a)
|
||||||
|
"If A is a list, return it, otherwise return a singleton list with A."
|
||||||
|
(if (list? a)
|
||||||
|
a
|
||||||
|
(list a)))
|
||||||
|
|
||||||
|
;; If EXPR1 evaluates to a non-@code{#f} value and EXPR2 is specified,
|
||||||
|
;; return EXPR2; if it isn't specified, return EXPR1. Otherwise, return
|
||||||
|
;; an empty list @code{'()}.
|
||||||
|
(define-syntax optional
|
||||||
|
(syntax-rules ()
|
||||||
|
((_ expr1)
|
||||||
|
(if expr1 expr1 '()))
|
||||||
|
((_ expr1 expr2)
|
||||||
|
(if expr1 expr2 '()))))
|
||||||
|
|
||||||
|
(define (wrap-package pkg executable-name gexp)
|
||||||
|
"Create a @code{<package>} object that is a wrapper for PACKAGE, and
|
||||||
|
runs GEXP. NAME is the name of the executable that will be put in the store."
|
||||||
|
(let* ((wrapper-name (string-append executable-name "-wrapper"))
|
||||||
|
(wrapper (program-file wrapper-name gexp)))
|
||||||
|
(package
|
||||||
|
(inherit pkg)
|
||||||
|
(name wrapper-name)
|
||||||
|
(source wrapper)
|
||||||
|
(propagated-inputs `((,(package-name pkg) ,pkg)))
|
||||||
|
(build-system trivial-build-system)
|
||||||
|
(arguments
|
||||||
|
`(#:modules
|
||||||
|
((guix build utils))
|
||||||
|
#:builder
|
||||||
|
(begin
|
||||||
|
(use-modules (guix build utils)
|
||||||
|
(srfi srfi-1))
|
||||||
|
(let* ((bin (string-append %output "/bin"))
|
||||||
|
(wrapper (assoc-ref %build-inputs "source")))
|
||||||
|
(mkdir-p bin)
|
||||||
|
(copy-file wrapper (string-append bin "/" ,executable-name)))))))))
|
||||||
|
|
||||||
|
|
||||||
|
;;;
|
||||||
|
;;; Enums.
|
||||||
|
;;;
|
||||||
|
|
||||||
|
(define-record-type <enum>
|
||||||
|
(make-enum name value)
|
||||||
|
enum?
|
||||||
|
(name enum-name)
|
||||||
|
(value enum-value))
|
||||||
|
|
||||||
|
;; Copied from (gnu services configuration)
|
||||||
|
(define-syntax-rule (id ctx parts ...)
|
||||||
|
"Assemble PARTS into a raw (unhygienic) identifier."
|
||||||
|
(datum->syntax ctx (symbol-append (syntax->datum parts) ...)))
|
||||||
|
|
||||||
|
;; (define-enum pinentry-flavor
|
||||||
|
;; '(emacs gtk qt ncurses tty))
|
||||||
|
;;
|
||||||
|
;; (pinentry-flavor? 'gtk)
|
||||||
|
;; => #t
|
||||||
|
;;
|
||||||
|
;; (enum-value pinentry-flavor)
|
||||||
|
;; => '(emacs gtk qt ncurses tty)
|
||||||
|
;;
|
||||||
|
;; (pinentry-flavor? 'vim)
|
||||||
|
;; exception: `pinetry-flavor' must be one of `emacs', `gtk', `qt',
|
||||||
|
;; `ncurses', or `tty', was given `vim'
|
||||||
|
|
||||||
|
(define-syntax define-enum
|
||||||
|
(lambda (x)
|
||||||
|
(syntax-case x ()
|
||||||
|
((_ stem value)
|
||||||
|
(with-syntax ((stem? (id #'stem #'stem #'?))
|
||||||
|
(msg (list->human-readable-list
|
||||||
|
(second (syntax->datum #'value))
|
||||||
|
#:proc (cut format #f "`~a'" <>))))
|
||||||
|
#'(begin
|
||||||
|
(define stem (make-enum (quote stem) value))
|
||||||
|
|
||||||
|
(define (stem? val)
|
||||||
|
(if (member val value)
|
||||||
|
#t
|
||||||
|
(raise (formatted-message
|
||||||
|
(G_ "`~a' must of ~a, was given: ~s")
|
||||||
|
(enum-name stem)
|
||||||
|
(syntax->datum msg)
|
||||||
|
val))))))))))
|
||||||
Reference in new issue
Block a user