Compare commits

...

1208 Commits

Author SHA1 Message Date
chn
0c49c71899 services.nginx.applications.main: fix 2023-12-29 20:22:21 +08:00
chn
b0e543d324 packages.server.ssh: enable ssh agent forward 2023-12-29 20:22:02 +08:00
chn
51c8a516ff packages.server: remove gnupg agent 2023-12-29 15:33:06 +08:00
chn
f3c8017959 Revert "try to enable codex"
This reverts commit 3867469fc5.
2023-12-28 21:04:45 +08:00
chn
3867469fc5 try to enable codex 2023-12-28 21:03:38 +08:00
chn
f23f7101e4 update zsh-lsd 2023-12-28 12:55:18 +08:00
chn
8eea6ffdc3 packages.server.zsh: remove zsh-nix-shell 2023-12-28 12:29:35 +08:00
chn
729df7ab63 update misskey 2023-12-28 11:05:52 +08:00
chn
c1737fcb08 packages.server.ssh: set askPassword to systemd-ask-password 2023-12-27 17:42:53 +08:00
chn
50862f0e33 users.chn: add forwardAgent 2023-12-27 17:18:04 +08:00
chn
5b30aebfae services.frpClient: stcp allow all users 2023-12-27 15:11:15 +08:00
chn
f5e82ee889 localPackages.misskey: use nodejs 21 2023-12-25 20:50:42 +08:00
chn
a6241a201a try to fix pc power bug 2023-12-25 20:50:15 +08:00
chn
db3571b8e5 revert nodejs update 2023-12-25 20:46:27 +08:00
chn
bd6a867ab3 localPackages.misskey: use nodejs 20 2023-12-24 22:46:33 +08:00
chn
045de2b18e update nodejs 2023-12-24 22:45:26 +08:00
chn
501df43b0c services.misskey: increase statement_timeout 2023-12-24 14:58:20 +08:00
chn
fee1f32a0a localPackages.misskey: remove re2 2023-12-24 14:40:27 +08:00
chn
71c4426e53 Merge branch 'misskey' 2023-12-24 09:22:30 +08:00
chn
7cd03dd163 packages.server: add hexo-cli 2023-12-23 22:43:39 +08:00
chn
4941582aec update misskey 2023-12-23 22:42:04 +08:00
chn
29fef229d8 Revert "system: try to fix ipv6"
This reverts commit 303d67ca06.
2023-12-23 15:31:44 +08:00
chn
303d67ca06 system: try to fix ipv6 2023-12-23 10:03:09 +08:00
chn
3732d19de0 packages.server.ssh: auto cd in jykang 2023-12-22 11:39:10 +08:00
chn
26eec4d375 packages.server: split zsh 2023-12-22 11:38:56 +08:00
chn
ac362289de services.synapse: fix 2023-12-20 16:20:23 +08:00
chn
3bb5e840e7 services.synapse: fix 2023-12-20 15:26:35 +08:00
chn
8b3ef05d3b services.nginx.applications.main: fix alias 2023-12-20 15:14:51 +08:00
chn
0fd63c01f7 services.synapse: fix 2023-12-20 14:39:23 +08:00
chn
61c644a4b1 services.synapse: enable sliding sync 2023-12-20 14:33:14 +08:00
chn
788709aac9 services.synapse: fix 2023-12-20 12:33:17 +08:00
chn
f5053ae284 services.postgresql: add initializeFlags 2023-12-20 12:23:05 +08:00
chn
6a6625d585 system.kernel: port some change from xddxdd/nur-packages 2023-12-20 11:31:12 +08:00
chn
69c528a03d switch back to xanmod 2023-12-20 11:04:40 +08:00
chn
6c496b7b8e services.postgresql: fix locale setting 2023-12-19 22:09:35 +08:00
chn
13652e7c0e services.synapse: correct locale 2023-12-19 22:07:27 +08:00
chn
2160e453eb services.postgresql: allow set locale 2023-12-19 22:06:41 +08:00
chn
71acf32da3 vps7: enable second synapse instance 2023-12-19 21:43:48 +08:00
chn
aac7bad20a packages.workstation: add nheko 2023-12-19 21:19:27 +08:00
chn
1d9a3ad2c0 enable laptop-mode 2023-12-19 18:56:08 +08:00
chn
f55576883c system.kernel: switch to zen 2023-12-19 18:36:45 +08:00
chn
e71a08586d Revert "Revert "drop acpi workaround""
This reverts commit 8c2b6530a6.
2023-12-19 13:43:28 +08:00
chn
8c2b6530a6 Revert "drop acpi workaround"
This reverts commit 72e1e0140a.
2023-12-19 13:29:17 +08:00
chn
38d3d8c7df update kernel 2023-12-19 12:56:24 +08:00
chn
72e1e0140a drop acpi workaround 2023-12-19 12:51:43 +08:00
chn
59dbfaa70f add acpi workaround 2023-12-18 21:04:42 +08:00
chn
75e2b84c4c Revert "nvidia: do not add modules to initrd"
This reverts commit 45ec3e74b7.
2023-12-18 20:25:35 +08:00
chn
9cfd30db6a Revert "hardware: gpu drivers should not be in initrd"
This reverts commit 02a2d399d6.
2023-12-18 20:24:40 +08:00
chn
02a2d399d6 hardware: gpu drivers should not be in initrd 2023-12-18 20:08:24 +08:00
chn
eb25e31c70 always apply embree patch 2023-12-18 14:04:39 +08:00
chn
6265e41ca7 revert some nvidia config 2023-12-17 22:46:58 +08:00
chn
6f36cfe007 services.akkoma: init 2023-12-17 22:43:54 +08:00
chn
b8abc4a326 services.nginx.https: allow custom TLS certificate 2023-12-17 21:42:57 +08:00
chn
59b053886b services.synapse: enable redis 2023-12-17 19:52:12 +08:00
chn
1769069057 synapse 支持多实例 2023-12-17 19:44:40 +08:00
chn
9801e53230 services.gitea: fix ssh 2023-12-17 14:41:00 +08:00
chn
9ea81dfe9e services.gitea: fix ssh 2023-12-17 14:10:16 +08:00
chn
c6c9bbafae services.gitea: fix 2023-12-17 13:46:29 +08:00
chn
f906e9d556 services.gitea: init 2023-12-17 13:37:15 +08:00
chn
4ffd5aebd5 move wireguard peer config to top level 2023-12-17 12:10:45 +08:00
chn
8724c23fde fix watchfiles 2023-12-17 11:50:40 +08:00
chn
808058596f xmupc1: do not build firefox 2023-12-17 11:44:32 +08:00
chn
36b37daf2e packages.desktop.vscode: remove copilot-labs 2023-12-17 10:50:42 +08:00
chn
45ec3e74b7 nvidia: do not add modules to initrd 2023-12-17 10:49:22 +08:00
chn
f5724e10a4 pc: fix power down on load graphic driver 2023-12-17 01:10:00 +08:00
chn
183d805a8f services.gitlab: currently disable ssh 2023-12-16 22:29:02 +08:00
chn
ca7668cbd5 services.gitlab: change hostname, enable ssh and lfs 2023-12-16 21:16:56 +08:00
chn
2462e85b70 pc: disable XHCI wakeup 2023-12-16 20:34:30 +08:00
chn
a6b4077114 packages.desktop-fat: add fluffychat 2023-12-16 13:42:19 +08:00
chn
e5b13ace75 add chn.moe 2023-12-15 21:01:29 +08:00
chn
b861d7bfb9 fix tmpfiles permission 2023-12-15 20:26:04 +08:00
chn
2d8c36d108 fix wireguard port 2023-12-15 12:40:28 +08:00
chn
9ec9597421 services.fz-new-order: fix permission 2023-12-15 12:38:39 +08:00
chn
469919c75a services.wireguard: auto deduce port 2023-12-14 23:34:03 +08:00
chn
9e14036e57 system.gui: default coincide with packages._packageSets 2023-12-14 23:28:30 +08:00
chn
839e56e52c init xmupc1 2023-12-14 23:24:20 +08:00
chn
087b4f0a7f yoga: try to fix touch keyboard in initrd 2023-12-13 22:20:29 +08:00
chn
99b891a4cb packages.server.ssh: remove internal hostnames 2023-12-13 12:33:56 +08:00
chn
73d6b46a4b vps7: fix wireguard private key 2023-12-13 12:01:16 +08:00
chn
d15794e7b1 yoga: prefer gui 2023-12-12 23:40:10 +08:00
chn
417e924b04 add yogabook module to initrd 2023-12-12 23:30:43 +08:00
chn
f4d12652c2 fix 2023-12-12 00:18:03 +08:00
chn
219d3fbb20 整理 flake.nix 2023-12-11 19:19:36 +08:00
chn
d44a9c4ddb add ventoy-full 2023-12-11 17:29:51 +08:00
chn
266692c74a remove pe 2023-12-11 17:27:26 +08:00
chn
c1a8043322 install pe 2023-12-11 17:05:29 +08:00
chn
d330f60909 add exfatprogs 2023-12-11 13:48:47 +08:00
chn
2b16dde96d move some packages to workstation 2023-12-10 15:20:04 +08:00
chn
6369cf7842 use fixed uid 2023-12-09 20:01:50 +08:00
chn
0dff3a17c0 fix libreoffice 2023-12-09 10:53:51 +08:00
chn
05dddf63b1 system.security.sudo: enable pwfeedback 2023-12-08 21:41:53 +08:00
chn
73c29c5f82 Merge branch 'main' into native 2023-12-08 20:46:14 +08:00
chn
d6b6f449b8 vps7: disable nebula, enable wireguard 2023-12-08 20:25:39 +08:00
chn
1b0d9e9a2d fix zip 2023-12-08 16:43:23 +08:00
chn
625bcaf448 分离vscode的配置 2023-12-08 13:09:17 +08:00
chn
7bfbc43a50 packages.desktop.vscode: add markdown-preview-enhanced 2023-12-08 13:04:50 +08:00
chn
2463a8c1af fix 2023-12-08 12:12:53 +08:00
chn
b9fa645334 plasmamanager: init 2023-12-08 00:46:29 +08:00
chn
78b132cc58 fix pe build 2023-12-07 22:03:20 +08:00
chn
608774790b pe: init 2023-12-07 21:20:25 +08:00
chn
9ccb3d3316 build everything from source 2023-12-07 21:12:01 +08:00
chn
a0f7af141a services.nginx.transparentProxy: default listen on all interfaces 2023-12-07 20:00:22 +08:00
chn
f65433eb1e services.wireguard: fix firewall 2023-12-07 19:48:03 +08:00
chn
a9d0f4d8f9 整理ssh 2023-12-07 18:15:06 +08:00
chn
651604da94 disable nebula for pc and nas 2023-12-07 17:53:35 +08:00
chn
bb3d4db6f5 nas: enable wireguard 2023-12-07 17:46:59 +08:00
chn
7dfcd83071 services.wireguard: fix collision with xray 2023-12-07 17:44:14 +08:00
chn
b1d885f62c services.wireguard: init 2023-12-07 17:30:12 +08:00
chn
cb849daf0a move default secrets to subdirs 2023-12-07 16:28:19 +08:00
chn
66ba4864a7 packages.server: add wireguard-tools 2023-12-07 16:19:24 +08:00
chn
9a4aaedb9a add pix2tex 2023-12-07 12:58:07 +08:00
chn
902fd30be8 auto optimize store as default 2023-12-07 00:01:13 +08:00
chn
e12d3a7349 fix 2023-12-06 22:28:12 +08:00
chn
b767b11e8a pc: do not replace tensorflow 2023-12-06 22:24:32 +08:00
chn
b5eeef1147 enhance cuda support 2023-12-06 22:23:31 +08:00
chn
e07abc0ad5 packages.server: enable yazi 2023-12-06 14:52:01 +08:00
chn
07050cd9cd packages.server: enable mosh 2023-12-06 14:44:27 +08:00
chn
9097917855 fix mirism 2023-12-06 11:45:57 +08:00
chn
18e9922846 fix xdg-desktop-portal 2023-12-06 09:39:35 +08:00
chn
11058dc731 update rsshub 2023-12-05 23:25:01 +08:00
chn
8872c18810 use optimized fastfetch 2023-12-05 23:19:50 +08:00
chn
8c3d74abaf fix xdg-desktop-portal 2023-12-05 23:16:14 +08:00
chn
d83062faf0 fix fwupd 2023-12-05 19:10:02 +08:00
chn
87eb5cb8fc 分割配置文件 2023-12-05 16:40:40 +08:00
chn
1faa6103ca packages.chromium: 增加沉浸式翻译插件 2023-12-05 16:04:38 +08:00
chn
38c419f291 system.gui.fcitx5: add more themes 2023-12-05 15:52:04 +08:00
chn
a5ddab766b 铜锣湾实验室直接从本地访问 2023-12-05 14:45:56 +08:00
chn
a0c9b62c0e Revert "services.xray: nebula do not bypass"
This reverts commit 5a30ebe7b6.
2023-12-05 14:41:05 +08:00
chn
5a30ebe7b6 services.xray: nebula do not bypass 2023-12-05 12:24:18 +08:00
chn
6fd53808e6 remove trace 2023-12-05 11:43:08 +08:00
chn
e372278343 fix gdal 2023-12-05 10:55:37 +08:00
chn
d13364fa42 fix latex 2023-12-05 10:53:11 +08:00
chn
666990c1a9 替换更多包 2023-12-05 10:27:12 +08:00
chn
13363f42a1 缩减行数 2023-12-04 21:41:23 +08:00
chn
f642e11739 update flake.lock 2023-12-04 21:39:19 +08:00
chn
ed6b68eb89 vim use optimized version 2023-12-04 21:38:27 +08:00
chn
396ee9fc73 use localPackages.esbonio instead of esbonio 2023-12-04 21:38:08 +08:00
chn
44ae89efee nixpkgs: allow to replace tensorflow 2023-12-04 21:20:32 +08:00
chn
36e1faee0c fix eval 2023-12-04 18:26:27 +08:00
chn
1080a2dacf 整理 nixpkgs 2023-12-04 17:27:47 +08:00
chn
f9e35b8837 do not build with ccache 2023-12-04 11:41:29 +08:00
chn
dfad8c1df7 add logseq 2023-12-03 14:43:19 +08:00
chn
6444e76b49 fix pygls 2023-12-02 22:20:58 +08:00
chn
c2864ad7a0 fix pygls 2023-12-02 21:55:14 +08:00
chn
136d02b0eb packages: add autograd 2023-12-02 17:04:47 +08:00
chn
97158555e4 packages.vscode: add restrucuredtext 2023-12-02 15:34:50 +08:00
chn
3deeb55dbd fix nextcloud
update everything
2023-12-02 10:52:42 +08:00
chn
2184dfa34f disable ccache for tensorflow 2023-11-30 23:18:11 +08:00
chn
94d74eac46 enable ccache for multiple packages 2023-11-30 22:44:06 +08:00
chn
2bf0d49e52 ccache: move cache to /var/lib/ccache 2023-11-30 20:21:06 +08:00
chn
73ddbd00a9 fix chromium build with ccache 2023-11-30 20:14:49 +08:00
chn
1deffccf00 enable ccache for chromium 2023-11-30 14:47:38 +08:00
chn
bac20eae3e upate everything 2023-11-30 14:15:26 +08:00
chn
6057c5079f remove touchix 2023-11-29 02:19:41 +08:00
chn
2ab7119ea9 fix nextcloud twofactor_webauthn url 2023-11-29 01:30:41 +08:00
chn
56a34a9f73 update everything 2023-11-29 01:07:20 +08:00
chn
693967cf49 system.kernel: remove preempt patch 2023-11-27 02:22:08 +08:00
chn
d273fd6046 update rsshub 2023-11-26 01:07:32 +08:00
chn
73a509b1ba remove unused packages 2023-11-26 01:07:18 +08:00
chn
df7ff0516c Merge branch 'main' into next 2023-11-25 23:05:24 +08:00
chn
2b3c0e61c5 add emacs 2023-11-25 22:33:21 +08:00
chn
47406cd0a5 update 2023-11-24 11:12:05 +08:00
chn
36a702a9a2 Merge branch 'main' into next 2023-11-24 11:08:10 +08:00
chn
b42024378b add aircrack-ng 2023-11-23 23:53:13 +08:00
chn
7f68855c7d users: fix 2023-11-23 02:04:47 +08:00
chn
38c7491640 services.mastodon: fix 2023-11-22 22:00:58 +08:00
chn
18ca4d7a00 services.nextcloud: update apps 2023-11-22 21:48:23 +08:00
chn
d52d0e3139 services.mastodon: fix 2023-11-22 21:35:47 +08:00
chn
fecf4816dc packages: move some packages from desktop to desktop-fat 2023-11-22 20:54:03 +08:00
chn
3d92e9e593 localPackages.mirism: fix 2023-11-22 20:48:12 +08:00
chn
d54d37b8f2 minor fixes 2023-11-22 20:12:41 +08:00
chn
44e843ae5f exa -> eza 2023-11-22 16:42:31 +08:00
chn
ec07725983 fix pnpm2nix 2023-11-22 16:40:38 +08:00
chn
bc40195d0f yoga: add to default 2023-11-22 13:49:45 +08:00
chn
7561442593 done some todo 2023-11-22 11:58:58 +08:00
chn
b240f8d04c update meilisearch 2023-11-22 11:48:39 +08:00
chn
10691aa076 remove unnecessary unstablePackages 2023-11-22 11:41:36 +08:00
chn
8599296ff5 update inputs 2023-11-22 11:39:30 +08:00
chn
86e89c7310 use archived branch 2023-11-22 10:57:38 +08:00
chn
367c78abd7 move some packages 2023-11-22 10:48:00 +08:00
chn
50025a78a1 hardware.cpu: add some intel modules 2023-11-22 01:48:09 +08:00
chn
7c08aa5b05 system.impermanence: fix /srv mount 2023-11-21 22:03:47 +08:00
chn
24727ea5f0 services.fail2ban: add ignoreIP 2023-11-21 20:52:46 +08:00
chn
04d411d16f services.fail2ban: init 2023-11-21 20:44:31 +08:00
chn
84a2bc2eac system.impermanence: write journal to nodatacow 2023-11-21 20:06:48 +08:00
chn
616a366221 services.grafana: init 2023-11-21 00:05:26 +08:00
chn
757f0f63bf services.gitlab: add email_from option 2023-11-20 22:25:47 +08:00
chn
083cf9524c services.gitlab: fix port number 2023-11-20 22:23:45 +08:00
chn
19729fb334 services.gitlab: fix smtp 2023-11-20 22:09:41 +08:00
chn
da4a7e33ff typo 2023-11-20 20:53:34 +08:00
chn
ff5780ca42 services.gitlab: fix nginx 2023-11-20 20:51:57 +08:00
chn
9bdb9c8293 services.nextcloud: run nextcloud-setup after postgresql 2023-11-20 20:46:29 +08:00
chn
f51f9c9992 services.gitlab: init 2023-11-20 20:15:53 +08:00
chn
f5777bc89d services.gitlab: prepare 2023-11-20 15:03:02 +08:00
chn
54f2458f69 services.mastodon: add package to system 2023-11-19 22:52:06 +08:00
chn
d0ff526f82 fix mastodon 2023-11-19 22:44:06 +08:00
chn
e7708c5647 services.gitlab: preprare 2023-11-19 22:01:36 +08:00
chn
c38d84a1b1 services.mastodon: init 2023-11-19 20:47:52 +08:00
chn
4e44953e75 typo 2023-11-19 17:44:07 +08:00
chn
be8cf779c9 change some default settings 2023-11-19 17:33:38 +08:00
chn
3209e0aa60 users: 分离各个用户的配置 2023-11-19 17:15:44 +08:00
chn
7bba7613a2 add plasma-manager 2023-11-19 16:38:21 +08:00
chn
e78c263248 system.fileSystems: set delay to 2 day 2023-11-19 08:29:15 +08:00
chn
3ab09c31bb mastodon: prepare 2023-11-19 06:38:05 +08:00
chn
ae468cb654 fix 2023-11-19 02:35:06 +08:00
chn
2615d82fea nginx.applications.webdav: allow multiple instances 2023-11-19 02:32:07 +08:00
chn
3d2ad2e800 update misskey 2023-11-17 22:35:15 +08:00
chn
15e9cf917e nas: add webdav 2023-11-17 22:11:36 +08:00
chn
b0619ec108 fix xray error 2023-11-16 16:10:46 +08:00
chn
3c29b08a08 add blog catalog 2023-11-16 16:06:52 +08:00
chn
ed794ac95f 缩减行数 2023-11-16 15:51:47 +08:00
chn
17a462ad04 fix mirism path 2023-11-16 14:45:53 +08:00
chn
994360d473 dnsmasq: fix dns 2023-11-16 14:43:16 +08:00
chn
c32cff7349 nginx: fix path 2023-11-16 14:09:23 +08:00
chn
97468b121b add mirism 2023-11-16 13:58:59 +08:00
chn
8cbad5dc58 add httpapi 2023-11-16 13:18:21 +08:00
chn
790aa5fa2e add crunch hashcat 2023-11-16 12:09:11 +08:00
chn
3cfedc26c9 add john 2023-11-16 12:06:53 +08:00
chn
d2479b229e nginx.webdav: restrict write path 2023-11-16 11:57:02 +08:00
chn
87684a981d packages.ssh: add some hostname 2023-11-16 11:35:03 +08:00
chn
3386b3bd2b nginx: fix permission 2023-11-15 22:09:44 +08:00
chn
86cb0a4d85 add webdav 2023-11-15 21:37:20 +08:00
chn
7c96745618 nginx: add charset 2023-11-15 20:59:27 +08:00
chn
2a515f2a9b add kkmeeting 2023-11-15 20:42:42 +08:00
chn
5f4fea3df6 Merge branch 'nginx' 2023-11-15 19:48:38 +08:00
chn
d53c5493e1 port change from main 2023-11-15 19:29:14 +08:00
chn
8750ee1b8b 修正 addAuth 2023-11-15 19:24:03 +08:00
chn
d9c956bca1 init fz-new-order 2023-11-15 14:20:56 +08:00
chn
1f529b55e1 nginx https support cgi 2023-11-12 23:35:08 +08:00
chn
888f438031 add fcgiwrap 2023-11-12 22:13:01 +08:00
chn
7aadd673cd 打包 mirism 2023-11-12 21:59:03 +08:00
chn
f227925d38 fix php user group 2023-11-12 20:47:29 +08:00
chn
90839e445d Merge branch 'ua' 2023-11-12 20:29:27 +08:00
chn
57d07fc326 add ua 2023-11-12 20:29:16 +08:00
chn
91228c3053 allow disable sddm autostart 2023-11-12 20:15:44 +08:00
chn
3e8237286d docker only persist volumes
rollRootfs chattr +C
2023-11-12 19:35:09 +08:00
chn
3f670636e8 huginn: do not create database 2023-11-12 19:28:07 +08:00
chn
8191eec21e mariadb uses password auth only 2023-11-12 19:15:29 +08:00
chn
fed092c67c mariadb: fix user creation 2023-11-12 17:59:49 +08:00
chn
44ee17f2ff init huginn 2023-11-12 16:56:58 +08:00
chn
a898902f9e fix frp tls config 2023-11-11 20:27:12 +08:00
chn
00dd5ae7ad update frp 2023-11-11 20:14:37 +08:00
chn
d274730437 pc: frp add stcp 2023-11-11 19:13:16 +08:00
chn
333ed600ef xray 使用 nginx 的设置 2023-11-11 01:33:46 +08:00
chn
05cd6dd1c8 enable proxyProtocol as default 2023-11-11 00:57:49 +08:00
chn
b1e2497054 allow send to be forwarded 2023-11-10 23:57:13 +08:00
chn
0e56ee4293 fix send websocket 2023-11-10 23:52:43 +08:00
chn
0294805326 add send 2023-11-10 23:37:16 +08:00
chn
218b6c6140 暂存 localPackages.send 2023-11-10 20:47:05 +08:00
chn
f908883f18 fix nextcloud config 2023-11-10 19:30:37 +08:00
chn
4d81aa8ca7 fix nginx listen 2023-11-10 19:16:55 +08:00
chn
98fafdd331 add two xray user 2023-11-10 18:24:43 +08:00
chn
2549be1e55 所有机器都可以编译通过 2023-11-10 12:39:55 +08:00
chn
3d261febd2 Merge branch 'main' into nginx 2023-11-09 23:04:41 +08:00
chn
12cdc43f17 可以编译通过 2023-11-09 23:04:28 +08:00
chn
fd799befd3 全部修改完成 2023-11-09 22:19:37 +08:00
chn
69cb43e6f5 整理 vaultwarden 2023-11-09 21:02:08 +08:00
chn
7122474023 整理 synapse 2023-11-09 20:52:15 +08:00
chn
ebc8f80476 整理 photoprism 2023-11-09 20:43:25 +08:00
chn
855d24c1ea 整理 nextcloud 2023-11-09 20:32:13 +08:00
chn
aa74e0911c 修正misskey 2023-11-09 12:41:25 +08:00
chn
ad4f316339 packages: add jabref 2023-11-09 12:02:39 +08:00
chn
f8c0295bd5 修正 element 2023-11-09 12:02:05 +08:00
chn
72801ad14c minor fixes 2023-11-09 00:51:45 +08:00
chn
c975bcba51 重写nginx模块 2023-11-08 23:44:19 +08:00
chn
967f7f155e acme可以直接设置组 2023-11-08 23:18:19 +08:00
chn
bc351ff0d4 fix nginx type check 2023-11-07 16:16:04 +08:00
chn
35c183f9dc fix freshrss 2023-11-07 15:14:06 +08:00
chn
90a3604ac7 vps7: enable freshrss 2023-11-07 13:48:38 +08:00
chn
dd1ac653a3 fix synapse-admin 2023-11-07 13:40:22 +08:00
chn
8a88c8f6a7 mariadb: backup using singleTransaction 2023-11-07 13:34:14 +08:00
chn
ad6e94ec09 vps6: add synapse-admin service 2023-11-07 13:27:47 +08:00
chn
6b384443e2 confix xray for xmupc1 2023-11-06 20:11:18 +08:00
chn
21080d7d61 fix frp 2023-11-06 19:47:00 +08:00
chn
8a3b3313f7 fix freshrss 2023-11-06 19:41:31 +08:00
chn
7b3a23d19f frp: add stcp support 2023-11-06 19:41:05 +08:00
chn
dea55cdc70 freshrss do not auto enable nginx 2023-11-06 18:49:20 +08:00
chn
1216a2c674 Merge branch 'vps7-freshrss' 2023-11-06 18:30:00 +08:00
chn
3de91db3fd add freshrss 2023-11-06 18:29:46 +08:00
chn
297fcee5df vps6: disable beesd, enable autoOptimiseStore 2023-11-06 13:48:29 +08:00
chn
95e42f969c localPackages.misskey: update 2023-11-06 09:21:10 +08:00
chn
2ae484fcc9 packages.zsh: try to workaround bug 2023-11-05 23:08:32 +08:00
chn
4d0cc3e30c pc: use single swap partition 2023-11-05 12:45:09 +08:00
chn
09a687f65a change disk 2023-11-04 21:08:30 +08:00
chn
8f7c6db841 packages.ssh: add nas ip 2023-11-04 16:47:51 +08:00
chn
d225de887d packages: add reptyr 2023-11-04 12:43:30 +08:00
chn
ed98f26185 mount everything with noatime 2023-11-02 16:41:49 +08:00
chn
f1173b45b4 remove nvme bug workaround 2023-11-02 16:25:53 +08:00
chn
0204420d4f remove bfq scheduler 2023-11-02 16:24:46 +08:00
chn
c991429151 try to fix nvme bug 2023-11-02 15:54:05 +08:00
chn
7c391d6666 localPackages: fix misskey 2023-11-02 15:50:33 +08:00
chn
6beec31dc1 remove yoga from default systems 2023-11-02 12:11:04 +08:00
chn
0e4d8368e9 fix iwlwifi after hibernate 2023-10-31 17:36:53 +08:00
chn
36f71df435 Merge branch 'next' 2023-10-30 19:53:15 +08:00
chn
7b73bdb9f3 prepare merge into main 2023-10-30 19:53:08 +08:00
chn
4e05896b4f services.noisetorch: init 2023-10-30 19:13:15 +08:00
chn
44d8553aef Revert "remove big-parallel from system-features"
This reverts commit dfe5f20346.
2023-10-30 12:07:09 +08:00
chn
dfe5f20346 remove big-parallel from system-features 2023-10-30 11:23:30 +08:00
chn
42162dc08c local.pkgs: update rsshub typora 2023-10-28 21:24:56 +08:00
chn
9ef9c4daa7 packages: allow zotero 2023-10-28 12:07:46 +08:00
chn
7afa093d25 packages: permit electron_24 2023-10-28 12:04:14 +08:00
chn
c26ea843eb yubikey TOTP use home-manager module 2023-10-27 22:42:57 +08:00
chn
2b73a6549e packages: remove firefoxpwa 2023-10-27 22:25:06 +08:00
chn
ad12157fe1 update everything 2023-10-27 22:24:44 +08:00
chn
f628e55fab nas: mount /nix/backup 2023-10-27 12:15:47 +08:00
chn
2444ff5d27 system.fileSystems: rollingRootFs use subvolume id as suffix 2023-10-27 00:01:58 +08:00
chn
97ec3061e7 localPackages: add latex-citation-style-language 2023-10-25 16:03:43 +08:00
chn
e2c61c6aaa add nixpkgs-unstable to registry 2023-10-25 14:01:30 +08:00
chn
550ef39dcf Revert "packages: texlive use ubstable"
This reverts commit b2ef263267.
2023-10-25 13:59:57 +08:00
chn
b2ef263267 packages: texlive use ubstable 2023-10-25 13:57:34 +08:00
chn
a686d8259b packages: add microsoft-edge 2023-10-24 11:17:59 +08:00
chn
057e5a5d51 pc: remove modprobe config about iwlwifi 2023-10-23 17:12:08 +08:00
chn
9e36962acb pc: use last kernle 2023-10-23 17:11:35 +08:00
chn
0941aaf2ee pc: remove nvme workaround 2023-10-23 17:10:43 +08:00
chn
3197b26b10 fstrim: exclude bind mounts 2023-10-23 10:36:19 +08:00
chn
ea4b2cbeb8 system.fstrim: set interval to hourly 2023-10-22 20:34:58 +08:00
chn
65bd74aa2d 写入 knownHosts 2023-10-22 13:28:15 +08:00
chn
00572e7b29 packages: add try 2023-10-22 12:15:35 +08:00
chn
5be30df0af add haskell patch to nixpkgs-unstable 2023-10-22 00:30:20 +08:00
chn
e4219ddefb packages: add fastfetch 2023-10-21 20:22:37 +08:00
chn
108cf36835 packages.chromium: add MetaMask 2023-10-21 19:56:29 +08:00
chn
5645c3d1bd vps6: fix xlog proxy 2023-10-21 15:35:14 +08:00
chn
4a56408a7a local.pkgs.misskey: update 2023-10-21 14:23:24 +08:00
chn
c8d6ed06a6 vps6: enable forward for xlog 2023-10-21 14:05:37 +08:00
chn
b6122fde21 packages: add electrum 2023-10-21 11:07:03 +08:00
chn
85ed0026cb packages.vscode: add todo-tree 2023-10-20 20:52:10 +08:00
chn
7ef8b41350 yoga: workaround bugs 2023-10-19 20:08:33 +08:00
chn
856ccc5281 typo 2023-10-19 19:58:44 +08:00
chn
fb924cd8e0 fix lenovo-yogabook module not found for kernel-lts 2023-10-18 21:45:28 +08:00
chn
66e602e750 pc: use lts kernel 2023-10-18 21:15:37 +08:00
chn
570b82015e system.gui: disable plasma-nm when gui is not preferred 2023-10-18 20:57:58 +08:00
chn
eaa5a7f7a3 try workaround nvme bug 2023-10-16 10:43:09 +08:00
chn
f38b2b3596 update misskey 2023-10-15 18:06:26 +08:00
chn
c1eb35b7d8 bug.nvme: use software iommu 2023-10-15 14:40:31 +08:00
chn
0b90b9831f packages: add ydict 2023-10-15 14:02:50 +08:00
chn
a56011bf6d fix biu 2023-10-14 23:19:32 +08:00
chn
4bb77b3351 update libbiu 2023-10-14 22:51:07 +08:00
chn
2982615a25 nas: fix swap 2023-10-14 21:29:00 +08:00
chn
279483923e Revert "services.misskey: temporarily disable redis"
This reverts commit 1334fe2b47.
2023-10-14 19:57:17 +08:00
chn
1334fe2b47 services.misskey: temporarily disable redis 2023-10-14 19:30:00 +08:00
chn
954dd962bc vps7.services.meilisearch: do not limit io 2023-10-14 17:49:18 +08:00
chn
62255316be services.misskey: do not limit runtime 2023-10-14 17:48:23 +08:00
chn
b2aa00afa6 add libbiu 2023-10-14 16:20:48 +08:00
chn
41d14eff54 add tgbot-cpp 2023-10-14 14:23:12 +08:00
chn
97e25871ae add localPackages overlay 2023-10-13 21:13:28 +08:00
chn
b59f68d3b1 systemd coredump write to rootfs 2023-10-11 22:24:08 +08:00
chn
dc4a836bbb sysreq use 438 2023-10-11 19:27:44 +08:00
chn
a6cddb2f7f fix cjktty 2023-10-09 12:11:14 +08:00
chn
f05d75d041 add yogabook kmod 2023-10-09 11:56:54 +08:00
chn
df76f20ff5 try to get halo keyboard working 2023-10-08 23:19:09 +08:00
chn
7133b45ffe try to fix touch keyboard 2023-10-08 19:27:16 +08:00
chn
4370b99ee6 fix touch keyboard 2023-10-08 19:09:45 +08:00
chn
bfd47d1dcf yoga: enable halo-keyboard 2023-10-08 19:04:39 +08:00
chn
9b89e61f20 yoga: disable smartd 2023-10-08 19:03:18 +08:00
chn
f1e4bfd9bc fix halo-keyboard service 2023-10-08 19:01:26 +08:00
chn
62aa651c15 add chromiumos-touch-keyboard 2023-10-08 17:00:27 +08:00
chn
5ffdec57c0 add propagatedBuildInputs 2023-10-08 13:34:38 +08:00
chn
e20527b4cd add glad 2023-10-08 13:33:32 +08:00
chn
be54e681c3 add yoga to default 2023-10-08 11:55:20 +08:00
chn
fe9c7b9363 system: adjust swappiness 2023-10-08 11:35:53 +08:00
chn
62c3c6ab29 add checks 2023-10-08 10:57:57 +08:00
chn
f97db074e6 services.misskey: fix postgresql.enable 2023-10-08 10:53:28 +08:00
chn
22ef0c27f5 local.pkgs.matplotplusplus: enable opengl 2023-10-07 22:11:22 +08:00
chn
f6a5022aca merge next 2023-10-07 20:41:14 +08:00
chn
53020f6373 allow deploy to yoga 2023-10-07 19:46:39 +08:00
chn
089fd25d8c nas: enable swap 2023-10-07 19:14:59 +08:00
chn
effb920c82 Merge branch 'main' into next 2023-10-07 11:41:19 +08:00
chn
a2c316a6f7 fix aagl build failed 2023-10-06 16:58:30 +08:00
chn
857625884d system: enable fstrim 2023-10-06 16:24:06 +08:00
chn
56a63df3c2 add pslist 2023-10-06 11:54:49 +08:00
chn
fee894fa0a anime-game use native package 2023-10-05 21:30:59 +08:00
chn
723e859079 update everything 2023-10-05 21:14:51 +08:00
chn
864b4c06eb fix 2023-10-05 19:21:12 +08:00
chn
9ec12f8bfc Merge branch 'nas-beesd' 2023-10-05 19:16:26 +08:00
chn
27515d37fe nas: enable beesd 2023-10-05 19:16:12 +08:00
chn
cbec6f8d8d add jupyterlab 2023-10-05 18:58:02 +08:00
chn
4a7c532b31 Merge branch 'vps7-beesd' 2023-10-05 16:47:15 +08:00
chn
50aba26cfc vps7: enable beesd 2023-10-05 16:46:59 +08:00
chn
d7a781ad1a Merge branch 'vps6-beesd' 2023-10-05 16:17:24 +08:00
chn
625c3264af services.nextcloud: disable update checker 2023-10-05 16:12:53 +08:00
chn
9f78a34e6a vps6: enable beesd 2023-10-05 15:55:39 +08:00
chn
b72c8a43fa vps7: prepare for beesd 2023-10-05 15:52:39 +08:00
chn
286fc162c9 vps6: prepare for beesd 2023-10-05 15:45:30 +08:00
chn
47126a7429 local.pkgs: update rsshub 2023-10-05 11:30:12 +08:00
chn
be3c0e5821 services.nextcloud: add app 2023-10-04 21:06:35 +08:00
chn
14f62cf255 Revert "services.nextcloud: enable appstore"
This reverts commit 60f3ccc506.
2023-10-04 20:45:05 +08:00
chn
60f3ccc506 services.nextcloud: enable appstore 2023-10-04 20:38:20 +08:00
chn
2bac21f4cf services.nextcloud: fix mail 2023-10-04 20:06:45 +08:00
chn
ea02adcf4d vps6: enable nextcloud 2023-10-04 19:51:48 +08:00
chn
7fb51ba080 fix nextcloud mail config 2023-10-04 16:19:57 +08:00
chn
6020e071c0 fix 2023-10-04 15:56:11 +08:00
chn
c83c90050a fix 2023-10-04 15:51:11 +08:00
chn
15d89d99ad fix 2023-10-04 15:46:55 +08:00
chn
4b5078a76c fix 2023-10-04 15:42:34 +08:00
chn
073aa595d3 vps7: enable nextcloud 2023-10-04 15:41:00 +08:00
chn
2b5349ae06 services.nextcloud: init 2023-10-04 15:40:28 +08:00
chn
3f62ee0dcd fix 2023-10-04 12:11:40 +08:00
chn
b9f5478c26 vps6: enable photoprism
vps7: enable photoprism
2023-10-04 12:09:01 +08:00
chn
11ee42d876 fix 2023-10-04 12:04:54 +08:00
chn
d7adea94eb services.mariadb: fix user password and permissions 2023-10-04 11:48:39 +08:00
chn
990a5cf0be services.photoprism: init 2023-10-04 11:15:23 +08:00
chn
2cbe5945b7 services.mariadb: init 2023-10-04 10:13:56 +08:00
chn
e06623ce79 move zsh history 2023-10-04 00:35:59 +08:00
chn
4eeae31498 vps6: enable element-web 2023-10-03 21:47:46 +08:00
chn
9c75d2ac8d fix 2023-10-03 20:41:09 +08:00
chn
f2b88fa5a3 services.nginx.http: rename from httpProxy, allow static site 2023-10-03 20:34:54 +08:00
chn
259a1cc6f9 move xxx-proxy to nginx 2023-10-03 20:11:43 +08:00
chn
e4d1320373 restore old misskey 2023-10-03 19:00:33 +08:00
chn
4f24bcce18 vps7: migrate misskey 2023-10-03 11:44:31 +08:00
chn
e3336b95f8 fix 2023-10-02 22:27:35 +08:00
chn
97952ec828 service.misskey: allow multiple instances 2023-10-02 21:38:06 +08:00
chn
66bcb54311 prepare beesd for nas 2023-10-02 16:21:18 +08:00
chn
a0ef3198c2 fix remote-decrypt 2023-10-02 14:20:21 +08:00
chn
68b94f7216 nas: add networking driver into initrd 2023-10-02 14:10:23 +08:00
chn
b533b80f31 nas: enable sshd in initrd 2023-10-02 13:55:40 +08:00
chn
a7315cd8b5 fix initrd.nas.chn.moe 2023-10-02 13:52:32 +08:00
chn
0a6a8fdd7b fix remote-decrypt 2023-10-02 13:49:26 +08:00
chn
d6d0a0e230 nas: enable remote decryption 2023-10-02 13:36:27 +08:00
chn
8d583b626f nas.snapper: disable 2023-10-02 11:41:04 +08:00
chn
14ef69b54a pc.services.snapper: enable
pc.services.beesd: adjust
2023-10-02 09:54:58 +08:00
chn
b69d4648b5 Revert "services.beesd: use 4 threads"
This reverts commit 70e6430750.
2023-10-02 00:28:47 +08:00
chn
2efb0afcfe system.kernel: update to 6.4.15 2023-10-01 23:41:31 +08:00
chn
70e6430750 services.beesd: use 4 threads 2023-10-01 23:35:50 +08:00
chn
3dc8a2d73a bugs: add nvme 2023-10-01 23:12:34 +08:00
chn
795d55baee services.beesd: use 8 threads 2023-10-01 22:46:56 +08:00
chn
705d279a94 system.fileSystems.rollingRootfs: fix 2023-10-01 22:46:11 +08:00
chn
d88610f3b7 services.beesd: more threads 2023-10-01 19:54:14 +08:00
chn
e832412f3b system.fileSystems.rollingRootFs: make old rootfs readonly 2023-10-01 19:15:32 +08:00
chn
78b27d3ae5 system.impermanence: kvm image save to nodatacow 2023-10-01 18:29:27 +08:00
chn
a694ada2ee Revert "pc.services.beesd: disable"
This reverts commit bacfb9ccf2.
2023-10-01 18:01:40 +08:00
chn
bacfb9ccf2 pc.services.beesd: disable
pc.services.snapper: enable
2023-10-01 17:49:09 +08:00
chn
fbe4c21e9a Revert "services.beesd: adjust thread count"
This reverts commit 4340106787.
2023-10-01 17:45:38 +08:00
chn
4340106787 services.beesd: adjust thread count 2023-10-01 17:33:21 +08:00
chn
f42e1df555 services.snapper: remove patch 2023-10-01 17:08:11 +08:00
chn
63664f4fc7 pc.services.beesd: larger hash table size
pc.snapper: disable
2023-10-01 17:04:04 +08:00
chn
33b96bd46f pc: enable beesd 2023-10-01 16:25:25 +08:00
chn
106112d16f local.pkgs.misskey: fix 2023-10-01 16:11:46 +08:00
chn
38b6378160 services.beesd: disable 2023-10-01 09:22:08 +08:00
chn
33f7702330 packages: fix octave gui 2023-09-30 15:50:11 +08:00
chn
556ac1994d local.pkgs.misskey: 2023.9.1 -> 2023.9.3 2023-09-30 10:59:38 +08:00
chn
99aa6ecbf7 Revert "local.pkgs.misskey: use symlink for pnpm store"
This reverts commit fde802ebfc.
2023-09-30 10:54:41 +08:00
chn
fde802ebfc local.pkgs.misskey: use symlink for pnpm store 2023-09-30 10:51:37 +08:00
chn
1118e86d62 services.beesd: do not deduplicate snapshots 2023-09-30 10:45:57 +08:00
chn
ca59f06646 services.beesd: disable for boot 2023-09-29 18:33:35 +08:00
chn
9eec3611d4 services.beesd: set hashTableSizeMB 2023-09-29 10:52:14 +08:00
chn
3f54c4256c services.beesd: use only one thread 2023-09-29 09:38:44 +08:00
chn
91d7ab5b8f services.beesd: lower io priority 2023-09-29 01:02:39 +08:00
chn
dcf7f8ace0 system.nix: disable auto-optimise-store 2023-09-29 00:33:31 +08:00
chn
b7d524671a enable beesd for all machines 2023-09-29 00:32:48 +08:00
chn
f9a5581410 add beesd 2023-09-28 23:44:04 +08:00
chn
8c70c96d8e add nameof 2023-09-28 11:17:50 +08:00
chn
1957d68247 add eigen 2023-09-28 10:06:06 +08:00
chn
ceb91a8ed8 add btrfs-assistant 2023-09-28 00:41:49 +08:00
chn
093b27a225 system.networking.nebula: try to fix nebula at boot 2023-09-26 17:49:36 +08:00
chn
79cad7f58a users.yxy: add yxy_id_rsa.pub 2023-09-26 17:47:49 +08:00
chn
84ad6e3ae4 packages: prebuild unstablePackages.gcc13Stdenv 2023-09-26 13:52:38 +08:00
chn
6318b938c2 concurrencpp: fix cmake 2023-09-26 12:40:32 +08:00
chn
e21c7a916a add zpp-bits 2023-09-25 21:26:20 +08:00
chn
bdd8e82b4c services.misskey: fix version and add passthru 2023-09-25 16:33:18 +08:00
chn
e967a2511f services: misskey: update 2023-09-25 16:31:22 +08:00
chn
b509fd7a51 ssh: fix hpc ls color 2023-09-25 15:46:18 +08:00
chn
0259ee11ec services: misskey: fix build 2023-09-24 23:23:35 +08:00
chn
473c4f4d17 services: misskey: update 2023-09-24 21:42:40 +08:00
chn
469b765f99 meilisearch: add io limit 2023-09-24 20:47:46 +08:00
chn
ad7be5bc2b matplotplusplus: fix build 2023-09-23 18:44:19 +08:00
chn
fefd22a7eb matplotplusplus: fix build 2023-09-23 18:20:59 +08:00
chn
e4076219e1 add matplotplusplus 2023-09-23 17:33:17 +08:00
chn
8dc5b34cc1 packages: fix p10k instant prompt 2023-09-22 16:48:26 +08:00
chn
4f39c1a1f3 virtualisation: kvmHost: parallel shutdown 2023-09-21 15:46:58 +08:00
chn
cf6e8dff66 packages: update rsshub 2023-09-21 15:33:44 +08:00
chn
cb9665bbb6 Merge branch 'next' 2023-09-21 15:31:19 +08:00
chn
a419838515 ready to merge into main 2023-09-21 15:28:19 +08:00
chn
164c5737d2 packages: zsh: p10k instant prompt set to quiet 2023-09-21 14:06:05 +08:00
chn
91ba3d8ec2 openexr: fix build 2023-09-21 14:03:06 +08:00
chn
9fd8c2d7c6 system: impermanence: clear /home/chn/.cache 2023-09-21 00:10:52 +08:00
chn
11efee5bb3 packages: phonopy: update 2023-09-20 21:36:57 +08:00
chn
677e8111bf flake: default package do not build yoga 2023-09-20 16:52:45 +08:00
chn
d48beec819 system: networking: nebula: always restart 2023-09-20 16:51:46 +08:00
chn
6bf6eabaa3 meilisearch: allow to use 16G memory 2023-09-20 09:18:45 +08:00
chn
273fcbb7c5 packages: enable p10k instant prompt 2023-09-19 21:36:30 +08:00
chn
22aadba0da packages: add eigengdb 2023-09-19 19:47:42 +08:00
chn
5555396f5d vscode: add native debugger 2023-09-19 19:05:40 +08:00
chn
d935330515 lock: downgrade nix-vscode-extensions 2023-09-19 18:51:36 +08:00
chn
a215b50761 vscode: use stable version 2023-09-19 18:44:03 +08:00
chn
52fd57469e packages: update vscode 2023-09-19 18:36:49 +08:00
chn
b003a1be43 packages: add gdb 2023-09-19 16:52:49 +08:00
chn
4bd0b01d9b nixpkgs: currently do not use ccache 2023-09-19 14:29:33 +08:00
chn
c3901eeeb8 packages: add hdfview 2023-09-19 13:15:58 +08:00
chn
77c4a604e9 nixpkgs: enable ccache 2023-09-19 12:33:08 +08:00
chn
7c361dab09 chromium: enable ccache 2023-09-19 12:31:05 +08:00
chn
b9efd5eb70 update everything 2023-09-19 00:41:46 +08:00
chn
1a2d11cef8 nix-store: fix 2023-09-18 23:45:11 +08:00
chn
bfec0e24a0 nginx: externalIp allow multiple ips 2023-09-18 23:33:40 +08:00
chn
de9945635b pc: enable nginx transparent proxy 2023-09-18 23:29:41 +08:00
chn
915fcc348d vps7: enable fontconfig 2023-09-18 21:30:02 +08:00
chn
91475e40d3 security: disable u2f auth for backup key 2023-09-18 20:59:50 +08:00
chn
565b7dd6bc sshd: use key without fido2 pin 2023-09-18 20:46:49 +08:00
chn
5a2b46898d sshd: remove ca key support 2023-09-18 20:25:17 +08:00
chn
3850b9bc05 删除 docker huginn linger
太难搞了,一年之内不再搞
2023-09-18 20:02:33 +08:00
chn
fb8c3cf89d add docker 2023-09-18 19:21:04 +08:00
chn
df5be06957 users: enable linger 2023-09-18 19:08:04 +08:00
chn
894607b933 users: root: enable autoSubUidGidRange 2023-09-18 14:03:17 +08:00
chn
aec4d38497 清理,放弃使用 rootless docker 2023-09-18 14:02:05 +08:00
chn
2312a8398c temp 2023-09-18 06:47:49 +08:00
chn
2e4a542c06 system: set home-manager state version 2023-09-18 05:45:56 +08:00
chn
69c7177b73 users: minor fix 2023-09-18 05:40:04 +08:00
chn
981643af44 users: add linger option 2023-09-18 05:35:56 +08:00
chn
5f88cd5cf5 users: manually import sharedModules 2023-09-18 05:28:02 +08:00
chn
a519053c2a 整理 users 2023-09-18 05:16:38 +08:00
chn
34c0ee6ced add wine-staging 2023-09-17 18:50:42 +08:00
chn
bdc7945e71 Revert "暂存"
This reverts commit beffb2bb95.
2023-09-17 12:48:11 +08:00
chn
beffb2bb95 暂存 2023-09-17 12:48:06 +08:00
chn
77ecc9787c nginx: remove unnecessary acme path 2023-09-16 17:50:45 +08:00
chn
f087027c6b misskey: fix mount options 2023-09-16 16:26:23 +08:00
chn
aad3849ee1 整理 frp 2023-09-16 16:01:23 +08:00
chn
f48a494e4f nginx: httpProxy add rewriteHttps option
nginx: httpProxy add locations support
vaultwarden: init
2023-09-16 15:34:27 +08:00
chn
4463cab071 nginx: fix streamProxy rewriteHttps 2023-09-16 00:22:17 +08:00
chn
286967f7fe meilisearch: remove some IO limits 2023-09-15 22:53:20 +08:00
chn
fc6fa4b1db drop unused machines 2023-09-15 21:52:21 +08:00
chn
a21d4258f2 nginx: fix resolver 2023-09-15 21:21:33 +08:00
chn
4387adde3f nginx: add streamProxy
vps6: enable nginx streamProxy
2023-09-15 20:59:18 +08:00
chn
bb456479b0 disable avx2 for cryptonie 2023-09-15 13:48:48 +08:00
chn
9efc93db49 nas: add user zem, yjq, yxy 2023-09-14 19:11:33 +08:00
chn
2130ded160 nas: enable user xll 2023-09-14 18:50:03 +08:00
chn
d51a8177d6 sshd: allow password authentication 2023-09-14 18:38:10 +08:00
chn
0eb722dab1 整理samba 2023-09-13 23:52:49 +08:00
chn
25995e7dd8 fix permission 2023-09-13 23:32:10 +08:00
chn
da1a328165 users: fix home-manager for xll 2023-09-13 22:27:40 +08:00
chn
040352d30a groupshare: fix permissions 2023-09-13 22:21:16 +08:00
chn
544b071081 fix 2023-09-13 21:21:13 +08:00
chn
f5ff5c3a9e xrdp: allow multiple hostnames 2023-09-13 21:19:08 +08:00
chn
9847e21bff acme: allow multiple domains 2023-09-13 21:13:13 +08:00
chn
4ad8abda21 nas: enable some services 2023-09-13 19:26:56 +08:00
chn
0e7385c408 nas: enable xrayClient 2023-09-13 19:12:32 +08:00
chn
ef7fe907a6 chn: nas use office.chn.moe 2023-09-13 19:05:16 +08:00
chn
48b1480206 programs: fix gpg 2023-09-13 13:51:30 +08:00
chn
eccdd913ed fileSystems: disable acl for vfat 2023-09-13 13:27:35 +08:00
chn
4eaa4f8df2 pc: enable nebula relay
nas: enable nebula relay
2023-09-13 10:25:42 +08:00
chn
1e631be14d nebula: fix firewall rules, allow relay 2023-09-13 10:23:00 +08:00
chn
01213d9eff nebula: use relay 2023-09-13 02:12:52 +08:00
chn
b8dcfa0fd6 groupshare: fix 2023-09-13 02:12:41 +08:00
chn
53be0e13c4 add groupshare (currently not working) 2023-09-12 23:08:35 +08:00
chn
716a4cbfcf fileSystems: set all file systems to neededForBoot 2023-09-12 21:37:47 +08:00
chn
d2c547ca46 nas: install system to ssd 2023-09-12 21:34:48 +08:00
chn
3f917a0cd1 nas: enable xrdp 2023-09-12 20:56:58 +08:00
chn
a1e0e17543 disable baloo for all user 2023-09-12 20:52:41 +08:00
chn
128ce69ce3 nas: enable nebula 2023-09-12 16:38:14 +08:00
chn
58e862661f 整理 users 2023-09-12 16:31:20 +08:00
chn
84effe92c6 nebula: bypass xray client transparent proxy 2023-09-12 12:27:22 +08:00
chn
f5ae7b00f9 add vlc 2023-09-11 20:33:49 +08:00
chn
e7fd01b42f update openexr 2023-09-11 10:23:36 +08:00
chn
6215e59f74 workstation: add gcc13Stdenv to prebuildPackages 2023-09-10 22:58:24 +08:00
chn
228a538819 fix concurrencpp include path 2023-09-10 21:53:18 +08:00
chn
a08c325d86 add concurrencpp 2023-09-10 21:23:22 +08:00
chn
007438ba1f pe: add deploy 2023-09-10 18:09:48 +08:00
chn
9b03c80b9a nas: enable gui 2023-09-10 17:03:26 +08:00
chn
eef8b0f312 set gcc flags for unstablePackages 2023-09-10 16:40:19 +08:00
chn
dfcd4582ba nas: enable deploy 2023-09-10 15:32:32 +08:00
chn
0fc95d4abf ssh: fix authorized_keys 2023-09-10 15:31:39 +08:00
chn
32712534e4 set nas ip 2023-09-10 15:26:34 +08:00
chn
e7df638e35 nas: final setup 2023-09-10 15:07:19 +08:00
chn
eba953b7ad waydroid use unstablePackages 2023-09-10 14:35:08 +08:00
chn
b286d9c8dc update nixpkgs 2023-09-10 12:05:08 +08:00
chn
14d61eb3a7 pe: enable kvmGuest 2023-09-10 11:20:33 +08:00
chn
77b8330ed5 Revert "nixpkgs: use generic haskellPackages"
This reverts commit fd13864f48.
2023-09-10 01:51:40 +08:00
chn
fd13864f48 nixpkgs: use generic haskellPackages 2023-09-10 00:31:00 +08:00
chn
b4792327e6 Revert "nixpkgs: use generic pandoc"
This reverts commit 558a61a0f1.
2023-09-10 00:26:51 +08:00
chn
558a61a0f1 nixpkgs: use generic pandoc 2023-09-10 00:23:53 +08:00
chn
87db616f7e add krita 2023-09-09 21:38:53 +08:00
chn
96271f7ac6 fileSystems: fix mdadm 2023-09-09 21:22:56 +08:00
chn
bc9c2a45d4 pc 基本上编译通过 2023-09-09 14:15:57 +08:00
chn
40dec0e342 Merge branch 'main' into stable 2023-09-09 11:11:53 +08:00
chn
812d646adc systemd: fix coredump 2023-09-09 00:40:39 +08:00
chn
6f166dcb80 update nur 2023-09-08 10:28:18 +08:00
chn
3ea27ee691 Revert "misskey: fix systemd shutdown"
This reverts commit 6d2c08e434.
2023-09-08 08:40:52 +08:00
chn
2615ed6437 暂存 2023-09-08 05:49:52 +08:00
chn
7c674ebbf9 update everything 2023-09-07 11:43:05 +08:00
chn
6d2c08e434 misskey: fix systemd shutdown 2023-09-07 04:17:24 +08:00
chn
6d1266b2b4 restart misskey everyday 2023-09-07 03:58:02 +08:00
chn
b402bff18b add v_sim 2023-09-06 20:04:23 +08:00
chn
eceb956c5e add huginn 2023-09-06 17:58:46 +08:00
chn
6aca2d605d update cjktty 2023-09-06 16:50:31 +08:00
chn
42879f22cb add bundix 2023-09-06 16:44:55 +08:00
chn
04bf86f89e kernel: update 2023-09-06 13:06:02 +08:00
chn
d5cd5d256e vasp: use openmpi without cuda support 2023-09-06 02:14:56 +08:00
chn
12705172fb Revert "disable nix-ld"
This reverts commit c146f56df5.
2023-09-06 01:43:16 +08:00
chn
865f2c3c78 vesta: fix build 2023-09-06 01:43:02 +08:00
chn
c146f56df5 disable nix-ld 2023-09-06 01:22:42 +08:00
chn
c5a9da5a4b add openbox 2023-09-06 00:19:19 +08:00
chn
63ee2ce5d9 slack: use stablePackages 2023-09-06 00:18:50 +08:00
chn
ed7d9b1fb7 meilisearch: limit io 2023-09-05 22:54:40 +08:00
chn
8bf884e09c Revert "use xorg as default session"
This reverts commit 4a93baf5de.
2023-09-05 21:00:23 +08:00
chn
0ede3816f5 intel: allow to use modesetting driver 2023-09-05 20:57:55 +08:00
chn
71681f75ec xrdp: fix 2023-09-05 20:10:46 +08:00
chn
4fb686af8a i915: try to no use modesetting driver 2023-09-05 20:08:27 +08:00
chn
244e690908 xrdp: fix ssl group 2023-09-05 19:47:57 +08:00
chn
7aebf47beb add xrdp 2023-09-05 17:17:43 +08:00
chn
14adcecc06 pc: enable misskey
add genymotion
2023-09-05 13:37:35 +08:00
chn
ff5c9b6701 add cage 2023-09-05 10:47:58 +08:00
chn
b79e06f52a add weston 2023-09-05 10:17:11 +08:00
chn
99213b8135 add 12to11 2023-09-05 09:50:37 +08:00
chn
4a93baf5de use xorg as default session 2023-09-05 01:51:39 +08:00
chn
d8dd5d7034 remove variable NIXOS_OZONE_WL 2023-09-05 01:42:03 +08:00
chn
1171f8d2b0 fix obs-studio 2023-09-05 01:31:27 +08:00
chn
ac17e255c1 Revert "add slack"
This reverts commit 6050d12010.
2023-09-05 00:50:33 +08:00
chn
6050d12010 add slack 2023-09-05 00:49:39 +08:00
chn
86e2c18d70 add slack 2023-09-05 00:30:10 +08:00
chn
eaaf70ffc8 xray: proxy zoom 2023-09-05 00:16:30 +08:00
chn
aaafe6a660 update zoom 2023-09-05 00:06:12 +08:00
chn
9fcc05fc22 add vaspkit 2023-09-04 23:23:46 +08:00
chn
5fbe508b33 add vasp gnu 2023-09-04 19:26:33 +08:00
chn
b218ac50b1 workstation: add vasp and phonon-unfolding 2023-09-03 22:48:20 +08:00
chn
d7e5e5aba9 nixpks: add option oneapiArch
nomacs: fix build with cuda
vasp: add vasp
phonon-unfolding: add phonon-unfolding
2023-09-03 22:46:18 +08:00
chn
6faed2aed6 vps7: enable gui 2023-09-03 18:20:32 +08:00
chn
2a2654ae2b nixpkgs: add cudaSupport 2023-09-03 17:17:10 +08:00
chn
267279bc81 misskey: use nebula to proxy 2023-09-03 16:53:56 +08:00
chn
203fc9cffd synapse: use nebula to proxy 2023-09-03 16:36:28 +08:00
chn
1a8b47032f nebula: add nebula.nebula to trustedInterfaces 2023-09-03 16:10:12 +08:00
chn
3671fde36b vps7: enable nebula 2023-09-03 14:37:38 +08:00
chn
ac9a792095 impermanence: enable nodatacow by default
impermanence: persist /var/backup
2023-09-03 14:23:43 +08:00
chn
99043047db move nebula to system.networking 2023-09-02 22:28:51 +08:00
chn
7e15a7f3b3 move sops to system 2023-09-02 22:11:08 +08:00
chn
4483e28dfe 整理 system.security 2023-09-02 21:47:12 +08:00
chn
289ed2fb27 整理 systemd.security 2023-09-02 21:39:01 +08:00
chn
438d1181ff 整理 system.networking 2023-09-02 21:33:09 +08:00
chn
b2ccf88adc 整理 system.nixpkgs 2023-09-02 21:21:29 +08:00
chn
6305555760 整理 system.gui 2023-09-02 21:03:23 +08:00
chn
6b8d105349 fix build 2023-09-02 16:55:49 +08:00
chn
5132bded49 将 impermanence 移到 system 模块中 2023-09-02 16:40:17 +08:00
chn
b00a0b51e7 增加 phpfpm 2023-09-02 16:30:21 +08:00
chn
e6969fb0c2 整理 system.kernel 2023-09-02 15:25:05 +08:00
chn
e1e88dfdba 整理 system.initrd 2023-09-02 15:07:16 +08:00
chn
72571d5d88 整理 system.grub 2023-09-02 14:54:37 +08:00
chn
0a7e808b6c 整理 system.fileSystems 2023-09-02 14:21:27 +08:00
chn
2d5397b0f1 整理 system.nix 2023-09-02 14:04:03 +08:00
chn
0115d96f11 add todo 2023-09-02 00:00:48 +08:00
chn
15ca93ada1 Revert "分离 nix 配置"
This reverts commit 9ff5212fe7.
2023-09-01 23:49:45 +08:00
chn
9ff5212fe7 分离 nix 配置 2023-09-01 23:44:51 +08:00
chn
735217d1b8 修改 hostname 为 pc 2023-09-01 21:18:09 +08:00
chn
3e029b25a5 tab 替换为空格 2023-09-01 21:05:26 +08:00
chn
0d46532922 add dguibert-nur-packages (nvhpc) 2023-09-01 14:37:51 +08:00
chn
9902ce82f8 add fake packages to build system
nix registry nixos-config to nixos
2023-09-01 02:09:16 +08:00
chn
c407e6c56c 打包,打个屁,人家都已经写好了 2023-09-01 01:54:15 +08:00
chn
7511fbacf1 暂存 2023-08-31 22:22:50 +08:00
chn
83959b68cc oneapi: 重新打包 2023-08-31 21:37:11 +08:00
chn
fe0130fa9d 整理 2023-08-31 18:53:48 +08:00
chn
9aab39149a update vscode extensions
use nil
2023-08-31 18:38:55 +08:00
chn
b013ca70b3 pc: enable nebula
nebula fix firewall
2023-08-31 17:37:45 +08:00
chn
9ae78ee549 vps6 enable nebula 2023-08-31 17:20:17 +08:00
chn
82c5d9c087 packages: add libfido2 to udev.packages 2023-08-31 16:38:09 +08:00
chn
b9ed4609f8 add yubico-piv-tool 2023-08-31 16:23:47 +08:00
chn
2415889698 coturn: allow both tls and non-tls connections
synapse: coturn use both tls and non-tls connections
2023-08-31 01:27:42 +08:00
chn
613bbb8513 coturn: change port to 5349
synapse: coturn use default port, allow both tcp and udp
2023-08-30 23:56:52 +08:00
chn
e413b16605 synapse: coturn set port 2023-08-30 23:49:51 +08:00
chn
b679bc595a synapse: coturn use udp 2023-08-30 23:40:41 +08:00
chn
c5974e5d5d coturn: set port to 3478
synapse: use turns instead of turn
2023-08-30 23:36:04 +08:00
chn
d5673acf64 nginx: allow port 80
coturn: allow ports
2023-08-30 23:24:50 +08:00
chn
0dd3c2b03d meilisearch: remove IODeviceLatencyTargetSec 2023-08-30 22:16:38 +08:00
chn
db5c126098 postgresql: enable autovacuum 2023-08-30 21:49:18 +08:00
chn
1fe0be0d82 meilisearch: lower IO priority 2023-08-30 21:39:34 +08:00
chn
9d98d1ac4d meilisearch: use idle scheduling 2023-08-30 20:26:53 +08:00
chn
d6cc45bdb8 meilisearch: set max_indexing_threads to 1 2023-08-30 20:21:52 +08:00
chn
0cdefd8d79 Revert "misskey: remove meilisearch"
This reverts commit a3a5ab23c0.
2023-08-30 20:08:08 +08:00
chn
a3a5ab23c0 misskey: remove meilisearch 2023-08-30 20:00:37 +08:00
chn
0296ca679f nginx: fix 2023-08-30 16:14:08 +08:00
chn
f2c975999c deploy: disable automatic rollback 2023-08-30 16:05:37 +08:00
chn
5d21d29aac postgresql: use native package 2023-08-30 16:01:27 +08:00
chn
bb407addda nginx: increase proxy timeouts 2023-08-30 15:51:10 +08:00
chn
65232df9c7 postgresql: enable automatic backups 2023-08-30 15:46:04 +08:00
chn
72b566a4bf postgresql: disable autovacuum
synapse: fix
system: disable coredump
2023-08-30 15:42:14 +08:00
chn
6f6305df95 postgresql: increase shared_buffers and work_mem 2023-08-30 00:56:15 +08:00
chn
ea87dbff76 change default locale 2023-08-30 00:55:48 +08:00
chn
d5b355d4e7 synapse: try to workaround config merge bug 2023-08-29 23:11:49 +08:00
chn
3516842bd7 synapse: move email config to secrets 2023-08-29 22:45:41 +08:00
chn
9e2b761ffa Revert "synapse: try to fix yaml escaping"
This reverts commit 8fbab0285e.
2023-08-29 22:45:05 +08:00
chn
8fbab0285e synapse: try to fix yaml escaping 2023-08-29 22:40:42 +08:00
chn
76a237694c add synapse 2023-08-29 22:15:58 +08:00
chn
0a40f47aab enable coturn for vps6 2023-08-29 20:28:11 +08:00
chn
67f6ec0d7c xray: fix client dns 2023-08-29 17:25:30 +08:00
chn
d2b29999ff Revert "xray: fix client dns settings"
This reverts commit 0b966ab1da.
2023-08-29 17:06:15 +08:00
chn
0b966ab1da xray: fix client dns settings 2023-08-29 17:01:30 +08:00
chn
af1b40b0f6 packages: add nix-tree 2023-08-29 15:50:31 +08:00
chn
a6f2709e3a disable failed tests 2023-08-29 12:48:36 +08:00
chn
86a4f05bc1 packages: move python to server 2023-08-29 11:23:48 +08:00
chn
8a55ead16c packages: add some python packages 2023-08-29 11:11:57 +08:00
chn
793f2c9e0a misskey: increase statement_timeout 2023-08-29 10:32:09 +08:00
chn
f4916eed5d postgresql: enable autovacuum 2023-08-29 10:30:32 +08:00
chn
d5a64fa9d3 chromium: use stable version 2023-08-29 00:50:57 +08:00
chn
28a5a2d729 rsshub: update 2023-08-29 00:07:34 +08:00
chn
8f3125fec1 Merge branch 'vps7' 2023-08-28 17:42:57 +08:00
chn
303eef80d9 fix build 2023-08-28 14:56:30 +08:00
chn
fb8d4e4b89 meilisearch: increase max_indexing_memory 2023-08-28 11:07:22 +08:00
chn
fce5491d6b vps7: change ip 2023-08-28 10:28:59 +08:00
chn
be5961d156 kernel add broadwell support 2023-08-28 01:10:23 +08:00
chn
287abc8907 vps7 change to broadwell 2023-08-28 01:06:05 +08:00
chn
7a73b7d9c1 chn-PC: allow compile broadwell 2023-08-28 01:05:12 +08:00
chn
5cc4dda9b1 meilisearch: optimise for performance
system: set NIX_PATH
system: add substituters
2023-08-27 22:14:31 +08:00
chn
959a4d448c use native meilisearch 2023-08-27 20:27:15 +08:00
chn
d77c2fdd85 meilisearch: RUST_BACKTRACE = "full"
mk-meili-mgn: update to 20230827
2023-08-27 19:10:21 +08:00
chn
fab096a46c meilisearch: use musl generic 2023-08-27 18:00:13 +08:00
chn
c72665bbf6 meilisearch: use musl 2023-08-27 16:44:23 +08:00
chn
0ad8903f01 vps7 enable nodatacow 2023-08-27 11:36:21 +08:00
chn
b9b9d97c02 meilisearch: use 2GB of memory for indexing 2023-08-27 10:20:53 +08:00
chn
4e02b3aaa6 xray: 8.8.8.8 force proxy 2023-08-27 10:08:49 +08:00
chn
a622daaa40 分离 xray 的设置 2023-08-27 09:54:05 +08:00
chn
a50275f54a try to fix meilisearch 2023-08-27 02:04:00 +08:00
chn
440d01745c enable ssh compression 2023-08-27 01:06:41 +08:00
chn
49dec3a2b3 systemd auto clean journal 2023-08-27 00:59:22 +08:00
chn
98ff90f8ad fix nginx geoip2 log 2023-08-27 00:39:30 +08:00
chn
cc3842f450 disable misskey test 2023-08-27 00:38:09 +08:00
chn
01749a6e41 nginx enable reload 2023-08-27 00:35:43 +08:00
chn
cf98f233a3 fix meilisearch files permissions 2023-08-27 00:33:59 +08:00
chn
46eb62fdb6 完成misskey 2023-08-26 23:55:14 +08:00
chn
e1c84dad25 update meilisearch 2023-08-26 22:59:15 +08:00
chn
3c2285704b 准备部署 misskey 2023-08-26 18:00:01 +08:00
chn
6d09435a2c enable misskey 2023-08-26 15:05:15 +08:00
chn
9d78bf0470 misskey proxy allow multiple instances 2023-08-26 14:12:06 +08:00
chn
fd0c285a47 fix meilisearch 2023-08-26 13:47:45 +08:00
chn
dce8fe8cda misskey add meilisearch 2023-08-26 13:30:35 +08:00
chn
736f84b105 add meilisearch 2023-08-26 12:17:30 +08:00
chn
87fc499bfe add mk-meili-mgn 2023-08-26 12:03:01 +08:00
chn
23c5063307 update kernel 2023-08-26 11:08:09 +08:00
chn
0d0dc6ed29 Revert "Revert "update kernel""
This reverts commit 8c53e5a6ae.
2023-08-26 10:43:46 +08:00
chn
935d7ef64c fix nginx 2023-08-26 01:27:04 +08:00
chn
bef540c0cc fix nginx 2023-08-26 01:00:32 +08:00
chn
f5a2ecdb39 fix nginx 2023-08-26 00:32:10 +08:00
chn
773cfb5e99 fix nginx 2023-08-26 00:12:15 +08:00
chn
43c6ac6448 nginx add log 2023-08-25 23:54:04 +08:00
chn
2ef8957aab fix 2023-08-25 23:22:47 +08:00
chn
fa4caaa2e9 fix 2023-08-25 23:18:13 +08:00
chn
d60a991eac enable 铜锣湾实验室 2023-08-25 22:55:33 +08:00
chn
b7c890a206 misskey 增加代理,并准备部署到 vps7 2023-08-25 22:32:43 +08:00
chn
56998a5f6d move nginx to a separate file 2023-08-25 20:53:31 +08:00
chn
3af36c2219 完成misskey服务 2023-08-25 19:36:09 +08:00
chn
8c53e5a6ae Revert "update kernel"
This reverts commit e2e7d5d49c.
2023-08-25 18:47:26 +08:00
chn
f2d7260390 fix misskey services 2023-08-25 18:46:26 +08:00
chn
c92e834908 add misskey 2023-08-25 18:25:34 +08:00
chn
b339ffc1c7 fix 2023-08-25 08:42:22 +08:00
chn
e2e7d5d49c update kernel 2023-08-25 08:38:36 +08:00
chn
e16c8f70aa successfully packaged misskey 2023-08-25 07:13:55 +08:00
chn
a6e9f27c29 vscode add mathematica support 2023-08-24 20:57:14 +08:00
chn
43861e19b5 only workstation should build chromium 2023-08-23 20:30:36 +08:00
chn
39dbad2031 add nas xmupc1 to all system 2023-08-23 20:22:27 +08:00
chn
4ce21c55e2 fix rsshub 2023-08-23 17:38:47 +08:00
chn
43bd2adfcc fix rsshub 2023-08-23 17:32:13 +08:00
chn
ef32ce14bb try to fix rsshub services 2023-08-23 16:52:23 +08:00
chn
270e190408 fix rsshub environment file 2023-08-23 16:37:38 +08:00
chn
36221f3ed7 Revert "try to reuse pnpm store"
This reverts commit 2830032fa9.
2023-08-23 16:17:43 +08:00
chn
2830032fa9 try to reuse pnpm store 2023-08-23 16:16:46 +08:00
chn
561a65e758 update pnpm2nix-nzbr 2023-08-23 16:08:17 +08:00
chn
4809faf38c update firefoxpwa 2023-08-23 15:18:14 +08:00
chn
7dae66f6bb firefox enable pwa 2023-08-23 14:10:10 +08:00
chn
c6638965b2 finally finish rsshub 2023-08-23 13:34:58 +08:00
chn
6b2f088cad 完成打包 rsshub 2023-08-23 07:52:47 +08:00
chn
ebd222abe7 暂存打包结果 2023-08-23 07:22:53 +08:00
chn
ff056eee8b 整理rsshub(还不能用) 2023-08-22 21:10:53 +08:00
chn
fc69608ec0 add pe 2023-08-22 16:53:33 +08:00
chn
95de4be396 enabel chromium 2023-08-21 23:06:39 +08:00
chn
74790adf51 放弃misskey打包 2023-08-21 21:23:02 +08:00
chn
52682a88c8 偷来一个misskey的打包 2023-08-21 20:57:15 +08:00
chn
1a1860d214 整理系统配置 2023-08-21 19:53:39 +08:00
chn
606a5823e5 default build yoga 2023-08-21 19:25:45 +08:00
chn
44888d963b set vim 2023-08-21 16:23:28 +08:00
chn
d218a03517 add ssh config 2023-08-21 15:55:40 +08:00
chn
0e69a9d0c4 customize git 2023-08-21 15:26:18 +08:00
chn
26a41318fa disable ussh
enable yubicoAuth for all
fix u2f
2023-08-21 13:32:41 +08:00
chn
249b5983c9 fix yoga boot 2023-08-21 12:15:20 +08:00
chn
9fd73fa3fd fix yoga config 2023-08-21 11:44:20 +08:00
chn
35e7f25a14 setup yoga sops 2023-08-21 02:23:30 +08:00
chn
403742c4f7 enable gamemode 2023-08-21 01:38:14 +08:00
chn
4bae6952ba 补回deploy的配置 2023-08-21 01:20:53 +08:00
chn
84ba2e1c95 fix yoga config 2023-08-21 00:39:22 +08:00
chn
f7bd41ee94 整理输入 2023-08-20 23:49:18 +08:00
chn
cb0363c439 fix build 2023-08-20 23:44:15 +08:00
chn
5f6db7ee9b update system config 2023-08-20 23:12:12 +08:00
chn
3b00659257 test on different compress level: default is enough 2023-08-20 23:10:08 +08:00
chn
78dad12e2c add deploy-rs 2023-08-20 21:39:36 +08:00
chn
78ca1676d7 try deploy-rs 2023-08-20 20:53:35 +08:00
chn
e20dae7d8b add deploy-rs 2023-08-20 20:13:24 +08:00
chn
437fda515e btrfs zstd:8 2023-08-20 18:34:03 +08:00
chn
df2a5982eb add texstudio 2023-08-20 17:34:18 +08:00
chn
59ead7ad36 xray enable socks5 proxy 2023-08-20 13:55:54 +08:00
chn
d73d16df74 fix build 2023-08-20 12:48:05 +08:00
chn
299bcf5003 增加huginn(还没有写完) 2023-08-20 12:42:07 +08:00
chn
6769b0925b 移动 rootless docker 的定义位置 2023-08-20 12:29:50 +08:00
chn
b670b6bf4f add postgresql 2023-08-20 12:19:56 +08:00
chn
b93c3736bb Merge branch 'rootless-docker' 2023-08-20 11:21:14 +08:00
chn
a565d30ed2 update intput 2023-08-20 10:41:01 +08:00
chn
5743f4c858 add neofetch 2023-08-20 09:24:38 +08:00
chn
a267b2c0c9 disable test for silvermon 2023-08-19 20:18:53 +08:00
chn
8129993552 yoga bootstrap 2023-08-19 12:08:34 +08:00
chn
14e323a9c1 Merge branch 'new-machine' 2023-08-19 11:40:45 +08:00
chn
cbe8946066 use nixpkgs unstable 2023-08-19 11:40:04 +08:00
chn
a4f6c0ffb8 update vscode 2023-08-19 10:55:07 +08:00
chn
99f392a724 add etcher 2023-08-19 02:26:03 +08:00
chn
a2a65f715a Revert "将许多软件包移动到 workstatioin"
This reverts commit b595c6ed77.
2023-08-19 02:23:28 +08:00
chn
b595c6ed77 将许多软件包移动到 workstatioin 2023-08-19 02:17:05 +08:00
chn
c111152569 bootstrap for pe 2023-08-18 22:48:56 +08:00
chn
ebb8c11c62 add nya.one to proxy 2023-08-18 22:18:24 +08:00
chn
9ea13a5a63 disable failed test 2023-08-18 20:39:37 +08:00
chn
4544091766 add clang-git 2023-08-18 13:24:42 +08:00
chn
5a21f39ccd add yoga 2023-08-18 13:04:04 +08:00
chn
bfb95385f8 move fix of embree into bugs 2023-08-18 03:41:44 +08:00
chn
2c36999f22 disable failed test for znver3 2023-08-18 03:39:37 +08:00
chn
8734367d98 add some vscode extentions
add fprettify
2023-08-18 01:11:34 +08:00
chn
e84874e2c9 fix embree for znver3 2023-08-17 23:50:05 +08:00
chn
77f01f7f27 update nvidia driver 2023-08-17 23:15:47 +08:00
chn
4aafad2b4a disable failed test for znver3 2023-08-17 20:39:52 +08:00
chn
cb827cf987 Revert "update vscode and extensions"
This reverts commit a13d2959bc.
2023-08-17 19:24:29 +08:00
chn
a13d2959bc update vscode and extensions 2023-08-17 15:54:12 +08:00
chn
3a1b365112 disable firefox for xmupc1 2023-08-17 14:05:03 +08:00
chn
5e6ddd0c03 disable failed test for znver3 2023-08-17 11:22:09 +08:00
chn
24111b6adf vscode add ccls 2023-08-17 10:49:10 +08:00
chn
eea572e812 update clangd to 16 2023-08-17 04:40:23 +08:00
chn
590f5053a5 move v2ray-forwarder from touchix to local
add proxy_net
2023-08-17 03:34:37 +08:00
chn
6449223f2e disable failed test for znver3 2023-08-17 02:15:50 +08:00
chn
7427e5720c max-jobs set to 2 2023-08-17 00:37:14 +08:00
chn
2da2507edb disable failed test for znver3 2023-08-16 23:49:25 +08:00
chn
82f24ac02c Revert "zsrd compression level set to 8"
This reverts commit 1bf90af888.
2023-08-16 22:47:12 +08:00
chn
1bf90af888 zsrd compression level set to 8 2023-08-16 21:31:19 +08:00
chn
60ec759e7d 编译通过 2023-08-16 20:22:27 +08:00
chn
14ce29fd6c add rootless docker 2023-08-16 19:51:55 +08:00
chn
10f9b719f4 fix xmupc1 secret 2023-08-16 18:07:48 +08:00
chn
d3951a924b fix xmupc1 secrets 2023-08-16 17:08:15 +08:00
chn
d57f985d52 fix silvermont build 2023-08-16 02:36:05 +08:00
chn
642da4d9ea add nas and xmupc1 2023-08-16 02:34:22 +08:00
chn
9167fbfb04 init nas 2023-08-16 02:16:27 +08:00
chn
bb2dc2d8b0 add toplevel virtual package 2023-08-16 01:33:29 +08:00
chn
e298ffc41f fix xmupc1 build 2023-08-16 01:05:37 +08:00
chn
5366644661 xmupc1 init 2023-08-16 01:00:39 +08:00
chn
add7b0333d Revert "test"
This reverts commit d621a2230c.
2023-08-15 17:24:08 +08:00
chn
d621a2230c test 2023-08-15 17:16:16 +08:00
chn
e8f8818604 fix wallabag 2023-08-15 16:40:12 +08:00
chn
0282024b55 currently disable wallabag mailer 2023-08-15 16:26:46 +08:00
chn
1206baf90f fix wallabag 2023-08-15 16:22:06 +08:00
chn
8741456752 fix wallabag mail 2023-08-15 15:17:03 +08:00
chn
0cce2683d9 try to run oci without root 2023-08-15 02:50:03 +08:00
chn
43371859a8 fix wallabag init db 2023-08-15 01:34:13 +08:00
chn
eae709a7fb fix postgresql authentication 2023-08-15 01:29:12 +08:00
chn
85d4e22b65 enable wallabag to vps7 2023-08-15 01:10:28 +08:00
chn
4388d82d4d enable postgresql for vps7 2023-08-15 00:53:30 +08:00
chn
990c4f656b fix vps7 nginx 2023-08-15 00:02:54 +08:00
chn
8a91ce4405 rsshub should enable nginx 2023-08-14 23:55:43 +08:00
chn
f7f7680a68 docker shoud set firewall 2023-08-14 23:52:44 +08:00
chn
38db6aa28c fix docker nvidia 2023-08-14 23:21:23 +08:00
chn
661b45a02d oci need docker enable 2023-08-14 23:18:14 +08:00
chn
1c91496dc7 add nix-prefetch-docker 2023-08-14 22:29:12 +08:00
chn
e72c967cbf fix nginx ssl 2023-08-14 22:21:00 +08:00
chn
b5c8905b22 move rsshub to vps7 2023-08-14 22:11:57 +08:00
chn
c83385f63f add rsshub 2023-08-14 22:08:44 +08:00
chn
d5ad02aa23 add rsshub 2023-08-14 20:57:56 +08:00
chn
0d7e8654af add more _prebuildPackages 2023-08-14 20:19:12 +08:00
chn
348dd4df4f enable more insecure packages 2023-08-14 20:09:57 +08:00
chn
fff2ec5c38 set docker dns to 1.1.1.1 2023-08-14 18:49:22 +08:00
chn
ec51b4122c fix misskey (not working) 2023-08-14 18:31:50 +08:00
chn
06531833ea add misskey (not working) 2023-08-14 17:59:50 +08:00
chn
942347c4d3 enable postgresql 2023-08-14 17:07:57 +08:00
chn
9f13838c97 fix config for vps7 2023-08-14 15:57:42 +08:00
chn
495cb862bf acme use google dns 2023-08-14 14:36:21 +08:00
chn
3ccf8b4013 nix-store compress at local 2023-08-14 14:25:21 +08:00
chn
2703424f56 add nginx maxmind license 2023-08-14 14:01:05 +08:00
chn
bc351fec9a enable nginx for PC 2023-08-14 13:59:32 +08:00
chn
28c8cc8a77 max-jobs set to 4 2023-08-14 13:58:18 +08:00
chn
cb1cefcbf3 nix-serve enable nginx proxy 2023-08-14 13:57:37 +08:00
chn
a5b1afc357 xray server do not force enable nginx 2023-08-14 13:51:59 +08:00
chn
ee3e6b293c allow to only enable nginx without transparent proxy 2023-08-14 13:49:17 +08:00
chn
f301ab22e9 adjust nginx config 2023-08-14 02:30:36 +08:00
chn
fc1a18a3f3 remove fileshelter 2023-08-14 02:16:53 +08:00
chn
f203ba62cc adjust some nginx settings 2023-08-14 02:14:37 +08:00
chn
ea9ff4dd85 bootstrap for vps7 2023-08-14 00:54:46 +08:00
chn
ce55cf8477 fix fileshelter user 2023-08-14 00:34:43 +08:00
chn
b4f3550483 nginx use geoip2 2023-08-14 00:11:48 +08:00
chn
49e25ed3cd remove send, add fileshelter 2023-08-13 23:24:47 +08:00
chn
78ac8125bd nginx allow to disable http2 2023-08-13 22:43:34 +08:00
chn
2a8cd527e3 nginx fix websocket client_max_body_size 2023-08-13 22:20:03 +08:00
chn
0618320b1b change port 2023-08-13 21:58:14 +08:00
chn
0d1d7b4301 fix docker image 2023-08-13 21:56:39 +08:00
chn
23ffdd7ac5 fix docker env 2023-08-13 21:46:59 +08:00
chn
75dc69fd6d enable socket for redis 2023-08-13 21:39:46 +08:00
chn
f003ee374e fix env file 2023-08-13 21:31:16 +08:00
chn
605694369e oci use docker 2023-08-13 21:20:13 +08:00
chn
56d53876be 整理 nginx config 2023-08-13 21:15:10 +08:00
chn
589194cce8 fix nginx config 2023-08-13 21:11:48 +08:00
chn
327e294a14 fix nginx conf 2023-08-13 21:08:05 +08:00
chn
f53b8c3a20 fix nginx listen 2023-08-13 21:02:56 +08:00
chn
c3331ae425 enable send for vps6 2023-08-13 20:53:42 +08:00
chn
0ea315017e add send 2023-08-13 19:42:41 +08:00
chn
54c637dc30 add node2nix 2023-08-13 15:20:22 +08:00
chn
27a3c12256 xray add user 2023-08-13 13:47:11 +08:00
chn
601f65e905 bootstrap using znver3 2023-08-13 13:33:45 +08:00
chn
76c6f6636f modify nix-store config 2023-08-13 13:25:06 +08:00
chn
14ac2708d8 fix vps4 config 2023-08-13 13:21:54 +08:00
chn
8e956b31ce bootstrap for vps4 2023-08-13 13:12:45 +08:00
chn
6547b88dcb fix nginx geoip 2023-08-13 02:56:41 +08:00
chn
257839b75a fix nginx http proxy 2023-08-13 02:42:24 +08:00
chn
49572a9a68 修改xray dns 2023-08-13 02:38:16 +08:00
chn
41b1dee098 enable geoip 2023-08-13 02:30:44 +08:00
chn
e91ba3f34d use old zip 2023-08-13 02:02:09 +08:00
chn
962cd34d66 xray lower min version 2023-08-13 01:35:00 +08:00
chn
3bbb6fb8e1 fix nginx config 2023-08-13 00:18:47 +08:00
chn
593391a894 使用 xray reality 2023-08-12 23:58:18 +08:00
chn
ee079b4251 fix nginx stream listen 2023-08-12 22:21:11 +08:00
chn
2825b0a28b fix nginx log 2023-08-12 22:11:42 +08:00
chn
a1cbd3949e xray enable fingerprint filter 2023-08-12 20:00:59 +08:00
chn
bc2f78d2e7 enable patched nginx 2023-08-12 19:13:24 +08:00
chn
c87bc53a24 add nginx httpProxy 2023-08-12 11:58:01 +08:00
chn
77cff8e03f 增加xray用户数量 2023-08-12 01:12:13 +08:00
chn
54461b6898 switch to unstable branch 2023-08-12 01:03:55 +08:00
chn
9a01ebb8dd Merge branch 'next' 2023-08-12 01:03:25 +08:00
chn
f311d441b8 fix xray stat 2023-08-12 00:58:28 +08:00
chn
b6a2de9983 fix netease cloud music 2023-08-12 00:42:15 +08:00
chn
ca85199c55 fix xray-stat 2023-08-12 00:25:56 +08:00
chn
19ffbf964f move zellij 2023-08-11 18:24:43 +08:00
chn
a9a52df312 fix build 2023-08-11 16:35:53 +08:00
chn
fe62b6bd81 Merge branch 'main' into next 2023-08-11 16:22:45 +08:00
chn
682cf2766f correct secrets permissions 2023-08-11 15:34:57 +08:00
chn
647e9b4463 fix xray stat 2023-08-11 15:19:56 +08:00
chn
baf5c5c9e4 fix xray stat 2023-08-11 15:08:02 +08:00
chn
274aa913e8 fix xray traffic stats 2023-08-11 15:02:42 +08:00
chn
54c200539d fix xray stat 2023-08-11 14:52:39 +08:00
chn
1391870957 启用 xray stat 2023-08-11 14:45:38 +08:00
chn
9a1dbe801f xrayServer 启用统计 2023-08-11 12:52:20 +08:00
chn
97496005cc add cinny 2023-08-11 12:25:09 +08:00
chn
0a48e6ffae fix yubikey build 2023-08-11 09:38:18 +08:00
chn
a50ebef28a fix xray server 2023-08-11 02:34:52 +08:00
chn
528cb94b54 add initrd.vps6.chn.moe 2023-08-11 02:31:59 +08:00
chn
ab2361a222 try to fix roll rootfs 2023-08-11 02:20:42 +08:00
chn
b083924e84 xray server openai use local dns 2023-08-11 01:31:02 +08:00
chn
68859d4da4 disable failed test for alderlake 2023-08-10 23:21:59 +08:00
chn
2a8becd0ce Merge branch 'main' into next 2023-08-10 21:22:06 +08:00
chn
b490fa1bf9 remove special dns for openai.com 2023-08-10 21:04:16 +08:00
chn
d45404966f force openai.com use forign dns 2023-08-10 20:54:31 +08:00
chn
c086db4ae7 dnsmasq log query 2023-08-10 20:47:59 +08:00
chn
5bb0f1f60d fix xray routing 2023-08-10 20:43:10 +08:00
chn
f132d8b53b xray 使用明文服务器地址 2023-08-10 20:20:17 +08:00
chn
c30e1d5e4d fix nginx permission 2023-08-10 20:06:49 +08:00
chn
725adb574c fix xray server 2023-08-10 19:55:08 +08:00
chn
e72fe79441 enable xray server for vps6 2023-08-10 19:43:28 +08:00
chn
9962a562c2 fix nginx stream config 2023-08-10 17:53:48 +08:00
chn
72a1c5c489 enabel nginx transparent proxy for vps6 2023-08-10 17:50:08 +08:00
chn
413820c427 disable failed test for alderlake 2023-08-10 16:52:42 +08:00
chn
13d1cd8d2d enable smartd 2023-08-10 10:15:21 +08:00
chn
7bb359c4e0 bump crow translate 2023-08-10 03:21:32 +08:00
chn
534a9ad602 Revert "use last kernel"
This reverts commit 8bc6403905.
2023-08-10 02:29:09 +08:00
chn
b5b2e369ed fix kernel5.4-sof patch 2023-08-10 02:23:51 +08:00
chn
92c4780c91 fix some deprecated options 2023-08-09 22:05:51 +08:00
chn
68afba0e95 change some nix config 2023-08-09 21:26:30 +08:00
chn
8bc6403905 use last kernel 2023-08-09 20:06:58 +08:00
chn
e84d0b6965 fix openssl build 2023-08-09 19:43:36 +08:00
chn
6b877a1246 fix nur-xddxdd import 2023-08-09 16:03:10 +08:00
chn
92c2f311e2 update inputs 2023-08-09 15:52:08 +08:00
chn
95331cd955 make custom substituters after 2023-08-08 22:54:27 +08:00
chn
0369abbf2a frpc always restart 2023-08-08 22:52:38 +08:00
chn
df8b686036 ssh allow x11 forwarding 2023-08-08 16:36:34 +08:00
chn
fa5e6c1450 add waydroid hibernate bug 2023-08-08 16:35:59 +08:00
chn
1207fe8595 disable failed test for znver2 2023-08-08 01:00:16 +08:00
chn
8a13158854 remove some build tools 2023-08-07 22:06:50 +08:00
chn
7a490b13b8 remove wine64 root-docker 2023-08-07 22:00:59 +08:00
chn
9369877099 enable local substituters 2023-08-07 21:54:10 +08:00
chn
195242cbc6 enable nix-serve 2023-08-07 21:47:09 +08:00
chn
288a7ace2f fix frp tls cert 2023-08-07 21:35:23 +08:00
chn
f0be22d66a add frp 2023-08-07 21:16:49 +08:00
chn
6075bef406 disable failed test for znver3 2023-08-07 17:03:28 +08:00
chn
14feec291f disable failed test for znver3 2023-08-07 16:02:25 +08:00
chn
e39f9df7f5 fix kernel config 2023-08-07 11:16:31 +08:00
chn
05ea6124fd fix for znver2 and znver3 2023-08-07 10:21:24 +08:00
chn
a9f448279a add pdftk 2023-08-06 21:51:23 +08:00
chn
5d122cbf97 init for vps4 and vps7 2023-08-06 18:52:32 +08:00
chn
17a61b4862 use generic stdenv to compile embree on alderlake 2023-08-06 18:28:08 +08:00
chn
949e46453c bump embree 2023-08-06 18:14:54 +08:00
chn
3212a73b94 disable failed test for alderlake 2023-08-06 15:36:13 +08:00
chn
f56650b799 add blender 2023-08-06 14:08:57 +08:00
chn
c52c88c01d disable check for sandybridge 2023-08-06 13:58:08 +08:00
chn
0cbb54c263 add s-tui 2023-08-06 09:54:15 +08:00
chn
144cc383ed add powertop 2023-08-06 09:46:37 +08:00
chn
1b87ad7ab9 add bootstrap system 2023-08-05 21:44:50 +08:00
chn
0d93cef4da allow more march 2023-08-05 19:32:34 +08:00
chn
02dd4e4dc3 调整 gui/headless 要安装的包 2023-08-05 19:14:35 +08:00
chn
cfcdbed317 add netease-cloud-music-gtk 2023-08-05 13:44:07 +08:00
chn
b6f88592e1 add fedora 2023-08-05 11:50:18 +08:00
chn
a7ac984a70 vps6 use march 2023-08-05 09:40:10 +08:00
chn
2e1f763f4a add extraMarch 2023-08-05 09:35:17 +08:00
chn
8c6ee75ed8 add telegram no ads patch 2023-08-04 22:55:29 +08:00
chn
136e7916aa snapper allow all user to read info 2023-08-04 22:25:07 +08:00
chn
3c810be918 add wine64 2023-08-04 21:10:50 +08:00
chn
c8037eb6cd try to enable acme 2023-08-04 20:25:17 +08:00
chn
c8312f76f9 fix session variables 2023-08-04 19:53:42 +08:00
chn
4387ebae36 use kde wayland as default session 2023-08-04 19:20:58 +08:00
chn
407f5b5eb9 fix roll-rootfs run twice at startup 2023-08-04 19:10:57 +08:00
chn
d6862f47f9 do not persist /var{cache,empty,lock,run,tmp,lib/sddm} 2023-08-04 18:46:20 +08:00
chn
1f4d74132b enable autojump 2023-08-03 22:34:13 +08:00
chn
4b4ef558ad networkmanager force reconfigure interface after boot 2023-08-03 22:02:22 +08:00
chn
80af4cf322 update vps6 age key 2023-08-03 18:12:54 +08:00
chn
ceab637b8b add swap for vps6 2023-08-03 18:03:09 +08:00
chn
992dd8d800 fix vps6 config 2023-08-03 17:57:38 +08:00
chn
baf2cb60ad ssh add some options 2023-08-03 17:03:54 +08:00
chn
78f12f3d8a enable yubico auth 2023-08-03 16:48:27 +08:00
chn
f294d23ea4 fix yubico auth 2023-08-03 16:26:35 +08:00
chn
2ba5316e15 disable ussh 2023-08-02 19:38:37 +08:00
chn
d947f8add3 u2fAuth have been enable as default 2023-08-02 19:37:46 +08:00
chn
59160508b4 revert ca.pub change 2023-08-02 18:12:40 +08:00
chn
14ae4eb76f ssh config change 2023-08-02 18:10:22 +08:00
chn
dd094f2547 mod ca file 2023-08-02 17:51:16 +08:00
chn
6a38e0db02 remove authorizedKeys for chn 2023-08-02 17:42:14 +08:00
chn
c24a421287 try to fix ussh 2023-08-02 17:06:16 +08:00
chn
2d9c631d84 try to enable ussh auth 2023-08-02 16:49:43 +08:00
chn
3980253c56 enable pcscd 2023-08-02 15:53:53 +08:00
chn
a62d8c2677 enable u2f as default 2023-08-02 15:30:20 +08:00
chn
a133306e3f fix manual decrypt 2023-08-02 15:25:38 +08:00
chn
332fbc80c3 fix decrypt manual 2023-08-02 15:18:30 +08:00
chn
d45e93d400 Merge branch 'current' 2023-08-02 14:24:59 +08:00
chn
b20aecca1f fix manual decrypt 2023-08-02 14:24:25 +08:00
chn
2d07eb76a8 update aagl 2023-08-01 22:51:25 +08:00
chn
af1a9c5a0a 暂存 2023-08-01 22:40:09 +08:00
chn
f3694fb421 fix wait-manual-decrypt before 2023-08-01 21:18:51 +08:00
chn
db54e3ca4f make manual decrypt devices exist before cryptsetup.target reached 2023-08-01 16:34:08 +08:00
chn
1b694ea319 fix decrypt manual 2023-08-01 16:14:58 +08:00
chn
bf276b1d19 longer wait time for manually unlocked device 2023-08-01 16:09:26 +08:00
chn
0ab92b8ba2 add nix-serve 2023-08-01 14:52:18 +08:00
chn
4e9a2cf4ea remove auto decrypt 2023-08-01 14:50:24 +08:00
chn
7e84c10805 add usbip to initrd 2023-08-01 14:49:03 +08:00
chn
71ae275527 add usbip 2023-08-01 14:32:16 +08:00
chn
1aa4683545 fix network in initrd 2023-08-01 13:05:10 +08:00
chn
bbc9292dfc enable dhcp 2023-08-01 12:51:06 +08:00
chn
3887ba1454 add additional virtio drivers 2023-08-01 12:45:55 +08:00
chn
82712f50ae add virtio_net driver to initrd 2023-08-01 12:41:50 +08:00
chn
085972d7a8 fix ssh 2023-08-01 11:22:30 +08:00
chn
6cd2e708d4 add waydroid0 to firewall trustedInterfaces 2023-08-01 11:09:30 +08:00
chn
92dfc730f0 add cowsay 2023-08-01 11:00:07 +08:00
chn
a2f21bef76 尝试启用 initrd ssh 2023-08-01 02:05:48 +08:00
chn
80af75ed28 add dracut 2023-08-01 01:33:00 +08:00
chn
dc4d3150b6 roll-rootfs wantedby initrd-root-fs.target 2023-07-31 23:50:05 +08:00
chn
ab9dac4166 run roll-rootfs before sysroot.mount 2023-07-31 23:32:19 +08:00
chn
47d8d0a026 add vps6 2023-07-31 22:20:22 +08:00
chn
1bb777b80f add sops for vps6 2023-07-31 22:14:31 +08:00
chn
9299314a1b bootstrap do not keep output 2023-07-31 21:55:15 +08:00
chn
623db23bf7 改正 bootstrap 的挂载 2023-07-31 21:40:07 +08:00
chn
095e9a5f8b vps6 config to bootstrap 2023-07-31 21:11:17 +08:00
chn
5b463a5a36 try higher compress level 2023-07-31 15:54:02 +08:00
chn
73ef07def9 enable sshd for vps6 2023-07-31 14:56:45 +08:00
chn
5b6999b154 add cpupower 2023-07-31 07:48:19 +08:00
chn
5114df7588 add some rss reader 2023-07-31 00:22:14 +08:00
chn
d257929a51 add compsize 2023-07-30 12:05:52 +08:00
chn
a16009918e 调整一些软件包分类 2023-07-29 23:38:01 +08:00
chn
8eab8fc4f0 用户密码使用明文 hashedPassword 2023-07-29 23:24:15 +08:00
chn
b5e5136d12 disable p10k instant prompt 2023-07-29 13:29:36 +08:00
chn
2f1ee658d1 add gtk materia theme 2023-07-28 23:43:03 +08:00
chn
5f0de28be8 add some kde theme 2023-07-28 23:37:52 +08:00
chn
439e8b4bbf add xmake vscode extension 2023-07-28 22:48:21 +08:00
chn
f46b92c889 add meson vscode extension 2023-07-28 22:07:16 +08:00
chn
3dcf316310 修正一部分错误 2023-07-28 20:15:49 +08:00
chn
dca603a583 增加 vps6 的初始配置用于测试 2023-07-28 20:06:44 +08:00
chn
57ecd45680 zsh keep more history 2023-07-28 15:08:08 +08:00
chn
136d5eb3f8 add tela-circle-icon-theme 2023-07-28 14:55:34 +08:00
chn
8d7ecc3759 add fluent-reader 2023-07-28 14:53:33 +08:00
chn
06cc885f45 add orchis-theme 2023-07-28 14:34:53 +08:00
chn
cd99981b88 remove ANDROID_HOME 2023-07-28 13:59:07 +08:00
chn
699fc48236 add zoom 2023-07-28 09:49:40 +08:00
chn
98b6395c15 增加一些 xdg-ninja 的结果 2023-07-28 00:02:51 +08:00
chn
1e007dc182 dnsmasq use bind-dynamic 2023-07-27 23:41:04 +08:00
chn
7c6b497963 Revert "start dnsmasq after network-interfaces"
This reverts commit 3422a545f4.
2023-07-27 23:40:39 +08:00
chn
3422a545f4 start dnsmasq after network-interfaces 2023-07-27 23:36:30 +08:00
chn
3881a60265 add some env from xdg-ninja 2023-07-27 23:25:27 +08:00
chn
0833f288f7 add xmunet fix 2023-07-27 23:14:44 +08:00
chn
6540a7d980 全部整理完成了 2023-07-27 23:05:04 +08:00
chn
e3f5704afc fix 2023-07-27 22:53:29 +08:00
chn
b77cb6414d 暂存 2023-07-27 22:24:01 +08:00
chn
dc18f6e51d 所有模块都整理完成 2023-07-27 21:50:51 +08:00
chn
7f5105a07a fix 2023-07-27 21:28:57 +08:00
chn
89a6a41d29 暂存 2023-07-27 21:14:39 +08:00
chn
d0ef102996 整理很多东西 2023-07-27 20:12:20 +08:00
chn
b12e903ec3 暂存 2023-07-27 19:32:51 +08:00
chn
3d2624284f 暂存 2023-07-27 19:01:58 +08:00
chn
68f4374c91 整理很多内容 2023-07-27 11:05:14 +08:00
chn
6ba50d9906 move display-manager after to modules 2023-07-27 00:40:37 +08:00
chn
02fa0af289 set display-manager after network-online.target 2023-07-27 00:37:57 +08:00
chn
c139989344 do not work as kvm guest 2023-07-27 00:16:17 +08:00
chn
77c878894d fix 2023-07-27 00:07:20 +08:00
chn
2f22dbe27b add inkscape 2023-07-26 23:56:13 +08:00
chn
ba2b67e3dd 整理许多内容 2023-07-26 23:36:12 +08:00
chn
3430a00548 fix 2023-07-26 21:11:47 +08:00
chn
39eb683ee8 暂存 2023-07-26 21:05:46 +08:00
chn
c34c579835 fix 2023-07-26 17:13:00 +08:00
chn
2029099f45 整理一些服务 2023-07-26 17:08:32 +08:00
chn
eea2495e2f 整理字体设置 2023-07-26 17:03:09 +08:00
chn
05b4bdf491 remove unused extension 2023-07-26 14:20:48 +08:00
chn
2f9987cc78 remove unused extensions 2023-07-26 14:17:17 +08:00
chn
8a51d00bfa add missing vscode extension 2023-07-26 14:02:49 +08:00
chn
ae1df36fe6 add kmscon (does not enable) 2023-07-26 11:24:27 +08:00
chn
d69f6effd4 整理services 2023-07-25 23:33:37 +08:00
chn
a1f99f53bb 解决 xorg 下不能使用 kde 的问题 2023-07-25 21:49:32 +08:00
chn
bd8002c3f9 调整一些设置 2023-07-25 21:22:04 +08:00
chn
18b37db37a 修正一些设置 2023-07-25 20:24:03 +08:00
chn
139275964d 尝试修复 x0rg 2023-07-25 20:06:07 +08:00
chn
7a4c0c8292 将空格替换为tab 2023-07-25 18:06:24 +08:00
chn
5db90f5f62 整理所有软件包 2023-07-25 18:04:29 +08:00
chn
a9cad9369d remove playonlinux 2023-07-24 18:34:16 +08:00
chn
c1e32b2bcc fix samba settings 2023-07-24 14:02:03 +08:00
chn
619cbb0cc0 samba obey pam restrictions 2023-07-24 13:19:07 +08:00
chn
5d3852d6b7 fix 2023-07-24 12:52:49 +08:00
chn
a1e2d0a914 samba enable winbindd 2023-07-24 12:52:21 +08:00
chn
32ae92be3c 整理 gui 2023-07-24 12:52:00 +08:00
chn
c58284cb63 整理 nspawn 2023-07-24 12:41:38 +08:00
chn
ffa05cf7b2 add screen 2023-07-24 08:02:42 +08:00
chn
7dcbc06e9a add xdg variables 2023-07-23 21:00:09 +08:00
chn
02d4b71aef add clang-tools 2023-07-23 20:57:12 +08:00
chn
ef71d813bd add xdg-ninja 2023-07-23 20:54:26 +08:00
chn
0ef9462bda 整理一些软件包 2023-07-23 16:16:56 +08:00
chn
d4ac9b6e1a fix tldr 2023-07-23 13:17:02 +08:00
chn
8d8bbeed35 整理一些软件包 2023-07-23 12:14:32 +08:00
chn
4d6131b36f fix nixos.fileSystems.decrypt.auto.before error 2023-07-23 09:03:45 +08:00
chn
64194760d2 整理很多东西 2023-07-23 00:20:11 +08:00
chn
f3f3000fa9 fix docker dns 2023-07-22 19:41:54 +08:00
chn
dde7708616 docker enable buildkit 2023-07-22 19:22:34 +08:00
chn
db9ee70565 整理 steam wine 2023-07-22 18:30:40 +08:00
chn
a6a11d940c 整理 decrypt before 2023-07-22 18:25:26 +08:00
chn
0f9e579d5b 整理 kvm guest 2023-07-22 18:05:55 +08:00
chn
91e866b14d 整理 kvm host 2023-07-22 18:03:09 +08:00
chn
04e19884fe 整理 docker 和 waydroid 2023-07-22 15:05:18 +08:00
chn
9faeb54ebd 整理内核模块 2023-07-22 14:16:01 +08:00
chn
3bf9c52bab 整理内核模块 2023-07-22 14:06:41 +08:00
chn
efecba2b43 disable ccache for kernel 2023-07-22 12:57:27 +08:00
chn
2077cba56c 移动 preempt 补丁 2023-07-22 12:52:28 +08:00
chn
485d107a3b 整理 system.march 2023-07-22 12:45:26 +08:00
chn
6017698731 整理内核模块和设置 2023-07-22 12:30:37 +08:00
chn
e6849a3ee6 fix 2023-07-22 00:48:24 +08:00
chn
bfa14be863 always allow overcommit memory 2023-07-22 00:45:24 +08:00
chn
b9503264f9 整理一些设置 2023-07-22 00:37:12 +08:00
chn
2a0c282b98 remove redundant after 2023-07-22 00:26:02 +08:00
chn
bf2e03f640 调整 kernel 的顺序 2023-07-22 00:22:32 +08:00
chn
30ca432712 使用 stripeTabs 2023-07-22 00:15:28 +08:00
chn
1e2fd98bd0 整理 localLib 到一个文件中 2023-07-22 00:09:29 +08:00
chn
ec16041fb9 add stripeTabs 2023-07-22 00:05:44 +08:00
chn
4337485e5d 整理 hostname 2023-07-22 00:02:51 +08:00
chn
a18a913546 add mkConditional 2023-07-21 22:02:48 +08:00
chn
86987ab871 整理 local 2023-07-21 21:57:06 +08:00
chn
a3dc4f3b88 整理 grub 2023-07-21 21:46:24 +08:00
chn
bf916175b4 整理 filesyste 2023-07-21 13:53:41 +08:00
chn
a01a7e749c add pandoc 2023-07-21 09:37:44 +08:00
chn
38f805fbf9 nvidia enable power management 2023-07-21 08:15:23 +08:00
chn
d559d28991 add yarn 2023-07-21 01:51:49 +08:00
chn
47a4675a4d add deps for researchgpt 2023-07-21 01:39:58 +08:00
chn
f1d9dd4ed5 add standard notes 2023-07-20 23:45:30 +08:00
chn
bc870e624c add todo-txt-cli 2023-07-20 23:26:49 +08:00
chn
ec8393e1d8 fix 2023-07-20 10:35:56 +08:00
chn
79988db9b2 fix systemd depends 2023-07-20 10:30:39 +08:00
chn
46df23998e disable tmpfiles clean 2023-07-20 10:17:31 +08:00
chn
f355bcca37 roll rootfs after swap 2023-07-20 10:13:11 +08:00
chn
a235e1b0b2 add joplin 2023-07-19 23:51:25 +08:00
chn
c74955c7ce add oneapi 2023-07-19 23:24:35 +08:00
chn
53f3a01c38 fix oneapi 2023-07-19 22:59:54 +08:00
chn
421274f9a2 add ubuntu nspawn config 2023-07-19 18:40:46 +08:00
chn
cbdd5cb46e add appimage-run file 2023-07-19 17:13:20 +08:00
chn
a6857f5fbe fix oneapi 2023-07-19 17:12:51 +08:00
chn
372dbca9fd add appflowy 2023-07-19 14:55:44 +08:00
chn
377bda72f2 add notion 2023-07-19 14:53:53 +08:00
chn
3c1e72a5c1 整理 hardware 2023-07-19 11:49:09 +08:00
chn
e55d604798 force swap unencrypt in initrd 2023-07-19 11:40:15 +08:00
chn
7f53e95ed5 整理 sound 2023-07-19 00:25:16 +08:00
chn
f3f72805ac fix oneapi 2023-07-19 00:06:53 +08:00
chn
f368ed87b5 fix oneapi 2023-07-18 20:17:38 +08:00
chn
130cb67787 fix vesta 2023-07-18 18:39:40 +08:00
chn
649c48ce09 整理 printer 设置 2023-07-18 18:19:00 +08:00
chn
11e6287c26 整理一些packages 2023-07-18 13:55:24 +08:00
chn
9e52369fd0 add p7zip 2023-07-18 09:36:34 +08:00
chn
152ed30035 enable ccache for libreoffice tensorflow 2023-07-17 17:16:15 +08:00
chn
d19a11c913 p10k move context to left 2023-07-17 14:29:18 +08:00
chn
02491d1246 fix wireplump config 2023-07-17 13:53:46 +08:00
chn
353f601ba6 remove all usage of ccache (except kernel) 2023-07-17 10:39:07 +08:00
chn
1c4c48769d larger ccache size 2023-07-17 00:30:18 +08:00
chn
bc06e79c07 disable unified builds for webkitgtk 2023-07-16 23:43:30 +08:00
chn
ffeae744fa enable ccache for wxgtk 2023-07-16 16:37:36 +08:00
chn
d701554bd8 enable ccache for webkitgtk 2023-07-16 16:20:29 +08:00
chn
02218e66fe enable ccache for tensorflow 2023-07-16 16:13:42 +08:00
chn
4740713482 kernel use ccache 2023-07-16 14:37:55 +08:00
chn
023e599c0e revert kernel to 6.3 2023-07-16 14:29:26 +08:00
chn
cc55d58afb remove davinci-resolve 2023-07-16 14:23:48 +08:00
chn
42bc589838 modify oneapi 2023-07-16 14:07:59 +08:00
chn
fd41773428 add davinci-resolve 2023-07-15 23:55:00 +08:00
chn
66d03c89a9 move joystick 2023-07-15 22:48:24 +08:00
chn
ce23149fca move bluetooth 2023-07-15 22:45:35 +08:00
chn
d5b3506945 move kernel patches 2023-07-15 22:37:43 +08:00
chn
80c55c3a24 move modules to separate directory 2023-07-15 22:20:30 +08:00
chn
91c72f4e43 move kernelParams 2023-07-15 22:12:29 +08:00
chn
f8b9ba475b add oneapi 2023-07-15 22:02:40 +08:00
chn
a2aa9f6361 libreoffice enable ccache 2023-07-15 21:37:09 +08:00
chn
ad371e365b disable ccache libreoffice
enable nixd
2023-07-15 19:12:15 +08:00
chn
ba99ff5d13 enable ccache for libreoffice 2023-07-15 18:53:07 +08:00
chn
503d03d293 add ccache path to test ccache 2023-07-15 16:25:24 +08:00
chn
7e4fd5c342 use nixpkgs/nixos-unstable 2023-07-15 13:18:27 +08:00
chn
6fb841710f add 32bit opengl 2023-07-15 12:19:14 +08:00
chn
037333910c add playonlinux bottles 2023-07-15 12:04:59 +08:00
chn
7cd518be4a update aagl 2023-07-15 10:35:24 +08:00
chn
2ac987bfaa fix firefox 2023-07-15 10:12:53 +08:00
chn
c34a9d3d82 Revert "sddm use wayland"
This reverts commit 10fecc5ab9.
2023-07-15 09:37:13 +08:00
chn
10fecc5ab9 sddm use wayland 2023-07-15 09:30:18 +08:00
chn
cf09455fba p10k move git to left 2023-07-15 09:23:13 +08:00
chn
395b1ff3d2 fix roll-rootfs failed 2023-07-14 23:09:34 +08:00
chn
3141be3fc1 整理微码设置 2023-07-14 21:30:30 +08:00
chn
a36922f81d 整理完成 filesystem 2023-07-14 16:57:57 +08:00
chn
f1200943bb fix cjytty hash 2023-07-14 15:59:14 +08:00
chn
f813b81608 Merge branch 'main' into next 2023-07-14 15:57:14 +08:00
chn
dcd8bbdaf1 update and clean 2023-07-14 15:57:05 +08:00
chn
83b7fae8e9 整理休眠虚拟机的服务 2023-07-13 21:44:48 +08:00
chn
e440a96dbf Revert "modify p10k settings"
This reverts commit 1ecc945c52.
2023-07-13 16:13:37 +08:00
chn
1ecc945c52 modify p10k settings 2023-07-13 15:04:33 +08:00
chn
026d35f8a9 add gimp 2023-07-13 10:39:47 +08:00
chn
d1f335ebae fix hibernate and resume 2023-07-12 23:59:32 +08:00
197 changed files with 11729 additions and 1729 deletions

1
.gitignore vendored
View File

@@ -1,2 +1,3 @@
result
result-man
outputs

View File

@@ -1,15 +1,43 @@
keys:
keys: # cat /etc/ssh/ssh_host_ed25519_key.pub | ssh-to-age
- &chn age19ax6vm3pv8rph5tq3mmehd9sy9jk823tw8svsd790r0lkslycquqvlwz9m
- &chn-PC age1ffvr5pqd2lfj24e3fh53s92z6h76fda3du4y4k6r3yjumdwvpfgqzj033a
- &chn-nixos-test age1thf94z6z4835nxsx56upa3s32vfqq2s6d67rpg7weawj2lrk25asw8smhh
- &pc age1ffvr5pqd2lfj24e3fh53s92z6h76fda3du4y4k6r3yjumdwvpfgqzj033a
- &vps6 age164tyqklwhdm57tfm5u863mdt2xrzrrzac4py8a0j9y6kzqcjy9zsp073t6
- &vps7 age137x7csalutwvfygvvzpemlsywvdxj3j4z93a50z2sjx03w6zau8q3r5902
- &yoga age1qrea4twxdhd7fnvlq5v45528c90qy6hp2wa55kghsxzgut6n6fxs7w6u42
- &nas age19lhcwk37jmvn6z0v4dpdfh0k4u23f76twdjknc0p7atktf37rd7s4t4wj3
- &xmupc1 age19ax6vm3pv8rph5tq3mmehd9sy9jk823tw8svsd790r0lkslycquqvlwz9m
creation_rules:
- path_regex: secrets/chn-PC\.yaml$
- path_regex: secrets/pc/.*$
key_groups:
- age:
- *chn
- *chn-PC
- path_regex: secrets/chn-nixos-test\.yaml$
- *pc
- path_regex: secrets/vps6/.*$
key_groups:
- age:
- *chn
- *chn-nixos-test
- *vps6
- path_regex: secrets/vps7/.*$
key_groups:
- age:
- *chn
- *vps7
- path_regex: secrets/nas/.*$
key_groups:
- age:
- *chn
- *nas
- path_regex: secrets/xmupc1/.*$
key_groups:
- age:
- *chn
- path_regex: secrets/yoga/.*$
key_groups:
- age:
- *chn
- *yoga
- path_regex: secrets/xmupc1/.*$
key_groups:
- age:
- *chn
- *xmupc1

1486
flake.lock generated

File diff suppressed because it is too large Load Diff

849
flake.nix
View File

@@ -1,191 +1,666 @@
{
description = "CNH's NixOS Flake";
description = "CNH's NixOS Flake";
inputs =
{
nixpkgs.url = "github:CHN-beta/nixpkgs/next";
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.05";
flake-utils.url = "github:numtide/flake-utils";
flake-utils-plus =
{
url = "github:gytis-ivaskevicius/flake-utils-plus";
inputs.flake-utils.follows = "flake-utils";
};
flake-compat = { url = "github:edolstra/flake-compat"; flake = false; };
nvfetcher =
{
url = "github:berberman/nvfetcher";
inputs =
{
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
flake-compat.follows = "flake-compat";
};
};
home-manager = { url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; };
sops-nix =
{
url = "github:Mic92/sops-nix";
inputs = { nixpkgs.follows = "nixpkgs"; nixpkgs-stable.follows = "nixpkgs-stable"; };
};
touchix = { url = "github:CHN-beta/touchix"; inputs.nixpkgs.follows = "nixpkgs"; };
aagl =
{
url = "github:ezKEa/aagl-gtk-on-nix";
inputs = { nixpkgs.follows = "nixpkgs"; flake-compat.follows = "flake-compat"; };
};
nix-index-database = { url = "github:Mic92/nix-index-database"; inputs.nixpkgs.follows = "nixpkgs"; };
nur.url = "github:nix-community/NUR";
nixos-cn =
{
url = "github:nixos-cn/flakes";
inputs = { nixpkgs.follows = "nixpkgs"; flake-utils.follows = "flake-utils"; };
};
nur-xddxdd =
{
url = "github:xddxdd/nur-packages";
inputs =
{
flake-utils.follows = "flake-utils";
nixpkgs.follows = "nixpkgs-stable";
flake-utils-plus.follows = "flake-utils-plus";
};
};
nix-vscode-extensions =
{
url = "github:nix-community/nix-vscode-extensions";
inputs =
{
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
flake-compat.follows = "flake-compat";
};
};
nix-alien =
{
url = "github:thiagokokada/nix-alien";
inputs =
{
flake-compat.follows = "flake-compat";
flake-utils.follows = "flake-utils";
nix-index-database.follows = "nix-index-database";
};
};
impermanence.url = "github:nix-community/impermanence";
qchem =
{
url = "github:Nix-QChem/NixOS-QChem";
inputs.nixpkgs.follows = "nixpkgs";
};
};
inputs =
{
nixpkgs.url = "github:CHN-beta/nixpkgs/nixos-23.11";
nixpkgs-unstable.url = "github:CHN-beta/nixpkgs/nixos-unstable";
nixpkgs-2305.url = "github:CHN-beta/nixpkgs/nixos-23.05";
home-manager = { url = "github:nix-community/home-manager/release-23.11"; inputs.nixpkgs.follows = "nixpkgs"; };
sops-nix =
{
url = "github:Mic92/sops-nix";
inputs = { nixpkgs.follows = "nixpkgs"; nixpkgs-stable.follows = "nixpkgs"; };
};
aagl = { url = "github:ezKEa/aagl-gtk-on-nix"; inputs.nixpkgs.follows = "nixpkgs"; };
nix-index-database = { url = "github:Mic92/nix-index-database"; inputs.nixpkgs.follows = "nixpkgs"; };
nur.url = "github:nix-community/NUR";
nixos-cn = { url = "github:nixos-cn/flakes"; inputs.nixpkgs.follows = "nixpkgs"; };
nur-xddxdd = { url = "github:xddxdd/nur-packages"; inputs.nixpkgs.follows = "nixpkgs"; };
nix-vscode-extensions = { url = "github:nix-community/nix-vscode-extensions"; inputs.nixpkgs.follows = "nixpkgs"; };
nix-alien =
{
url = "github:thiagokokada/nix-alien";
inputs = { nixpkgs.follows = "nixpkgs"; nix-index-database.follows = "nix-index-database"; };
};
impermanence.url = "github:nix-community/impermanence";
qchem = { url = "github:Nix-QChem/NixOS-QChem"; inputs.nixpkgs.follows = "nixpkgs"; };
nixd = { url = "github:nix-community/nixd"; inputs.nixpkgs.follows = "nixpkgs"; };
napalm = { url = "github:nix-community/napalm"; inputs.nixpkgs.follows = "nixpkgs"; };
nixpak = { url = "github:nixpak/nixpak"; inputs.nixpkgs.follows = "nixpkgs"; };
deploy-rs = { url = "github:serokell/deploy-rs"; inputs.nixpkgs.follows = "nixpkgs"; };
pnpm2nix-nzbr = { url = "github:CHN-beta/pnpm2nix-nzbr"; inputs.nixpkgs.follows = "nixpkgs"; };
lmix = { url = "github:CHN-beta/lmix"; inputs.nixpkgs.follows = "nixpkgs"; };
dguibert-nur-packages = { url = "github:CHN-beta/dguibert-nur-packages"; inputs.nixpkgs.follows = "nixpkgs"; };
plasma-manager =
{
url = "github:pjones/plasma-manager";
inputs = { nixpkgs.follows = "nixpkgs"; home-manager.follows = "home-manager"; };
};
nix-doom-emacs = { url = "github:nix-community/nix-doom-emacs"; inputs.nixpkgs.follows = "nixpkgs"; };
};
outputs = inputs:
let
local = import ./local;
in
{
nixosConfigurations =
{
"chn-PC" = inputs.nixpkgs.lib.nixosSystem
{
system = "x86_64-linux";
specialArgs = { topInputs = inputs; localLib = local.lib; };
modules =
[
inputs.home-manager.nixosModules.home-manager
inputs.sops-nix.nixosModules.sops
inputs.touchix.nixosModules.v2ray-forwarder
inputs.aagl.nixosModules.default
inputs.nix-index-database.nixosModules.nix-index
inputs.nur.nixosModules.nur
inputs.nur-xddxdd.nixosModules.setupOverlay
inputs.impermanence.nixosModules.impermanence
(args: {
config.nixpkgs =
{
overlays =
[
(
final: prev:
{
touchix = inputs.touchix.packages."${prev.system}";
nix-vscode-extensions = inputs.nix-vscode-extensions.extensions."${prev.system}";
localPackages = local.pkgs { pkgs = prev; };
}
)
inputs.qchem.overlays.default
(
final: prev: { nur-xddxdd =
(inputs.nur-xddxdd.overlays.custom args.config.boot.kernelPackages.nvidia_x11) final prev; }
)
];
config.allowUnfree = true;
};
})
(
local.lib.mkModules
[
./modules/boot/fileSystems.nix
(inputs: { config.nixos =
{
fileSystems =
{
mount =
{
vfat."/dev/disk/by-uuid/3F57-0EBE" = "/boot/efi";
btrfs =
{
"/dev/disk/by-uuid/02e426ec-cfa2-4a18-b3a5-57ef04d66614"."/" = "/boot";
"/dev/mapper/root"."/nix" = "/nix";
};
};
decrypt.auto =
{
"/dev/disk/by-uuid/55fdd19f-0f1d-4c37-bd4e-6df44fc31f26" = { mapper = "root"; ssd = true; };
"/dev/md/swap" = { mapper = "swap"; ssd = true; };
};
mdadm =
"ARRAY /dev/md/swap metadata=1.2 name=chn-PC:swap UUID=2b546b8d:e38007c8:02990dd1:df9e23a4";
swap = [ "/dev/mapper/swap" ];
resume = "/dev/mapper/swap";
};
};}
)
[ ./modules/basic.nix { hostName = "chn-PC"; } ]
./modules/fonts.nix
[ ./modules/i18n.nix { fcitx = true; } ]
./modules/kde.nix
./modules/sops.nix
./modules/boot/chn-PC.nix
./modules/hardware/bluetooth.nix
./modules/hardware/joystick.nix
[ ./modules/hardware/nvidia-prime.nix { intelBusId = "PCI:0:2:0"; nvidiaBusId = "PCI:1:0:0"; } ]
./modules/hardware/printer.nix
./modules/hardware/sound.nix
./modules/hardware/chn-PC.nix
./modules/networking/basic.nix
./modules/networking/samba.nix
./modules/networking/ssh.nix
./modules/networking/wall_client.nix
./modules/networking/xmunet.nix
./modules/networking/chn-PC.nix
./modules/packages/terminal.nix
./modules/packages/gui.nix
./modules/packages/gaming.nix
./modules/packages/hpc.nix
[ ./modules/users/root.nix {} ]
[ ./modules/users/chn.nix {} ]
./modules/virtualisation/docker.nix
./modules/virtualisation/kvm_guest.nix
./modules/virtualisation/kvm_host.nix
./modules/virtualisation/waydroid.nix
./modules/home/root.nix
./modules/home/chn.nix
]
)
];
};
};
};
outputs = inputs:
let
localLib = import ./local/lib inputs.nixpkgs.lib;
in
{
packages.x86_64-linux =
{
default = inputs.nixpkgs.legacyPackages.x86_64-linux.writeText "systems"
(builtins.concatStringsSep "\n" (builtins.map
(system: builtins.toString inputs.self.outputs.nixosConfigurations.${system}.config.system.build.toplevel)
[ "pc" "vps6" "vps7" "nas" "yoga" ]));
}
// (
builtins.listToAttrs (builtins.map
(system:
{
name = system;
value = inputs.self.outputs.nixosConfigurations.${system}.config.system.build.toplevel;
})
[ "pc" "vps6" "vps7" "nas" "yoga" "xmupc1" ])
);
# ssh-keygen -t rsa -C root@pe -f /mnt/nix/persistent/etc/ssh/ssh_host_rsa_key
# ssh-keygen -t ed25519 -C root@pe -f /mnt/nix/persistent/etc/ssh/ssh_host_ed25519_key
# systemd-machine-id-setup --root=/mnt/nix/persistent
nixosConfigurations =
let
system =
{
pc =
{
system =
{
fileSystems =
{
mount =
{
vfat."/dev/disk/by-uuid/3F57-0EBE" = "/boot/efi";
btrfs =
{
"/dev/disk/by-uuid/02e426ec-cfa2-4a18-b3a5-57ef04d66614"."/" = "/boot";
"/dev/mapper/root" = { "/nix" = "/nix"; "/nix/rootfs/current" = "/"; };
};
};
decrypt.auto =
{
"/dev/disk/by-uuid/55fdd19f-0f1d-4c37-bd4e-6df44fc31f26" = { mapper = "root"; ssd = true; };
"/dev/disk/by-uuid/4be45329-a054-4c20-8965-8c5b7ee6b35d" =
{ mapper = "swap"; ssd = true; before = [ "root" ]; };
};
swap = [ "/dev/mapper/swap" ];
resume = "/dev/mapper/swap";
rollingRootfs = { device = "/dev/mapper/root"; path = "/nix/rootfs"; };
};
grub =
{
windowsEntries = { "7317-1DB6" = "Windows"; "7321-FA9C" = "Windows for malware"; };
installDevice = "efi";
};
nix =
{
marches =
[
"alderlake"
# CX16
"sandybridge"
# CX16 SAHF FXSR
"silvermont"
# RDSEED MWAITX SHA CLZERO CX16 SSE4A ABM CLFLUSHOPT WBNOINVD
"znver2" "znver3"
# CX16 SAHF FXSR HLE RDSEED
"broadwell"
];
keepOutputs = true;
};
nixpkgs =
{ march = "alderlake"; cuda = { enable = true; capabilities = [ "8.6" ]; forwardCompat = false; }; };
kernel.patches = [ "cjktty" "lantian" ];
impermanence.enable = true;
networking.hostname = "pc";
sysctl.laptop-mode = 5;
};
hardware =
{
cpus = [ "intel" ];
gpus = [ "intel" "nvidia" ];
bluetooth.enable = true;
joystick.enable = true;
printer.enable = true;
sound.enable = true;
prime = { enable = true; mode = "offload"; busId = { intel = "PCI:0:2:0"; nvidia = "PCI:1:0:0"; }; };
gamemode.drmDevice = 1;
};
packages.packageSet = "workstation";
virtualization =
{
waydroid.enable = true;
docker.enable = true;
kvmHost = { enable = true; gui = true; autoSuspend = [ "win10" "hardconnect" ]; };
# kvmGuest.enable = true;
nspawn = [ "arch" "ubuntu-22.04" "fedora" ];
};
services =
{
snapper.enable = true;
fontconfig.enable = true;
samba =
{
enable = true;
private = true;
hostsAllowed = "192.168. 127.";
shares =
{
media.path = "/run/media/chn";
home.path = "/home/chn";
mnt.path = "/mnt";
share.path = "/home/chn/share";
};
};
sshd.enable = true;
xrayClient =
{
enable = true;
serverAddress = "74.211.99.69";
serverName = "vps6.xserver.chn.moe";
dns =
{
extraInterfaces = [ "docker0" ];
hosts =
{
"mirism.one" = "74.211.99.69";
"beta.mirism.one" = "74.211.99.69";
"ng01.mirism.one" = "74.211.99.69";
"debug.mirism.one" = "127.0.0.1";
"initrd.vps6.chn.moe" = "74.211.99.69";
"nix-store.chn.moe" = "127.0.0.1";
"initrd.nas.chn.moe" = "192.168.1.185";
};
};
};
firewall.trustedInterfaces = [ "virbr0" "waydroid0" ];
acme = { enable = true; cert."debug.mirism.one" = {}; };
frpClient =
{
enable = true;
serverName = "frp.chn.moe";
user = "pc";
stcpVisitor."yy.vnc".localPort = 6187;
};
nix-serve = { enable = true; hostname = "nix-store.chn.moe"; };
smartd.enable = true;
misskey.instances.misskey.hostname = "xn--qbtm095lrg0bfka60z.chn.moe";
beesd = { enable = true; instances.root = { device = "/"; hashTableSizeMB = 2048; }; };
wireguard =
{
enable = true;
peers = [ "vps6" ];
publicKey = "l1gFSDCeBxyf/BipXNvoEvVvLqPgdil84nmr5q6+EEw=";
wireguardIp = "192.168.83.3";
};
};
bugs =
[
"suspend-hibernate-no-platform" "hibernate-iwlwifi" "suspend-lid-no-wakeup" "xmunet"
"suspend-hibernate-waydroid" "power"
];
};
vps6 =
{
system =
{
fileSystems =
{
mount =
{
btrfs =
{
"/dev/disk/by-uuid/24577c0e-d56b-45ba-8b36-95a848228600"."/boot" = "/boot";
"/dev/mapper/root" = { "/nix" = "/nix"; "/nix/rootfs/current" = "/"; };
};
};
decrypt.manual =
{
enable = true;
devices."/dev/disk/by-uuid/4f8aca22-9ec6-4fad-b21a-fd9d8d0514e8" = { mapper = "root"; ssd = true; };
delayedMount = [ "/" ];
};
swap = [ "/nix/swap/swap" ];
rollingRootfs = { device = "/dev/mapper/root"; path = "/nix/rootfs"; };
};
grub.installDevice = "/dev/disk/by-path/pci-0000:00:05.0-scsi-0:0:0:0";
nixpkgs.march = "sandybridge";
nix.substituters = [ "https://cache.nixos.org/" "https://nix-store.chn.moe" ];
initrd.sshd.enable = true;
impermanence.enable = true;
networking.hostname = "vps6";
};
packages.packageSet = "server";
services =
{
snapper.enable = true;
sshd.enable = true;
xrayServer = { enable = true; serverName = "vps6.xserver.chn.moe"; };
frpServer = { enable = true; serverName = "frp.chn.moe"; };
nginx =
{
streamProxy.map =
{
"anchor.fm" = { upstream = "anchor.fm:443"; proxyProtocol = false; };
"podcasters.spotify.com" = { upstream = "podcasters.spotify.com:443"; proxyProtocol = false; };
"xlog.chn.moe" = { upstream = "cname.xlog.app:443"; proxyProtocol = false; };
}
// (builtins.listToAttrs (builtins.map
(site: { name = "${site}.chn.moe"; value.upstream.address = "wireguard.pc.chn.moe"; })
[ "nix-store" "xn--qbtm095lrg0bfka60z" ]))
// (builtins.listToAttrs (builtins.map
(site: { name = "${site}.chn.moe"; value.upstream.address = "wireguard.vps7.chn.moe"; })
[
"xn--s8w913fdga" "misskey" "synapse" "syncv3.synapse" "matrix" "syncv3.matrix"
"send" "kkmeeting" "api" "git" "grafana"
]));
applications =
{
element.instances."element.chn.moe" = {};
synapse-admin.instances."synapse-admin.chn.moe" = {};
catalog.enable = true;
blog.enable = true;
main.enable = true;
};
};
coturn.enable = true;
httpua.enable = true;
mirism.enable = true;
fail2ban.enable = true;
wireguard =
{
enable = true;
peers = [ "pc" "nas" "vps7" ];
publicKey = "AVOsYUKQQCvo3ctst3vNi8XSVWo1Wh15066aHh+KpF4=";
wireguardIp = "192.168.83.1";
externalIp = "74.211.99.69";
lighthouse = true;
};
};
};
vps7 =
{
system =
{
fileSystems =
{
mount =
{
btrfs =
{
"/dev/disk/by-uuid/e36287f7-7321-45fa-ba1e-d126717a65f0"."/boot" = "/boot";
"/dev/mapper/root" = { "/nix" = "/nix"; "/nix/rootfs/current" = "/"; };
};
};
decrypt.manual =
{
enable = true;
devices."/dev/disk/by-uuid/db48c8de-bcf7-43ae-a977-60c4f390d5c4" = { mapper = "root"; ssd = true; };
delayedMount = [ "/" ];
};
swap = [ "/nix/swap/swap" ];
rollingRootfs = { device = "/dev/mapper/root"; path = "/nix/rootfs"; };
};
grub.installDevice = "/dev/disk/by-path/pci-0000:00:05.0-scsi-0:0:0:0";
nixpkgs.march = "broadwell";
nix.substituters = [ "https://cache.nixos.org/" "https://nix-store.chn.moe" ];
initrd.sshd.enable = true;
impermanence.enable = true;
networking.hostname = "vps7";
gui.preferred = false;
};
packages.packageSet = "desktop";
services =
{
snapper.enable = true;
fontconfig.enable = true;
sshd.enable = true;
rsshub.enable = true;
wallabag.enable = true;
misskey.instances =
{
misskey.hostname = "xn--s8w913fdga.chn.moe";
misskey-old = { port = 9727; redis.port = 3546; meilisearch.enable = false; };
};
synapse.instances =
{
synapse.matrixHostname = "synapse.chn.moe";
matrix = { port = 8009; redisPort = 6380; slidingSyncPort = 9001; };
};
xrdp = { enable = true; hostname = [ "vps7.chn.moe" ]; };
vaultwarden.enable = true;
beesd = { enable = true; instances.root = { device = "/"; hashTableSizeMB = 1024; }; };
photoprism.enable = true;
nextcloud.enable = true;
freshrss.enable = true;
send.enable = true;
huginn.enable = true;
fz-new-order.enable = true;
nginx.applications = { kkmeeting.enable = true; webdav.instances."webdav.chn.moe" = {}; };
httpapi.enable = true;
mastodon.enable = true;
gitea.enable = true;
grafana.enable = true;
fail2ban.enable = true;
wireguard =
{
enable = true;
peers = [ "vps6" ];
publicKey = "n056ppNxC9oECcW7wEbALnw8GeW7nrMImtexKWYVUBk=";
wireguardIp = "192.168.83.2";
externalIp = "95.111.228.40";
};
};
};
nas =
{
system =
{
fileSystems =
{
mount =
{
vfat."/dev/disk/by-uuid/13BC-F0C9" = "/boot/efi";
btrfs =
{
"/dev/disk/by-uuid/0e184f3b-af6c-4f5d-926a-2559f2dc3063"."/boot" = "/boot";
"/dev/mapper/nix"."/nix" = "/nix";
"/dev/mapper/root1" =
{
"/nix/rootfs" = "/nix/rootfs";
"/nix/persistent" = "/nix/persistent";
"/nix/nodatacow" = "/nix/nodatacow";
"/nix/rootfs/current" = "/";
"/nix/backup" = "/nix/backup";
};
};
};
decrypt.manual =
{
enable = true;
devices =
{
"/dev/disk/by-uuid/5cf1d19d-b4a5-4e67-8e10-f63f0d5bb649".mapper = "root1";
"/dev/disk/by-uuid/aa684baf-fd8a-459c-99ba-11eb7636cb0d".mapper = "root2";
"/dev/disk/by-uuid/a779198f-cce9-4c3d-a64a-9ec45f6f5495" = { mapper = "nix"; ssd = true; };
};
delayedMount = [ "/" "/nix" ];
};
swap = [ "/nix/swap/swap" ];
rollingRootfs = { device = "/dev/mapper/root1"; path = "/nix/rootfs"; };
};
initrd.sshd.enable = true;
grub.installDevice = "efi";
nixpkgs.march = "silvermont";
nix.substituters = [ "https://cache.nixos.org/" "https://nix-store.chn.moe" ];
kernel.patches = [ "cjktty" ];
impermanence.enable = true;
networking.hostname = "nas";
gui.preferred = false;
};
hardware = { cpus = [ "intel" ]; gpus = [ "intel" ]; };
packages.packageSet = "desktop";
services =
{
snapper.enable = true;
fontconfig.enable = true;
samba =
{
enable = true;
hostsAllowed = "192.168. 127.";
shares = { home.path = "/home"; root.path = "/"; };
};
sshd = { enable = true; passwordAuthentication = true; };
xrayClient =
{
enable = true;
serverAddress = "74.211.99.69";
serverName = "vps6.xserver.chn.moe";
dns.extraInterfaces = [ "docker0" ];
};
xrdp = { enable = true; hostname = [ "nas.chn.moe" "office.chn.moe" ]; };
groupshare.enable = true;
smartd.enable = true;
beesd =
{
enable = true;
instances =
{
root = { device = "/"; hashTableSizeMB = 2048; };
nix = { device = "/nix"; hashTableSizeMB = 128; };
};
};
frpClient =
{
enable = true;
serverName = "frp.chn.moe";
user = "nas";
stcp.hpc = { localIp = "hpc.xmu.edu.cn"; localPort = 22; };
};
nginx = { enable = true; applications.webdav.instances."local.webdav.chn.moe" = {}; };
wireguard =
{
enable = true;
peers = [ "vps6" ];
publicKey = "xCYRbZEaGloMk7Awr00UR3JcDJy4AzVp4QvGNoyEgFY=";
wireguardIp = "192.168.83.4";
};
};
users.users = [ "chn" "xll" "zem" "yjq" "yxy" ];
};
yoga =
{
system =
{
fileSystems =
{
mount =
{
vfat."/dev/disk/by-uuid/86B8-CF80" = "/boot/efi";
btrfs =
{
"/dev/disk/by-uuid/e252f81d-b4b3-479f-8664-380a9b73cf83"."/boot" = "/boot";
"/dev/mapper/root" = { "/nix" = "/nix"; "/nix/rootfs/current" = "/"; };
};
};
decrypt.auto."/dev/disk/by-uuid/8186d34e-005c-4461-94c7-1003a5bd86c0" =
{ mapper = "root"; ssd = true; };
swap = [ "/nix/swap/swap" ];
rollingRootfs = { device = "/dev/mapper/root"; path = "/nix/rootfs"; };
};
nixpkgs.march = "silvermont";
grub.installDevice = "efi";
nix.substituters = [ "https://cache.nixos.org/" "https://nix-store.chn.moe" ];
kernel.patches = [ "cjktty" ];
impermanence.enable = true;
networking.hostname = "yoga";
};
hardware =
{
cpus = [ "intel" ];
gpus = [ "intel" ];
bluetooth.enable = true;
joystick.enable = true;
printer.enable = true;
sound.enable = true;
halo-keyboard.enable = true;
};
packages.packageSet = "desktop-fat";
virtualization.docker.enable = true;
services =
{
snapper.enable = true;
fontconfig.enable = true;
sshd.enable = true;
xrayClient =
{
enable = true;
serverAddress = "74.211.99.69";
serverName = "vps6.xserver.chn.moe";
dns.extraInterfaces = [ "docker0" ];
};
firewall.trustedInterfaces = [ "virbr0" ];
};
bugs = [ "xmunet" ];
};
xmupc1 =
{
system =
{
fileSystems =
{
mount =
{
vfat."/dev/disk/by-uuid/3F57-0EBE" = "/boot/efi";
btrfs =
{
"/dev/disk/by-uuid/02e426ec-cfa2-4a18-b3a5-57ef04d66614"."/" = "/boot";
"/dev/mapper/root" = { "/nix" = "/nix"; "/nix/rootfs/current" = "/"; };
};
};
swap = [ "/dev/mapper/swap" ];
resume = "/dev/mapper/swap";
rollingRootfs = { device = "/dev/mapper/root"; path = "/nix/rootfs"; };
};
grub.installDevice = "efi";
nixpkgs =
{
march = "znver3";
cuda =
{
enable = true;
capabilities =
[
# 2080 Ti
"7.5"
# 3090
"8.6"
# 4090
"8.9"
];
forwardCompat = false;
};
};
gui.preferred = false;
kernel.patches = [ "cjktty" ];
impermanence.enable = true;
networking.hostname = "xmupc1";
};
hardware =
{
cpus = [ "amd" ];
gpus = [ "nvidia" ];
bluetooth.enable = true;
joystick.enable = true;
printer.enable = true;
sound.enable = true;
gamemode.drmDevice = 1;
};
packages.packageSet = "workstation";
virtualization = { docker.enable = true; kvmHost = { enable = true; gui = true; }; };
services =
{
snapper.enable = true;
fontconfig.enable = true;
samba =
{
enable = true;
private = true;
hostsAllowed = "192.168. 127.";
shares =
{
media.path = "/run/media/chn";
home.path = "/home/chn";
mnt.path = "/mnt";
share.path = "/home/chn/share";
};
};
sshd.enable = true;
xrayClient =
{
enable = true;
serverAddress = "74.211.99.69";
serverName = "vps6.xserver.chn.moe";
dns.extraInterfaces = [ "docker0" ];
};
firewall.trustedInterfaces = [ "virbr0" "waydroid0" ];
acme = { enable = true; cert."debug.mirism.one" = {}; };
smartd.enable = true;
beesd = { enable = true; instances.root = { device = "/nix/persistent"; hashTableSizeMB = 2048; }; };
wireguard =
{
enable = true;
peers = [ "vps6" ];
publicKey = "JEY7D4ANfTpevjXNvGDYO6aGwtBGRXsf/iwNwjwDRQk=";
wireguardIp = "192.168.83.5";
};
};
bugs = [ "xmunet" "firefox" ];
};
};
in builtins.listToAttrs (builtins.map
(system:
{
name = system.name;
value = inputs.nixpkgs.lib.nixosSystem
{
system = "x86_64-linux";
specialArgs = { topInputs = inputs; inherit localLib; };
modules = localLib.mkModules
[
(inputs: { config.nixpkgs.overlays = [(final: prev:
{ localPackages = (import ./local/pkgs { inherit (inputs) lib; pkgs = final; }); })]; })
./modules
{ config.nixos = system.value; }
];
};
})
(localLib.attrsToList system));
# sudo HTTPS_PROXY=socks5://127.0.0.1:10884 nixos-install --flake .#bootstrap --option substituters http://127.0.0.1:5000 --option require-sigs false --option system-features gccarch-silvermont
# nix-serve -p 5000
# nix copy --substitute-on-destination --to ssh://server /run/current-system
# nix copy --to ssh://nixos@192.168.122.56 ./result
# sudo nixos-install --flake .#bootstrap
# --option substituters http://192.168.122.1:5000 --option require-sigs false
# sudo chattr -i var/empty
# nix-shell -p ssh-to-age --run 'cat /etc/ssh/ssh_host_ed25519_key.pub | ssh-to-age'
# sudo nixos-rebuild switch --flake .#vps6 --log-format internal-json -v |& nom --json
# boot.shell_on_fail systemd.setenv=SYSTEMD_SULOGIN_FORCE=1
# sudo usbipd
# ssh -R 3240:127.0.0.1:3240 root@192.168.122.57
# modprobe vhci-hcd
# sudo usbip bind -b 3-6
# usbip attach -r 127.0.0.1 -b 3-6
# systemd-cryptenroll --fido2-device=auto /dev/vda2
# systemd-cryptsetup attach root /dev/vda2
deploy =
{
sshUser = "root";
user = "root";
fastConnection = true;
autoRollback = false;
magicRollback = false;
nodes = builtins.listToAttrs (builtins.map
(node:
{
name = node;
value =
{
hostname = node;
profiles.system.path = inputs.self.nixosConfigurations.${node}.pkgs.deploy-rs.lib.activate.nixos
inputs.self.nixosConfigurations.${node};
};
})
[ "vps6" "vps7" "nas" "yoga" ]);
};
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks inputs.self.deploy) inputs.deploy-rs.lib;
overlays.default = final: prev:
{ localPackages = (import ./local/pkgs { inherit (inputs) lib; pkgs = final; }); };
};
}

View File

@@ -1,4 +0,0 @@
{
lib = import ./lib;
pkgs = import ./pkgs;
}

View File

@@ -1 +0,0 @@
Attrs: builtins.map ( name: { inherit name; value = Attrs.${name}; } ) ( builtins.attrNames Attrs )

View File

@@ -1,6 +1,40 @@
lib:
{
mkModules = import ./mkModules.nix;
mkSystem = import ./mkSystems.nix;
mkInputs = import ./mkInputs.nix;
attrsToList = import ./attrsToList.nix;
attrsToList = Attrs: builtins.map ( name: { inherit name; value = Attrs.${name}; } ) ( builtins.attrNames Attrs );
mkConditional = condition: trueResult: falseResult: let inherit (lib) mkMerge mkIf; in
mkMerge [ ( mkIf condition trueResult ) ( mkIf (!condition) falseResult ) ];
# Behaviors of these two NixOS modules would be different:
# { pkgs, ... }@inputs: { environment.systemPackages = [ pkgs.hello ]; }
# inputs: { environment.systemPackages = [ pkgs.hello ]; }
# The second one would failed to evaluate because nixpkgs would not pass pkgs to it.
# So that we wrote a wrapper to make it always works like the first one.
mkModules = moduleList:
(builtins.map
(
let handle = module:
if ( builtins.typeOf module ) == "path" then (handle (import module))
else if ( builtins.typeOf module ) == "lambda" then ({ pkgs, utils, ... }@inputs: (module inputs))
else module;
in handle
)
moduleList);
# from: https://github.com/NixOS/nix/issues/3759
stripeTabs = text:
let
# Whether all lines start with a tab (or is empty)
shouldStripTab = lines: builtins.all (line: (line == "") || (lib.strings.hasPrefix " " line)) lines;
# Strip a leading tab from all lines
stripTab = lines: builtins.map (line: lib.strings.removePrefix " " line) lines;
# Strip tabs recursively until there are none
stripTabs = lines: if (shouldStripTab lines) then (stripTabs (stripTab lines)) else lines;
in
# Split into lines. Strip leading tabs. Concat back to string.
builtins.concatStringsSep "\n" (stripTabs (lib.strings.splitString "\n" text));
# find an element in a list, return the index
findIndex = e: list:
let findIndex_ = i: list: if (builtins.elemAt list i) == e then i else findIndex_ (i + 1) list;
in findIndex_ 0 list;
}

View File

@@ -1,45 +0,0 @@
# Behaviors of these two NixOS modules would be different:
# { pkgs, ... }@inputs: { environment.systemPackages = [ pkgs.hello ]; }
# inputs: { environment.systemPackages = [ pkgs.hello ]; }
# The second one would failed to evaluate because nixpkgs would not pass pkgs to it.
# So that we wrote a wrapper to make it always works like the first one.
# Input a list of modules, allowed types are:
# * attribute set
# * file containing attribute set
# * file containing lambda, which takes inputs as argument
# * lambda, which takes inputs as argument
# * list, first member is a lambda,
moduleList: { pkgs, ... }@inputs:
{
imports = builtins.map
(
let
handle = { module, customArgs }:
if ( builtins.typeOf module ) == "list"
then handle { module = builtins.elemAt module 0; customArgs = builtins.elemAt module 1; }
else if ( builtins.typeOf module ) == "path"
then handle { module = import module; inherit customArgs; }
else if ( builtins.typeOf module ) == "lambda" && customArgs != null # deprecated
then handle { module = module customArgs; customArgs = null; }
else if ( builtins.typeOf module ) == "lambda" then module inputs # deprecated
else module;
caller = module: handle { inherit module; customArgs = null; };
in caller
) moduleList;
}
# Behaviors of these two NixOS modules would be different:
# { pkgs, ... }@inputs: { environment.systemPackages = [ pkgs.hello ]; }
# inputs: { environment.systemPackages = [ pkgs.hello ]; }
# The second one would failed to evaluate because nixpkgs would not pass pkgs to it.
# So that we wrote a wrapper to make it always works like the first one.
# moduleList: { pkgs, ... }@inputs:
# {
# imports = builtins.map
# (
# handle = module:
# if ( builtins.typeOf module ) == "path" then handle import module
# else if ( builtins.typeOf module ) == "lambda" then module inputs
# else module;
# ) moduleList;
# }

View File

@@ -0,0 +1,17 @@
{
stdenv, fetchFromGitHub, cmake, pkg-config, ninja,
fmt, boost, magic-enum, libbacktrace, concurrencpp, tgbot-cpp, nameof, eigen, range-v3
}: stdenv.mkDerivation rec
{
name = "libbiu";
src = fetchFromGitHub
{
owner = "CHN-beta";
repo = "biu";
rev = "8ed2e52968f98d3a6ddbd01e86e57604ba3a7f54";
sha256 = "OqQ+QkjjIbpve/xn/DJA7ONw/bBg5zGNr+VJjc3o+K8=";
};
nativeBuildInputs = [ cmake pkg-config ninja ];
buildInputs = [ fmt boost magic-enum libbacktrace concurrencpp tgbot-cpp nameof eigen range-v3 ];
propagatedBuildInputs = buildInputs;
}

View File

@@ -0,0 +1,18 @@
{ lib, stdenv, fetchFromGitHub, fetchurl, cmake }: stdenv.mkDerivation rec
{
pname = "chromiumos-touch-keyboard";
version = "1.4.1";
src = fetchFromGitHub
{
owner = "CHN-beta";
repo = "chromiumos_touch_keyboard";
rev = "32b72240ccac751a1b983152f65aa5b19503ffcf";
sha256 = "eFesDSBS2VzTOVfepgXYGynWvkrCSdCV9C/gcG/Ocbg=";
};
cmakeFlags = [ "-DCMAKE_CXX_FLAGS=-Wno-error=stringop-truncation" ];
nativeBuildInputs = [ cmake ];
postInstall =
''
cp $out/etc/touch_keyboard/layouts/YB1-X9x-pc105.csv $out/etc/touch_keyboard/layout.csv
'';
}

View File

@@ -0,0 +1,30 @@
{ stdenvNoCC, texlive, fetchFromGitHub }: stdenvNoCC.mkDerivation (finalAttrs: rec
{
pname = "citation-style-language";
version = "0.4.5";
passthru = {
pkgs = [ finalAttrs.finalPackage ];
tlDeps = with texlive; [ latex ];
tlType = "run";
};
src = fetchFromGitHub
{
owner = "zepinglee";
repo = "citeproc-lua";
rev = "v${version}";
sha256 = "XH+GH+t/10hr4bfaod8F9JPxmBnAQlDmpSvQNDQsslM=";
fetchSubmodules = true;
};
nativeBuildInputs = [ texlive.combined.scheme-full ];
dontConfigure = true;
dontBuild = true;
installPhase =
''
runHook preInstall
export TEXMFHOME=$out
l3build install
runHook postInstall
'';
})

View File

@@ -0,0 +1,13 @@
{ stdenv, fetchFromGitHub, cmake }: stdenv.mkDerivation rec
{
pname = "concurrencpp";
version = "0.1.7";
src = fetchFromGitHub
{
owner = "David-Haim";
repo = "concurrencpp";
rev = "v.${version}";
sha256 = "4qT29YVjKEWcMrI5R5Ps8aD4grAAgz5VOxANjpp1oTo=";
};
nativeBuildInputs = [ cmake ];
}

View File

@@ -0,0 +1,12 @@
diff --git a/lib/static_thread_pool.cpp b/lib/static_thread_pool.cpp
index 989a6a9..0b91b9c 100644
--- a/lib/static_thread_pool.cpp
+++ b/lib/static_thread_pool.cpp
@@ -12,6 +12,7 @@
#include <cassert>
#include <mutex>
#include <chrono>
+#include <utility>
namespace
{

View File

@@ -0,0 +1,13 @@
{ stdenv, fetchFromGitHub, cmake }: stdenv.mkDerivation
{
name = "cppcoro";
src = fetchFromGitHub
{
owner = "Garcia6l20";
repo = "cppcoro";
rev = "e1d53e620b0eee828915ada179cd7ca8e66ca855";
sha256 = "luBkf1x5kqXaVbQM01yWRmA5QvrQNZkFVCjRctJdnXc=";
};
nativeBuildInputs = [ cmake ];
patches = [ ./cppcoro-include-utility.patch ];
}

View File

@@ -0,0 +1,18 @@
{ stdenv, fetchFromGitHub }: stdenv.mkDerivation
{
name = "date";
src = fetchFromGitHub
{
owner = "HowardHinnant";
repo = "date";
rev = "cc4685a21e4a4fdae707ad1233c61bbaff241f93";
sha256 = "KilhBEeLMvHtS76Gu0UhzE8lhS1+sCwQ1UL4pswKXTs=";
};
phases = [ "installPhase" ];
installPhase =
''
runHook preInstall
mkdir -p $out
cp -r $src/{include,src} $out
'';
}

View File

@@ -1,7 +1,48 @@
{ pkgs }: with pkgs;
{ lib, pkgs }: with pkgs; rec
{
typora = callPackage ./typora {};
upho = python3Packages.callPackage ./upho {};
spectral = python3Packages.callPackage ./spectral {};
vesta = callPackage ./vesta {};
typora = callPackage ./typora {};
vesta = callPackage ./vesta {};
oneapi = callPackage ./oneapi {};
rsshub = callPackage ./rsshub {};
misskey = callPackage ./misskey { nodejs = nodejs_21; };
mk-meili-mgn = callPackage ./mk-meili-mgn {};
# vasp = callPackage ./vasp
# {
# stdenv = pkgs.lmix-pkgs.intel21Stdenv;
# intel-mpi = pkgs.lmix-pkgs.intel-oneapi-mpi_2021_9_0;
# ifort = pkgs.lmix-pkgs.intel-oneapi-ifort_2021_9_0;
# };
vasp = callPackage ./vasp
{
openmp = llvmPackages.openmp;
openmpi = pkgs.openmpi.override { cudaSupport = false; };
};
vaspkit = callPackage ./vaspkit { attrsToList = (import ../lib lib).attrsToList; };
v_sim = callPackage ./v_sim {};
concurrencpp = callPackage ./concurrencpp { stdenv = gcc13Stdenv; };
eigengdb = python3Packages.callPackage ./eigengdb {};
nodesoup = callPackage ./nodesoup {};
matplotplusplus = callPackage ./matplotplusplus { inherit nodesoup glad; };
zpp-bits = callPackage ./zpp-bits {};
eigen = callPackage ./eigen {};
nameof = callPackage ./nameof {};
pslist = callPackage ./pslist {};
glad = callPackage ./glad {};
chromiumos-touch-keyboard = callPackage ./chromiumos-touch-keyboard {};
yoga-support = callPackage ./yoga-support {};
tgbot-cpp = callPackage ./tgbot-cpp {};
biu = callPackage ./biu { inherit concurrencpp tgbot-cpp nameof; stdenv = gcc13Stdenv; };
citation-style-language = callPackage ./citation-style-language {};
mirism = callPackage ./mirism
{
inherit cppcoro nameof tgbot-cpp date;
nghttp2 = nghttp2-2305.override { enableAsioLib = true; };
};
cppcoro = callPackage ./cppcoro {};
date = callPackage ./date {};
esbonio = python3Packages.callPackage ./esbonio {};
pix2tex = python3Packages.callPackage ./pix2tex {};
pyreadline3 = python3Packages.callPackage ./pyreadline3 {};
torchdata = python3Packages.callPackage ./torchdata {};
torchtext = python3Packages.callPackage ./torchtext { inherit torchdata; };
}

View File

@@ -0,0 +1,12 @@
{ lib, stdenv, fetchFromGitLab, cmake }: stdenv.mkDerivation rec
{
name = "eigen";
src = fetchFromGitLab
{
owner = "libeigen";
repo = name;
rev = "6d829e766ff1b1ab867d93631163cbc63ed5798f";
sha256 = "BXUnizcRPrOyiPpoyYJ4VVOjlG49aj80mgzPKmEYPKU=";
};
nativeBuildInputs = [ cmake ];
}

View File

@@ -0,0 +1,15 @@
{ lib, fetchFromGitHub, buildPythonPackage, numpy, gdb }: buildPythonPackage
{
name = "eigengdb";
src = fetchFromGitHub
{
owner = "dmillard";
repo = "eigengdb";
rev = "c741edef3f07f33429056eff48d79a62733ed494";
sha256 = "MTqOaWsKhWaPs3G5F/6bYZmQI5qS2hEGKGa3mwbgFaY=";
};
doCheck = false;
buildInputs = [ gdb ];
nativeBuildInputs = [ gdb ];
propagatedBuildInputs = [ numpy ];
}

View File

@@ -0,0 +1,11 @@
{ lib, fetchPypi, buildPythonPackage }: buildPythonPackage rec
{
pname = "esbonio";
version = "0.16.3";
src = fetchPypi
{
inherit pname version;
sha256 = "1ggxdzl95fy0zxpyd1pcylhif1x604wk4wy7sv9322hc84b708zx";
};
doCheck = false;
}

View File

@@ -0,0 +1,14 @@
{ lib, stdenv, fetchFromGitHub, cmake, python3 }: stdenv.mkDerivation rec
{
pname = "glad";
version = "0.1.36";
src = fetchFromGitHub
{
owner = "Dav1dde";
repo = "glad";
rev = "v${version}";
sha256 = "FtkPz0xchwmqE+QgS+nSJVYaAfJSTUmZsObV/IPypVQ=";
};
cmakeFlags = [ "-DGLAD_REPRODUCIBLE=ON" "-DGLAD_INSTALL=ON" ];
nativeBuildInputs = [ cmake python3 ];
}

View File

@@ -0,0 +1,25 @@
{
stdenv, fetchFromGitHub, cmake, pkg-config, substituteAll,
gnuplot, libjpeg, libtiff, zlib, libpng, lapack, blas, fftw, opencv, nodesoup, cimg, glfw, libGL, python3, glad
}: stdenv.mkDerivation
{
pname = "matplotplusplus";
version = "1.2.0";
src = fetchFromGitHub
{
owner = "alandefreitas";
repo = "matplotplusplus";
rev = "a40344efa9dc5ea0c312e6e9ef4eb7238d98dc12";
sha256 = "6/dH/Rl2aAb8b+Ji5LwzkC+GWPOCBnYCrjy0qk8u/+I=";
};
cmakeFlags =
[
"-DBUILD_SHARED_LIBS=ON" "-DMATPLOTPP_BUILD_SHARED_LIBS=ON" "-DMATPLOTPP_BUILD_EXAMPLES=OFF"
"-DMATPLOTPP_WITH_SYSTEM_NODESOUP=ON" "-DMATPLOTPP_WITH_SYSTEM_CIMG=ON"
"-DMATPLOTPP_BUILD_EXPERIMENTAL_OPENGL_BACKEND=ON" "-DGLAD_REPRODUCIBLE=ON"
];
buildInputs = [ gnuplot libjpeg libtiff zlib libpng lapack blas fftw opencv nodesoup cimg glfw libGL glad ];
nativeBuildInputs = [ cmake pkg-config python3 ];
propagatedBuildInputs = [ libGL glad glfw ];
propagatedNativeBuildInputs = [ python3 ];
}

View File

@@ -0,0 +1,29 @@
{
lib, stdenv, requireFile,
boost, nghttp2, brotli, nameof, cppcoro, tgbot-cpp, libbacktrace, fmt, date
}: stdenv.mkDerivation rec
{
name = "mirism";
# nix-store --query --hash $(nix store add-path . --name 'mirism')
src = requireFile
{
inherit name;
sha256 = "1q3f4q4ln9dz68dfc35jybgv861f7acqiiykkm7jxviz8jdgn8c7";
hashMode = "recursive";
message = "Source file not found.";
};
buildInputs = [ boost nghttp2.dev brotli nameof cppcoro tgbot-cpp libbacktrace fmt date ];
buildPhase =
''
runHook preBuild
make ng01 beta
runHook postBuild
'';
installPhase =
''
runHook preInstall
mkdir -p $out/bin
cp build/{ng01,beta} $out/bin
runHook postInstall
'';
}

View File

@@ -0,0 +1,76 @@
{
lib, stdenv, mkPnpmPackage, fetchFromGitHub, fetchurl, nodejs, writeShellScript, buildFHSEnv,
bash, cypress, vips, pkg-config
}:
let
pname = "misskey";
version = "2023.12.2";
src = fetchFromGitHub
{
owner = "CHN-beta";
repo = "misskey";
rev = "579e1b00c1dc053a598ac4fd777459067860cdea";
hash = "sha256-jrUqfj8RaF8JeQ6qh8O071o4IWXNhKz6XiC92htJsbY=";
fetchSubmodules = true;
};
originalPnpmPackage = mkPnpmPackage
{
inherit pname version src nodejs;
copyPnpmStore = true;
};
startScript = writeShellScript "misskey"
''
export PATH=${lib.makeBinPath [ bash nodejs nodejs.pkgs.pnpm nodejs.pkgs.gulp cypress ]}:$PATH
export CYPRESS_RUN_BINARY="${cypress}/bin/Cypress"
export NODE_ENV=production
pnpm run migrateandstart
'';
in
stdenv.mkDerivation rec
{
inherit version src pname;
buildInputs =
[
bash nodejs nodejs.pkgs.typescript nodejs.pkgs.pnpm nodejs.pkgs.gulp cypress vips pkg-config
];
nativeBuildInputs = buildInputs;
CYPRESS_RUN_BINARY = "${cypress}/bin/Cypress";
NODE_ENV = "production";
configurePhase =
''
export HOME=$NIX_BUILD_TOP # Some packages need a writable HOME
export npm_config_nodedir=${nodejs}
runHook preConfigure
store=$(pnpm store path)
mkdir -p $(dirname $store)
cp -f ${originalPnpmPackage.passthru.patchedLockfileYaml} pnpm-lock.yaml
cp -RL ${originalPnpmPackage.passthru.pnpmStore} $store
chmod -R +w $store
pnpm install --frozen-lockfile --offline
runHook postConfigure
'';
buildPhase =
''
runHook preBuild
pnpm run build
runHook postBuild
'';
installPhase =
''
runHook preInstall
mkdir -p $out
mv * .* $out
mkdir -p $out/bin
cp ${startScript} $out/bin/misskey
mkdir -p $out/files
runHook postInstall
'';
passthru =
{
inherit originalPnpmPackage startScript;
};
}

View File

@@ -0,0 +1,16 @@
{ lib, fetchFromGitHub, rustPlatform, pkg-config, openssl }:
rustPlatform.buildRustPackage rec
{
pname = "mk-meili-mgn";
version = "20230827";
src = fetchFromGitHub
{
owner = "CHN-beta";
repo = "mk-meili-mgn";
rev = "53e282c992293ec735c9bc964f097b5bdbc3e48a";
hash = "sha256-KBSoEGfWKDXZHSzSzak1v0nxtQQGI15DQTyNAPhsIB4=";
};
cargoHash = "sha256-wNdMPPl2H2iSrNYjoij0Qg/c2S5RjTHpOMV1RfHU27g=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ];
}

View File

@@ -0,0 +1,20 @@
{ lib, stdenv, fetchFromGitHub }: stdenv.mkDerivation rec
{
pname = "nameof";
version = "0.10.3";
src = fetchFromGitHub
{
owner = "Neargye";
repo = pname;
rev = "v${version}";
sha256 = "eHG0Y/BQGbwTrBHjq9SeSiIXaVqWp7PxIq7vCIECYPk=";
};
phases = [ "installPhase" ];
installPhase =
''
runHook preInstall
mkdir -p $out
cp -r $src/include $out
runHook postInstall
'';
}

View File

@@ -0,0 +1,13 @@
{ stdenv, fetchFromGitHub, cmake, pkg-config, cairo, pcre2, xorg }: stdenv.mkDerivation rec
{
name = "nodesoup";
src = fetchFromGitHub
{
owner = "olvb";
repo = "nodesoup";
rev = "3158ad082bb0cd1abee75418b12b35522dbca74f";
sha256 = "tFLq6QC3U3uvcuWsdRy2wnwcmAfH2MkI2oMcAiUBHSo=";
};
buildInputs = [ cairo pcre2.dev xorg.libXdmcp.dev ];
nativeBuildInputs = [ cmake pkg-config ];
}

View File

@@ -0,0 +1,32 @@
{
lib, fetchFromGitHub, buildPythonPackage,
# general dependencies:
tqdm, munch, torch, opencv, requests, einops, transformers, tokenizers, numpy, pillow, pyyaml, pandas, timm,
albumentations,
# gui
pyqt6, pyqt6-webengine, pyside6, pynput, screeninfo,
# api
streamlit, fastapi, uvicorn, python-multipart,
# training
# python-Levenshtein, torchtext, imagesize
# highlight
pygments
}: buildPythonPackage
{
name = "pix2tex";
src = fetchFromGitHub
{
owner = "lukas-blecher";
repo = "LaTeX-OCR";
rev = "1781514fb8c92ea9f94057295fdae0e683f4648e";
hash = "sha256-I3B8eH7zV2zIogDt9znkEzp4EeBjY6NfI4jsl+v/8aM=";
};
patches = [ ./remove-version-requires.patch ];
propagatedBuildInputs =
[
tqdm munch torch opencv requests einops transformers tokenizers numpy pillow pyyaml pandas timm albumentations
pyqt6 pyqt6-webengine pyside6 pynput screeninfo
streamlit fastapi uvicorn python-multipart
pygments
];
}

View File

@@ -0,0 +1,13 @@
diff --git a/setup.py b/setup.py
index 29b26cb..511012f 100644
--- a/setup.py
+++ b/setup.py
@@ -64,7 +64,7 @@ setuptools.setup(
'Pillow>=9.1.0',
'PyYAML>=5.4.1',
'pandas>=1.0.0',
- 'timm==0.5.4',
+ 'timm>=0.5.4',
'albumentations>=0.5.2',
'pyreadline3>=3.4.1; platform_system=="Windows"',
],

View File

@@ -0,0 +1,27 @@
# http://launchpadlibrarian.net/632309499/pslist_1.4.0-4_all.deb
# https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/pslist/1.4.0-4/pslist_1.4.0.orig.tar.xz
{ lib, stdenv, fetchzip, perl, procps }: stdenv.mkDerivation
{
pname = "pslist";
version = "1.4.0";
src = fetchzip
{
url = "https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/pslist/1.4.0-4/pslist_1.4.0.orig.tar.xz";
sha256 = "1sp1h7ccniz658ms331npffpa9iz8llig43d9mlysll420nb3xqv";
};
buildInstall = [ perl procps ];
installPhase =
''
mkdir -p $out/bin
cp $src/pslist $out/bin
ln -s pslist $out/bin/rkill
ln -s pslist $out/bin/rrenice
mkdir -p $out/share/man/man1
cp $src/pslist.1 $out/share/man/man1
ln -s pslist.1 $out/share/man/man1/rkill.1
ln -s pslist.1 $out/share/man/man1/rrenice.1
sed -i 's|/usr/bin/perl|${perl}/bin/perl|' $out/bin/pslist
sed -i 's|/bin/ps|${procps}/bin/ps|' $out/bin/pslist
'';
}

View File

@@ -0,0 +1,14 @@
{
lib, fetchFromGitHub, buildPythonPackage
}: buildPythonPackage rec
{
pname = "pyreadline3";
version = "3.4.1";
src = fetchFromGitHub
{
owner = "pyreadline3";
repo = "pyreadline3";
rev = "v${version}";
hash = "sha256-02/gkx955NupVKXSu/xBQQtY4SEP4zxbNQYg1oQ/nGY=";
};
}

View File

@@ -0,0 +1,57 @@
{
lib, stdenv, mkPnpmPackage, fetchFromGitHub, nodejs, writeShellScript,
chromium, bash
}:
let
name = "rsshub";
src = fetchFromGitHub
{
owner = "DIYgod";
repo = "RSSHub";
rev = "38a5b0c193bf77d71c4eea33db6e76bc8b565d0b";
hash = "sha256-gJsT9W2fFiy2IG89E5th49DpBHsPMfsdONyzAKDG48c=";
};
originalPnpmPackage = mkPnpmPackage { inherit name src nodejs; };
nodeModules = originalPnpmPackage.nodeModules.overrideAttrs { PUPPETEER_SKIP_DOWNLOAD = true; };
rsshub-unwrapped = stdenv.mkDerivation
{
inherit src;
name = "${name}-unwrapped";
configurePhase =
''
export HOME=$NIX_BUILD_TOP # Some packages need a writable HOME
export npm_config_nodedir=${nodejs}
runHook preConfigure
ln -s ${nodeModules}/. node_modules
runHook postConfigure
'';
installPhase =
''
runHook preInstall
mkdir -p $out
mv * .* $out
runHook postInstall
'';
};
startScript = writeShellScript "rsshub"
''
cd ${rsshub-unwrapped}
export PATH=${lib.makeBinPath [ bash nodejs nodejs.pkgs.pnpm chromium ]}:$PATH
export CHROMIUM_EXECUTABLE_PATH=chromium
pnpm start
'';
in stdenv.mkDerivation
{
inherit name;
phases = [ "installPhase" ];
installPhase =
''
runHook preInstall
mkdir -p $out/bin
cp ${startScript} $out/bin/rsshub
runHook postInstall
'';
}

View File

@@ -1,15 +0,0 @@
{
lib, fetchPypi, buildPythonPackage,
numpy, pillow, wxPython_4_2, matplotlib, ipython, pyopengl
}: buildPythonPackage rec
{
pname = "spectral";
version = "0.23.1";
src = fetchPypi
{
inherit pname version;
sha256 = "sha256-4YIic1Je81g7J6lmIm1Vr+CefSmnI2z82LwN+x+Wj8I=";
};
doCheck = false;
propagatedBuildInputs = [ numpy pillow wxPython_4_2 matplotlib ipython pyopengl ];
}

View File

@@ -0,0 +1,15 @@
{ stdenv, fetchFromGitHub, cmake, pkg-config, boost, openssl, zlib, curl }: stdenv.mkDerivation rec
{
pname = "tgbot-cpp";
version = "1.7.2";
src = fetchFromGitHub
{
owner = "reo7sp";
repo = "tgbot-cpp";
rev = "v${version}";
sha256 = "TKirSxEUqFB1WtzNEfU4EJK3p7V5xcFIvA2+QVX7TlA=";
};
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ boost openssl zlib curl.dev ];
propagatedBuildInputs = buildInputs;
}

View File

@@ -0,0 +1,20 @@
{
lib, fetchFromGitHub, buildPythonPackage,
torch, urllib3, requests, cmake, pkg-config, ninja
}: buildPythonPackage rec
{
pname = "torchdata";
version = "0.7.1";
src = fetchFromGitHub
{
owner = "pytorch";
repo = "data";
rev = "v${version}";
hash = "sha256-SOeu+mI4p2tHX0YyctrDBcrz2/zYcwH9GGJ+6ytRmjQ=";
fetchSubmodules = true;
};
dontUseCmakeConfigure = true;
pyproject = true;
propagatedBuildInputs = [ torch urllib3 requests ];
nativeBuildInputs = [ cmake pkg-config ninja ];
}

View File

@@ -0,0 +1,20 @@
{
lib, fetchFromGitHub, buildPythonPackage,
tqdm, requests, torch, numpy, torchdata, cmake
}: buildPythonPackage rec
{
pname = "torchtext";
version = "0.16.1";
src = fetchFromGitHub
{
owner = "pytorch";
repo = "text";
rev = "v${version}";
hash = "sha256-4a33AWdd1VZwRL5vTawo0yplpw+qcNMetbfE1h1kafE=";
fetchSubmodules = true;
};
dontUseCmakeConfigure = true;
pyproject = true;
propagatedBuildInputs = [ tqdm requests torch numpy torchdata ];
nativeBuildInputs = [ cmake ];
}

View File

@@ -1,42 +1,42 @@
{ lib, stdenv, steam-run, fetchurl, writeShellScript }:
let
typora-dist = stdenv.mkDerivation rec
{
pname = "typora-dist";
version = "1.6.6";
src = fetchurl
{
url = "https://download.typora.io/linux/typora_${version}_amd64.deb";
sha256 = "sha256-77mCgmsROLhfuOmOOyl2C5Ug2NfqEvcD+kMA3aiAQtA=";
};
typora-dist = stdenv.mkDerivation rec
{
pname = "typora-dist";
version = "1.7.6";
src = fetchurl
{
url = "https://download.typora.io/linux/typora_${version}_amd64.deb";
sha256 = "19xgv83zk3mhniswwrb341sr9j4sb9pqy47jamrmkc3w8famxpd3";
};
dontFixup = true;
dontFixup = true;
unpackPhase =
''
ar x ${src}
tar xf data.tar.xz
'';
installPhase =
''
mkdir -p $out
mv usr/share $out
'';
};
unpackPhase =
''
ar x ${src}
tar xf data.tar.xz
'';
installPhase =
''
mkdir -p $out
mv usr/share $out
'';
};
in stdenv.mkDerivation rec
{
pname = "typora";
inherit (typora-dist) version;
BuildInputs = [ typora-dist steam-run ];
startScript = writeShellScript "typora" "${steam-run}/bin/steam-run ${typora-dist}/share/typora/Typora $@";
phases = [ "installPhase" ];
pname = "typora";
inherit (typora-dist) version;
BuildInputs = [ typora-dist steam-run ];
startScript = writeShellScript "typora" "${steam-run}/bin/steam-run ${typora-dist}/share/typora/Typora $@";
phases = [ "installPhase" ];
installPhase =
''
''
mkdir -p $out/bin $out/share/applications
ln -s ${startScript} $out/bin/typora
cp ${typora-dist}/share/applications/typora.desktop $out/share/applications
sed -i "s|Exec=.*|Exec=${startScript} %U|g" $out/share/applications/typora.desktop
sed -i "s|Icon=.*|Icon=${typora-dist}/share/icons/hicolor/256x256/apps/typora.png|g" \
$out/share/applications/typora.desktop
sed -i "s|Exec=.*|Exec=${startScript} %U|g" $out/share/applications/typora.desktop
sed -i "s|Icon=.*|Icon=${typora-dist}/share/icons/hicolor/256x256/apps/typora.png|g" \
$out/share/applications/typora.desktop
'';
}

View File

@@ -1,14 +0,0 @@
{ lib, fetchFromGitHub, buildPythonPackage, numpy, h5py, phonopy }: buildPythonPackage rec
{
pname = "upho";
version = "0.6.6";
src = fetchFromGitHub
{
owner = "CHN-beta";
repo = "upho";
rev = "0f27ac6918e8972c70692816438e4ac37ec6b348";
sha256 = "sha256-NvoV+AUH9MmGT4ohrLAAvpLs8APP2DOKYlZVliHrVRM=";
};
doCheck = false;
propagatedBuildInputs = [ numpy h5py phonopy ];
}

View File

@@ -0,0 +1,28 @@
{
stdenv, lib, fetchFromGitLab,
wrapGAppsHook, autoreconfHook, autoconf, libtool, intltool, gettext, automake, gtk-doc, pkg-config, gfortran, libxslt,
glib, gtk3, epoxy, libyaml
}:
stdenv.mkDerivation
{
pname = "v_sim";
version = "3.8.0_p20230824";
src = fetchFromGitLab
{
owner = "l_sim";
repo = "v_sim";
rev = "8abc67b56795c19a8e2357d442b556c71d2441cb";
sha256 = "KQNd3BGvkZVsfIPVLEEMBptiFQYeCbWGR28ds2Y+w2Y=";
};
buildInputs = [ glib gtk3 epoxy libyaml ];
nativeBuildInputs =
[
autoreconfHook wrapGAppsHook autoconf libtool intltool gettext automake pkg-config
gtk-doc gfortran libxslt.bin
];
enableParallelBuilding = true;
postPatch =
''
./autogen.sh
'';
}

View File

@@ -0,0 +1,77 @@
# {
# stdenv, requireFile, config, rsync, intel-mpi, ifort,
# mkl
# }:
# stdenv.mkDerivation rec
# {
# pname = "vasp";
# version = "6.4.0";
# # nix-store --query --hash $(nix store add-path ./vasp-6.4.0)
# src = requireFile
# {
# name = "${pname}-${version}";
# sha256 = "189i1l5q33ynmps93p2mwqf5fx7p4l50sls1krqlv8ls14s3m71f";
# hashMode = "recursive";
# message = "Source file not found.";
# };
# VASP_TARGET_CPU = if config ? oneapiArch then "-x${config.oneapiArch}" else "";
# MKLROOT = mkl;
# makeFlags = "DEPS=1";
# enableParallelBuilding = true;
# buildInputs = [ mkl intel-mpi ifort ];
# nativeBuildInputs = [ rsync ];
# configurePhase =
# ''
# cp arch/makefile.include.intel makefile.include
# echo "CPP_OPTIONS += -Duse_shmem -Dshmem_bcast_buffer -Dshmem_rproj" >> makefile.include
# echo "OBJECTS_LIB += getshmem.o" >> makefile.include
# mkdir -p bin
# '';
# installPhase =
# ''
# mkdir -p $out/bin
# for i in std gam ncl; do
# cp bin/vasp_$i $out/bin/vasp-cpu-${version}-$i
# done
# '';
# doStrip = false;
# doFixup = false;
# }
{
stdenvNoCC, requireFile, rsync, blas, scalapack, openmpi, openmp, gfortran, gcc, fftwMpi
}:
stdenvNoCC.mkDerivation rec
{
pname = "vasp";
version = "6.4.0";
# nix-store --query --hash $(nix store add-path ./vasp-6.4.0)
src = requireFile
{
name = "${pname}-${version}";
sha256 = "189i1l5q33ynmps93p2mwqf5fx7p4l50sls1krqlv8ls14s3m71f";
hashMode = "recursive";
message = "Source file not found.";
};
# VASP_TARGET_CPU = if config ? oneapiArch then "-x${config.oneapiArch}" else "";
# MKLROOT = mkl;
makeFlags = "DEPS=1";
enableParallelBuilding = true;
buildInputs = [ blas scalapack openmpi openmp gfortran gfortran.cc gcc fftwMpi.dev fftwMpi ];
nativeBuildInputs = [ rsync ];
FFTW_ROOT = fftwMpi.dev;
configurePhase =
''
cp ${./makefile.include/${version}-gnu} makefile.include
chmod +w makefile.include
echo "CPP_OPTIONS += -Duse_shmem -Dshmem_bcast_buffer -Dshmem_rproj" >> makefile.include
echo "OBJECTS_LIB += getshmem.o" >> makefile.include
mkdir -p bin
'';
installPhase =
''
mkdir -p $out/bin
for i in std gam ncl; do
cp bin/vasp_$i $out/bin/vasp-gnu-${version}-$i
done
'';
}

View File

@@ -0,0 +1,94 @@
# Default precompiler options
CPP_OPTIONS = -DHOST=\"LinuxGNU\" \
-DMPI -DMPI_BLOCK=8000 -Duse_collective \
-DscaLAPACK \
-DCACHE_SIZE=4000 \
-Davoidalloc \
-Dvasp6 \
-Duse_bse_te \
-Dtbdyn \
-Dfock_dblbuf \
-D_OPENMP
CPP = gcc -E -C -w $*$(FUFFIX) >$*$(SUFFIX) $(CPP_OPTIONS)
FC = mpif90 -fopenmp
FCL = mpif90 -fopenmp
FREE = -ffree-form -ffree-line-length-none
FFLAGS = -w -ffpe-summary=none
OFLAG = -O3
OFLAG_IN = $(OFLAG)
DEBUG = -O0
OBJECTS = fftmpiw.o fftmpi_map.o fftw3d.o fft3dlib.o
OBJECTS_O1 += fftw3d.o fftmpi.o fftmpiw.o
OBJECTS_O2 += fft3dlib.o
# For what used to be vasp.5.lib
CPP_LIB = $(CPP)
FC_LIB = $(FC)
CC_LIB = gcc
CFLAGS_LIB = -O
FFLAGS_LIB = -O1
FREE_LIB = $(FREE)
OBJECTS_LIB = linpack_double.o
# For the parser library
CXX_PARS = g++
LLIBS = -lstdc++
##
## Customize as of this point! Of course you may change the preceding
## part of this file as well if you like, but it should rarely be
## necessary ...
##
# When compiling on the target machine itself, change this to the
# relevant target when cross-compiling for another architecture
# VASP_TARGET_CPU ?= -march=native
# FFLAGS += $(VASP_TARGET_CPU)
# For gcc-10 and higher (comment out for older versions)
FFLAGS += -fallow-argument-mismatch
# BLAS and LAPACK (mandatory)
# OPENBLAS_ROOT ?= /path/to/your/openblas/installation
# BLASPACK = -L$(OPENBLAS_ROOT)/lib -lopenblas
BLASPACK = -lblas
# scaLAPACK (mandatory)
# SCALAPACK_ROOT ?= /path/to/your/scalapack/installation
# SCALAPACK = -L$(SCALAPACK_ROOT)/lib -lscalapack
SCALAPACK = -lscalapack
LLIBS += $(SCALAPACK) $(BLASPACK)
# FFTW (mandatory)
# FFTW_ROOT ?= /path/to/your/fftw/installation
# LLIBS += -L$(FFTW_ROOT)/lib -lfftw3 -lfftw3_omp
LLIBS += -lfftw3 -lfftw3_omp
INCS += -I$(FFTW_ROOT)/include
# HDF5-support (optional but strongly recommended)
#CPP_OPTIONS+= -DVASP_HDF5
#HDF5_ROOT ?= /path/to/your/hdf5/installation
#LLIBS += -L$(HDF5_ROOT)/lib -lhdf5_fortran
#INCS += -I$(HDF5_ROOT)/include
# For the VASP-2-Wannier90 interface (optional)
#CPP_OPTIONS += -DVASP2WANNIER90
#WANNIER90_ROOT ?= /path/to/your/wannier90/installation
#LLIBS += -L$(WANNIER90_ROOT)/lib -lwannier
# For the fftlib library (recommended)
CPP_OPTIONS+= -Dsysv
FCL += fftlib.o
CXX_FFTLIB = g++ -fopenmp -std=c++11 -DFFTLIB_THREADSAFE
# INCS_FFTLIB = -I./include -I$(FFTW_ROOT)/include
INCS_FFTLIB = -I./include
LIBS += fftlib
LLIBS += -ldl

View File

@@ -0,0 +1,64 @@
{ stdenv, fetchurl, requireFile, autoPatchelfHook, makeWrapper, python3, attrsToList, gnused }:
let
potcar = requireFile
{
name = "POTCAR";
sha256 = "01adpp9amf27dd39m8svip3n6ax822vsyhdi6jn5agj13lis0ln3";
hashMode = "recursive";
message = "POTCAR not found.";
};
unwrapped = stdenv.mkDerivation
{
pname = "vaspkit-unwrapped";
version = "1.4.1";
buildInputs = [ autoPatchelfHook stdenv.cc.cc ];
src = fetchurl
{
url = "mirror://sourceforge/vaspkit/Binaries/vaspkit.1.4.1.linux.x64.tar.gz";
sha256 = "0i5m7nbvqk7hzxisyydjvs2l8lnvj9vsxa170783kv9zmp51lnvs";
};
installPhase =
''
runHook preInstall
mkdir -p $out
cp -r * $out
runHook postInstall
'';
};
python = python3.withPackages (pythonPackages: with pythonPackages; [ numpy scipy matplotlib ]);
envirmentVariables =
{
LDA_PATH = "${potcar}/PAW_LDA";
PBE_PATH = "${potcar}/PAW_PBE";
GGA_PATH = "${potcar}/PAW_PW91";
VASPKIT_UTILITIES_PATH = "${unwrapped}/utilities";
PYTHON_BIN = "${python}/bin/python";
AUTO_PLOT = ".TRUE.";
};
in
stdenv.mkDerivation rec
{
pname = "vaspkit";
inherit (unwrapped) version;
phases = [ "installPhase" ];
buildInputs = [ makeWrapper ];
nativeBuildInputs = [ gnused ];
replaceEnv = builtins.concatStringsSep "" (map
(variable: ''sed 's|\(${variable.name}\s*=\s*\)\(\S\+\)|\1${variable.value}|g' -i $out/.vaspkit'' + "\n")
(attrsToList envirmentVariables));
installPhase =
''
runHook preInstall
# setup ~/.vaspkit
mkdir -p $out
cp ${unwrapped}/how_to_set_environment_variables $out/.vaspkit
# setup wrapper
makeWrapper ${unwrapped}/bin/vaspkit $out/bin/vaspkit --set HOME $out;
''
+ replaceEnv
+ ''
runHook postInstall
'';
}

View File

@@ -1,49 +1,42 @@
{
lib, stdenv, fetchurl, autoPatchelfHook, wrapGAppsHook,
glib, gtk2, xorg, libGLU, gtk3, writeShellScript, gsettings-desktop-schemas, xdg-utils
lib, stdenv, fetchurl, autoPatchelfHook, wrapGAppsHook, makeWrapper,
glib, gtk2, xorg, libGLU, gtk3, writeShellScript, gsettings-desktop-schemas, xdg-utils
}:
stdenv.mkDerivation rec
{
pname = "vesta";
version = "3.5.5";
src = fetchurl
{
url = "https://jp-minerals.org/vesta/archives/${version}/VESTA-gtk3.tar.bz2";
sha256 = "sRzQNJA7+hsjLWmykqe6bH0p1/aGEB8hCuxCyPzxYHs=";
};
desktopFile = fetchurl
{
url = "https://aur.archlinux.org/cgit/aur.git/plain/VESTA.desktop?h=vesta&id=4fae08afc37ee0fd88d14328cf0d6b308fea04d1";
sha256 = "Tq4AzQgde2KIWKA1k6JlxvdphGG9JluHMZjVw0fBUeQ=";
};
pname = "vesta";
version = "3.5.5";
src = fetchurl
{
url = "https://jp-minerals.org/vesta/archives/${version}/VESTA-gtk3.tar.bz2";
sha256 = "sRzQNJA7+hsjLWmykqe6bH0p1/aGEB8hCuxCyPzxYHs=";
};
desktopFile = fetchurl
{
url = "https://aur.archlinux.org/cgit/aur.git/plain/VESTA.desktop?h=vesta&id=4fae08afc37ee0fd88d14328cf0d6b308fea04d1";
sha256 = "Tq4AzQgde2KIWKA1k6JlxvdphGG9JluHMZjVw0fBUeQ=";
};
nativeBuildInputs = [ glib autoPatchelfHook gtk2 xorg.libXxf86vm libGLU gtk3 xorg.libXtst wrapGAppsHook ];
# buildInputs = [ makeWrapper ];
nativeBuildInputs = [ autoPatchelfHook wrapGAppsHook makeWrapper ];
buildInputs = [ glib gtk2 xorg.libXxf86vm libGLU gtk3 xorg.libXtst ];
unpackPhase = "tar -xf ${src}";
unpackPhase = "tar -xf ${src}";
installPhase =
# Note '<<-' here, it strips tabs before EOF. It doesn't work with spaces
''
echo $out
mkdir -p $out/share/applications
cp ${desktopFile} $out/share/applications/vesta.desktop
sed -i "s|Exec=.*|Exec=$out/bin/vesta|" $out/share/applications/vesta.desktop
sed -i "s|Icon=.*|Icon=$out/opt/VESTA-gtk3/img/logo.png|" $out/share/applications/vesta.desktop
''
echo $out
mkdir -p $out/share/applications
cp ${desktopFile} $out/share/applications/vesta.desktop
sed -i "s|Exec=.*|Exec=$out/bin/vesta|" $out/share/applications/vesta.desktop
sed -i "s|Icon=.*|Icon=$out/opt/VESTA-gtk3/img/logo.png|" $out/share/applications/vesta.desktop
mkdir -p $out/opt
cp -r VESTA-gtk3 $out/opt/VESTA-gtk3
mkdir -p $out/opt
cp -r VESTA-gtk3 $out/opt/VESTA-gtk3
mkdir -p $out/bin
tee $out/bin/vesta <<- EOF
#!${stdenv.shell}
export XDG_DATA_DIRS=$GSETTINGS_SCHEMAS_PATH\''${XDG_DATA_DIRS:+:}\$XDG_DATA_DIRS
export PATH="\$PATH\''${PATH:+:}${xdg-utils}/bin"
$out/opt/VESTA-gtk3/VESTA "\$@"
EOF
chmod +x $out/bin/vesta
mkdir -p $out/bin
makeWrapper $out/opt/VESTA-gtk3/VESTA $out/bin/vesta
patchelf --remove-needed libjawt.so $out/opt/VESTA-gtk3/PowderPlot/libswt-awt-gtk-3346.so
'';
patchelf --remove-needed libjawt.so $out/opt/VESTA-gtk3/PowderPlot/libswt-awt-gtk-3346.so
'';
}

View File

@@ -0,0 +1,24 @@
{ lib, stdenv, fetchFromGitHub, python3 }:
let
python = python3.withPackages (ps: with ps; [ evdev pyudev ]);
in stdenv.mkDerivation
{
name = "yogabook-support";
src = fetchFromGitHub
{
owner = "jekhor";
repo = "yogabook-support";
rev = "8ecf7861e469ba4094115fff0e81d537135e3f22";
sha256 = "4UtiQooCaeUDHc9YE9EQRJ2MNKvOqqCv85k0YyI2BO4=";
};
buildInputs = [ python ];
installPhase =
''
mkdir -p $out/bin
cp pen-key-handler yogabook-modes-handler $out/bin
mkdir -p $out/lib/udev/rules.d
cp 61-sensor-yogabook.rules $out/lib/udev/rules.d
mkdir -p $out/lib/udev/hwdb.d
cp 61-sensor-yogabook.hwdb $out/lib/udev/hwdb.d
'';
}

View File

@@ -0,0 +1,18 @@
{ stdenv, fetchFromGitHub }: stdenv.mkDerivation rec
{
pname = "zpp-bits";
version = "4.4.19";
src = fetchFromGitHub
{
owner = "eyalz800";
repo = "zpp_bits";
rev = "v${version}";
sha256 = "ejIwrvCFALuBQbQhTfzjBb11oMR/akKnboB60GWbjlQ=";
};
phases = [ "installPhase" ];
installPhase =
''
mkdir -p $out/include
cp $src/zpp_bits.h $out/include
'';
}

View File

@@ -1,72 +0,0 @@
{ hostName }: inputs:
{
config =
{
nixpkgs.hostPlatform = inputs.lib.mkDefault "x86_64-linux";
nix =
{
settings =
{
experimental-features = [ "nix-command" "flakes" ];
keep-outputs = true;
system-features = [ "big-parallel" ];
keep-failed = true;
auto-optimise-store = true;
};
daemonIOSchedClass = "idle";
daemonCPUSchedPolicy = "idle";
registry =
{
nixpkgs.flake = inputs.topInputs.nixpkgs;
nixos-config.flake = inputs.topInputs.self;
};
# nixPath =
# [
# "nixpkgs=/etc/channels/nixpkgs"
# "nixos-config=/etc/nixos/configuration.nix"
# "/nix/var/nix/profiles/per-user/root/channels"
# ];
};
networking.hostName = hostName;
time.timeZone = "Asia/Shanghai";
system =
{
stateVersion = "22.11";
configurationRevision = inputs.topInputs.self.rev or "dirty";
};
nixpkgs.config.allowUnfree = true;
systemd =
{
extraConfig =
"
DefaultTimeoutStopSec=10s
DefaultLimitNOFILE=1048576:1048576
";
user.extraConfig = "DefaultTimeoutStopSec=10s";
sleep.extraConfig =
"
SuspendState=freeze
HibernateMode=shutdown
";
services.nix-daemon.serviceConfig = { Slice = "-.slice"; Nice = "19"; };
};
programs.nix-ld.enable = true;
boot = { supportedFilesystems = [ "ntfs" ]; consoleLogLevel = 7; };
hardware.enableAllFirmware = true;
security.pam =
{
u2f = { enable = true; cue = true; authFile = ./u2f_keys; };
services = builtins.listToAttrs (builtins.map (name: { inherit name; value = { u2fAuth = true; }; })
[ "login" "sudo" "su" "kde" "polkit-1" ]);
};
systemd.nspawn.arch =
{
execConfig.PrivateUsers = false;
networkConfig.VirtualEthernet = false;
};
environment.etc."channels/nixpkgs".source = inputs.topInputs.nixpkgs.outPath;
# environment.pathsToLink = [ "/include" ];
# environment.variables.CPATH = "/run/current-system/sw/include";
# environment.variables.LIBRARY_PATH = "/run/current-system/sw/lib";
};
}

View File

@@ -1,184 +0,0 @@
inputs:
{
config =
{
# filesystem mount
fileSystems."/" =
{
device = "/dev/mapper/root";
fsType = "btrfs";
options = [ "subvol=nix/rootfs/current" "compress-force=zstd" ];
};
# sudo btrfs fi mkswapfile --size 64g --uuid clear swap
# sudo btrfs inspect-internal map-swapfile -r swap
# sudo mdadm --create /dev/md/swap --level 0 --raid-devices 2 /dev/nvme1n1p5 /dev/nvme0n1p5
# sudo mkswap --uuid clear /dev/md/swap
# sudo cryptsetup luksFormat /dev/md/swap
# sudo systemd-cryptenroll --fido2-device=auto /dev/md/swap
# sudo systemd-cryptenroll --wipe-slot=0 /dev/md/swap
# sudo $(dirname $(realpath $(which systemctl)))/../lib/systemd/systemd-cryptsetup \
# attach swap /dev/md/swap - fido2-device=auto
# sudo mkswap --uuid clear /dev/mapper/swap
# kernel, modules, ucode
boot.kernelPackages = inputs.pkgs.linuxPackages_xanmod_latest;
hardware.cpu.intel.updateMicrocode = true;
# modules auto loaded in stage2
boot.kernelModules = [ "kvm-intel" "br_netfilter" ];
# modules install but not auto loaded
# boot.extraModulePackages = [ yourmodulename ];
boot.extraModprobeConfig =
''
options kvm_intel nested=1
options iwlmvm power_scheme=1
options iwlwifi uapsd_disable=1
'';
boot.kernelParams = [ "delayacct" "acpi_osi=Linux" ];
boot.kernelPatches =
[
{ name = "hdmi"; patch = ./hdmi.patch; }
{
name = "cjktty";
patch = inputs.pkgs.fetchurl
{
url = "https://raw.githubusercontent.com/zhmars/cjktty-patches/master/v6.x/cjktty-6.3.patch";
sha256 = "sha256-QnsWruzhtiZnqzTUXkPk9Hb19Iddr4VTWXyV4r+iLvE=";
};
extraStructuredConfig = { FONT_CJK_16x16 = inputs.lib.kernel.yes; FONT_CJK_32x32 = inputs.lib.kernel.yes; };
}
{
name = "custom config";
patch = null;
extraStructuredConfig =
{
GENERIC_CPU = inputs.lib.kernel.no;
MALDERLAKE = inputs.lib.kernel.yes;
PREEMPT_VOLUNTARY = inputs.lib.mkForce inputs.lib.kernel.no;
PREEMPT = inputs.lib.mkForce inputs.lib.kernel.yes;
HZ_500 = inputs.lib.mkForce inputs.lib.kernel.no;
HZ_1000 = inputs.lib.mkForce inputs.lib.kernel.yes;
HZ = inputs.lib.mkForce (inputs.lib.kernel.freeform "1000");
};
}
];
# grub
boot.loader =
{
timeout = 5;
efi = { canTouchEfiVariables = true; efiSysMountPoint = "/boot/efi"; };
grub =
{
enable = true;
# for BIOS, set disk to install; for EFI, set nodev
device = "nodev";
efiSupport = true;
useOSProber = false;
extraEntries =
''
menuentry "Windows" {
insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --fs-uuid --set=root 7317-1DB6
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
menuentry "Windows for malware" {
insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --fs-uuid --set=root 7321-FA9C
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
'';
};
};
# initrd, luks
boot.initrd =
{
systemd =
{
enable = true;
services.create-current-rootfs =
{
wantedBy = [ "local-fs-pre.target" ];
after = [ "cryptsetup.target" ];
before = [ "local-fs-pre.target" ];
unitConfig.DefaultDependencies = false;
serviceConfig.Type = "oneshot";
script =
''
mount /dev/mapper/root /mnt -m
if [ -f /mnt/nix/rootfs/current/.timestamp ]
then
mv /mnt/nix/rootfs/current /mnt/nix/rootfs/$(cat /mnt/nix/rootfs/current/.timestamp)
fi
btrfs subvolume create /mnt/nix/rootfs/current
echo $(date '+%Y%m%d%H%M%S') > /mnt/nix/rootfs/current/.timestamp
umount /mnt
'';
};
};
# modules in initrd
# modprobe --show-depends
availableKernelModules =
[
"ahci" "bfq" "i915" "intel_cstate" "nls_cp437" "nls_iso8859-1" "nvidia" "nvidia_drm" "nvidia_modeset"
"nvidia_uvm" "nvme" "sr_mod" "usbhid" "usb_storage" "virtio_blk" "virtio_pci" "xhci_pci"
]
# speed up luks decryption
++ [ "aesni_intel" "cryptd" "crypto_simd" "libaes" ];
};
# impermanence
environment.persistence."/nix/persistent" =
{
hideMounts = true;
directories =
[
"/etc/NetworkManager/system-connections"
"/home"
"/root"
"/var"
];
files =
[
"/etc/machine-id"
"/etc/ssh/ssh_host_ed25519_key.pub"
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_rsa_key.pub"
"/etc/ssh/ssh_host_rsa_key"
];
};
# services
systemd.services =
{
nix-daemon = { environment = { TMPDIR = "/var/cache/nix"; }; serviceConfig = { CacheDirectory = "nix"; }; };
systemd-tmpfiles-setup = { environment = { SYSTEMD_TMPFILES_FORCE_SUBVOL = "0"; }; };
};
services =
{
snapper.configs.persistent =
{
SUBVOLUME = "/nix/persistent";
TIMELINE_CREATE = true;
TIMELINE_CLEANUP = true;
TIMELINE_MIN_AGE = 1800;
TIMELINE_LIMIT_HOURLY = "10";
TIMELINE_LIMIT_DAILY = "7";
TIMELINE_LIMIT_WEEKLY = "1";
TIMELINE_LIMIT_MONTHLY = "0";
TIMELINE_LIMIT_YEARLY = "0";
};
udev.extraRules =
''
ACTION=="add|change", KERNEL=="[sv]d[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="bfq"
ACTION=="add|change", KERNEL=="nvme[0-9]n[0-9]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="bfq"
'';
};
};
}

View File

@@ -1,119 +0,0 @@
inputs:
{
options.nixos.fileSystems = let inherit (inputs.lib) mkOption types; in
{
mount =
{
# device = mountPoint;
vfat = mkOption { type = types.attrsOf types.nonEmptyStr; };
# device.subvol = mountPoint;
btrfs = mkOption { type = types.attrsOf (types.attrsOf types.nonEmptyStr); };
};
decrypt.auto = mkOption { type = types.attrsOf (types.submodule { options =
{
mapper = mkOption { type = types.nonEmptyStr; };
ssd = mkOption { type = types.bool; default = false; };
}; }); };
mdadm = mkOption { type = types.nullOr types.str; };
swap = mkOption { type = types.listOf types.nonEmptyStr; };
resume = mkOption { type = types.nullOr (types.str or (types.submodule { options =
{ device = mkOption { type = types.nonEmptyStr; }; offset = mkOption { type = types.ints.unsigned; }; }; })); };
# cleanRootfs = mkOption { type = types.nullOr
# swap and resume
# swap != resume.device if swap is a file
# swap = mkOption { type = types.nullOr types.str; };
# resume =
# {
# device = mkOption { type = types.nullOr types.str; };
# # sudo btrfs fi mkswapfile --size 64g --uuid clear swap
# # sudo btrfs inspect-internal map-swapfile -r swap
# offset = mkOption { type = types.nullOr types.ints.unsigned; };
# };
};
config =
{
fileSystems =
(
builtins.listToAttrs (builtins.map
(device: { name = device.value; value = { device = device.name; fsType = "vfat"; }; })
(inputs.localLib.attrsToList inputs.config.nixos.fileSystems.mount.vfat))
)
// (
builtins.listToAttrs (builtins.concatLists (builtins.map
(
device: builtins.map
(
subvol:
{
name = subvol.value;
value =
{
device = device.name;
fsType = "btrfs";
options = [ "compress-force=zstd:8" "subvol=${subvol.name}" ];
};
}
)
(inputs.localLib.attrsToList device.value)
)
(inputs.localLib.attrsToList inputs.config.nixos.fileSystems.mount.btrfs)))
);
swapDevices = builtins.map (device: { device = device; }) inputs.config.nixos.fileSystems.swap;
boot =
{
initrd = {}
// (
if inputs.config.nixos.fileSystems.decrypt.auto != null then
{
luks.devices =
(
builtins.listToAttrs (builtins.map
(
device:
{
name = device.value.mapper;
value =
{
device = device.name;
allowDiscards = device.value.ssd;
bypassWorkqueues = device.value.ssd;
crypttabExtraOpts = [ "fido2-device=auto" ];
};
}
)
(inputs.localLib.attrsToList inputs.config.nixos.fileSystems.decrypt.auto))
);
}
else {}
)
// (
if inputs.config.nixos.fileSystems.mdadm != null then
{ services.swraid = { enable = true; mdadmConf = inputs.config.nixos.fileSystems.mdadm; }; }
else {}
);
}
// (
if inputs.config.nixos.fileSystems.resume != null then
if builtins.typeOf inputs.config.nixos.fileSystems.resume == "string" then
{ resumeDevice = inputs.config.nixos.fileSystems.resume; }
else
{
resumeDevice = inputs.config.nixos.fileSystems.resume.device;
kernelModules = [ "resume_offset=${inputs.config.nixos.fileSystems.resume.offset}" ];
}
else {}
);
};
}
# Disable CoW for VM image and database:
# sudo chattr +C images
# zstd:15 cause sound stuttering
# From btrfs wiki: 1-3 are real-time, 4-8 slower with improved compression,
# 9-15 try even harder though the resulting size may not be significantly improved.
# https://btrfs.readthedocs.io/en/latest/Compression.html
# sudo btrfs filesystem resize -50G /nix
# sudo cryptsetup status root
# sudo cryptsetup -b 3787456512 resize root
# sudo cfdisk /dev/nvme1n1p3

View File

@@ -1,14 +0,0 @@
diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index 55544d484318..d6f257f8fd14 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -2708,7 +2708,7 @@ static void parse_ddi_port(struct intel_bios_encoder_data *devdata)
if (i915->display.vbt.ports[port]) {
drm_dbg_kms(&i915->drm,
"More than one child device for port %c in VBT, using the first.\n",
port_name(port));
- return;
+ // return;
}
sanitize_device_type(devdata, port);

91
modules/bugs/default.nix Normal file
View File

@@ -0,0 +1,91 @@
inputs:
let
inherit (inputs.localLib) stripeTabs;
inherit (builtins) map attrNames;
inherit (inputs.lib) mkMerge mkIf mkOption types;
bugs =
{
# suspend & hibernate do not use platform
suspend-hibernate-no-platform.systemd.sleep.extraConfig =
''
SuspendState=freeze
HibernateMode=shutdown
'';
# reload iwlwifi after resume from hibernate
hibernate-iwlwifi =
{
systemd.services.reload-iwlwifi-after-hibernate =
{
description = "reload iwlwifi after resume from hibernate";
after = [ "systemd-hibernate.service" ];
serviceConfig.Type = "oneshot";
script = let modprobe = "${inputs.pkgs.kmod}/bin/modprobe"; in
''
${modprobe} -r iwlwifi
${modprobe} iwlwifi
echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo
'';
wantedBy = [ "systemd-hibernate.service" ];
};
nixos.system.kernel.modules.modprobeConfig =
[ "options iwlmvm power_scheme=1" "options iwlwifi uapsd_disable=1" ];
};
# disable wakeup on lid open
suspend-lid-no-wakeup.systemd.services.lid-no-wakeup =
{
description = "lid no wake up";
serviceConfig.Type = "oneshot";
script =
let
cat = "${inputs.pkgs.coreutils}/bin/cat";
grep = "${inputs.pkgs.gnugrep}/bin/grep";
in
''
if ${cat} /proc/acpi/wakeup | ${grep} LID0 | ${grep} -q enabled
then
echo LID0 > /proc/acpi/wakeup
fi
if ${cat} /proc/acpi/wakeup | ${grep} XHCI | ${grep} -q enabled
then
echo XHCI > /proc/acpi/wakeup
fi
'';
wantedBy = [ "multi-user.target" ];
};
# xmunet use old encryption
xmunet.nixpkgs.config.packageOverrides = pkgs: { wpa_supplicant = pkgs.wpa_supplicant.overrideAttrs
(attrs: { patches = attrs.patches ++ [ ./xmunet.patch ];}); };
suspend-hibernate-waydroid.systemd.services =
let
systemctl = "${inputs.pkgs.systemd}/bin/systemctl";
in
{
"waydroid-hibernate" =
{
description = "waydroid hibernate";
wantedBy = [ "systemd-hibernate.service" "systemd-suspend.service" ];
before = [ "systemd-hibernate.service" "systemd-suspend.service" ];
serviceConfig.Type = "oneshot";
script = "${systemctl} stop waydroid-container";
};
"waydroid-resume" =
{
description = "waydroid resume";
wantedBy = [ "systemd-hibernate.service" "systemd-suspend.service" ];
after = [ "systemd-hibernate.service" "systemd-suspend.service" ];
serviceConfig.Type = "oneshot";
script = "${systemctl} start waydroid-container";
};
};
firefox.programs.firefox.enable = inputs.lib.mkForce false;
power.boot.kernelParams = [ "cpufreq.default_governor=powersave" ];
};
in
{
options.nixos.bugs = mkOption
{
type = types.listOf (types.enum (attrNames bugs));
default = [];
};
config = mkMerge (map (bug: mkIf (builtins.elem bug inputs.config.nixos.bugs) bugs.${bug}) (attrNames bugs));
}

View File

@@ -5,7 +5,7 @@
SSL_CTX_set_options(ssl, SSL_OP_NO_SSLv2);
SSL_CTX_set_options(ssl, SSL_OP_NO_SSLv3);
-
+ SSL_CTX_set_options(ssl, SSL_OP_LEGACY_SERVER_CONNECT);
+ SSL_CTX_set_options(ssl, SSL_OP_LEGACY_SERVER_CONNECT);
SSL_CTX_set_mode(ssl, SSL_MODE_AUTO_RETRY);
#ifdef SSL_MODE_NO_AUTO_CHAIN

50
modules/default.nix Normal file
View File

@@ -0,0 +1,50 @@
inputs:
let
inherit (inputs) topInputs;
inherit (inputs.localLib) mkModules;
in
{
imports = mkModules
[
topInputs.home-manager.nixosModules.home-manager
topInputs.sops-nix.nixosModules.sops
topInputs.aagl.nixosModules.default
topInputs.nix-index-database.nixosModules.nix-index
topInputs.nur.nixosModules.nur
topInputs.nur-xddxdd.nixosModules.setupOverlay
topInputs.impermanence.nixosModules.impermanence
(inputs:
{
config =
{
nixpkgs.overlays =
[
topInputs.qchem.overlays.default
topInputs.nixd.overlays.default
topInputs.nix-alien.overlays.default
topInputs.napalm.overlays.default
topInputs.pnpm2nix-nzbr.overlays.default
topInputs.lmix.overlays.default
topInputs.aagl.overlays.default
(import "${topInputs.dguibert-nur-packages}/overlays/nvhpc-overlay")
(final: prev:
{
nix-vscode-extensions = topInputs.nix-vscode-extensions.extensions."${prev.system}";
nur-xddxdd = topInputs.nur-xddxdd.overlays.default final prev;
deploy-rs =
{ inherit (prev) deploy-rs; inherit ((topInputs.deploy-rs.overlay final prev).deploy-rs) lib; };
# needed by mirism
nghttp2-2305 =
inputs.pkgs.callPackage "${inputs.topInputs.nixpkgs-2305}/pkgs/development/libraries/nghttp2" {};
})
];
home-manager.sharedModules =
[
topInputs.plasma-manager.homeManagerModules.plasma-manager
topInputs.nix-doom-emacs.hmModule
];
};
})
./hardware ./packages ./system ./virtualization ./services ./bugs ./users
];
}

View File

@@ -1,16 +0,0 @@
inputs:
{
config.fonts =
{
fontDir.enable = true;
fonts = with inputs.pkgs;
[ noto-fonts source-han-sans source-han-serif source-code-pro hack-font jetbrains-mono nerdfonts ];
fontconfig.defaultFonts =
{
emoji = [ "Noto Color Emoji" ];
monospace = [ "Noto Sans Mono CJK SC" "Sarasa Mono SC" "DejaVu Sans Mono"];
sansSerif = [ "Noto Sans CJK SC" "Source Han Sans SC" "DejaVu Sans" ];
serif = [ "Noto Serif CJK SC" "Source Han Serif SC" "DejaVu Serif" ];
};
};
}

View File

@@ -1 +0,0 @@
{ config.hardware.bluetooth.enable = true; }

View File

@@ -1,79 +0,0 @@
{ pkgs, ... }@inputs:
{
config =
{
nix.settings.system-features = [ "nixos-test" "benchmark" "kvm" "gccarch-alderlake" ];
nixpkgs =
{
hostPlatform = { system = "x86_64-linux"; gcc = { arch = "alderlake"; tune = "alderlake"; }; };
config.allowUnfree = true;
overlays =
[(
final: prev:
let
generic-pkgs = (inputs.topInputs.nixpkgs.lib.nixosSystem
{
system = "x86_64-linux";
modules = [{ config.nixpkgs.config.allowUnfree = true; }];
}).pkgs;
in
{
pandoc = generic-pkgs.pandoc;
fwupd = generic-pkgs.fwupd;
}
)];
config.qchem-config.optArch = "alderlake";
};
services.dbus.implementation = "broker";
programs.dconf.enable = true;
hardware.opengl.extraPackages = with inputs.pkgs; [ intel-media-driver intel-ocl ];
systemd.services =
{
reload-iwlwifi-after-hibernate =
{
description = "reload iwlwifi after resume from hibernate";
after = [ "systemd-hibernate.service" ];
serviceConfig =
{
Type = "oneshot";
ExecStart = let inherit (inputs.pkgs) kmod bash; in
[
"${kmod}/bin/modprobe -r iwlwifi" "${kmod}/bin/modprobe iwlwifi"
"${bash}/bin/bash -c 'echo 0 /sys/devices/system/cpu/intel_pstate/no_turbo'"
];
};
wantedBy = [ "systemd-hibernate.service" ];
};
lid-no-wakeup =
{
description = "lid no wake up";
serviceConfig.ExecStart = let inherit (inputs.pkgs) bash coreutils gnugrep; in
"${bash}/bin/bash -c '"
+ "if ${coreutils}/bin/cat /proc/acpi/wakeup | "
+ "${gnugrep}/bin/grep LID0 | "
+ "${gnugrep}/bin/grep -q enabled; then "
+ "echo LID0 > /proc/acpi/wakeup; "
+ "fi"
+ "'";
wantedBy = [ "multi-user.target" ];
};
};
boot.kernel.sysctl =
{
"net.core.rmem_max" = 67108864;
"net.core.wmem_max" = 67108864;
"net.ipv4.tcp_rmem" = "4096 87380 67108864";
"net.ipv4.tcp_wmem" = "4096 65536 67108864";
"net.ipv4.tcp_mtu_probing" = true;
"net.ipv4.tcp_tw_reuse" = true;
"vm.swappiness" = 10;
"net.ipv4.tcp_max_syn_backlog" = 8388608;
"net.core.netdev_max_backlog" = 8388608;
"net.core.somaxconn" = 8388608;
"vm.oom_kill_allocating_task" = true;
"vm.oom_dump_tasks" = false;
"vm.overcommit_kbytes" = 22020096;
"dev.i915.perf_stream_paranoid" = false;
};
};
}

View File

@@ -0,0 +1,220 @@
inputs:
{
options.nixos.hardware = let inherit (inputs.lib) mkOption types; in
{
bluetooth.enable = mkOption { type = types.bool; default = false; };
joystick.enable = mkOption { type = types.bool; default = false; };
printer.enable = mkOption { type = types.bool; default = false; };
sound.enable = mkOption { type = types.bool; default = false; };
cpus = mkOption { type = types.listOf (types.enum [ "intel" "amd" ]); default = []; };
gpus = mkOption { type = types.listOf (types.enum [ "intel" "nvidia" "amd" ]); default = []; };
prime =
{
enable = mkOption { type = types.bool; default = false; };
mode = mkOption { type = types.enum [ "offload" "sync" ]; default = "offload"; };
busId = mkOption { type = types.attrsOf types.str; default = {}; };
};
gamemode.drmDevice = mkOption { type = types.int; default = 0; };
halo-keyboard.enable = mkOption { type = types.bool; default = false; };
};
config =
let
inherit (inputs.lib) mkMerge mkIf;
inherit (inputs.config.nixos) hardware;
inherit (builtins) listToAttrs map concatLists;
inherit (inputs.localLib) attrsToList;
in mkMerge
[
# bluetooth
(mkIf hardware.bluetooth.enable { hardware.bluetooth.enable = true; })
# joystick
(mkIf hardware.joystick.enable { hardware = { xone.enable = true; xpadneo.enable = true; }; })
# printer
(
mkIf hardware.printer.enable
{
services =
{
printing = { enable = true; drivers = [ inputs.pkgs.cnijfilter2 ]; };
avahi = { enable = true; nssmdns = true; openFirewall = true; };
};
}
)
# sound
(
mkIf hardware.sound.enable
{
hardware.pulseaudio.enable = false;
services.pipewire = { enable = true; alsa = { enable = true; support32Bit = true; }; pulse.enable = true; };
sound.enable = true;
security.rtkit.enable = true;
environment.etc."wireplumber/main.lua.d/50-alsa-config.lua".text =
let
content = builtins.readFile
(inputs.pkgs.wireplumber + "/share/wireplumber/main.lua.d/50-alsa-config.lua");
matched = builtins.match
".*\n([[:space:]]*)(--\\[\"session\\.suspend-timeout-seconds\"][^\n]*)[\n].*" content;
spaces = builtins.elemAt matched 0;
comment = builtins.elemAt matched 1;
config = ''["session.suspend-timeout-seconds"] = 0'';
in
builtins.replaceStrings [(spaces + comment)] [(spaces + config)] content;
}
)
# cpus
(
mkIf (hardware.cpus != [])
{
hardware.cpu = listToAttrs
(map (name: { inherit name; value = { updateMicrocode = true; }; }) hardware.cpus);
boot.initrd.availableKernelModules =
let
modules =
{
intel =
[
"intel_cstate" "aesni_intel" "intel_cstate" "intel_uncore" "intel_uncore_frequency" "intel_powerclamp"
];
amd = [];
};
in
concatLists (map (cpu: modules.${cpu}) hardware.cpus);
}
)
# gpus
(
mkIf (hardware.gpus != [])
{
boot.initrd.availableKernelModules =
let
modules =
{
intel = [ "i915" ];
nvidia = [ "nvidia" "nvidia_drm" "nvidia_modeset" "nvidia_uvm" ];
amd = [ "amdgpu" ];
};
in
concatLists (map (gpu: modules.${gpu}) hardware.gpus);
hardware =
{
opengl =
{
enable = true;
driSupport = true;
extraPackages =
with inputs.pkgs;
let
packages =
{
intel = [ intel-compute-runtime intel-media-driver libvdpau-va-gl ]; # intel-vaapi-driver
nvidia = [ vaapiVdpau ];
amd = [];
};
in
concatLists (map (gpu: packages.${gpu}) hardware.gpus);
driSupport32Bit = true;
};
nvidia.nvidiaSettings = builtins.elem "nvidia" hardware.gpus;
};
}
)
(mkIf (builtins.elem "intel" hardware.gpus) { services.xserver.deviceSection = ''Driver "modesetting"''; })
# prime
(
mkIf hardware.prime.enable
{
hardware.nvidia = mkMerge
[
(
mkIf (hardware.prime.mode == "offload")
{
prime.offload = { enable = true; enableOffloadCmd = true; };
powerManagement = { finegrained = true; enable = true; };
}
)
(
mkIf (hardware.prime.mode == "sync")
{
prime = { sync.enable = true; };
# prime.forceFullCompositionPipeline = true;
}
)
{
prime = listToAttrs
(map (gpu: { inherit (gpu) value; name = "${gpu.name}BusId"; }) (attrsToList hardware.prime.busId));
}
];
}
)
{ programs.gamemode.settings.gpu.gpu_device = "${toString hardware.gamemode.drmDevice}"; }
# halo-keyboard
(mkIf hardware.halo-keyboard.enable
(
let
keyboard = inputs.pkgs.localPackages.chromiumos-touch-keyboard;
support = inputs.pkgs.localPackages.yoga-support;
in
{
services.udev.packages = [ keyboard support ];
systemd.services =
{
touch-keyboard-handler.serviceConfig =
{
Type = "simple";
WorkingDirectory = "/etc/touch_keyboard";
ExecStart = "${keyboard}/bin/touch_keyboard_handler";
};
yogabook-modes-handler.serviceConfig =
{
Type = "simple";
ExecStart = "${support}/bin/yogabook-modes-handler";
StandardOutput = "journal";
};
monitor-sensor =
{
wantedBy = [ "default.target" ];
serviceConfig =
{
Type = "simple";
ExecStart = "${inputs.pkgs.iio-sensor-proxy}/bin/monitor-sensor --hinge";
};
};
};
environment.etc."touch_keyboard".source = "${keyboard}/etc/touch_keyboard";
boot.initrd =
{
services.udev.packages = [ keyboard support ];
systemd =
{
extraBin =
{
touch_keyboard_handler = "${keyboard}/bin/touch_keyboard_handler";
yogabook-modes-handler = "${support}/bin/yogabook-modes-handler";
};
services =
{
touch-keyboard-handler =
{
serviceConfig =
{
Type = "simple";
WorkingDirectory = "/etc/touch_keyboard";
ExecStart = "${keyboard}/bin/touch_keyboard_handler";
};
};
yogabook-modes-handler.serviceConfig =
{
Type = "simple";
ExecStart = "${support}/bin/yogabook-modes-handler";
StandardOutput = "journal";
};
};
};
extraFiles."/etc/touch_keyboard".source = "${keyboard}/etc/touch_keyboard";
};
}
))
];
}

View File

@@ -1 +0,0 @@
{ config.hardware = { xone.enable = true; xpadneo.enable = true; }; }

View File

@@ -1,24 +0,0 @@
{ intelBusId, nvidiaBusId }: inputs:
{
config =
{
services.xserver.videoDrivers = inputs.lib.mkBefore [ "intel" "nvidia" ];
hardware.nvidia.prime =
{
offload.enable = true;
intelBusId = intelBusId;
nvidiaBusId = nvidiaBusId;
};
environment.systemPackages =
[(
inputs.pkgs.writeShellScriptBin "nvidia-offload"
''
export __NV_PRIME_RENDER_OFFLOAD=1
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export __VK_LAYER_NV_optimus=NVIDIA_only
exec "$@"
''
)];
};
}

View File

@@ -1,8 +0,0 @@
inputs:
{
config.services =
{
printing = { enable = true; drivers = [ inputs.pkgs.cnijfilter2 ]; };
avahi = { enable = true; nssmdns = true; openFirewall = true; };
};
}

View File

@@ -1,19 +0,0 @@
inputs:
{
config =
{
sound =
{
enable = true;
extraConfig = "session.suspend-timeout-seconds 0";
};
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire =
{
enable = true;
alsa = { enable = true; support32Bit = true; };
pulse.enable = true;
};
};
}

View File

@@ -1,13 +0,0 @@
inputs:
{
config =
{
home-manager.users.chn = { pkgs, ... }:
{
home.stateVersion = "22.11";
programs.zsh = import ./zsh.nix { inherit pkgs; };
programs.direnv.enable = true;
programs.direnv.nix-direnv.enable = true;
};
};
}

View File

@@ -1,14 +0,0 @@
{
config.home-manager =
{
useGlobalPkgs = true;
useUserPackages = true;
users.root = { pkgs, ... }:
{
home.stateVersion = "22.11";
programs.zsh = import ./zsh.nix { inherit pkgs; };
programs.direnv.enable = true;
programs.direnv.nix-direnv.enable = true;
};
};
}

View File

@@ -1,62 +0,0 @@
{ pkgs }:
{
enable = true;
initExtraBeforeCompInit =
''
# p10k instant prompt
P10K_INSTANT_PROMPT="$XDG_CACHE_HOME/p10k-instant-prompt-''${(%):-%n}.zsh"
[[ ! -r "$P10K_INSTANT_PROMPT" ]] || source "$P10K_INSTANT_PROMPT"
HYPHEN_INSENSITIVE="true"
export PATH=~/bin:$PATH
function br
{
local cmd cmd_file code
cmd_file=$(mktemp)
if broot --outcmd "$cmd_file" "$@"; then
cmd=$(<"$cmd_file")
command rm -f "$cmd_file"
eval "$cmd"
else
code=$?
command rm -f "$cmd_file"
return "$code"
fi
}
'';
plugins =
[
{
file = "powerlevel10k.zsh-theme";
name = "powerlevel10k";
src = "${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k";
}
{
file = "p10k.zsh";
name = "powerlevel10k-config";
src = ./p10k-config;
}
{
name = "zsh-lsd";
src = pkgs.fetchFromGitHub
{
owner = "z-shell";
repo = "zsh-lsd";
rev = "029a9cb0a9b39c9eb6c5b5100dd9182813332250";
sha256 = "sha256-oWjWnhiimlGBMaZlZB+OM47jd9hporKlPNwCx6524Rk=";
};
}
# {
# name = "zsh-exa";
# src = pkgs.fetchFromGitHub
# {
# owner = "ptavares";
# repo = "zsh-exa";
# rev = "0.2.3";
# sha256 = "0vn3iv9d3c1a4rigq2xm52x8zjaxlza1pd90bw9mbbkl9iq8766r";
# };
# }
];
}

View File

@@ -1,20 +0,0 @@
{ fcitx }: inputs:
{
config.i18n =
{
defaultLocale = "zh_CN.UTF-8";
supportedLocales = ["zh_CN.UTF-8/UTF-8" "en_US.UTF-8/UTF-8" "C.UTF-8/UTF-8"];
}
//
(
if fcitx then
{
inputMethod =
{
enabled = "fcitx5";
fcitx5.addons = with inputs.pkgs; [ fcitx5-rime fcitx5-chinese-addons fcitx5-mozc ];
};
}
else {}
);
}

View File

@@ -1,20 +0,0 @@
inputs:
{
config =
{
services.xserver =
{
enable = true;
displayManager.sddm.enable = true;
desktopManager.plasma5.enable = true;
};
environment =
{
sessionVariables."GTK_USE_PORTAL" = "1";
systemPackages = [ inputs.pkgs.libsForQt5.qtstyleplugin-kvantum ];
};
xdg.portal.extraPortals = with inputs.pkgs; [ xdg-desktop-portal-gtk xdg-desktop-portal-wlr ];
programs.xwayland.enable = true;
programs.kdeconnect.enable = true;
};
}

View File

@@ -1 +0,0 @@
{ config.networking.networkmanager.enable = true; }

View File

@@ -1,9 +0,0 @@
{
config.services.dnsmasq.settings.address =
[
"/mirism.one/216.24.188.24"
"/beta.mirism.one/216.24.188.24"
"/ng01.mirism.one/216.24.188.24"
"/debug.mirism.one/127.0.0.1"
];
}

View File

@@ -1,45 +0,0 @@
inputs:
{
config =
{
# make shares visible for windows 10 clients
services.samba-wsdd.enable = true;
# networking.firewall = { allowedTCPPorts = [ 5357 ]; allowedUDPPorts = [ 3702 ]; };
services.samba =
{
enable = true;
securityType = "user";
extraConfig =
''
workgroup = WORKGROUP
server string = Samba Server
server role = standalone server
hosts allow = 192.168. 127.
dns proxy = no
'';
shares = builtins.listToAttrs (builtins.map
(config: { name = config.name; value =
{
comment = config.comment;
path = config.path;
browseable = true;
writeable = true;
"create mask" = "664";
"force create mode" = "644";
"security mask" = "644";
"force security mode" = "644";
"directory mask" = "2755";
"force directory mode" = "2755";
"directory security mask" = "2755";
"force directory security mode" = "2755";
}; })
[
{ name = "media"; comment = "chn media"; path = "/run/media/chn"; }
{ name = "home"; comment = "chn home"; path = "/home/chn"; }
{ name = "mnt"; comment = "mnt"; path = "/mnt"; }
{ name = "share"; comment = "chn share"; path = "/home/chn/share"; }
]);
};
};
}

View File

@@ -1 +0,0 @@
{ config.services.openssh.enable = true; }

View File

@@ -1,55 +0,0 @@
inputs:
{
config =
{
services =
{
dnsmasq =
{
enable = true;
settings =
{
no-poll = true;
server = [ "127.0.0.1#10853" ];
listen-address = "127.0.0.1";
bind-interfaces = true;
ipset =
[
"/developer.download.nvidia.com/noproxy_net"
"/yuanshen.com/noproxy_net"
"/zoom.us/noproxy_net"
];
};
};
xray = { enable = true; settingsFile = inputs.config.sops.secrets."xray.json".path; };
v2ray-forwarder = { enable = true; proxyPort = 10880; xmuPort = 10881; };
};
sops.secrets."xray.json" =
{ mode = "0440"; owner = "v2ray"; group = "v2ray"; restartUnits = [ "xray.service" ]; };
systemd.services.xray.serviceConfig =
{
DynamicUser = inputs.lib.mkForce false;
User = "v2ray";
Group = "v2ray";
CapabilityBoundingSet = "CAP_NET_ADMIN CAP_NET_BIND_SERVICE";
AmbientCapabilities = "CAP_NET_ADMIN CAP_NET_BIND_SERVICE";
LimitNPROC = 10000;
LimitNOFILE = 1000000;
};
users = { users.v2ray = { isSystemUser = true; group = "v2ray"; }; groups.v2ray = {}; };
boot.kernel.sysctl =
{
"net.ipv4.conf.all.route_localnet" = true;
"net.ipv4.conf.default.route_localnet" = true;
"net.ipv4.conf.all.accept_local" = true;
"net.ipv4.conf.default.accept_local" = true;
"net.ipv4.ip_forward" = true;
"net.ipv4.ip_nonlocal_bind" = true;
"net.bridge.bridge-nf-call-iptables" = false;
"net.bridge.bridge-nf-call-ip6tables" = false;
"net.bridge.bridge-nf-call-arptables" = false;
};
environment.etc."resolv.conf".text = "nameserver 127.0.0.1";
networking.firewall.trustedInterfaces = [ "docker0" "virbr0" ];
};
}

View File

@@ -1,7 +0,0 @@
{
config.nixpkgs.config.packageOverrides = pkgs:
{
wpa_supplicant = pkgs.wpa_supplicant.overrideAttrs ( attrs:
{ patches = attrs.patches ++ [ ./xmunet.patch ]; });
};
}

View File

@@ -0,0 +1,172 @@
inputs:
{
imports = inputs.localLib.mkModules
[
./server
./desktop
./desktop-fat
./workstation
];
options.nixos.packages =
let
inherit (inputs.lib) mkOption types;
packageSets =
[
# no gui, only used for specific purpose
"server"
# gui, for daily use, but not install large programs such as matlab
"desktop"
"desktop-fat"
# nearly everything
"workstation"
];
in
{
packageSet = mkOption { type = types.enum packageSets; default = "server"; };
extraPackages = mkOption { type = types.listOf types.unspecified; default = []; };
excludePackages = mkOption { type = types.listOf types.unspecified; default = []; };
extraPythonPackages = mkOption { type = types.listOf types.unspecified; default = []; };
excludePythonPackages = mkOption { type = types.listOf types.unspecified; default = []; };
extraPrebuildPackages = mkOption { type = types.listOf types.unspecified; default = []; };
excludePrebuildPackages = mkOption { type = types.listOf types.unspecified; default = []; };
_packageSets = mkOption
{
type = types.listOf types.nonEmptyStr;
readOnly = true;
default = builtins.genList (i: builtins.elemAt packageSets i)
((inputs.localLib.findIndex inputs.config.nixos.packages.packageSet packageSets) + 1);
};
_packages = mkOption { type = types.listOf types.unspecified; default = []; };
_pythonPackages = mkOption { type = types.listOf types.unspecified; default = []; };
_prebuildPackages = mkOption { type = types.listOf types.unspecified; default = []; };
};
config =
let
inherit (builtins) concatLists map;
in
{
environment.systemPackages = let inherit (inputs.lib.lists) subtractLists; in with inputs.config.nixos.packages;
(subtractLists excludePackages (_packages ++ extraPackages))
++ [
(inputs.pkgs.python3.withPackages (pythonPackages:
subtractLists
(concatLists (map (packageFunction: packageFunction pythonPackages) excludePythonPackages))
(concatLists (map (packageFunction: packageFunction pythonPackages)
(_pythonPackages ++ extraPythonPackages)))))
(inputs.pkgs.callPackage ({ stdenv }: stdenv.mkDerivation
{
name = "prebuild-packages";
propagateBuildInputs = subtractLists excludePrebuildPackages (_prebuildPackages ++ extraPrebuildPackages);
phases = [ "installPhase" ];
installPhase =
''
runHook preInstall
mkdir -p $out
runHook postInstall
'';
}) {})
];
};
}
# programs.firejail =
# {
# enable = true;
# wrappedBinaries =
# {
# qq =
# {
# executable = "${inputs.pkgs.qq}/bin/qq";
# profile = "${inputs.pkgs.firejail}/etc/firejail/linuxqq.profile";
# };
# };
# };
# config.nixpkgs.config.replaceStdenv = { pkgs }: pkgs.ccacheStdenv;
# only replace stdenv for large and tested packages
# config.programs.ccache.packageNames = [ "webkitgtk" "libreoffice" "tensorflow" "linux" "chromium" ];
# config.nixpkgs.overlays = [(final: prev:
# {
# libreoffice-qt = prev.libreoffice-qt.override (prev: { unwrapped = prev.unwrapped.override
# (prev: { stdenv = final.ccacheStdenv.override { stdenv = prev.stdenv; }; }); });
# python3 = prev.python3.override { packageOverrides = python-final: python-prev:
# {
# tensorflow = python-prev.tensorflow.override
# { stdenv = final.ccacheStdenv.override { stdenv = python-prev.tensorflow.stdenv; }; };
# };};
# # webkitgtk = prev.webkitgtk.override (prev:
# # { stdenv = final.ccacheStdenv.override { stdenv = prev.stdenv; }; enableUnifiedBuilds = false; });
# wxGTK31 = prev.wxGTK31.override { stdenv = final.ccacheStdenv.override { stdenv = prev.wxGTK31.stdenv; }; };
# wxGTK32 = prev.wxGTK32.override { stdenv = final.ccacheStdenv.override { stdenv = prev.wxGTK32.stdenv; }; };
# # firefox-unwrapped = prev.firefox-unwrapped.override
# # { stdenv = final.ccacheStdenv.override { stdenv = prev.firefox-unwrapped.stdenv; }; };
# # chromium = prev.chromium.override
# # { stdenv = final.ccacheStdenv.override { stdenv = prev.chromium.stdenv; }; };
# # linuxPackages_xanmod_latest = prev.linuxPackages_xanmod_latest.override
# # {
# # kernel = prev.linuxPackages_xanmod_latest.kernel.override
# # {
# # stdenv = final.ccacheStdenv.override { stdenv = prev.linuxPackages_xanmod_latest.kernel.stdenv; };
# # buildPackages = prev.linuxPackages_xanmod_latest.kernel.buildPackages //
# # { stdenv = prev.linuxPackages_xanmod_latest.kernel.buildPackages.stdenv; };
# # };
# # };
# })];
# config.programs.ccache.packageNames = [ "libreoffice-unwrapped" ];
# cross-x86_64-pc-linux-musl/gcc
# dev-cpp/cpp-httplib ? how to use
# dev-cpp/cppcoro
# dev-cpp/date
# dev-cpp/nameof
# dev-cpp/scnlib
# dev-cpp/tgbot-cpp
# dev-libs/pocketfft
# dev-util/intel-hpckit
# dev-util/nvhpc
# kde-misc/wallpaper-engine-kde-plugin
# media-fonts/arphicfonts
# media-fonts/sarasa-gothic
# media-gfx/flameshot
# media-libs/libva-intel-driver
# media-libs/libva-intel-media-driver
# media-sound/netease-cloud-music
# net-vpn/frp
# net-wireless/bluez-tools
# sci-libs/mkl
# sci-libs/openblas
# sci-libs/pfft
# sci-libs/scalapack
# sci-libs/wannier90
# sci-mathematics/ginac
# sci-mathematics/mathematica
# sci-mathematics/octave
# sci-physics/lammps::touchfish-os
# sci-physics/vsim
# sci-visualization/scidavis
# sys-apps/flatpak
# sys-cluster/modules
# sys-devel/distcc
# sys-fs/btrfs-progs
# sys-fs/compsize
# sys-fs/dosfstools
# sys-fs/duperemove
# sys-fs/exfatprogs
# sys-fs/mdadm
# sys-fs/ntfs3g
# sys-kernel/dracut
# sys-kernel/linux-firmware
# sys-kernel/xanmod-sources
# sys-kernel/xanmod-sources:6.1.12
# sys-kernel/xanmod-sources::touchfish-os
# sys-libs/libbacktrace
# sys-libs/libselinux
# x11-apps/xinput
# x11-base/xorg-apps
# x11-base/xorg-fonts
# x11-base/xorg-server
# x11-misc/imwheel
# x11-misc/optimus-manager
# x11-misc/unclutter-xfixes
# ++ ( with inputs.pkgs.pkgsCross.mingwW64.buildPackages; [ gcc ] );

View File

@@ -0,0 +1,39 @@
inputs:
{
config =
let
inherit (inputs.lib) mkIf;
in mkIf (builtins.elem "desktop-fat" inputs.config.nixos.packages._packageSets)
{
nixos.users.sharedModules =
[{
config.programs.chromium =
{
enable = true;
extensions =
[
{ id = "mpkodccbngfoacfalldjimigbofkhgjn"; } # Aria2 Explorer
{ id = "nngceckbapebfimnlniiiahkandclblb"; } # Bitwarden
{ id = "kbfnbcaeplbcioakkpcpgfkobkghlhen"; } # Grammarly
{ id = "ihnfpdchjnmlehnoeffgcbakfmdjcckn"; } # Pixiv Fanbox Downloader
{ id = "cimiefiiaegbelhefglklhhakcgmhkai"; } # Plasma Integration
{ id = "dkndmhgdcmjdmkdonmbgjpijejdcilfh"; } # Powerful Pixiv Downloader
{ id = "padekgcemlokbadohgkifijomclgjgif"; } # Proxy SwitchyOmega
{ id = "kefjpfngnndepjbopdmoebkipbgkggaa"; } # RSSHub Radar
{ id = "abpdnfjocnmdomablahdcfnoggeeiedb"; } # Save All Resources
{ id = "nbokbjkabcmbfdlbddjidfmibcpneigj"; } # SmoothScroll
{ id = "onepmapfbjohnegdmfhndpefjkppbjkm"; } # SuperCopy 超级复制
{ id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } # uBlock Origin
{ id = "gppongmhjkpfnbhagpmjfkannfbllamg"; } # Wappalyzer
{ id = "hkbdddpiemdeibjoknnofflfgbgnebcm"; } # YouTube™ 双字幕
{ id = "ekhagklcjbdpajgpjgmbionohlpdbjgc"; } # Zotero Connector
{ id = "ikhdkkncnoglghljlkmcimlnlhkeamad"; } # 划词翻译
{ id = "dhdgffkkebhmkfjojejmpbldmpobfkfo"; } # 篡改猴
{ id = "hipekcciheckooncpjeljhnekcoolahp"; } # Tabliss
{ id = "nkbihfbeogaeaoehlefnkodbefgpgknn"; } # MetaMask
{ id = "bpoadfkcbjbfhfodiogcnhhhpibjhbnh"; } # 沉浸式翻译
];
};
}];
};
}

View File

@@ -0,0 +1,47 @@
inputs:
{
imports = inputs.localLib.mkModules
[
./chromium.nix
];
config =
let
inherit (inputs.lib) mkIf;
in mkIf (builtins.elem "desktop-fat" inputs.config.nixos.packages._packageSets)
{
nixos =
{
packages = with inputs.pkgs;
{
_packages =
[
# system management
etcher btrfs-assistant snapper-gui libsForQt5.qtstyleplugin-kvantum
# password and key management
yubikey-manager yubikey-manager-qt yubikey-personalization yubikey-personalization-gui bitwarden
# download
qbittorrent nur-xddxdd.baidupcs-go wgetpaste
# development
scrcpy weston cage openbox krita
# media
spotify yesplaymusic simplescreenrecorder imagemagick gimp netease-cloud-music-gtk vlc
# editor
localPackages.typora
# themes
orchis-theme plasma-overdose-kde-theme materia-kde-theme graphite-kde-theme arc-kde-theme materia-theme
# news
fluent-reader
# nix tools
deploy-rs.deploy-rs nixpkgs-fmt
# instant messager
element-desktop telegram-desktop discord fluffychat
# browser
google-chrome
# office
crow-translate zotero pandoc ydict
] ++ (with inputs.lib; filter isDerivation (attrValues plasma5Packages.kdeGear));
};
};
programs = { steam.enable = true; kdeconnect.enable = true; };
};
}

View File

@@ -0,0 +1,49 @@
inputs:
{
imports = inputs.localLib.mkModules [ ./vscode.nix ];
config =
let
inherit (inputs.lib) mkIf;
in mkIf (builtins.elem "desktop" inputs.config.nixos.packages._packageSets)
{
nixos =
{
packages._packages = with inputs.pkgs;
[
# system management
gparted wl-clipboard-x11 kio-fuse
wayland-utils clinfo glxinfo vulkan-tools dracut
# networking
remmina putty mtr-gui
# media
mpv nomacs
# themes
tela-circle-icon-theme
];
users.sharedModules =
[{
config.home.file.".config/baloofilerc".text =
''
[Basic Settings]
Indexing-Enabled=false
'';
}];
};
programs =
{
adb.enable = true;
wireshark = { enable = true; package = inputs.pkgs.wireshark; };
firefox = { enable = true; languagePacks = [ "zh-CN" "en-US" ]; };
vim.package = inputs.pkgs.vim-full;
};
nixpkgs.config.packageOverrides = pkgs:
{
telegram-desktop = pkgs.telegram-desktop.overrideAttrs (attrs:
{
patches = (if (attrs ? patches) then attrs.patches else []) ++ [ ./telegram.patch ];
});
};
services.pcscd.enable = true;
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/Telegram/SourceFiles/data/data_sponsored_messages.cpp b/Telegram/SourceFiles/data/data_sponsored_messages.cpp
index fa21af4..211f3bf 100644
--- a/Telegram/SourceFiles/data/data_sponsored_messages.cpp
+++ b/Telegram/SourceFiles/data/data_sponsored_messages.cpp
@@ -175,7 +175,7 @@ void SponsoredMessages::inject(
}
bool SponsoredMessages::canHaveFor(not_null<History*> history) const {
- return history->peer->isChannel();
+ return false;
}
void SponsoredMessages::request(not_null<History*> history, Fn<void()> done) {

View File

@@ -0,0 +1,57 @@
inputs:
{
config =
let
inherit (inputs.lib) mkIf;
in mkIf (builtins.elem "desktop" inputs.config.nixos.packages._packageSets)
{
nixos.packages = with inputs.pkgs;
{
_packages =
[(
vscode-with-extensions.override
{
vscodeExtensions = with nix-vscode-extensions.vscode-marketplace;
(with equinusocio; [ vsc-community-material-theme vsc-material-theme-icons ])
++ (with github; [ copilot copilot-chat github-vscode-theme ])
++ (with intellsmi; [ comment-translate deepl-translate ])
++ (with ms-python; [ isort python vscode-pylance ])
++ (with ms-toolsai;
[
jupyter jupyter-keymap jupyter-renderers vscode-jupyter-cell-tags vscode-jupyter-slideshow
])
++ (with ms-vscode;
[
cmake-tools cpptools cpptools-extension-pack cpptools-themes hexeditor remote-explorer
test-adapter-converter
])
++ (with ms-vscode-remote; [ remote-ssh remote-containers remote-ssh-edit ])
++ [
donjayamanne.githistory genieai.chatgpt-vscode fabiospampinato.vscode-diff cschlosser.doxdocgen
llvm-vs-code-extensions.vscode-clangd ms-ceintl.vscode-language-pack-zh-hans
oderwat.indent-rainbow
twxs.cmake guyutongxue.cpp-reference znck.grammarly thfriedrich.lammps leetcode.vscode-leetcode
james-yu.latex-workshop gimly81.matlab affenwiesel.matlab-formatter ckolkman.vscode-postgres
yzhang.markdown-all-in-one pkief.material-icon-theme bbenoist.nix ms-ossdata.vscode-postgresql
redhat.vscode-xml dotjoshjohnson.xml jnoortheen.nix-ide xdebug.php-debug
hbenl.vscode-test-explorer
jeff-hykin.better-cpp-syntax fredericbonnet.cmake-test-adapter mesonbuild.mesonbuild
hirse.vscode-ungit fortran-lang.linter-gfortran tboox.xmake-vscode ccls-project.ccls
feiskyer.chatgpt-copilot yukiuuh2936.vscode-modern-fortran-formatter wolframresearch.wolfram
njpipeorgan.wolfram-language-notebook brettm12345.nixfmt-vscode webfreak.debug
gruntfuggly.todo-tree
# restrctured text
lextudio.restructuredtext trond-snekvik.simple-rst
# markdown
shd101wyy.markdown-preview-enhanced
];
}
)];
_pythonPackages = [(pythonPackages: with pythonPackages;
[
# required by vscode extensions restrucuredtext
localPackages.esbonio
])];
};
};
}

View File

@@ -1,13 +0,0 @@
inputs:
{
config =
{
environment.systemPackages = [ inputs.config.nur.repos.ataraxiasjel.proton-ge inputs.pkgs.wine ];
programs =
{
anime-game-launcher.enable = true;
honkers-railway-launcher.enable = true;
steam.enable = true;
};
};
}

View File

@@ -1,112 +0,0 @@
inputs:
{
config =
{
environment.systemPackages = with inputs.pkgs;
[
( vscode-with-extensions.override
{
vscodeExtensions = (with vscode-extensions;
[
ms-vscode.cpptools
genieai.chatgpt-vscode
ms-ceintl.vscode-language-pack-zh-hans
llvm-vs-code-extensions.vscode-clangd
twxs.cmake
ms-vscode.cmake-tools
donjayamanne.githistory
github.copilot
github.github-vscode-theme
ms-vscode.hexeditor
oderwat.indent-rainbow
ms-toolsai.jupyter
ms-toolsai.vscode-jupyter-cell-tags
ms-toolsai.jupyter-keymap
ms-toolsai.jupyter-renderers
ms-toolsai.vscode-jupyter-slideshow
james-yu.latex-workshop
yzhang.markdown-all-in-one
pkief.material-icon-theme
equinusocio.vsc-material-theme
bbenoist.nix
ms-python.vscode-pylance
ms-python.python
ms-vscode-remote.remote-ssh
redhat.vscode-xml
dotjoshjohnson.xml
jnoortheen.nix-ide
])
++ (with nix-vscode-extensions.vscode-marketplace;
[
jeff-hykin.better-cpp-syntax
ms-vscode.cpptools-extension-pack
ms-vscode.cpptools-themes
josetr.cmake-language-support-vscode
fredericbonnet.cmake-test-adapter
equinusocio.vsc-community-material-theme
guyutongxue.cpp-reference
intellsmi.comment-translate
intellsmi.deepl-translate
ms-vscode-remote.remote-containers
fabiospampinato.vscode-diff
cschlosser.doxdocgen
znck.grammarly
ms-python.isort
thfriedrich.lammps
leetcode.vscode-leetcode
equinusocio.vsc-material-theme-icons
gimly81.matlab
affenwiesel.matlab-formatter
xdebug.php-debug
ckolkman.vscode-postgres
ms-ossdata.vscode-postgresql
ms-vscode-remote.remote-ssh-edit
ms-vscode.remote-explorer
ms-vscode.test-adapter-converter
hbenl.vscode-test-explorer
hirse.vscode-ungit
fortran-lang.linter-gfortran
]);
} )
qbittorrent # tunder
gparted snapper-gui
firefox google-chrome
zotero texlive.combined.scheme-full libreoffice-qt
element-desktop tdesktop discord
# jail
qq nur-xddxdd.wechat-uos inputs.config.nur.repos.linyinfeng.wemeet
# nur-xddxdd.wine-wechat
nur-xddxdd.baidupcs-go
remmina
bitwarden
spotify yesplaymusic
crow-translate
scrcpy
mpv nur-xddxdd.svp
jetbrains.clion android-studio
localPackages.typora
yubikey-manager yubikey-manager-qt yubikey-personalization yubikey-personalization-gui
appflowy
nomacs
putty virt-viewer
wl-clipboard-x11 parallel lsof duperemove mlocate kmscon hdparm bat gnuplot whois zoom traceroute tcping-go
tcpdump nmap mtr-gui simplescreenrecorder obs-studio
signal-desktop dbeaver ftxui yaml-cpp wl-mirror poppler_utils imagemagick
]
++ (with inputs.lib; filter isDerivation (attrValues inputs.pkgs.plasma5Packages.kdeGear));
programs.wireshark = { enable = true; package = inputs.pkgs.wireshark; };
nixpkgs.config = { permittedInsecurePackages = [ "openssl-1.1.1u" "electron-19.0.7" ]; allowUnfree = true; };
# programs.firejail =
# {
# enable = true;
# wrappedBinaries =
# {
# qq =
# {
# executable = "${inputs.pkgs.qq}/bin/qq";
# profile = "${inputs.pkgs.firejail}/etc/firejail/linuxqq.profile";
# };
# };
# };
};
}

View File

@@ -1,80 +0,0 @@
inputs:
{
config.environment.systemPackages =
(
with inputs.pkgs;
[
ovito paraview localPackages.vesta # vsim
(python3.withPackages (ps: with ps;
[
phonopy inquirerpy requests tqdm tensorflow keras python-telegram-bot
localPackages.upho localPackages.spectral
]))
mathematica octave root cling gfortran
qchem.quantum-espresso
waifu2x-converter-cpp
]
)
++ ( with inputs.pkgs.pkgsCross.mingwW64.buildPackages; [ gcc ] );
config.programs.ccache.enable = true;
config.nix.settings.extra-sandbox-paths = [ inputs.config.programs.ccache.cacheDir ];
config.nixpkgs.config.replaceStdenv = { pkgs }: pkgs.ccacheStdenv;
# only replace stdenv for large and tested packages
# config.programs.ccache.packageNames = [ "webkitgtk" "libreoffice" "tensorflow" "linux" "chromium" ];
}
# cross-x86_64-pc-linux-musl/gcc
# dev-cpp/cpp-httplib ? how to use
# dev-cpp/cppcoro
# dev-cpp/date
# dev-cpp/nameof
# dev-cpp/scnlib
# dev-cpp/tgbot-cpp
# dev-libs/pocketfft
# dev-util/intel-hpckit
# dev-util/nvhpc
# kde-misc/wallpaper-engine-kde-plugin
# media-fonts/arphicfonts
# media-fonts/sarasa-gothic
# media-gfx/flameshot
# media-libs/libva-intel-driver
# media-libs/libva-intel-media-driver
# media-sound/netease-cloud-music
# net-vpn/frp
# net-wireless/bluez-tools
# sci-libs/mkl
# sci-libs/openblas
# sci-libs/pfft
# sci-libs/scalapack
# sci-libs/wannier90
# sci-mathematics/ginac
# sci-mathematics/mathematica
# sci-mathematics/octave
# sci-physics/lammps::touchfish-os
# sci-physics/vsim
# sci-visualization/scidavis
# sys-apps/flatpak
# sys-cluster/modules
# sys-devel/distcc
# sys-fs/btrfs-progs
# sys-fs/compsize
# sys-fs/dosfstools
# sys-fs/duperemove
# sys-fs/exfatprogs
# sys-fs/mdadm
# sys-fs/ntfs3g
# sys-kernel/dracut
# sys-kernel/linux-firmware
# sys-kernel/xanmod-sources
# sys-kernel/xanmod-sources:6.1.12
# sys-kernel/xanmod-sources::touchfish-os
# sys-libs/libbacktrace
# sys-libs/libselinux
# x11-apps/xinput
# x11-base/xorg-apps
# x11-base/xorg-fonts
# x11-base/xorg-server
# x11-misc/imwheel
# x11-misc/optimus-manager
# x11-misc/unclutter-xfixes

View File

@@ -0,0 +1,133 @@
inputs:
{
imports = inputs.localLib.mkModules
[
./ssh
./zsh
];
config =
let
inherit (inputs.lib) mkIf;
inherit (builtins) concatLists map listToAttrs;
inherit (inputs.localLib) attrsToList;
in mkIf (builtins.elem "server" inputs.config.nixos.packages._packageSets)
{
nixos =
{
packages = with inputs.pkgs;
{
_packages =
[
# shell
ksh
# basic tools
beep dos2unix gnugrep pv tmux screen parallel tldr cowsay jq zellij neofetch ipfetch localPackages.pslist
fastfetch reptyr
# lsxx
pciutils usbutils lshw util-linux lsof
# top
iotop iftop htop btop powertop s-tui
# editor
nano bat
# downloader
wget aria2 curl yt-dlp
# file manager
tree eza trash-cli lsd broot file xdg-ninja mlocate
# compress
pigz rar upx unzip zip lzip p7zip
# file system management
sshfs e2fsprogs adb-sync duperemove compsize exfatprogs
# disk management
smartmontools hdparm
# encryption and authentication
apacheHttpd openssl ssh-to-age gnupg age sops pam_u2f yubico-piv-tool
# networking
ipset iptables iproute2 dig nettools traceroute tcping-go whois tcpdump nmap inetutils wireguard-tools
# nix tools
nix-output-monitor nix-tree ssh-to-age
# office
todo-txt-cli
# development
gdb try inputs.topInputs.plasma-manager.packages.x86_64-linux.rc2nix hexo-cli
] ++ (with inputs.config.boot.kernelPackages; [ cpupower usbip ]);
};
users.sharedModules = [(home-inputs:
{
config.programs =
{
direnv = { enable = true; nix-direnv.enable = true; };
git =
{
enable = true;
lfs.enable = true;
extraConfig =
{
core.editor = if inputs.config.nixos.system.gui.preferred then "code --wait" else "vim";
advice.detachedHead = false;
merge.conflictstyle = "diff3";
diff.colorMoved = "default";
};
package = inputs.pkgs.gitFull;
delta =
{
enable = true;
options =
{
side-by-side = true;
navigate = true;
syntax-theme = "GitHub";
light = true;
zero-style = "syntax white";
line-numbers-zero-style = "#ffffff";
};
};
};
vim =
{
enable = true;
defaultEditor = true;
packageConfigurable = inputs.config.programs.vim.package;
settings =
{
number = true;
expandtab = false;
shiftwidth = 2;
tabstop = 2;
};
extraConfig =
''
set clipboard=unnamedplus
colorscheme evening
'';
};
};
})];
};
programs =
{
nix-index-database.comma.enable = true;
nix-index.enable = true;
command-not-found.enable = false;
autojump.enable = true;
git =
{
enable = true;
package = inputs.pkgs.gitFull;
lfs.enable = true;
config =
{
init.defaultBranch = "main";
core = { quotepath = false; editor = "vim"; };
};
};
yazi.enable = true;
mosh.enable = true;
};
services =
{
fwupd.enable = true;
udev.packages = with inputs.pkgs; [ yubikey-personalization libfido2 ];
};
home-manager = { useGlobalPkgs = true; useUserPackages = true; };
};
}

View File

@@ -0,0 +1,168 @@
inputs:
{
config =
let
inherit (inputs.lib) mkIf;
inherit (builtins) concatLists map listToAttrs;
inherit (inputs.localLib) attrsToList;
in mkIf (builtins.elem "server" inputs.config.nixos.packages._packageSets)
{
services.openssh.knownHosts =
let
servers =
{
vps6 =
{
ed25519 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO5ZcvyRyOnUCuRtqrM/Qf+AdUe3a5bhbnfyhw2FSLDZ";
hostnames = [ "vps6.chn.moe" "wireguard.vps6.chn.moe" "74.211.99.69" "192.168.83.1" ];
};
"initrd.vps6" =
{
ed25519 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB4DKB/zzUYco5ap6k9+UxeO04LL12eGvkmQstnYxgnS";
hostnames = [ "initrd.vps6.chn.moe" "74.211.99.69" ];
};
vps7 =
{
ed25519 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF5XkdilejDAlg5hZZD0oq69k8fQpe9hIJylTo/aLRgY";
hostnames = [ "vps7.chn.moe" "wireguard.vps7.chn.moe" "ssh.git.chn.moe" "95.111.228.40" "192.168.83.2" ];
};
"initrd.vps7" =
{
ed25519 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGZyQpdQmEZw3nLERFmk2tS1gpSvXwW0Eish9UfhrRxC";
hostnames = [ "initrd.vps7.chn.moe" "95.111.228.40" ];
};
nas =
{
ed25519 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIktNbEcDMKlibXg54u7QOLt0755qB/P4vfjwca8xY6V";
hostnames = [ "wireguard.nas.chn.moe" "[office.chn.moe]:5440" "192.168.1.185" "192.168.83.4" ];
};
"initrd.nas" =
{
ed25519 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAoMu0HEaFQsnlJL0L6isnkNZdRq0OiDXyaX3+fl3NjT";
hostnames = [ "initrd.nas.chn.moe" "[office.chn.moe]:5440" "192.168.1.185" ];
};
pc =
{
ed25519 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMSfREi19OSwQnhdsE8wiNwGSFFJwNGN0M5gN+sdrrLJ";
hostnames = [ "wireguard.pc.chn.moe" "192.168.83.3" ];
};
hpc =
{
ed25519 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDVpsQW3kZt5alHC6mZhay3ZEe2fRGziG4YJWCv2nn/O";
hostnames = [ "hpc.xmu.edu.cn" ];
};
github =
{
ed25519 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl";
hostnames = [ "github.com" ];
};
};
in listToAttrs (concatLists (map
(server:
(
if builtins.pathExists ./ssh/${server.name}_rsa.pub then
[{
name = "${server.name}-rsa";
value =
{
publicKey = builtins.readFile ./ssh/${server.name}_rsa.pub;
hostNames = server.value.hostnames;
};
}]
else []
)
++ (
if builtins.pathExists ./ssh/${server.name}_ecdsa.pub then
[{
name = "${server.name}-ecdsa";
value =
{
publicKey = builtins.readFile ./ssh/${server.name}_ecdsa.pub;
hostNames = server.value.hostnames;
};
}]
else []
)
++ (
if server.value ? ed25519 then
[{
name = "${server.name}-ed25519";
value =
{
publicKey = server.value.ed25519;
hostNames = server.value.hostnames;
};
}]
else []
))
(attrsToList servers)));
programs.ssh =
{
startAgent = true;
enableAskPassword = true;
askPassword = "${inputs.pkgs.systemd}/bin/systemd-ask-password";
extraConfig = "AddKeysToAgent yes";
};
nixos.users.sharedModules =
[(hmInputs: {
config.programs.ssh =
{
enable = true;
controlMaster = "auto";
controlPersist = "1m";
compression = true;
matchBlocks = builtins.listToAttrs
(
(builtins.map
(host: { name = host; value = { inherit host; hostname = "${host}.chn.moe"; }; })
[ "vps6" "wireguard.vps6" "vps7" "wireguard.vps7" "wireguard.pc" "wireguard.nas" ])
++ (builtins.map
(host:
{
name = host;
value =
{
host = host;
hostname = "hpc.xmu.edu.cn";
user = host;
extraOptions =
{
PubkeyAcceptedAlgorithms = "+ssh-rsa";
HostkeyAlgorithms = "+ssh-rsa";
SetEnv =
let
usernameMap =
{
chn = "linwei/chn";
};
cdString =
if host == "jykang" && (usernameMap ? ${hmInputs.config.home.username}) then
":chn_cd:${usernameMap.${hmInputs.config.home.username}}"
else "";
in "TERM=chn_unset_ls_colors${cdString}:xterm-256color";
# in .bash_profile:
# if [[ $TERM == chn_unset_ls_colors* ]]; then
# export TERM=${TERM#*:}
# export CHN_LS_USE_COLOR=1
# fi
# if [[ $TERM == chn_cd* ]]; then
# export TERM=${TERM#*:}
# cd ~/${TERM%%:*}
# export TERM=${TERM#*:}
# fi
# in .bashrc
# [ -n "$CHN_LS_USE_COLOR" ] && alias ls="ls --color=auto"
};
};
})
[ "wlin" "jykang" "hwang" ])
)
// {
xmupc1 = { host = "xmupc1"; hostname = "office.chn.moe"; port = 6007; };
nas = { host = "nas"; hostname = "office.chn.moe"; port = 5440; };
gitea = { host = "gitea"; hostname = "ssh.git.chn.moe"; };
};
};
})];
};
}

View File

@@ -0,0 +1 @@
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=

View File

@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=

View File

@@ -0,0 +1 @@
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDkkl7A9kWWBoi4b5g6Vus70ja1KhPfcZZjeU1/QbYdN8PRRw/hsGklrhefslKRbym/TMFS0ko0g5WUi9G5vbGw=

View File

@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDgs8MvV2nczjGMZ548tuAhgvCEd4uHu0VhLDSwQG7Nh/UR4Pgc5T9Nf7Vfwg96Lah/pwD5my4RaWis6bLMmlkYyDBKFBOsGYQUe5J5XfZdxk8pz+7L0Hq6gPfAZAdNlUiuFVKsvkE+NF42NgJyXSYQicPbu5LQiFwZGXlW20+LO8uBQ1y1xabKVpg8XGwordduL99VepwEzeLK/st+UVfW+mKgxkf9TuxvD2fuYIDZM7y2rXqcjf4/6OXA5kACsYK1MgZSFxgO/m6+1uCC1qBDseMTA3D+Tsjf9VtcqUE9dMd/dJ/uuILHJ0+oIqkykTCecPLgJY3Vh8rAtln/lbId

View File

@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC0+xafJMnOGCHv6OLljaq8iJ3ZBaIezv7AJ9rVWJXFg/QJRYBwct35c4zaVom7If8F+Ss+BTLMp33HZ8gLpoat6LkjARjy65Ycog3NOnEposX2JjZEYXDbovxEmcJkDXAIVmnaBUi3r22z4UI8OqsHPeRXj017O0yQrQQYEAw/IO/tSNQZt2k8JHxAX50UTqGFdgkriO1fYHBocq48m0nn3sXrMuM3yBe5zy3NngOHxMn7UxjECmAElsuu/nu1x083pRnv5NSa+JxDGJ+S6Zhj3nGGNwZesa51I4cJjsYLxgmO/NxL1J86bDp6HhK9C9799ruG60pGTw6HcvbKTgx7klUgn4936wsy7qukWqp53MvqrLSJkRb/HHU9zZqvzcjbwet+Iv1OAAok5QC88j7Jgenk3nbZw4BNFd2r/8rOZuXheDnMKOa61dXxnvoAO3Euk0RPdZqW1slT/DDyD/kB6TPY7yOywNURNnrwzfSsmravKi6bGA5t2Ehhpf2LETM=

View File

@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDOyU7VvusseL2tDp7JkIXKGxRGQNHpYWVAPraUj17Xls7Z9e7HO6+GBiGP+bB9tZbzsoTNGHdXg8VaJmf98QAhhg0FcUb6IvWmfmPWzQ0MC8L+USqdDpaH7s9SOZF/yveNYCR5GOMmFdSW4OPVYIOrjPltDIe5S1SN2nOXvjxbLmuoMjg+5U4F0ii0ZaCRuMVDskeift+Amxe7iRnSzeDbECd0rJhaUb8gf3shz0Hp9lRUMej7cJH8LLP3m0s3Vk+kasKntz18MpJ6/3n+fR2aK75qkcq9FZaFA4tSIabh9eKoxlRCy7g8Qj6nNStW+ys/a1UYBFgAoTyE7e47o3dpcxR5oMLbeDwhOstWL0YOjEH1K5Wyj3eEOT71C6kuQBPcCJQ9q9hknRpW0mWe9Q6qaAzTgE9LLssijr/yTfYQk7zKEyo0i4f6buOfmyYZfnzfnCB3LiJKa98TVEEzrKYHIO44LwIkNf/YHOMDknzjYpav6HfDy+AebRHZFYhGax1YP/tP0Ve/FSq5rh6Vwuqa/zyfFUPZmZVf+EYXK7DdyuBhEZhBEu6QrjY60NRMTMLpnUZMcZXRAz9byMpAGcCYQv6gjU99ps8AkRjZNkn+FpAtDGT+oJxixQwyZMSxZ+ZuzkZGyBMeMplZXMMLICGZ2LRAgT0bxXLZUxHJBLwwnw==

View File

@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDYiP+ELuG5KTmafVjBkY0ZSggJg+mDkvZpF8d7NljMst0YwKWV3IgHnkAGXdTd7jlRgm9HH6oc8rP2R6Q8EJmfr+xcL1IQIWKuYAoddHlpe2Ds4EE74xbgm5Elf7FpdYNHUH9XyVmMmIhVSpLw2N10jUhvYqw+h+xC2nObEKZuBOt/lqrTGbC/EMv3+sDv0ApBh8lKt2yfjt88pnAj1LKPANDgIYSyQOllHQWeUY/eD/5Qc9XWR3uWclslVaxriRmEA0sNZlOFCeRIyDbYpSzQBdcnojkwt7Z5kjhaqGlT9g00fdiqO0OMaeY/G8ki3QxqjONqTEDqK+DpEZFO6jyZARcY6ki0ANc0AO4qosEC3gEbAvVwyPwDFtyDggMTHlTzaw8iakMGSDEk10zKaUOgZYLzC2yCWYYQS5mae9wC1gkXIGD51/laeq2E7NpM+nha6kp9weLVyvwf0DLfwsiP+0qlCLrxBLTSRa0HQ+BnQMi4r16Ss7YJwLf/oXrbOVk=

View File

@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDFwb7qi9/DvhpMvu43LRlTEC+3kPAA0KNeyk4FT4HlpRE/yxMxN6tgrP9vcx2c6TMfkRwIJKDcBuVVtKOVx+SDZo+nQBxpSz73v1qSmqlsy8D4gCk0a7cLgStb3Cvh0UZjJ5nVnxjzqY2CFnpnKYGmxL+a3qTj1KYPuA2wSsxkYVcHUfDj/uTtEDdRPaNTACsUxe1a57T/Tsjp+321+zKldYreozaABEBsexf9Z34+3vZvyQcfDB3QuxlBRPJBLik80QllpNpE1bqol8swoGEPbl/Ac7tNy+GtlwTG9SH1povmoT9K+8tjJaG2pD+z+vvgZQtJQh+aczYmEBJRZp3ksw1JH4eGqTWG/SDat9Isnx2NDhJe12b9izniDciuBScNySAazIDPidsCMUYjc9kgWdSOiODOtodj5IB+KazFVJgfpmzPv97LHVdjvR74usrgbFw2mYCw2YEiL3xjDYpQGmXSNklsQLwJiBe59oyS4QNpNYQzYD9StjgRIdvtmiM=

View File

@@ -0,0 +1,78 @@
inputs:
{
config =
let
inherit (inputs.lib) mkIf;
in mkIf (builtins.elem "server" inputs.config.nixos.packages._packageSets)
{
nixos.users.sharedModules = [(home-inputs: { config.programs.zsh =
{
enable = true;
initExtraBeforeCompInit =
''
# p10k instant prompt
P10K_INSTANT_PROMPT="$XDG_CACHE_HOME/p10k-instant-prompt-''${(%):-%n}.zsh"
[[ ! -r "$P10K_INSTANT_PROMPT" ]] || source "$P10K_INSTANT_PROMPT"
HYPHEN_INSENSITIVE="true"
export PATH=~/bin:$PATH
function br
{
local cmd cmd_file code
cmd_file=$(mktemp)
if broot --outcmd "$cmd_file" "$@"; then
cmd=$(<"$cmd_file")
command rm -f "$cmd_file"
eval "$cmd"
else
code=$?
command rm -f "$cmd_file"
return "$code"
fi
}
alias todo="todo.sh"
'';
plugins =
[
{
file = "powerlevel10k.zsh-theme";
name = "powerlevel10k";
src = "${inputs.pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k";
}
{
file = "p10k.zsh";
name = "powerlevel10k-config";
src = ./p10k-config;
}
{
name = "zsh-lsd";
src = inputs.pkgs.fetchFromGitHub
{
owner = "z-shell";
repo = "zsh-lsd";
rev = "65bb5ac49190beda263aae552a9369127961632d";
hash = "sha256-JSNsfpgiqWhtmGQkC3B0R1Y1QnDKp9n0Zaqzjhwt7Xk=";
};
}
];
history =
{
path = "${home-inputs.config.xdg.dataHome}/zsh/zsh_history";
extended = true;
save = 100000000;
size = 100000000;
};
};})];
programs.zsh =
{
enable = true;
syntaxHighlighting.enable = true;
autosuggestions.enable = true;
enableCompletion = true;
ohMyZsh =
{
enable = true;
plugins = [ "git" "colored-man-pages" "extract" "history-substring-search" "autojump" ];
};
};
};
}

View File

@@ -33,7 +33,9 @@
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
# =========================[ Line #1 ]=========================
os_icon # os identifier
context # user@hostname
dir # current directory
vcs # git status
# =========================[ Line #2 ]=========================
newline # \n
# prompt_char # prompt symbol
@@ -48,7 +50,6 @@
status # exit code of the last command
command_execution_time # duration of the last command
background_jobs # presence of background jobs
vcs # git status
direnv # direnv status (https://direnv.net/)
asdf # asdf version manager (https://github.com/asdf-vm/asdf)
virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html)
@@ -82,7 +83,6 @@
azure # azure account name (https://docs.microsoft.com/en-us/cli/azure)
gcloud # google cloud cli account and project (https://cloud.google.com/)
google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production)
context # user@hostname
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
ranger # ranger shell (https://github.com/ranger/ranger)
nnn # nnn shell (https://github.com/jarun/nnn)
@@ -855,7 +855,7 @@
#
# These variables correspond to the last line of the output of `todo.sh -p ls`:
#
# TODO: 24 of 42 tasks shown
# TO DO: 24 of 42 tasks shown
#
# Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT.
#
@@ -1686,7 +1686,7 @@
# - verbose: Enable instant prompt and print a warning when detecting console output during
# zsh initialization. Choose this if you've never tried instant prompt, haven't
# seen the warning, or if you are unsure what this all means.
typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose
typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet
# Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized.
# For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload

View File

@@ -1,61 +0,0 @@
inputs:
{
config =
{
environment.systemPackages = with inputs.pkgs;
[
beep neofetch screen dos2unix tldr gnugrep pv
pciutils usbutils lshw powertop compsize iotop iftop smartmontools htop intel-gpu-tools btop wayland-utils clinfo
glxinfo vulkan-tools
ksh
vim nano
wget aria2 curl yt-dlp
tree git autojump exa
nix-output-monitor inputs.topInputs.nix-alien.packages.x86_64-linux.nix-alien nix-template
apacheHttpd certbot-full
pigz rar unrar upx unzip zip lzip
util-linux snapper
ocrmypdf pdfgrep
openssl ssh-to-age gnupg age sops
ipset iptables iproute2 dig nettools
gcc clang-tools
sshfs kio-fuse
pam_u2f
e2fsprogs
trash-cli tmux adb-sync pdfchain wgetpaste httplib clang magic-enum xtensor
go rustc boost cereal cxxopts valgrind
lsd zellij broot
nil
];
programs =
{
nix-index-database.comma.enable = true;
nix-index.enable = true;
command-not-found.enable = false;
zsh =
{
enable = true;
syntaxHighlighting.enable = true;
autosuggestions.enable = true;
enableCompletion = true;
ohMyZsh =
{
enable = true;
plugins = [ "git" "colored-man-pages" "extract" "history-substring-search" "autojump" ];
customPkgs = with inputs.pkgs; [ zsh-nix-shell ];
};
};
adb.enable = true;
gnupg.agent =
{
enable = true;
enableSSHSupport = true;
};
};
services =
{
fwupd.enable = true;
udev.packages = [ inputs.pkgs.yubikey-personalization ];
};
};
}

View File

@@ -0,0 +1,104 @@
inputs:
{
config =
let
inherit (inputs.lib) mkIf;
in mkIf (builtins.elem "workstation" inputs.config.nixos.packages._packageSets)
{
nixos =
{
packages = with inputs.pkgs;
{
_packages =
[
# password and key management
electrum jabref
# system management
wl-mirror ventoy-full
# nix tools
nix-template appimage-run nil nixd nix-alien nix-serve node2nix nix-prefetch-github prefetch-npm-deps
nix-prefetch-docker pnpm-lock-export bundix
# instant messager
zoom-us signal-desktop qq nur-xddxdd.wechat-uos slack inputs.config.nur.repos.linyinfeng.wemeet
cinny-desktop nheko
# office
libreoffice-qt texstudio poppler_utils pdftk gnuplot pdfchain hdfview
(texlive.combine { inherit (texlive) scheme-full; inherit (localPackages) citation-style-language; })
# development
jetbrains.clion android-studio dbeaver cling clang-tools_16 ccls fprettify aircrack-ng
# media
nur-xddxdd.svp obs-studio waifu2x-converter-cpp inkscape blender
# virtualization
wineWowPackages.stagingFull virt-viewer bottles # wine64
# text editor
appflowy notion-app-enhanced joplin-desktop standardnotes logseq
# math, physics and chemistry
mathematica octaveFull root ovito paraview localPackages.vesta qchem.quantum-espresso
localPackages.vasp localPackages.vaspkit jmol localPackages.v_sim
# encryption and password management
john crunch hashcat
# container and vm
genymotion # davinci-resolve playonlinux
# browser
microsoft-edge
# news
rssguard newsflash newsboat
];
_pythonPackages = [(pythonPackages: with pythonPackages;
[
phonopy tensorflow keras openai scipy scikit-learn jupyterlab autograd
# localPackages.pix2tex
inquirerpy requests python-telegram-bot tqdm fastapi pypdf2 pandas matplotlib plotly gunicorn redis jinja2
certifi charset-normalizer idna orjson psycopg2 localPackages.eigengdb
])];
_prebuildPackages =
[
httplib magic-enum xtensor boost cereal cxxopts ftxui yaml-cpp gfortran gcc10 python2
gcc13Stdenv
];
};
users.sharedModules =
[{
config.programs =
{
obs-studio =
{
enable = true;
plugins = with inputs.pkgs.obs-studio-plugins;
[ wlrobs obs-vaapi obs-nvfbc droidcam-obs obs-vkcapture ];
};
doom-emacs = { enable = true; doomPrivateDir = ./doom.d; };
};
}];
};
programs =
{
anime-game-launcher = { enable = true; package = inputs.pkgs.anime-game-launcher; };
honkers-railway-launcher = { enable = true; package = inputs.pkgs.honkers-railway-launcher; };
nix-ld.enable = true;
gamemode =
{
enable = true;
settings =
{
general.renice = 10;
gpu =
{
apply_gpu_optimisations = "accept-responsibility";
nv_powermizer_mode = 1;
};
custom = let notify-send = "${inputs.pkgs.libnotify}/bin/notify-send"; in
{
start = "${notify-send} 'GameMode started'";
end = "${notify-send} 'GameMode ended'";
};
};
};
chromium =
{
enable = true;
extraOpts.PasswordManagerEnabled = false;
};
};
};
}

View File

@@ -0,0 +1,191 @@
;;; init.el -*- lexical-binding: t; -*-
;; This file controls what Doom modules are enabled and what order they load
;; in. Remember to run 'doom sync' after modifying it!
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
;; documentation. There you'll find a "Module Index" link where you'll find
;; a comprehensive list of Doom's modules and what flags they support.
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
;; 'C-c c k' for non-vim users) to view its documentation. This works on
;; flags as well (those symbols that start with a plus).
;;
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
;; directory (for easy access to its source code).
(doom! :input
;;chinese
;;japanese
;;layout ; auie,ctsrnm is the superior home row
:completion
company ; the ultimate code completion backend
;;helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine...
;;ivy ; a search engine for love and life
vertico ; the search engine of the future
:ui
;;deft ; notational velocity for Emacs
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs
doom-quit ; DOOM quit-message prompts when you quit Emacs
;;(emoji +unicode) ; 🙂
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra
;;indent-guides ; highlighted indent columns
;;ligatures ; ligatures and symbols to make your code pretty again
;;minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API
;;nav-flash ; blink cursor line after big motions
;;neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows
;;tabs ; a tab bar for Emacs
;;treemacs ; a project drawer, like neotree but cooler
;;unicode ; extended unicode support for various languages
vc-gutter ; vcs diff in the fringe
vi-tilde-fringe ; fringe tildes to mark beyond EOB
;;window-select ; visually switch windows
workspaces ; tab emulation, persistence & separate workspaces
;;zen ; distraction-free coding or writing
:editor
(evil +everywhere); come to the dark side, we have cookies
file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding
;;(format +onsave) ; automated prettiness
;;god ; run Emacs commands without modifier keys
;;lispy ; vim for lisp, for people who don't like vim
;;multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent
;;parinfer ; turn lisp into python, sort of
;;rotate-text ; cycle region at point between text candidates
snippets ; my elves. They type so I don't have to
;;word-wrap ; soft wrapping with language-aware indent
:emacs
dired ; making dired pretty [functional]
electric ; smarter, keyword-based electric-indent
;;ibuffer ; interactive buffer management
undo ; persistent, smarter undo for your inevitable mistakes
vc ; version-control and Emacs, sitting in a tree
:term
;;eshell ; the elisp shell that works everywhere
;;shell ; simple shell REPL for Emacs
;;term ; basic terminal emulator for Emacs
;;vterm ; the best terminal emulation in Emacs
:checkers
syntax ; tasing you for every semicolon you forget
;;(spell +flyspell) ; tasing you for misspelling mispelling
;;grammar ; tasing grammar mistake every you make
:tools
;;ansible
;;biblio ; Writes a PhD for you (citation needed)
;;debugger ; FIXME stepping through code, to help you add bugs
;;direnv
;;docker
;;editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls)
;;gist ; interacting with github gists
lookup ; navigate your code and its documentation
;;lsp ; M-x vscode
magit ; a git porcelain for Emacs
;;make ; run make tasks from Emacs
;;pass ; password manager for nerds
;;pdf ; pdf enhancements
;;prodigy ; FIXME managing external services & code builders
;;rgb ; creating color strings
;;taskrunner ; taskrunner for all your projects
;;terraform ; infrastructure as code
;;tmux ; an API for interacting with tmux
;;upload ; map local to remote projects via ssh/ftp
:os
(:if IS-MAC macos) ; improve compatibility with macOS
;;tty ; improve the terminal Emacs experience
:lang
;;agda ; types of types of types of types...
;;beancount ; mind the GAAP
;;cc ; C > C++ == 1
;;clojure ; java with a lisp
;;common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs
;;crystal ; ruby at the speed of c
;;csharp ; unity, .NET, and mono shenanigans
;;data ; config/data formats
;;(dart +flutter) ; paint ui and not much else
;;dhall
;;elixir ; erlang done right
;;elm ; care for a cup of TEA?
emacs-lisp ; drown in parentheses
;;erlang ; an elegant language for a more civilized age
;;ess ; emacs speaks statistics
;;factor
;;faust ; dsp, but you get to keep your soul
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
;;fsharp ; ML stands for Microsoft's Language
;;fstar ; (dependent) types and (monadic) effects and Z3
;;gdscript ; the language you waited for
;;(go +lsp) ; the hipster dialect
;;(haskell +lsp) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python
;;idris ; a language you can depend on
;;json ; At least it ain't XML
;;(java +meghanada) ; the poster child for carpal tunnel syndrome
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script)
;;latex ; writing papers in Emacs has never been so fun
;;lean ; for folks with too much to prove
;;ledger ; be audit you can be
;;lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c
;;nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
org ; organize your plain life in plain text
;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
;;python ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6
;;rest ; Emacs as a REST client
;;rst ; ReST in peace
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good
;;(scheme +guile) ; a fully conniving family of lisps
sh ; she sells {ba,z,fi}sh shells on the C xor
;;sml
;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance.
;;web ; the tubes
;;yaml ; JSON, but readable
;;zig ; C, but simpler
:email
;;(mu4e +org +gmail)
;;notmuch
;;(wanderlust +gmail)
:app
;;calendar
;;emms
;;everywhere ; *leave* Emacs!? You must be joking
;;irc ; how neckbeards socialize
;;(rss +org) ; emacs as an RSS reader
;;twitter ; twitter client https://twitter.com/vnought
:config
;;literate
(default +bindings +smartparens))

46
modules/services/acme.nix Normal file
View File

@@ -0,0 +1,46 @@
inputs:
{
options.nixos.services.acme = let inherit (inputs.lib) mkOption types; in
{
enable = mkOption { type = types.bool; default = false; };
cert = mkOption
{
type = types.attrsOf (types.submodule (submoduleInputs: { options =
{
domains = mkOption
{ type = types.nonEmptyListOf types.nonEmptyStr; default = [ submoduleInputs.config._module.args.name ]; };
group = mkOption { type = types.nullOr types.nonEmptyStr; default = null; };
};}));
default = {};
};
};
config =
let
inherit (inputs.lib) mkIf;
inherit (inputs.config.nixos.services) acme;
inherit (builtins) map listToAttrs;
inherit (inputs.localLib) attrsToList;
in mkIf acme.enable
{
security.acme =
{
acceptTerms = true;
defaults.email = "chn@chn.moe";
certs = listToAttrs (map
(cert:
{
name = builtins.elemAt cert.value.domains 0;
value =
{
dnsResolver = "8.8.8.8";
dnsProvider = "cloudflare";
credentialsFile = inputs.config.sops.secrets."acme/cloudflare.ini".path;
extraDomainNames = builtins.tail cert.value.domains;
group = mkIf (cert.value.group != null) cert.value.group;
};
})
(attrsToList acme.cert));
};
sops.secrets."acme/cloudflare.ini" = {};
};
}

View File

@@ -0,0 +1,51 @@
inputs:
{
options.nixos.services.akkoma = let inherit (inputs.lib) mkOption types; in
{
enable = mkOption { type = types.bool; default = false; };
hostname = mkOption { type = types.str; default = "akkoma.chn.moe"; };
};
config =
let
inherit (inputs.config.nixos.services) akkoma;
inherit (inputs.lib) mkIf;
in mkIf akkoma.enable
{
services.akkoma =
{
enable = true;
config.":pleroma" =
{
"Pleroma.Web.Endpoint".url.host = akkoma.hostname;
"Pleroma.Repo" =
{
adapter = (inputs.pkgs.formats.elixirConf { }).lib.mkRaw "Ecto.Adapters.Postgres";
hostname = "127.0.0.1";
username = "akkoma";
password._secret = inputs.config.sops.secrets."akkoma/db".path;
database = "akkoma";
};
":instance" =
{
name = "";
email = "grass@grass.squre";
description = "";
};
};
};
nixos.services =
{
nginx =
{
enable = true;
https."${akkoma.hostname}" =
{
global.tlsCert = "/var/lib/akkoma";
location."/".proxy = { upstream = "http://127.0.0.1:4000"; websocket = true; };
};
};
postgresql.instances.akkoma = {};
};
sops.secrets."akkoma/db" = { owner = "akkoma"; key = "postgresql/akkoma"; };
};
}

View File

@@ -0,0 +1,47 @@
inputs:
{
options.nixos.services.beesd = let inherit (inputs.lib) mkOption types; in
{
enable = mkOption { type = types.bool; default = false; };
instances = mkOption
{
type = types.attrsOf (types.oneOf
[
types.nonEmptyStr
(types.submodule { options =
{ device = mkOption { type = types.nonEmptyStr; }; hashTableSizeMB = mkOption { type = types.int; }; };})
]);
default = {};
};
};
config =
let
inherit (inputs.config.nixos.services) beesd;
inherit (inputs.lib) mkIf;
inherit (builtins) map listToAttrs;
inherit (inputs.localLib) attrsToList;
in mkIf beesd.enable
{
services.beesd.filesystems = listToAttrs (map
(instance:
{
inherit (instance) name;
value =
{
spec = instance.value.device or instance.value;
hashTableSizeMB = instance.value.hashTableSizeMB or 1024;
extraOptions = [ "--thread-count" "1" "--scan-mode" "3" ];
};
})
(attrsToList beesd.instances));
systemd.slices.system-beesd.sliceConfig =
{
CPUSchedulingPolicy = "idle";
IOSchedulingClass = "idle";
IOSchedulingPriority = 4;
IOAccounting = true;
IOWeight = 1;
Nice = 19;
};
};
}

View File

@@ -0,0 +1,37 @@
inputs:
{
options.nixos.services.coturn = let inherit (inputs.lib) mkOption types; in
{
enable = mkOption { type = types.bool; default = false; };
hostname = mkOption { type = types.str; default = "coturn.chn.moe"; };
};
config =
let
inherit (inputs.config.nixos.services) coturn;
inherit (inputs.lib) mkIf;
in mkIf coturn.enable
{
services.coturn = let keydir = inputs.config.security.acme.certs.${coturn.hostname}.directory; in
{
enable = true;
use-auth-secret = true;
static-auth-secret-file = inputs.config.sops.secrets."coturn/auth-secret".path;
realm = coturn.hostname;
cert = "${keydir}/full.pem";
pkey = "${keydir}/key.pem";
no-cli = true;
};
sops.secrets."coturn/auth-secret".owner = inputs.config.systemd.services.coturn.serviceConfig.User;
nixos.services.acme =
{
enable = true;
cert.${coturn.hostname}.group = inputs.config.systemd.services.coturn.serviceConfig.Group;
};
networking.firewall = with inputs.config.services.coturn;
{
allowedUDPPorts = [ listening-port tls-listening-port ];
allowedTCPPorts = [ listening-port tls-listening-port ];
allowedUDPPortRanges = [ { from = min-port; to = max-port; } ];
};
};
}

Some files were not shown because too many files have changed in this diff Show More