mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 15:19:23 +08:00
Compare commits
35 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 426077c296 | |||
| 135df14fff | |||
| 52cd11dd2b | |||
| b9f287e089 | |||
| bffe5b809d | |||
| 4753943bbe | |||
| 2d91bd4ea0 | |||
| 8270fa73df | |||
| a1097b60e9 | |||
| f8aca249b8 | |||
| 1d581eb756 | |||
| 414685c95a | |||
| 745d7613b8 | |||
| 0d61d71fdb | |||
| 84bdee3f93 | |||
| 99e4e9da89 | |||
| 34a82e7a53 | |||
| ba270a2830 | |||
| 4c6f25118d | |||
| 42484394f1 | |||
| 24405876d1 | |||
| 0026ff0382 | |||
| a9eda967cf | |||
| 93c6869896 | |||
| 24f3d75f4b | |||
| bc7561ed10 | |||
| 2929d620a4 | |||
| 6de39f3eba | |||
| 21b4246800 | |||
| c9626a0c57 | |||
| 90cb6117aa | |||
| af98c9a312 | |||
| 88a399769f | |||
| 56e14750fe | |||
| 30c5d93685 |
1
.webui_secret_key
Normal file
1
.webui_secret_key
Normal file
@@ -0,0 +1 @@
|
||||
1c2lE/E3swpYeU8F
|
||||
@@ -146,6 +146,7 @@ inputs:
|
||||
memoryMB = 90112;
|
||||
gpus."4060" = 1;
|
||||
};
|
||||
ollama = {};
|
||||
};
|
||||
bugs = [ "xmunet" "backlight" "amdpstate" ];
|
||||
};
|
||||
@@ -153,8 +154,6 @@ inputs:
|
||||
[
|
||||
"acpi_osi=!" ''acpi_osi="Windows 2015"''
|
||||
"amdgpu.sg_display=0" # 混合模式下避免外接屏幕闪烁,和内置外接屏幕延迟
|
||||
"acpi.ec_no_wakeup=1" # 睡眠时避免开盖唤醒,似乎没有用
|
||||
"processor.max_cstate=1" # workaround for amd cpu hard lock
|
||||
];
|
||||
# 禁止鼠标等在睡眠时唤醒
|
||||
services.udev.extraRules = ''ACTION=="add", ATTR{power/wakeup}="disabled"'';
|
||||
@@ -165,7 +164,7 @@ inputs:
|
||||
hideMounts = true;
|
||||
users.chn.directories = builtins.map
|
||||
(dir: { directory = "repo/${dir}"; user = "chn"; group = "chn"; mode = "0755"; })
|
||||
[ "lammps-SiC" "BPD-paper" "kurumi-asmr" "linwei-stuff" "BPD-paper-old" ];
|
||||
[ "lammps-SiC" "BPD-paper" "kurumi-asmr" "linwei-stuff" "BPD-paper-old" "SiC-20240705" ];
|
||||
};
|
||||
specialisation =
|
||||
{
|
||||
|
||||
@@ -68,21 +68,18 @@ freshrss:
|
||||
huginn:
|
||||
invitationCode: ENC[AES256_GCM,data:+m2AabRzUiCFy3MAKTB8d1IE05WHTcmZ,iv:ccdIPHl9N+bvPR/QCwZUwZOfWTeW6gWhhBjOpL85JRg=,tag:Ir2085K04XUGkAuoCG+7VQ==,type:str]
|
||||
fz-new-order:
|
||||
manager: ENC[AES256_GCM,data:qZc5U3SZQPWzcKVjN2+A2qWNae4GItcjvEQFgkThvIQ=,iv:fJpiUlViiUg1ea/zGhgedQG7TeTbeb9dPviYoiUBLqI=,tag:6T7rgJflsjgK++28SgsLtg==,type:str]
|
||||
token: ENC[AES256_GCM,data:qhwWRflJbW1QMOhiPfbTIrEdQJyVtfZ1QycCgstdKD1Nh40=,iv:GvZ8MJig64l34jkvuJbMMjyNaPT5yz0/pFCc6KEPTvA=,tag:cMXo/6F9thl8k2iAhT507Q==,type:str]
|
||||
uids:
|
||||
#ENC[AES256_GCM,data:WJszzA==,iv:KvyEnUu69+L5ZxNbRmjtP2R+8lHKgdlMN0WuvDbYgE4=,tag:LP2FJ2HXWZJmTdvXpHflVQ==,type:comment]
|
||||
user0: ENC[AES256_GCM,data:Qw18Ht6qXo3n7DD9NgNB+3IRbCmKuvJQiK5UBsg/FC8=,iv:TeeTcR0tnRrniySqKrsKfOfr2JO7+kqS3iETdCFX5ZA=,tag:rRo2yNku9JWxmILWBS/Wyw==,type:str]
|
||||
#ENC[AES256_GCM,data:O3DOE3jFCg==,iv:9shUoHCLXsJPKHELlyWdreouEcyOqhsfVI2KaqwC4CU=,tag:tYKVv+/DuesSijZwWGdrig==,type:comment]
|
||||
user1: ENC[AES256_GCM,data:vY4qTPNqdFp2H348jAgvwKktywdVVvQK/lR2NgRE4Ho=,iv:DrweeSEJ5ETomIkRtkcVboiQindzBoxvxjlSmrQIfI8=,tag:sMz1ITHkDclBc4OY91dMGg==,type:str]
|
||||
user0: ENC[AES256_GCM,data:2sieulGmi7mCYrJH24djrrmHArrFbOHZ9wUuKvY4f2k=,iv:lb5ODFOeQQ+D9HZnMw48n/DGRB7L51U4frBVcPx1mvk=,tag:MwZua6u+G478uGOwtGu4fQ==,type:str]
|
||||
#ENC[AES256_GCM,data:yeA9zF8Tug==,iv:VZuWLZnt1RBmkBWudKVvgJkYfqxIj/umEHVCfR6IG3k=,tag:1kj7HyjVT59n05VYJ1uP+w==,type:comment]
|
||||
user2: ENC[AES256_GCM,data:7hlq1FEauGcKkStREDbxA3tOA5NmFo9AbXiOPUt+kZ4=,iv:urOP3ENSviWRKDIWGc1P5PkEtkoBSCSYlgGqJQznp8s=,tag:NNKCW5bFPY7t/PC7dsSJwg==,type:str]
|
||||
user1: ENC[AES256_GCM,data:Aw0ydspmf+PXKU27Pdzn4q/nY4sxXCADL1WGB7vm3eo=,iv:uTmVvGlW1HfdvoNbupSw3GyShsWTGVCoNrvVJ5BPUy0=,tag:k9KIoCWM6bSprwR8dmN+Hg==,type:str]
|
||||
#ENC[AES256_GCM,data:4G7DyLVVgQ==,iv:Ht/exln1QtL2BxjCaOTIXHRPDiSFYP4zIa7VaeMCuhE=,tag:btVLXf+WS/YgzRFbVFoAfQ==,type:comment]
|
||||
user3: ENC[AES256_GCM,data:nBTbmp9OP14ayVBz1UGC5g76txfUwxL2NPQCKGxsQyw=,iv:2B8ISdT+8WpfeiU9peKoMlpwcRoGZVh11VyAnS9IKP4=,tag:uBMxqrPlb6TaftnAMqodKw==,type:str]
|
||||
user2: ENC[AES256_GCM,data:P5gmhaQ+VOWVOjTrsx34zUS8dsqIkzCwOImIE8TIfUc=,iv:IoJIUcNJmaBTyr0Ut6R7BN/UqyK8p4HtiwbXUl171pE=,tag:k99PGSL1cEALTmFVWH1uSg==,type:str]
|
||||
#ENC[AES256_GCM,data:TGrZBuCRgQ==,iv:9IOJ3Bkw9udS/y93TTtZ9o79aDq3Bb+DMEogJG77iqA=,tag:S/XcPX1f89IyfZnMoR9s/A==,type:comment]
|
||||
user4: ENC[AES256_GCM,data:LVendDEBlPUCkXPfgbYf2X0EgJsAdLKjAudXeAgy2Is=,iv:bR0emkQa6OHUP1ucgAvJU0eEop0gp+3rwDB5XJhh4+s=,tag:YZsW9Yyr+ey9AbTO3ucWDg==,type:str]
|
||||
user3: ENC[AES256_GCM,data:cAzf2X20rtQYyz1rLK6b4jo8utuUOdUHVYfCWdfPTDY=,iv:L5cg7aNdfnLTH2dKl4bWCqaujJ9tIvBJrJIoDIaBLwk=,tag:9Al6Wig4lz1my6hgozSsIA==,type:str]
|
||||
#ENC[AES256_GCM,data:b4iJ73sUoQ==,iv:A2hmi7lCR15E5jVR8E71GQuHgF4TdjDuQadXOtBon6k=,tag:eopTJdjN16u7PtpZdhKymQ==,type:comment]
|
||||
user5: ENC[AES256_GCM,data:wG4awLnfB4B0qLWG6Aj+OslLMnViPjIzicfB4ZzkZPA=,iv:b9C1IDmZTMV0RYXqkM/Y3khZeSQEOISrQyPjhQe3WKM=,tag:cRMtLNU6TCwTQG4UVhvTng==,type:str]
|
||||
user4: ENC[AES256_GCM,data:nUJ0lPuFOUVGCtq0IRSh5dAkAna7hoow1YOtFEgSoZc=,iv:D8phoZxdbQ2/Zaeq8498eRb0a7SZD5WnVdKv+u2pBak=,tag:Obu01n34JjyAVnF0f3uKzg==,type:str]
|
||||
config0:
|
||||
username: ENC[AES256_GCM,data:p8+q8u1A,iv:9s52kS5yLB4vQuGVXNtA4amZqT3eHTTybsbsQZRiFnk=,tag:7SA4SEzMHpP9H/rwoE+UJQ==,type:str]
|
||||
password: ENC[AES256_GCM,data:58+gFodT,iv:ohZlT1BwnzCYv84xHgFsLRkiPMpE8lB8QVHwr0QtDWc=,tag:XF047RnXs6IbKsTnsm0D6g==,type:str]
|
||||
@@ -143,8 +140,8 @@ sops:
|
||||
SnFHS1Z0SXUzTFdEd29KTy9DU3Y3R0UKfhh+rUmWDrf+UGjclP57dHipPLFoXSqy
|
||||
HdelmfV6q4/c7ppx2E+oZw3VNgoZCsrxxzYZfwxHJiZb+5vkE0D8iA==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2024-06-08T09:15:52Z"
|
||||
mac: ENC[AES256_GCM,data:EY6sFc4EcTuxPgIZQ51HFZZZf+khb7mkNEvb6U12kCtoJAEo+i83uszwBZCo/QWw6VCCt9c//9y0mNH4FjZPJAxweJHcRtanyTXa5jdyv12qINUceYe7Uhcb7JuiiEns9DEbrr3UeAKfbPC+N5mD/2trzht0E8hqnFlWU/fysz8=,iv:saymdP4nFveEWx0JrBR2bW8SUl6xCJKhYqw+CsrfRG8=,tag:CHGvJAO8hpSMNdU2YE2OGw==,type:str]
|
||||
lastmodified: "2024-07-11T13:55:38Z"
|
||||
mac: ENC[AES256_GCM,data:5mYdz+1v6LZBW2TiM6CROaU6TUtFemOvbqJUQfqO3Lr8UnDM9AdH/fD//xDYNR1T1tMhBJf04Jchle7jRl45HKCzuyOGFOABu2m25nJeJGGDTSVDaRUUgCcmN4NQ0h1ep9gmZM9u2g5KLdmenXqcVD2tVgWNLykHtEZ/MyyEPC4=,iv:te1/rjBWhBIvJol51S4hehI4gxr3nsTH+YhmINDfy0U=,tag:mGXzGi309B1er8atMJta3g==,type:str]
|
||||
pgp: []
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.8.1
|
||||
|
||||
@@ -77,5 +77,12 @@ inputs:
|
||||
bugs = [ "xmunet" ];
|
||||
user.users = [ "chn" "xll" "zem" "yjq" "gb" ];
|
||||
};
|
||||
environment.persistence."/nix/archive" =
|
||||
{
|
||||
hideMounts = true;
|
||||
users.chn.directories = builtins.map
|
||||
(dir: { directory = "repo/${dir}"; user = "chn"; group = "chn"; mode = "0755"; })
|
||||
[ "lammps-SiC" "linwei-stuff" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
223
flake.lock
generated
223
flake.lock
generated
@@ -8,11 +8,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719917903,
|
||||
"narHash": "sha256-UJpEzS99Y/j1QiwpDaB5JLhK85AKBqJ/8jaEiIrEG8Q=",
|
||||
"lastModified": 1720111357,
|
||||
"narHash": "sha256-pxpojirYvCtjWqrhUICsrZ/BKB1o5GNZ+XynQesXdbU=",
|
||||
"owner": "ezKEa",
|
||||
"repo": "aagl-gtk-on-nix",
|
||||
"rev": "55d7639b1e6aa6ed8ca5ab196b8acd1890d2fc38",
|
||||
"rev": "07f0bfebaf4db60b2c3424b1c39164be1e7da1dc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -59,11 +59,11 @@
|
||||
},
|
||||
"catppuccin": {
|
||||
"locked": {
|
||||
"lastModified": 1718339789,
|
||||
"narHash": "sha256-Q3fgY7huFE+uaw7BNsAl1x+FvjDAi3EDWPnlALJt5pM=",
|
||||
"lastModified": 1719915848,
|
||||
"narHash": "sha256-zq+CMkdT8A9z74HonwspXp8HsX4OvP4uaVdD98AO6as=",
|
||||
"owner": "catppuccin",
|
||||
"repo": "nix",
|
||||
"rev": "73e06d5bd7ed34bdd0168030893ef8364fdc1d4a",
|
||||
"rev": "9345073d27d91ab66c1b6ab65df322906992aa59",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -87,11 +87,11 @@
|
||||
"yafas": "yafas"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719341523,
|
||||
"narHash": "sha256-UhbsY1ECPo0aqyXx8mR/y7f389ZH3lzEigrgsnrvA6U=",
|
||||
"lastModified": 1720162329,
|
||||
"narHash": "sha256-iB9PZYreHYjp9t8BNMgmyfXA9ed5lFRayKsx03L2yQo=",
|
||||
"owner": "chaotic-cx",
|
||||
"repo": "nyx",
|
||||
"rev": "d2754bc296923da7f710100e9cafee14b4f97a2e",
|
||||
"rev": "793fa1b40c4dec81ee8eb7104fdd35aed7b96ab1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -206,11 +206,11 @@
|
||||
"eigen": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1718750072,
|
||||
"narHash": "sha256-BgaHbqaeLGFpss34xrARvmQ99nRdvLRis5JEj/3rx0M=",
|
||||
"lastModified": 1719474966,
|
||||
"narHash": "sha256-qmFsmFEQCDH+TRFc8+5BsYAG1ybL08fWhn8NpM6H6xY=",
|
||||
"owner": "libeigen",
|
||||
"repo": "eigen",
|
||||
"rev": "d791d48859c6fc7850c9fd5270d2b236c818068d",
|
||||
"rev": "33d0937c6bdf5ec999939fb17f2a553183d14a74",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
@@ -228,11 +228,11 @@
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1716853897,
|
||||
"narHash": "sha256-vZixjUtN4zQr117r26/Q+0fivtG3AYOc8zKjZPoV/mw=",
|
||||
"lastModified": 1719875359,
|
||||
"narHash": "sha256-JwF3XxYsnVwZwYrHnWuM1KbtiwnhALAlpw5KGpvZek0=",
|
||||
"owner": "Mic92",
|
||||
"repo": "envfs",
|
||||
"rev": "5644572b4567e8ebecae28525f953bcb71fbf481",
|
||||
"rev": "135193473c3eac12922802f42760e2228a6f5ff6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -368,11 +368,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1717285511,
|
||||
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
|
||||
"lastModified": 1719994518,
|
||||
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
|
||||
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -386,11 +386,11 @@
|
||||
"nixpkgs-lib": "nixpkgs-lib_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1717285511,
|
||||
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
|
||||
"lastModified": 1719994518,
|
||||
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
|
||||
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -492,11 +492,11 @@
|
||||
"gricad": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1709199491,
|
||||
"narHash": "sha256-J32quO+kCOrOLkYQzFZpiPhUXJHE6GIrmb0VSlECKLM=",
|
||||
"lastModified": 1720179285,
|
||||
"narHash": "sha256-nJ+FKTCJz0FIWcE9S2covKGfj4SgZOjgfxcAGBZ8Kqs=",
|
||||
"owner": "Gricad",
|
||||
"repo": "nur-packages",
|
||||
"rev": "4b4a489297f3a11b8d0883b02c0d154ce37f24e0",
|
||||
"rev": "1605d8b20651a0a42152347e9e04096e567cd359",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -512,11 +512,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719037157,
|
||||
"narHash": "sha256-aOKd8+mhBsLQChCu1mn/W5ww79ta5cXVE59aJFrifM8=",
|
||||
"lastModified": 1720167120,
|
||||
"narHash": "sha256-K9JYdlPiyaXp33JRg7CT8rMwH56e4ncXSsXW/YKnNXc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "cd886711998fe5d9ff7979fdd4b4cbd17b1f1511",
|
||||
"rev": "bbe6e94737289c8cb92d4d8f9199fbfe4f11c0ba",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -527,11 +527,11 @@
|
||||
},
|
||||
"impermanence": {
|
||||
"locked": {
|
||||
"lastModified": 1717932370,
|
||||
"narHash": "sha256-7C5lCpiWiyPoIACOcu2mukn/1JRtz6HC/1aEMhUdcw0=",
|
||||
"lastModified": 1719091691,
|
||||
"narHash": "sha256-AxaLX5cBEcGtE02PeGsfscSb/fWMnyS7zMWBXQWDKbE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "impermanence",
|
||||
"rev": "27979f1c3a0d3b9617a3563e2839114ba7d48d3f",
|
||||
"rev": "23c1f06316b67cb5dabdfe2973da3785cfe9c34a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -549,11 +549,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719292813,
|
||||
"narHash": "sha256-6w/buoRKo4ijH9O4D/0KjNtiWjtrJebuV7djTEEa0+k=",
|
||||
"lastModified": 1719631702,
|
||||
"narHash": "sha256-HMWxIehVO8pHp7OlqBYliiLOds34UJHSRn5FPdEb1j8=",
|
||||
"owner": "Jovian-Experiments",
|
||||
"repo": "Jovian-NixOS",
|
||||
"rev": "d6222e7818aa5528f8369afe84bc53556a57c329",
|
||||
"rev": "2f9668e19aff06550cd154c87c0af120735a56a4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -581,11 +581,11 @@
|
||||
"lepton": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1718727150,
|
||||
"narHash": "sha256-/i/Nqm29Dqr57pIGgl+qzmQjqJiC1Zem/+WjVxS4guA=",
|
||||
"lastModified": 1719817324,
|
||||
"narHash": "sha256-19aivAOvXeFOnsP5XhitK3+xk1lwUyXoTK8BE84qbFQ=",
|
||||
"owner": "black7375",
|
||||
"repo": "Firefox-UI-Fix",
|
||||
"rev": "5861dbaaf4e5e6671cb230ef7da0b3ae4e7d49d1",
|
||||
"rev": "362f34bece31a0e89b87d036547a56fc2c412d0c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -597,11 +597,11 @@
|
||||
"linux-surface": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1718132187,
|
||||
"narHash": "sha256-gdk4ueNISIVa0mSyrvpVuto1M65DP+EwVMiVody0aV0=",
|
||||
"lastModified": 1719778916,
|
||||
"narHash": "sha256-CfxfDxzCMwrZg375n89rljR6hchJQQ+SOHTBgNCR82w=",
|
||||
"owner": "linux-surface",
|
||||
"repo": "linux-surface",
|
||||
"rev": "312dae71d425bba0df8074aedb34585cc79af385",
|
||||
"rev": "dbc445a23d3b546447eab6d46b49ed76af544070",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -613,11 +613,11 @@
|
||||
"lmod": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1718640815,
|
||||
"narHash": "sha256-HWheEFHklmziVpLoprSO2kKekh52cJ9pVy51+NID1xE=",
|
||||
"lastModified": 1719265824,
|
||||
"narHash": "sha256-p/kYQ2hiWwOQS6I8urJvqY7Gz8SGunUkR3ZTqgMiVvY=",
|
||||
"owner": "TACC",
|
||||
"repo": "Lmod",
|
||||
"rev": "2fdfa8ca1bff34bd85a361493230e26fce6f3697",
|
||||
"rev": "a66999b861c1d3ac5025338493455fe2aa1c89df",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -701,11 +701,11 @@
|
||||
"treefmt-nix": "treefmt-nix_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1715803356,
|
||||
"narHash": "sha256-wvsg/UMM/jekzgbggH56KLZJzRmwrB9ErevaXXyWyqc=",
|
||||
"lastModified": 1719475157,
|
||||
"narHash": "sha256-8zW6eWvE9T03cMpo/hY8RRZIsSCfs1zmsJOkEZzuYwM=",
|
||||
"owner": "Mic92",
|
||||
"repo": "nix-fast-build",
|
||||
"rev": "cfff239d93716e92f6467f8953d8f8c12da1892a",
|
||||
"rev": "030e586195c97424844965d2ce680140f6565c02",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -759,11 +759,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718507237,
|
||||
"narHash": "sha256-xBEWCxWeRpWQggFFp8ugJCDa63cOJsVvx71R9F0Eowg=",
|
||||
"lastModified": 1719832725,
|
||||
"narHash": "sha256-dr8DkeS74KVNTgi8BE0BiUKALb+EKlMIV86G2xPYO64=",
|
||||
"owner": "Mic92",
|
||||
"repo": "nix-index-database",
|
||||
"rev": "6af2c5e58c20311276f59d247341cafeebfcb6f4",
|
||||
"rev": "2917972ed34ce292309b3a4976286f8b5c08db27",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -780,11 +780,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718507237,
|
||||
"narHash": "sha256-xBEWCxWeRpWQggFFp8ugJCDa63cOJsVvx71R9F0Eowg=",
|
||||
"lastModified": 1719832725,
|
||||
"narHash": "sha256-dr8DkeS74KVNTgi8BE0BiUKALb+EKlMIV86G2xPYO64=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-index-database",
|
||||
"rev": "6af2c5e58c20311276f59d247341cafeebfcb6f4",
|
||||
"rev": "2917972ed34ce292309b3a4976286f8b5c08db27",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -802,11 +802,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719019506,
|
||||
"narHash": "sha256-2lpbK6W3QHxc7BFeEDPumcBoNBx7dO7UE+ypwFVEOOc=",
|
||||
"lastModified": 1720142793,
|
||||
"narHash": "sha256-KhKF1VEMT5vz0vv1HZy0IOTEp2ZU1UD4ZgJAkOFbhIg=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-vscode-extensions",
|
||||
"rev": "935d522e2a0306083d15e09c7d17a9358c141f29",
|
||||
"rev": "8d57c84024068180130f3c0a2103dda967a0ddc2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -817,11 +817,11 @@
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1719366783,
|
||||
"narHash": "sha256-uPIZDEjZmJCWy1+0Jpqq73nEMpbaTxVtX1LoIN0z9aM=",
|
||||
"lastModified": 1719984813,
|
||||
"narHash": "sha256-/zRdv5J5exywcZXxIatB0Megh1QUs2vC7BCyvBB73ZA=",
|
||||
"owner": "CHN-beta",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "6b60a779eb5f12b5395d8c133c1cec048724faf5",
|
||||
"rev": "a939cbb5dfd3648debce81492a17b0bafa301948",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -832,11 +832,11 @@
|
||||
},
|
||||
"nixos-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1718811006,
|
||||
"narHash": "sha256-0Y8IrGhRmBmT7HHXlxxepg2t8j1X90++qRN3lukGaIk=",
|
||||
"lastModified": 1719957072,
|
||||
"narHash": "sha256-gvFhEf5nszouwLAkT9nWsDzocUTqLWHuL++dvNjMp9I=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "03d771e513ce90147b65fe922d87d3a0356fc125",
|
||||
"rev": "7144d6241f02d171d25fba3edeaf15e0f2592105",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -848,11 +848,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1719897776,
|
||||
"narHash": "sha256-6YOzRagJILvNM8JkYEhdmPUKEkz+jIu7yUDU5/zB8JE=",
|
||||
"lastModified": 1720567847,
|
||||
"narHash": "sha256-yRWuXFnzbFqi48GXisg4J9uA5EJBEBXcdjRgxFGbaxU=",
|
||||
"owner": "CHN-beta",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "7e36c3204bce7c9f0b0ff5cb64a954137a6d6a13",
|
||||
"rev": "4d9cfcd9a7a7195cbca4ed5310a52dde16143702",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -940,23 +940,23 @@
|
||||
},
|
||||
"nixpkgs-lib_2": {
|
||||
"locked": {
|
||||
"lastModified": 1717284937,
|
||||
"narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=",
|
||||
"lastModified": 1719876945,
|
||||
"narHash": "sha256-Fm2rDDs86sHy0/1jxTOKB1118Q0O3Uc7EC0iXvXKpbI=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz"
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz"
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1718447546,
|
||||
"narHash": "sha256-JHuXsrC9pr4kA4n7LuuPfWFJUVlDBVJ1TXDVpHEuUgM=",
|
||||
"lastModified": 1718811006,
|
||||
"narHash": "sha256-0Y8IrGhRmBmT7HHXlxxepg2t8j1X90++qRN3lukGaIk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "842253bf992c3a7157b67600c2857193f126563a",
|
||||
"rev": "03d771e513ce90147b65fe922d87d3a0356fc125",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -996,11 +996,11 @@
|
||||
"treefmt-nix": "treefmt-nix_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719037946,
|
||||
"narHash": "sha256-ZmaV6KePuFZTBgBmMms4BOHk2ubNbMx6tpaMZPMrhPU=",
|
||||
"lastModified": 1720117827,
|
||||
"narHash": "sha256-C9BXXBAm6Nwog7AqFxKsqUOo5/fbzq4rYkCw/fVVLiw=",
|
||||
"owner": "linyinfeng",
|
||||
"repo": "nur-packages",
|
||||
"rev": "03ce015ef2ac079c854f7f7794c9ed020ce53db0",
|
||||
"rev": "3838eac2cfe996847926bde071166da3f9d94715",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1021,11 +1021,11 @@
|
||||
"treefmt-nix": "treefmt-nix_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718965750,
|
||||
"narHash": "sha256-Z7IkEPAUBLWRF6MWp9VWClTI2T2Nln1qHGFuzqQkUHc=",
|
||||
"lastModified": 1720176115,
|
||||
"narHash": "sha256-YjBj9W2BKIcTtFQbu5lSYSfGh2/JXpSd5zpXtdxT8Sc=",
|
||||
"owner": "xddxdd",
|
||||
"repo": "nur-packages",
|
||||
"rev": "5ae9da327360952e35702e1a6faf7b8e34f584e4",
|
||||
"rev": "ca3f342474efb6418cc1dab4da7cb225691cafae",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1112,11 +1112,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718956312,
|
||||
"narHash": "sha256-iH+ilQbskYuwoOgN1w3sTgkEcVuuFPIJZ1HCGdgeh70=",
|
||||
"lastModified": 1720168075,
|
||||
"narHash": "sha256-Nb/8+zrOPbU9EBMterwQPTUonqwj6Czd0CCCNM4SROA=",
|
||||
"owner": "pjones",
|
||||
"repo": "plasma-manager",
|
||||
"rev": "6f182700ad78f13f367fdfff2b0a4062e70eeea8",
|
||||
"rev": "71c3fb6eb0767923335662aa33a06f983c2fbeae",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1136,11 +1136,11 @@
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718879355,
|
||||
"narHash": "sha256-RTyqP4fBX2MdhNuMP+fnR3lIwbdtXhyj7w7fwtvgspc=",
|
||||
"lastModified": 1719259945,
|
||||
"narHash": "sha256-F1h+XIsGKT9TkGO3omxDLEb/9jOOsI6NnzsXFsZhry4=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "8cd35b9496d21a6c55164d8547d9d5280162b07a",
|
||||
"rev": "0ff4381bbb8f7a52ca4a851660fc7a437a4c6e07",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1156,11 +1156,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718920881,
|
||||
"narHash": "sha256-2KqvALCqoNPGYXv9J82HAp18XITOzlZBQmh0zH0nhYg=",
|
||||
"lastModified": 1719919782,
|
||||
"narHash": "sha256-XBo+DCmhSv2Va4JbbiXv870mr6nEWZPzEgMCRcme/B8=",
|
||||
"owner": "Nix-QChem",
|
||||
"repo": "NixOS-QChem",
|
||||
"rev": "2483da74db819b9cd42d0ff0fc07ce6806700c07",
|
||||
"rev": "a9dd2cbc2b6968f66a4fae811f3e23a091c993f6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1213,6 +1213,7 @@
|
||||
"rsshub": "rsshub",
|
||||
"rycee": "rycee",
|
||||
"slate": "slate",
|
||||
"sockpp": "sockpp",
|
||||
"sops-nix": "sops-nix",
|
||||
"sqlite-orm": "sqlite-orm",
|
||||
"tgbot-cpp": "tgbot-cpp",
|
||||
@@ -1224,11 +1225,11 @@
|
||||
"rsshub": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1719034435,
|
||||
"narHash": "sha256-c5RLeagj8MK7DG8WwDMLzxce4uxdO8ukJrRMNVVUGj4=",
|
||||
"lastModified": 1720178553,
|
||||
"narHash": "sha256-er/hFd0rX2Btw+nheg0zpolMOLPPtmRZWeCyXS5SlMg=",
|
||||
"owner": "DIYgod",
|
||||
"repo": "RSSHub",
|
||||
"rev": "0b43d515ac39c3977bfe31431d638d469b5608ad",
|
||||
"rev": "68c7430fbb3d158c88f95beeb5881352d1d4caf1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1240,11 +1241,11 @@
|
||||
"rycee": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1719039984,
|
||||
"narHash": "sha256-+tH0AeN+4ql0VA9GZ0glN/4QI4WMJ28JEFkrf3CiR40=",
|
||||
"lastModified": 1720167363,
|
||||
"narHash": "sha256-GIQZdHXLC2u7QyXAtb9WsOqwmRpeCqcqX/AR7INiiXY=",
|
||||
"owner": "rycee",
|
||||
"repo": "nur-expressions",
|
||||
"rev": "e3ad55b79aaf8a74e29a9219c3e84238beb90347",
|
||||
"rev": "cea36a02a4619e009d7fac7df1bc2acba825c5a4",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
@@ -1269,6 +1270,22 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"sockpp": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1707078447,
|
||||
"narHash": "sha256-lV3K6OGs4bFaCKKu1FeMwTMT5Q47Gxl+GzVf4rNnYjE=",
|
||||
"owner": "fpagliughi",
|
||||
"repo": "sockpp",
|
||||
"rev": "04002daccc8f66a77edf019124089a3ce966b2e3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "fpagliughi",
|
||||
"repo": "sockpp",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"sops-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -1279,11 +1296,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718506969,
|
||||
"narHash": "sha256-Pm9I/BMQHbsucdWf6y9G3xBZh3TMlThGo4KBbeoeczg=",
|
||||
"lastModified": 1719873517,
|
||||
"narHash": "sha256-D1dxZmXf6M2h5lNE1m6orojuUawVPjogbGRsqSBX+1g=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "797ce4c1f45a85df6dd3d9abdc53f2691bea9251",
|
||||
"rev": "a11224af8d824935f363928074b4717ca2e280db",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1434,11 +1451,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718522839,
|
||||
"narHash": "sha256-ULzoKzEaBOiLRtjeY3YoGFJMwWSKRYOic6VNw2UyTls=",
|
||||
"lastModified": 1719887753,
|
||||
"narHash": "sha256-p0B2r98UtZzRDM5miGRafL4h7TwGRC4DII+XXHDHqek=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "68eb1dc333ce82d0ab0c0357363ea17c31ea1f81",
|
||||
"rev": "bdb6355009562d8f9313d9460c0d3860f525bc6c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1455,11 +1472,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718522839,
|
||||
"narHash": "sha256-ULzoKzEaBOiLRtjeY3YoGFJMwWSKRYOic6VNw2UyTls=",
|
||||
"lastModified": 1719887753,
|
||||
"narHash": "sha256-p0B2r98UtZzRDM5miGRafL4h7TwGRC4DII+XXHDHqek=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "68eb1dc333ce82d0ab0c0357363ea17c31ea1f81",
|
||||
"rev": "bdb6355009562d8f9313d9460c0d3860f525bc6c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1512,11 +1529,11 @@
|
||||
"zpp-bits": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1715201662,
|
||||
"narHash": "sha256-/KkMnRN3DBTzwMYH5WUdhziJiSWJAJqIA1uodm2M0PQ=",
|
||||
"lastModified": 1720100883,
|
||||
"narHash": "sha256-EDMg+bvyCjKbUIZD0wahvr+0+fTwOvJiQ/gv5r8PexM=",
|
||||
"owner": "eyalz800",
|
||||
"repo": "zpp_bits",
|
||||
"rev": "2fa24112425ace55ae27a75f717ae0fd054097a0",
|
||||
"rev": "5f980b00bc47fb486ba5902e0be4e1d08c297f50",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
20
flake.nix
20
flake.nix
@@ -63,6 +63,7 @@
|
||||
zxorm = { url = "github:CHN-beta/zxorm"; flake = false; };
|
||||
openxlsx = { url = "github:troldal/OpenXLSX"; flake = false; };
|
||||
sqlite-orm = { url = "github:fnc12/sqlite_orm"; flake = false; };
|
||||
sockpp = { url = "github:fpagliughi/sockpp"; flake = false; };
|
||||
|
||||
# does not support lfs yet
|
||||
# nixos-wallpaper = { url = "git+https://git.chn.moe/chn/nixos-wallpaper.git"; flake = false; };
|
||||
@@ -108,7 +109,7 @@
|
||||
{
|
||||
pkgs = (import inputs.nixpkgs
|
||||
{
|
||||
crossSystem = inputs.nixpkgs.lib.systems.examples.mingwW64 // { isStatic = true; libc = "ucrt"; };
|
||||
crossSystem = inputs.nixpkgs.lib.systems.examples.mingwW64 // { isStatic = true; };
|
||||
system = "x86_64-linux";
|
||||
config.allowUnfree = true;
|
||||
overlays = [ inputs.self.overlays.default ];
|
||||
@@ -118,8 +119,7 @@
|
||||
[ "-DMAGIC_ENUM_OPT_BUILD_EXAMPLES=OFF" "-DMAGIC_ENUM_OPT_BUILD_TESTS=OFF" ]; });
|
||||
range-v3 = pkgs.range-v3.overrideAttrs (prev: { cmakeFlags = prev.cmakeFlags ++
|
||||
[ "-DRANGE_V3_DOCS=OFF" "-DRANGE_V3_TESTS=OFF" "-DRANGE_V3_EXAMPLES=OFF" ]; });
|
||||
biu = pkgs.localPackages.biu.override { inherit boost magic-enum range-v3; };
|
||||
winjob = pkgs.localPackages.winjob.override { inherit biu; };
|
||||
winjob = pkgs.localPackages.winjob.override { inherit boost range-v3; };
|
||||
};
|
||||
};
|
||||
nixosConfigurations =
|
||||
@@ -167,7 +167,7 @@
|
||||
biu = pkgs.mkShell
|
||||
{
|
||||
inputsFrom = [ pkgs.localPackages.biu ];
|
||||
buildInputs = [ pkgs.clang-tools_18 ];
|
||||
packages = [ pkgs.clang-tools_18 ];
|
||||
CMAKE_EXPORT_COMPILE_COMMANDS = "1";
|
||||
};
|
||||
hpcstat = pkgs.mkShell.override { stdenv = pkgs.gcc14Stdenv; }
|
||||
@@ -179,7 +179,7 @@
|
||||
sbatch-tui = pkgs.mkShell
|
||||
{
|
||||
inputsFrom = [ pkgs.localPackages.sbatch-tui ];
|
||||
buildInputs = [ pkgs.clang-tools_18 ];
|
||||
packages = [ pkgs.clang-tools_18 ];
|
||||
CMAKE_EXPORT_COMPILE_COMMANDS = "1";
|
||||
};
|
||||
ufo = pkgs.mkShell
|
||||
@@ -191,9 +191,17 @@
|
||||
chn-bsub = pkgs.mkShell
|
||||
{
|
||||
inputsFrom = [ pkgs.localPackages.chn-bsub ];
|
||||
buildInputs = [ pkgs.clang-tools_18 ];
|
||||
packages = [ pkgs.clang-tools_18 ];
|
||||
CMAKE_EXPORT_COMPILE_COMMANDS = "1";
|
||||
};
|
||||
winjob =
|
||||
let inherit (pkgs) clang-tools_18; in let inherit (inputs.self.packages.x86_64-w64-mingw32) pkgs winjob;
|
||||
in pkgs.mkShell.override { stdenv = pkgs.gcc14Stdenv; }
|
||||
{
|
||||
inputsFrom = [ winjob ];
|
||||
packages = [ clang-tools_18 ];
|
||||
CMAKE_EXPORT_COMPILE_COMMANDS = "1";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ enable_testing()
|
||||
include(GNUInstallDirs)
|
||||
|
||||
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
|
||||
option(BUILD_FOR_WINDOWS "Do not pull in dependencies not available on Windows" OFF)
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
message("Setting build type to 'Release' as none was specified.")
|
||||
@@ -17,19 +16,13 @@ find_package(fmt REQUIRED)
|
||||
find_package(Boost REQUIRED COMPONENTS headers iostreams filesystem)
|
||||
find_package(range-v3 REQUIRED)
|
||||
find_path(NAMEOF_INCLUDE_DIR nameof.hpp REQUIRED)
|
||||
find_path(ZPP_BITS_INCLUDE_DIR zpp_bits.h REQUIRED)
|
||||
if (NOT BUILD_FOR_WINDOWS)
|
||||
find_package(Eigen3 REQUIRED)
|
||||
endif()
|
||||
find_package(Eigen3 REQUIRED)
|
||||
|
||||
add_library(biu src/common.cpp)
|
||||
target_include_directories(biu PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> ${NAMEOF_INCLUDE_DIR} ${ZPP_BITS_INCLUDE_DIR})
|
||||
target_link_libraries(biu PUBLIC magic_enum::magic_enum fmt::fmt Boost::headers Boost::iostreams Boost::filesystem
|
||||
range-v3::range-v3)
|
||||
if (NOT BUILD_FOR_WINDOWS)
|
||||
target_link_libraries(biu PUBLIC Eigen3::Eigen)
|
||||
endif()
|
||||
range-v3::range-v3 Eigen3::Eigen)
|
||||
set_property(TARGET biu PROPERTY CXX_STANDARD 23 CXX_STANDARD_REQUIRED ON)
|
||||
install(TARGETS biu EXPORT biuTargets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
@@ -47,7 +40,8 @@ add_executable(test-serialize test/serialize.cpp)
|
||||
target_link_libraries(test-serialize PRIVATE biu)
|
||||
set_property(TARGET test-serialize PROPERTY CXX_STANDARD 23 CXX_STANDARD_REQUIRED ON)
|
||||
add_test(NAME test-serialize COMMAND test-serialize)
|
||||
|
||||
add_executable(test-process test/process.cpp)
|
||||
target_link_libraries(test-process PRIVATE biu)
|
||||
set_property(TARGET test-process PROPERTY CXX_STANDARD 23 CXX_STANDARD_REQUIRED ON)
|
||||
add_test(NAME test-process COMMAND test-process)
|
||||
add_test(NAME test-process COMMAND test-process)
|
||||
|
||||
@@ -5,9 +5,8 @@
|
||||
{
|
||||
name = "biu";
|
||||
src = ./.;
|
||||
buildInputs = [ magic-enum fmt boost range-v3 nameof zpp-bits ] ++ lib.optional (!stdenv.hostPlatform.isMinGW) eigen;
|
||||
buildInputs = [ magic-enum fmt boost range-v3 nameof zpp-bits eigen ];
|
||||
propagatedBuildInputs = buildInputs;
|
||||
nativeBuildInputs = [ cmake ];
|
||||
cmakeFlags = [ "-DBUILD_FOR_WINDOWS=${builtins.toString stdenv.hostPlatform.isMinGW}" ];
|
||||
doCheck = true;
|
||||
}
|
||||
|
||||
@@ -83,10 +83,10 @@ namespace biu
|
||||
template <ExecMode Mode> struct ExecInput
|
||||
{
|
||||
std::conditional_t<Mode.SearchPath, std::string, std::filesystem::path> Program;
|
||||
std::vector<std::string> Args = {};
|
||||
std::vector<std::string> Args;
|
||||
std::conditional_t<Mode.DirectStdin, Empty, std::string> Stdin = {};
|
||||
std::map<std::string, std::string> ExtraEnv = {};
|
||||
std::optional<std::chrono::milliseconds> Timeout = {};
|
||||
std::optional<std::chrono::milliseconds> Timeout;
|
||||
};
|
||||
}
|
||||
template <detail_::ExecMode Mode = {}> detail_::ExecResult<Mode> exec(detail_::ExecInput<Mode> input);
|
||||
|
||||
@@ -1,32 +1,24 @@
|
||||
inputs: rec
|
||||
{
|
||||
typora = inputs.pkgs.callPackage ./typora {};
|
||||
vesta = inputs.pkgs.callPackage ./vesta {};
|
||||
rsshub = inputs.pkgs.callPackage ./rsshub.nix
|
||||
{
|
||||
inherit mkPnpmPackage;
|
||||
src = inputs.topInputs.rsshub;
|
||||
nodejs = nodejs-with-pnpm9.override { nodejs = inputs.pkgs.nodejs_22; };
|
||||
};
|
||||
misskey = inputs.pkgs.callPackage ./misskey.nix
|
||||
{ inherit mkPnpmPackage; src = inputs.topInputs.misskey; nodejs = nodejs-with-pnpm9; };
|
||||
mk-meili-mgn = inputs.pkgs.callPackage ./mk-meili-mgn {};
|
||||
vaspkit = inputs.pkgs.callPackage ./vaspkit { inherit (inputs.localLib) attrsToList; };
|
||||
v-sim = inputs.pkgs.callPackage ./v-sim { src = inputs.topInputs.v-sim; };
|
||||
concurrencpp = inputs.pkgs.callPackage ./concurrencpp { src = inputs.topInputs.concurrencpp; };
|
||||
eigengdb = inputs.pkgs.python3Packages.callPackage ./eigengdb {};
|
||||
nodesoup = inputs.pkgs.callPackage ./nodesoup { src = inputs.topInputs.nodesoup; };
|
||||
matplotplusplus = inputs.pkgs.callPackage ./matplotplusplus
|
||||
vesta = inputs.pkgs.callPackage ./vesta.nix {};
|
||||
rsshub = inputs.pkgs.callPackage ./rsshub.nix { inherit mkPnpmPackage; src = inputs.topInputs.rsshub; };
|
||||
misskey = inputs.pkgs.callPackage ./misskey.nix { inherit mkPnpmPackage; src = inputs.topInputs.misskey; };
|
||||
mk-meili-mgn = inputs.pkgs.callPackage ./mk-meili-mgn.nix {};
|
||||
vaspkit = inputs.pkgs.callPackage ./vaspkit.nix { inherit (inputs.localLib) attrsToList; };
|
||||
v-sim = inputs.pkgs.callPackage ./v-sim.nix { src = inputs.topInputs.v-sim; };
|
||||
concurrencpp = inputs.pkgs.callPackage ./concurrencpp.nix { src = inputs.topInputs.concurrencpp; };
|
||||
eigengdb = inputs.pkgs.python3Packages.callPackage ./eigengdb.nix {};
|
||||
nodesoup = inputs.pkgs.callPackage ./nodesoup.nix { src = inputs.topInputs.nodesoup; };
|
||||
matplotplusplus = inputs.pkgs.callPackage ./matplotplusplus.nix
|
||||
{ inherit nodesoup glad; src = inputs.topInputs.matplotplusplus; };
|
||||
zpp-bits = inputs.pkgs.callPackage ./zpp-bits { src = inputs.topInputs.zpp-bits; };
|
||||
eigen = inputs.pkgs.callPackage ./eigen { src = inputs.topInputs.eigen; };
|
||||
nameof = inputs.pkgs.callPackage ./nameof { src = inputs.topInputs.nameof; };
|
||||
pslist = inputs.pkgs.callPackage ./pslist {};
|
||||
glad = inputs.pkgs.callPackage ./glad {};
|
||||
chromiumos-touch-keyboard = inputs.pkgs.callPackage ./chromiumos-touch-keyboard {};
|
||||
yoga-support = inputs.pkgs.callPackage ./yoga-support {};
|
||||
tgbot-cpp = inputs.pkgs.callPackage ./tgbot-cpp { src = inputs.topInputs.tgbot-cpp; };
|
||||
mirism = inputs.pkgs.callPackage ./mirism
|
||||
zpp-bits = inputs.pkgs.callPackage ./zpp-bits.nix { src = inputs.topInputs.zpp-bits; };
|
||||
eigen = inputs.pkgs.callPackage ./eigen.nix { src = inputs.topInputs.eigen; };
|
||||
nameof = inputs.pkgs.callPackage ./nameof.nix { src = inputs.topInputs.nameof; };
|
||||
pslist = inputs.pkgs.callPackage ./pslist.nix {};
|
||||
glad = inputs.pkgs.callPackage ./glad.nix {};
|
||||
yoga-support = inputs.pkgs.callPackage ./yoga-support.nix {};
|
||||
tgbot-cpp = inputs.pkgs.callPackage ./tgbot-cpp.nix { src = inputs.topInputs.tgbot-cpp; };
|
||||
mirism = inputs.pkgs.callPackage ./mirism.nix
|
||||
{
|
||||
inherit cppcoro nameof tgbot-cpp date;
|
||||
nghttp2 = inputs.pkgs.callPackage "${inputs.topInputs."nixpkgs-23.05"}/pkgs/development/libraries/nghttp2"
|
||||
@@ -34,16 +26,16 @@ inputs: rec
|
||||
stdenv = inputs.pkgs.gcc12Stdenv;
|
||||
};
|
||||
cppcoro = inputs.pkgs.callPackage ./cppcoro { src = inputs.topInputs.cppcoro; };
|
||||
date = inputs.pkgs.callPackage ./date { src = inputs.topInputs.date; };
|
||||
esbonio = inputs.pkgs.python3Packages.callPackage ./esbonio {};
|
||||
date = inputs.pkgs.callPackage ./date.nix { src = inputs.topInputs.date; };
|
||||
esbonio = inputs.pkgs.python3Packages.callPackage ./esbonio.nix {};
|
||||
pix2tex = inputs.pkgs.python3Packages.callPackage ./pix2tex {};
|
||||
pyreadline3 = inputs.pkgs.python3Packages.callPackage ./pyreadline3 {};
|
||||
torchdata = inputs.pkgs.python3Packages.callPackage ./torchdata {};
|
||||
torchtext = inputs.pkgs.python3Packages.callPackage ./torchtext { inherit torchdata; };
|
||||
pyreadline3 = inputs.pkgs.python3Packages.callPackage ./pyreadline3.nix {};
|
||||
torchdata = inputs.pkgs.python3Packages.callPackage ./torchdata.nix {};
|
||||
torchtext = inputs.pkgs.python3Packages.callPackage ./torchtext.nix { inherit torchdata; };
|
||||
blurred-wallpaper = inputs.pkgs.callPackage ./blurred-wallpaper.nix { src = inputs.topInputs.blurred-wallpaper; };
|
||||
slate = inputs.pkgs.callPackage ./slate { src = inputs.topInputs.slate; };
|
||||
nvhpc = inputs.pkgs.callPackage ./nvhpc {};
|
||||
lmod = inputs.pkgs.callPackage ./lmod { src = inputs.topInputs.lmod; };
|
||||
slate = inputs.pkgs.callPackage ./slate.nix { src = inputs.topInputs.slate; };
|
||||
nvhpc = inputs.pkgs.callPackage ./nvhpc.nix {};
|
||||
lmod = inputs.pkgs.callPackage ./lmod.nix { src = inputs.topInputs.lmod; };
|
||||
vasp = rec
|
||||
{
|
||||
src = inputs.pkgs.callPackage ./vasp/source.nix {};
|
||||
@@ -63,23 +55,23 @@ inputs: rec
|
||||
vtstscripts = inputs.pkgs.callPackage ./vasp/vtstscripts.nix {};
|
||||
};
|
||||
# TODO: use other people packaged hpc version
|
||||
oneapi = inputs.pkgs.callPackage ./oneapi {};
|
||||
mumax = inputs.pkgs.callPackage ./mumax { src = inputs.topInputs.mumax; };
|
||||
kylin-virtual-keyboard = inputs.pkgs.libsForQt5.callPackage ./kylin-virtual-keyboard
|
||||
oneapi = inputs.pkgs.callPackage ./oneapi.nix {};
|
||||
mumax = inputs.pkgs.callPackage ./mumax.nix { src = inputs.topInputs.mumax; };
|
||||
kylin-virtual-keyboard = inputs.pkgs.libsForQt5.callPackage ./kylin-virtual-keyboard.nix
|
||||
{ src = inputs.topInputs.kylin-virtual-keyboard; };
|
||||
biu = inputs.pkgs.callPackage ./biu { inherit nameof zpp-bits; };
|
||||
zxorm = inputs.pkgs.callPackage ./zxorm { src = inputs.topInputs.zxorm; };
|
||||
zxorm = inputs.pkgs.callPackage ./zxorm.nix { src = inputs.topInputs.zxorm; };
|
||||
hpcstat = inputs.pkgs.callPackage ./hpcstat
|
||||
{ inherit sqlite-orm date biu openxlsx; stdenv = inputs.pkgs.gcc14Stdenv; };
|
||||
openxlsx = inputs.pkgs.callPackage ./openxlsx { src = inputs.topInputs.openxlsx; };
|
||||
sqlite-orm = inputs.pkgs.callPackage ./sqlite-orm { src = inputs.topInputs.sqlite-orm; };
|
||||
openxlsx = inputs.pkgs.callPackage ./openxlsx.nix { src = inputs.topInputs.openxlsx; };
|
||||
sqlite-orm = inputs.pkgs.callPackage ./sqlite-orm.nix { src = inputs.topInputs.sqlite-orm; };
|
||||
mkPnpmPackage = inputs.pkgs.callPackage ./mkPnpmPackage.nix {};
|
||||
nodejs-with-pnpm9 = inputs.pkgs.callPackage ./nodejs-with-pnpm9.nix {};
|
||||
sbatch-tui = inputs.pkgs.callPackage ./sbatch-tui { inherit biu; };
|
||||
ufo = inputs.pkgs.callPackage ./ufo
|
||||
{ inherit concurrencpp biu glad matplotplusplus zpp-bits; tbb = inputs.pkgs.tbb_2021_11; };
|
||||
chn-bsub = inputs.pkgs.callPackage ./chn-bsub { inherit biu; };
|
||||
winjob = inputs.pkgs.callPackage ./winjob { inherit sqlite-orm biu; stdenv = inputs.pkgs.gcc14Stdenv; };
|
||||
winjob = inputs.pkgs.callPackage ./winjob { stdenv = inputs.pkgs.gcc14Stdenv; };
|
||||
sockpp = inputs.pkgs.callPackage ./sockpp.nix { src = inputs.topInputs.sockpp; };
|
||||
|
||||
fromYaml = content: builtins.fromJSON (builtins.readFile
|
||||
(inputs.pkgs.runCommand "toJSON" {}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
lib, mkPnpmPackage, nodejs, writeShellScript,
|
||||
bash, cypress, vips, src
|
||||
lib, mkPnpmPackage, nodejs, writeShellScript, src,
|
||||
bash, cypress, vips, python3
|
||||
}: (mkPnpmPackage.override { inherit nodejs; })
|
||||
{
|
||||
inherit src;
|
||||
extraIntegritySha256."https://github.com/aiscript-dev/aiscript-languageserver/releases/download/0.1.6/aiscript-dev-aiscript-languageserver-0.1.6.tgz" = "0092d5r67bhf4xkvrdn4a2rm1drjzy7b5sw8mi7hp4pqvpc20ylr";
|
||||
extraNativeBuildInputs = [ bash nodejs.pkgs.typescript nodejs.pkgs.gulp ];
|
||||
extraNativeBuildInputs = [ bash nodejs.pkgs.typescript nodejs.pkgs.gulp python3 ];
|
||||
extraAttrs =
|
||||
{
|
||||
CYPRESS_INSTALL_BINARY = "0";
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
{ nodejs, fetchurl }: nodejs.overrideAttrs (prev:
|
||||
{
|
||||
passthru.pkgs = prev.passthru.pkgs.extend (final: prev:
|
||||
{
|
||||
pnpm = prev.pnpm.override
|
||||
{
|
||||
version = "9.1.0";
|
||||
src = fetchurl
|
||||
{
|
||||
url = "https://registry.npmjs.org/pnpm/-/pnpm-9.1.0.tgz";
|
||||
sha512 = "Z/WHmRapKT5c8FnCOFPVcb6vT3U8cH9AyyK+1fsVeMaq07bEEHzLO6CzW+AD62IaFkcayDbIe+tT+dVLtGEnJA==";
|
||||
};
|
||||
};
|
||||
});
|
||||
})
|
||||
@@ -115,8 +115,7 @@ int main()
|
||||
{
|
||||
// replace \n with space
|
||||
boost::replace_all(submit_command, "\n", " ");
|
||||
biu::exec<{.DirectStdout = true, .DirectStderr = true, .SearchPath = true}>
|
||||
("sh", { "-c", submit_command });
|
||||
biu::exec<{.DirectStdout = true, .DirectStderr = true, .SearchPath = true}>({"sh", { "-c", submit_command }});
|
||||
};
|
||||
|
||||
// 进入事件循环
|
||||
|
||||
7
local/pkgs/sockpp.nix
Normal file
7
local/pkgs/sockpp.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ stdenv, src, cmake, pkg-config }: stdenv.mkDerivation
|
||||
{
|
||||
name = "sockpp";
|
||||
inherit src;
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [];
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
use flake .#hpcstat
|
||||
use flake .#winjob
|
||||
|
||||
@@ -13,16 +13,14 @@ endif()
|
||||
set(WINJOB_VERSION "unknown" CACHE STRING "Version of the winjob")
|
||||
|
||||
find_package(Boost REQUIRED COMPONENTS headers filesystem)
|
||||
find_package(SqliteOrm REQUIRED)
|
||||
find_package(nlohmann_json REQUIRED)
|
||||
find_package(range-v3 REQUIRED)
|
||||
find_package(biu REQUIRED)
|
||||
|
||||
add_executable(winjob src/winjob.cpp)
|
||||
# target_compile_features(winjob PRIVATE cxx_std_26)
|
||||
target_compile_options(winjob PRIVATE "-std=c++26")
|
||||
target_include_directories(winjob PRIVATE ${PROJECT_SOURCE_DIR}/include)
|
||||
target_link_libraries(winjob PRIVATE Boost::headers Boost::filesystem sqlite_orm::sqlite_orm
|
||||
target_link_libraries(winjob PRIVATE Boost::headers Boost::filesystem
|
||||
nlohmann_json::nlohmann_json range-v3::range-v3)
|
||||
target_compile_definitions(winjob PRIVATE winjob_VERSION="${winjob_VERSION}")
|
||||
|
||||
@@ -30,12 +28,11 @@ add_executable(winjobd src/winjobd.cpp)
|
||||
# target_compile_features(winjob PRIVATE cxx_std_26)
|
||||
target_compile_options(winjobd PRIVATE "-std=c++26")
|
||||
target_include_directories(winjobd PRIVATE ${PROJECT_SOURCE_DIR}/include)
|
||||
target_link_libraries(winjobd PRIVATE Boost::headers Boost::filesystem sqlite_orm::sqlite_orm
|
||||
target_link_libraries(winjobd PRIVATE Boost::headers Boost::filesystem
|
||||
nlohmann_json::nlohmann_json range-v3::range-v3)
|
||||
target_compile_definitions(winjobd PRIVATE winjob_VERSION="${winjob_VERSION}")
|
||||
|
||||
install(TARGETS winjob RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
install(DIRECTORY share/ DESTINATION ${CMAKE_INSTALL_DATADIR}/winjob)
|
||||
|
||||
get_property(ImportedTargets DIRECTORY "${CMAKE_SOURCE_DIR}" PROPERTY IMPORTED_TARGETS)
|
||||
message("Imported targets: ${ImportedTargets}")
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
stdenv, cmake, pkg-config, version ? null, lib,
|
||||
nlohmann_json, range-v3, biu, sqlite-orm
|
||||
nlohmann_json, range-v3, boost
|
||||
}: stdenv.mkDerivation
|
||||
{
|
||||
name = "winjob";
|
||||
src = ./.;
|
||||
buildInputs = [ nlohmann_json range-v3 biu sqlite-orm ];
|
||||
buildInputs = [ nlohmann_json range-v3 boost ];
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
cmakeFlags = lib.optionals (version != null) [ "-DWINJOB_VERSION=${version}" ];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# include <boost/asio.hpp>
|
||||
# include <iostream>
|
||||
|
||||
int main()
|
||||
{
|
||||
boost::asio::io_context io_context;
|
||||
boost::asio::local::stream_protocol::endpoint ep("/tmp/winjobd.sock");
|
||||
// send a message to the server
|
||||
boost::asio::local::stream_protocol::socket socket(io_context);
|
||||
socket.connect(ep);
|
||||
std::string message = "Hello, world!\n";
|
||||
boost::asio::write(socket, boost::asio::buffer(message));
|
||||
// receive a message from the server
|
||||
boost::asio::streambuf buf;
|
||||
boost::asio::read_until(socket, buf, '\n');
|
||||
std::istream is(&buf);
|
||||
std::string line;
|
||||
std::getline(is, line);
|
||||
std::cout << "Received: " << line << '\n';
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
# include <boost/asio.hpp>
|
||||
# include <iostream>
|
||||
|
||||
int main()
|
||||
{
|
||||
boost::asio::io_context io_context;
|
||||
boost::asio::local::stream_protocol::endpoint ep("/tmp/winjobd.sock");
|
||||
boost::asio::local::stream_protocol::acceptor acceptor(io_context, ep);
|
||||
auto getuid = [](boost::asio::local::stream_protocol::socket& socket)
|
||||
{
|
||||
struct ucred ucred;
|
||||
socklen_t len = sizeof(ucred);
|
||||
if (getsockopt(socket.native_handle(), SOL_SOCKET, SO_PEERCRED, &ucred, &len) == -1)
|
||||
{
|
||||
std::cerr << "Failed to get SO_PEERCRED\n";
|
||||
return 0u;
|
||||
}
|
||||
return ucred.uid;
|
||||
};
|
||||
std::function<void(const boost::system::error_code&, boost::asio::local::stream_protocol::socket)> func =
|
||||
[&](const boost::system::error_code& ec, boost::asio::local::stream_protocol::socket socket)
|
||||
{
|
||||
if (ec)
|
||||
{
|
||||
std::cerr << "Failed to accept connection\n";
|
||||
return;
|
||||
}
|
||||
std::cout << "Accepted connection\n";
|
||||
boost::asio::streambuf buf;
|
||||
boost::asio::read_until(socket, buf, '\n');
|
||||
std::istream is(&buf);
|
||||
std::string line;
|
||||
std::getline(is, line);
|
||||
std::cout << "Received: " << line << '\n';
|
||||
std::cout << "Peer UID: " << getuid(socket) << '\n';
|
||||
// write a message to the client
|
||||
std::string message = "thanks for the message\n";
|
||||
boost::asio::write(socket, boost::asio::buffer(message));
|
||||
acceptor.async_accept(func);
|
||||
};
|
||||
acceptor.async_accept(func);
|
||||
io_context.run();
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ inputs:
|
||||
{
|
||||
intel = [ "i915" ];
|
||||
nvidia = [ "nvidia" "nvidia_drm" "nvidia_modeset" ]; # nvidia-uvm should not be loaded
|
||||
amd = [ "amdgpu" ];
|
||||
amd = [];
|
||||
};
|
||||
in builtins.concatLists (builtins.map (gpu: modules.${gpu}) gpus);
|
||||
hardware =
|
||||
@@ -48,12 +48,9 @@ inputs:
|
||||
{
|
||||
intel = [ intel-vaapi-driver libvdpau-va-gl intel-media-driver ];
|
||||
nvidia = [ vaapiVdpau ];
|
||||
amd = [ amdvlk rocmPackages.clr rocmPackages.clr.icd ];
|
||||
amd = [];
|
||||
};
|
||||
in builtins.concatLists (builtins.map (gpu: packages.${gpu}) gpus);
|
||||
extraPackages32 =
|
||||
let packages = { intel = []; nvidia = []; amd = [ inputs.pkgs.driversi686Linux.amdvlk ]; };
|
||||
in builtins.concatLists (builtins.map (gpu: packages.${gpu}) gpus);
|
||||
};
|
||||
nvidia = inputs.lib.mkIf (builtins.elem "nvidia" gpus)
|
||||
{
|
||||
@@ -70,12 +67,7 @@ inputs:
|
||||
open = inputs.lib.mkIf (gpu.nvidia.driver == "beta") true;
|
||||
};
|
||||
};
|
||||
boot =
|
||||
{
|
||||
kernelParams = inputs.lib.mkIf (builtins.elem "amd" gpus)
|
||||
[ "radeon.cik_support=0" "amdgpu.cik_support=1" "radeon.si_support=0" "amdgpu.si_support=1" ];
|
||||
blacklistedKernelModules = [ "nouveau" ];
|
||||
};
|
||||
boot.blacklistedKernelModules = [ "nouveau" ];
|
||||
environment.variables.VDPAU_DRIVER = inputs.lib.mkIf (builtins.elem "intel" gpus) "va_gl";
|
||||
services.xserver.videoDrivers =
|
||||
let driver = { intel = "modesetting"; amd = "amdgpu"; nvidia = "nvidia"; };
|
||||
@@ -97,5 +89,15 @@ inputs:
|
||||
powerManagement.finegrained = inputs.lib.mkIf (gpu.nvidia.prime.mode == "offload") true;
|
||||
};}
|
||||
)
|
||||
# amdgpu
|
||||
(
|
||||
inputs.lib.mkIf (inputs.lib.strings.hasPrefix "amd" gpu.type) { hardware.amdgpu =
|
||||
{
|
||||
opencl.enable = true;
|
||||
legacySupport.enable = true;
|
||||
initrd.enable = true;
|
||||
amdvlk = { enable = true; support32Bit.enable = true; supportExperimental.enable = true; };
|
||||
};}
|
||||
)
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,16 @@ inputs:
|
||||
services.openssh.knownHosts =
|
||||
let servers =
|
||||
{
|
||||
vps4 =
|
||||
{
|
||||
ed25519 = "AAAAC3NzaC1lZDI1NTE5AAAAIF7Y0tjt1XLPjqJ8HEB26W9jVfJafRQ3pv5AbPaxEc/Z";
|
||||
hostnames = [ "vps4.chn.moe" "104.234.37.61" ];
|
||||
};
|
||||
"initrd.vps4" =
|
||||
{
|
||||
ed25519 = "AAAAC3NzaC1lZDI1NTE5AAAAIJkOPTFvX9f+Fn/KHOIvUgoRiJfq02T42lVGQhpMUGJq";
|
||||
hostnames = [ "initrd.vps4.chn.moe" "104.234.37.61" ];
|
||||
};
|
||||
vps6 =
|
||||
{
|
||||
ed25519 = "AAAAC3NzaC1lZDI1NTE5AAAAIO5ZcvyRyOnUCuRtqrM/Qf+AdUe3a5bhbnfyhw2FSLDZ";
|
||||
@@ -97,7 +107,7 @@ inputs:
|
||||
(
|
||||
(builtins.map
|
||||
(host: { name = host; value = { inherit host; hostname = "${host}.chn.moe"; }; })
|
||||
[ "vps6" "wireguard.vps6" "vps7" "wireguard.vps7" "wireguard.nas" ])
|
||||
[ "vps4" "vps6" "wireguard.vps6" "vps7" "wireguard.vps7" "wireguard.nas" ])
|
||||
++ (builtins.map
|
||||
(host: { name = host; value = { inherit host; hostname = "${host}.chn.moe"; forwardX11 = true; }; })
|
||||
[ "wireguard.pc" "wireguard.surface" "wireguard.xmupc1" "wireguard.xmupc2" ])
|
||||
|
||||
@@ -2,6 +2,7 @@ inputs:
|
||||
{
|
||||
config = inputs.lib.mkIf (builtins.elem "workstation" inputs.config.nixos.packages._packageSets)
|
||||
{
|
||||
nixos.packages._packages = with inputs.pkgs.localPackages.vasp; [ intel nvidia vtstscripts ];
|
||||
nixos.packages._packages = inputs.lib.optionals (inputs.config.nixos.system.nixpkgs.march != null)
|
||||
(with inputs.pkgs.localPackages.vasp; [ intel nvidia vtstscripts ]);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ inputs:
|
||||
# math, physics and chemistry
|
||||
(mathematica.overrideAttrs (prev: { postInstall = prev.postInstall or "" + "ln -s ${src} $out/src"; }))
|
||||
(quantum-espresso.override { stdenv = gcc14Stdenv; gfortran = gfortran14; })
|
||||
paraview jmol mpi localPackages.mumax
|
||||
paraview jmol mpi
|
||||
# encryption and password management
|
||||
john crunch hashcat
|
||||
# container and vm
|
||||
@@ -38,7 +38,7 @@ inputs:
|
||||
microsoft-edge tor-browser
|
||||
# news
|
||||
rssguard newsflash newsboat
|
||||
];
|
||||
] ++ inputs.lib.optional (inputs.config.nixos.system.nixpkgs.march != null) localPackages.mumax;
|
||||
_pythonPackages = [(pythonPackages: with pythonPackages;
|
||||
[
|
||||
phonopy tensorflow keras scipy scikit-learn jupyterlab autograd # localPackages.pix2tex
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
inputs:
|
||||
{
|
||||
options.nixos.services.fz-new-order = let inherit (inputs.lib) mkOption types; in mkOption
|
||||
{
|
||||
type = types.nullOr (types.submodule {});
|
||||
default = null;
|
||||
};
|
||||
{ type = types.nullOr (types.submodule {}); default = null; };
|
||||
config = let inherit (inputs.config.nixos.services) fz-new-order; in inputs.lib.mkIf (fz-new-order != null)
|
||||
{
|
||||
users =
|
||||
@@ -72,7 +69,7 @@ inputs:
|
||||
"Z /var/lib/fz-new-order - fz-new-order fz-new-order"
|
||||
];
|
||||
};
|
||||
sops = let userNum = 6; configNum = 2; in
|
||||
sops = let userNum = 5; configNum = 2; in
|
||||
{
|
||||
templates."fz-new-order/config.json" =
|
||||
{
|
||||
@@ -80,7 +77,6 @@ inputs:
|
||||
group = inputs.config.users.users."fz-new-order".group;
|
||||
content = let placeholder = inputs.config.sops.placeholder; in builtins.toJSON
|
||||
{
|
||||
manager = placeholder."fz-new-order/manager";
|
||||
token = placeholder."fz-new-order/token";
|
||||
uids = builtins.map (j: placeholder."fz-new-order/uids/user${builtins.toString j}")
|
||||
(builtins.genList (n: n) userNum);
|
||||
@@ -92,7 +88,7 @@ inputs:
|
||||
};
|
||||
};
|
||||
secrets =
|
||||
{ "fz-new-order/manager" = {}; "fz-new-order/token" = {}; }
|
||||
{ "fz-new-order/token" = {}; }
|
||||
// (builtins.listToAttrs (builtins.map
|
||||
(i: { name = "fz-new-order/uids/user${toString i}"; value = {}; })
|
||||
(builtins.genList (n: n) userNum)))
|
||||
|
||||
@@ -48,7 +48,7 @@ std::string urlencode(std::string s)
|
||||
void oneshot
|
||||
(
|
||||
const std::string& username, const std::string& password, const std::string& comment,
|
||||
const std::set<std::string>& wxuser, const std::set<std::string>& manager, const std::string& token
|
||||
const std::set<std::string>& wxuser, const std::string& token
|
||||
)
|
||||
{
|
||||
httplib::Client fzclient("http://scmv9.fengzhansy.com:8882");
|
||||
@@ -152,16 +152,6 @@ void oneshot
|
||||
for (const auto& order : order_list)
|
||||
if (!order_old.contains(order.first))
|
||||
{
|
||||
for (const auto& user : manager)
|
||||
{
|
||||
auto path = fmt::format
|
||||
(
|
||||
"/api/send/message/?appToken={}&content={}&uid={}",
|
||||
token, urlencode(fmt::format("push {}", order.first)), user
|
||||
);
|
||||
auto wxresult = wxclient.Get(path.c_str());
|
||||
}
|
||||
|
||||
auto body = fmt::format
|
||||
(
|
||||
"method=dgate&rand=1234&op=scmmgr_pcggl&nv%5B%5D=opmode&nv%5B%5D=ddsp_qry&nv%5B%5D=bill&nv%5B%5D={}",
|
||||
@@ -248,7 +238,7 @@ int main(int argc, char** argv)
|
||||
oneshot
|
||||
(
|
||||
config["username"].asString(), config["password"].asString(), config["comment"].asString(),
|
||||
uids, { configs["manager"].asString() }, configs["token"].asString()
|
||||
uids, configs["token"].asString()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
16
modules/services/ollama.nix
Normal file
16
modules/services/ollama.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
inputs:
|
||||
{
|
||||
options.nixos.services.ollama = let inherit (inputs.lib) mkOption types; in mkOption
|
||||
{ type = types.nullOr (types.submodule {}); default = null; };
|
||||
config = let inherit (inputs.config.nixos.services) ollama; in inputs.lib.mkIf (ollama != null)
|
||||
{
|
||||
services =
|
||||
{
|
||||
ollama.enable = true;
|
||||
open-webui =
|
||||
{ enable = true; package = inputs.pkgs.genericPackages.open-webui; environment.WEBUI_AUTH = "False"; };
|
||||
nextjs-ollama-llm-ui.enable = true;
|
||||
};
|
||||
nixos.packages._packages = [ inputs.pkgs.oterm ];
|
||||
};
|
||||
}
|
||||
@@ -20,8 +20,9 @@ inputs:
|
||||
{
|
||||
sessionVariables =
|
||||
{
|
||||
"GTK_USE_PORTAL" = "1";
|
||||
"NIXOS_OZONE_WL" = inputs.lib.mkIf gui.preferred "1";
|
||||
GTK_USE_PORTAL = "1";
|
||||
NIXOS_OZONE_WL = inputs.lib.mkIf gui.preferred "1";
|
||||
KWIN_DRM_DISABLE_TRIPLE_BUFFERING = "1";
|
||||
};
|
||||
plasma6.excludePackages = inputs.lib.mkIf (!gui.preferred) [ inputs.pkgs.kdePackages.plasma-nm ];
|
||||
persistence = let inherit (inputs.config.nixos.system) impermanence; in inputs.lib.mkIf impermanence.enable
|
||||
|
||||
@@ -47,10 +47,7 @@ inputs:
|
||||
systemd.services.nix-daemon = { serviceConfig.CacheDirectory = "nix"; environment.TMPDIR = "/var/cache/nix"; };
|
||||
}
|
||||
# nix daemon use lower io/cpu priority
|
||||
{
|
||||
nix = { daemonIOSchedClass = "idle"; daemonCPUSchedPolicy = "idle"; };
|
||||
systemd.services.nix-daemon.serviceConfig = { Slice = "-.slice"; Nice = "19"; };
|
||||
}
|
||||
{ nix = { daemonIOSchedClass = "idle"; daemonCPUSchedPolicy = "idle"; }; }
|
||||
# nix channel & nix flake registry
|
||||
{
|
||||
nix =
|
||||
|
||||
@@ -49,6 +49,8 @@ inputs:
|
||||
oneapiArch = let match = { znver3 = "CORE-AVX2"; znver4 = "CORE-AVX512"; };
|
||||
in match.${nixpkgs.march} or nixpkgs.march;
|
||||
nvhpcArch = nixpkgs.march;
|
||||
# contentAddressedByDefault = true;
|
||||
enableCcache = true;
|
||||
});
|
||||
overlays =
|
||||
[(final: prev:
|
||||
@@ -60,7 +62,6 @@ inputs:
|
||||
config =
|
||||
{
|
||||
allowUnfree = true;
|
||||
contentAddressedByDefault = true;
|
||||
permittedInsecurePackages = let pkgs = inputs.topInputs.nixpkgs.legacyPackages.${system}; in map
|
||||
(package: pkgs.${package}.name)
|
||||
(filter (package: pkgs ? ${package}) permittedInsecurePackages);
|
||||
@@ -84,7 +85,7 @@ inputs:
|
||||
config = cudaConfig //
|
||||
{
|
||||
allowUnfree = true;
|
||||
contentAddressedByDefault = true;
|
||||
# contentAddressedByDefault = true;
|
||||
permittedInsecurePackages =
|
||||
let pkgs = inputs.topInputs.${source.${name}}.legacyPackages.${system};
|
||||
in map
|
||||
@@ -104,6 +105,8 @@ inputs:
|
||||
ispc = genericPackages.ispc;
|
||||
opencolorio = prev.opencolorio.overrideAttrs { doCheck = false; };
|
||||
redis = prev.redis.overrideAttrs { doCheck = false; };
|
||||
krita = final.genericPackages.krita;
|
||||
geos = prev.geos.overrideAttrs { doCheck = false; };
|
||||
}
|
||||
)
|
||||
// (
|
||||
|
||||
@@ -15,7 +15,7 @@ inputs:
|
||||
appId = "pam://chn.moe";
|
||||
origin = "pam://chn.moe";
|
||||
# generate using: `pamu2fcfg -u chn -o pam://chn.moe -i pam://chn.moe`
|
||||
authFile = inputs.pkgs.writeText "yubikey_mappings" (builtins.concatStringsSep "\n"
|
||||
authFile = builtins.toString (inputs.pkgs.writeText "yubikey_mappings" (builtins.concatStringsSep "\n"
|
||||
[
|
||||
(builtins.concatStringsSep ":"
|
||||
[
|
||||
@@ -28,7 +28,7 @@ inputs:
|
||||
"+presence"
|
||||
])
|
||||
])
|
||||
]);
|
||||
]));
|
||||
};
|
||||
yubico = { enable = true; id = "91291"; };
|
||||
loginLimits =
|
||||
|
||||
@@ -31,7 +31,7 @@ inputs:
|
||||
// (builtins.listToAttrs (builtins.map
|
||||
(system: { name = system; value = { forwardAgent = true; extraOptions.AddKeysToAgent = "yes"; }; })
|
||||
[
|
||||
"vps6" "wireguard.vps6" "vps7" "wireguard.vps7" "wireguard.pc" "nas" "wireguard.nas" "pc"
|
||||
"vps4" "vps6" "wireguard.vps6" "vps7" "wireguard.vps7" "wireguard.pc" "nas" "wireguard.nas" "pc"
|
||||
"wireguard.surface" "xmupc1" "wireguard.xmupc1" "xmupc2" "wireguard.xmupc2"
|
||||
]));
|
||||
extraConfig =
|
||||
|
||||
@@ -450,7 +450,7 @@ transparent_pcmanfm_sidepane=true
|
||||
transparent_pcmanfm_view=true
|
||||
blur_translucent=true
|
||||
centered_forms=false
|
||||
kinetic_scrolling=true
|
||||
kinetic_scrolling=false
|
||||
middle_click_scroll=false
|
||||
no_selection_tint=false
|
||||
noninteger_translucency=false
|
||||
|
||||
Reference in New Issue
Block a user