mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 12:59:23 +08:00
Compare commits
127 Commits
fix-libvir
...
temp
| Author | SHA1 | Date | |
|---|---|---|---|
| df93212d11 | |||
| 96d507a5ee | |||
| 21ec879c84 | |||
| 4c7c357aca | |||
| ce6b60b150 | |||
| 30c283523a | |||
| 66a7da7c0c | |||
| d0836dd35e | |||
| 4516dd39b3 | |||
| 97f36d2e92 | |||
| 2ded7a75f0 | |||
| 8379b95651 | |||
| 26d8e48e61 | |||
| 125bab0ea8 | |||
| 1f108a4ffc | |||
| 1259ace667 | |||
| 1325418934 | |||
| 780f86a0b7 | |||
| b6495a02a8 | |||
| e171f3cd97 | |||
| 6b8ecc62c1 | |||
| ef71e54d26 | |||
| b1b76c2984 | |||
| e110601a80 | |||
| cef3a1eb63 | |||
| bb8442a458 | |||
| b8320c00a7 | |||
| 3d162ddfb9 | |||
| ec321e117c | |||
| 29e15e70ab | |||
| eb3ec5828f | |||
| 9ec5772480 | |||
| 7796e96c20 | |||
| a5b9725b41 | |||
| c3e9ac4d3d | |||
| 759f68a0f7 | |||
| 57d73b193e | |||
| 6d528c35d7 | |||
| c027bb456c | |||
| a909023f14 | |||
| 3bc77fcc51 | |||
| 2866e242b2 | |||
| 736494a640 | |||
| 77dd73a2e7 | |||
| 39de1b5e9e | |||
| 012060a249 | |||
| 626aa6d459 | |||
| 82347260e6 | |||
| f6c205131e | |||
| 0d73b8293f | |||
| 8f1b70c22d | |||
| 90d6b827c7 | |||
| 8cb82861e5 | |||
| 78e2016797 | |||
| 126d47b841 | |||
| e6c4fbddab | |||
| b48c1dfe3f | |||
| d3b06ad1b7 | |||
| 5a873bee31 | |||
| f5caaaefe4 | |||
| b72575045a | |||
| 333dd32eee | |||
| f9ef305a80 | |||
| 18cb080b18 | |||
| ee86e9c244 | |||
| 0d45b6ffca | |||
| 8aebad64ce | |||
| d5a24a4323 | |||
| 919eb1247c | |||
| 524285fa67 | |||
| 091c16e887 | |||
| 285d23c2da | |||
| b690132c8e | |||
| 46eb66201c | |||
| 13a2c57312 | |||
| c8fa8a0974 | |||
| c5193590cb | |||
| cf896ff786 | |||
| 663415ad84 | |||
| 907a8f6080 | |||
| 7c32fa3b8a | |||
| 36b140bb16 | |||
| 7e40d8af38 | |||
| f5a3c4af12 | |||
| 03ddd14623 | |||
| 6f50f70cd7 | |||
| a2863615c0 | |||
| 8c38364596 | |||
| 2451f16442 | |||
| b36f9e9f69 | |||
| 585bb26dcb | |||
| f31a38af3c | |||
| 61e6393190 | |||
| c3410d8be0 | |||
| 596d1d4e91 | |||
| 893ed54b79 | |||
| d50ed59209 | |||
| 9da8f28997 | |||
| cf3a47ca56 | |||
| d28d4ec79f | |||
| bb97d11d77 | |||
| 98de92fd76 | |||
| ad40c0457e | |||
| 130e7008d2 | |||
| 74b9384a51 | |||
| d2b6ac8d2c | |||
| d1e3867481 | |||
| 02758bd2e4 | |||
| 78b67438a7 | |||
| 7441e19606 | |||
| fa1d0e6757 | |||
| 135eaf2760 | |||
| 2a04978872 | |||
| 22abe5378f | |||
| 382f74a127 | |||
| 300a69c389 | |||
| e306de5db7 | |||
| 50ca811ac3 | |||
| 9b92bb1180 | |||
| c3b4de09a5 | |||
| 0cd2c914f8 | |||
| 58836ecef9 | |||
| 191e065863 | |||
| dd3020e7bb | |||
| 499f4e1791 | |||
| 5352384ff3 | |||
| 46ad5f128c |
Binary file not shown.
@@ -38,7 +38,6 @@ inputs:
|
||||
};
|
||||
beesd."/".hashTableSizeMB = 10 * 128;
|
||||
nfs."/" = inputs.topInputs.self.config.dns."chn.moe".getAddress "wg1.pc";
|
||||
btrbk = [ "pc" "vps6" "srv3" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,17 +1,7 @@
|
||||
xray-client:
|
||||
uuid: ENC[AES256_GCM,data:97aX07G5FPumdWcDxnYOs6fRgljXWuwyNXGg1d7zdbUUfNnb,iv:+wAC/DZXsg+evYFA4DMfLw5Ut3ExQl1RgZ/2AsNQDpo=,tag:ebD77muITHof+FQMydWobg==,type:str]
|
||||
wireguard: ENC[AES256_GCM,data:JaOSq474mGOoQQcdJ/j9fYo2e1vjXMPxJ69TOd079FrSkbzbIteWww5f8Xo=,iv:uy/NC2+tibL61XJDZK/spKjV9u0oXK4YzjFjYmCAL0k=,tag:en+c8cHaPvDqJL+EpQjr0g==,type:str]
|
||||
wireless:
|
||||
#ENC[AES256_GCM,data:wjStmDz44D13rg==,iv:7Qdqk/3VfS6kZNMSD6P4zyuRkzgIb1PcH56rWBhuD80=,tag:RVfRu9zMAenZBk3+RFC9wg==,type:comment]
|
||||
"457": ENC[AES256_GCM,data:at6sfLdZUj7JTkumDLzoBoM6rNH3SGXvzso2ryYEXiFzy24e8cMKql2Sw3CHqWH9+cS6+rzuRLLeLJQMDN3dHw==,iv:nHEdqAIF7WK6kPkm01LoDmypvkHOhIR+tf9cAlv+1hs=,tag:3lMuOZ4qatv1LOSMwMiEoQ==,type:str]
|
||||
store:
|
||||
signingKey: ENC[AES256_GCM,data:Y1nbOt2boQQ94oBjQDoH7J7tkCIVx4f7Nrq0AC5Bqq/uGZnd7UCPv8hLnbjVcPTPHLMwnwzD9yvdYrLv+Q2HZJJQfQjO+sXkVZI4TpFJkqTofvrmDk4PL5tkh/4=,iv:eOM6wCO/qQaf5MMXWLROKFkfo6avm6IWWpgK1mNx6VY=,tag:ZC5xsTDdyCe1VxaBIC0ozQ==,type:str]
|
||||
btrbk: ENC[AES256_GCM,data:OADRHx+lXPSvvSApg4faq9uqsjExmlZzGnud8uygWJoIUeP6OJNukBfQIMD1SjSLH0q9kmQ6D7NpYzjx9uSQ07MS5cK4RQXFBOEdJwD86QMJEFietGMceAxCYCOSFAgZH4OF4HFCoiDONXZDOZLfIDzGqIfejbJlM0CTDozeKNu6dUn8SbprBNddg6wSI0S/v+tIBN1SgF5CzytCCh9APzNaEvBl6bF9DTNY8AGaGQXyQwZAJ+dx1jtCQhHzXGJ755BPxgKRj4WvlwSfwVCEWykg7d0RQsvnXMvKe0MJyvg5LHa6+dPsldUooo6jq+KV51tCno0xQQtac5bJ2ZEsALlAayuj/NT5PfFKE1ZK34YMBmfUa3+fhW7DIggASIVy+SV7BTfYk29GoYjrtS7gH948J+ko0LnypcrGDTVnmWIJQlgwLPegI0jO8IWBI8yP8npQBTMm9SQQtbN0VIMVQueWnFcgbcR43lvVhkkA7b3a8sRNZGQBip4AJ3kQXF2VkSji,iv:5989jmkk4Rci7bohQLE8rgYp4lTRRcE6c/Bh6nz+ncQ=,tag:MH6mCPXwjsB/ov3xHhn9aQ==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age:
|
||||
- recipient: age19ax6vm3pv8rph5tq3mmehd9sy9jk823tw8svsd790r0lkslycquqvlwz9m
|
||||
enc: |
|
||||
@@ -31,8 +21,7 @@ sops:
|
||||
by9Rd0U0bzNiK21BQTNxN1RuQ09DQVkKJmSlzV5ppEkZFljsS17ZWmoI++fz4tJh
|
||||
kTdoAStG1zsKASHyZTsmdm3RBDO3qV1KhQC2gC7d4EiwNZngxOOZJg==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-05-07T10:50:31Z"
|
||||
mac: ENC[AES256_GCM,data:a51pRxylo+/XMLxEqy0rMdigrVJ0sSWsienWWP+dGz2oaJpytH3XzFfninsEic4om7jlN8m6ITa9t6P5yvainrX5hLii7Z2/aZELRGCQdGgm2SEWgLMuKyJpkRHXkD4pnooUwE8b0OgRogusQUZw0yVGZYkngWrRXRvXF6lpd5A=,iv:ZBU0HFCJqNUGnkJVB+QM1+tlbC0ex+HJafydUpEInkk=,tag:cZT+fgf9NVRIvdeGgxUzCQ==,type:str]
|
||||
pgp: []
|
||||
lastmodified: "2025-05-19T01:47:25Z"
|
||||
mac: ENC[AES256_GCM,data:J79zVjfGgptSjh+ShPBOd+lJ9i+NuS2Uw7P4ZvF7xeahn7fbT8bercsBv1F1USwW2ituTBMZFmxaspGjAD+azEM2X7zSJnVtbKr+T9FY6i2N+kPIxdseyw93JLZ1pPTy9bQeXRAJYlJHyEw4zHEpMBbWSI88I+i43s2xkScwEuU=,iv:4Ge0dHPxa4zF++0eeHy8fH7t5ndFznhFAKnrV7WOOXs=,tag:+UG3b93zFo/EfOfCQrPoBg==,type:str]
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.9.2
|
||||
version: 3.10.2
|
||||
|
||||
@@ -20,6 +20,7 @@ inputs:
|
||||
rollingRootfs = {};
|
||||
};
|
||||
nixpkgs.march = "tigerlake";
|
||||
kernel.variant = "cachyos-lts";
|
||||
};
|
||||
hardware = { cpus = [ "intel" ]; gpu.type = "intel"; };
|
||||
services =
|
||||
@@ -36,7 +37,6 @@ inputs:
|
||||
};
|
||||
beesd."/".hashTableSizeMB = 64;
|
||||
sshd = {};
|
||||
kvm = {};
|
||||
};
|
||||
bugs = [ "xmunet" ];
|
||||
};
|
||||
|
||||
@@ -19,7 +19,7 @@ inputs:
|
||||
"/nix/remote/jykang.xmuhpc" = "/data/gpfs01/jykang/.nix";
|
||||
};
|
||||
nfs."${inputs.topInputs.self.config.dns."chn.moe".getAddress "wg1.nas"}:/" =
|
||||
{ mountPoint = "/nix/nas"; hard = false; };
|
||||
{ mountPoint = "/nix/remote/nas"; hard = false; };
|
||||
};
|
||||
luks.auto =
|
||||
{
|
||||
@@ -52,13 +52,12 @@ inputs:
|
||||
"alderlake"
|
||||
];
|
||||
nixpkgs = { march = "znver4"; cuda.capabilities = [ "8.9" ]; };
|
||||
kernel.variant = "cachyos-lts";
|
||||
sysctl.laptop-mode = 5;
|
||||
};
|
||||
hardware =
|
||||
{
|
||||
cpus = [ "amd" ];
|
||||
gpu = { type = "nvidia"; nvidia = { dynamicBoost = true; driver = "beta"; }; };
|
||||
gpu = { type = "nvidia"; nvidia.dynamicBoost = true; };
|
||||
legion = {};
|
||||
};
|
||||
services =
|
||||
@@ -99,21 +98,9 @@ inputs:
|
||||
};
|
||||
};
|
||||
acme.cert."debug.mirism.one" = {};
|
||||
frpClient =
|
||||
{
|
||||
enable = true;
|
||||
serverName = "frp.chn.moe";
|
||||
user = "pc";
|
||||
stcpVisitor =
|
||||
{
|
||||
"yy.vnc".localPort = 6187;
|
||||
"temp.ssh".localPort = 6188;
|
||||
};
|
||||
};
|
||||
nix-serve = {};
|
||||
misskey.instances.misskey.hostname = "xn--qbtm095lrg0bfka60z.chn.moe";
|
||||
beesd."/" = { hashTableSizeMB = 4 * 128; threads = 4; };
|
||||
gamemode = { enable = true; drmDevice = 0; };
|
||||
slurm =
|
||||
{
|
||||
enable = true;
|
||||
@@ -136,14 +123,14 @@ inputs:
|
||||
docker = {};
|
||||
ananicy = {};
|
||||
keyd = {};
|
||||
lumericalLicenseManager = {};
|
||||
searx = {};
|
||||
kvm = {};
|
||||
nspawn = [ "arch" "ubuntu-22.04" "fedora" ];
|
||||
nfs."/" = "192.168.84.0/24";
|
||||
};
|
||||
bugs = [ "xmunet" "backlight" "amdpstate" "iwlwifi" ];
|
||||
packages = { android-studio = {}; mathematica = {}; };
|
||||
packages = { android-studio = {}; mathematica = {}; vasp = {}; };
|
||||
user.users = [ "chn" "test" ];
|
||||
};
|
||||
boot.loader.grub =
|
||||
{
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
xray-client:
|
||||
uuid: ENC[AES256_GCM,data:XU7/GZ8cJmDwNsrQfoFHrquZT5QkjvTPZfnghX3BLyvPLlrX,iv:e/BQkZ5ydWD4P/qT9OUloB8/cXImfkG3YZnuIeNLoTc=,tag:EW3ZBzGnyIrUfcMeJqm4aA==,type:str]
|
||||
frp:
|
||||
token: ENC[AES256_GCM,data:0mE8/cWqHKNquCIiqgbjcNhipKk7KEfbZ+qRYbu+iZr7AH9QjfYZQiMJNp4Aa3JWwBLYAnpf,iv:ID4cc8Tn0H9b1CimXlPamMlhlAkafhRApDHo/CCQ4BE=,tag:BUuU/BCj16R7FlKlpubawA==,type:str]
|
||||
stcp:
|
||||
yy.vnc: ENC[AES256_GCM,data:IsZWkNGYHrbQcgvOSURDnA==,iv:4XO8RFBdNopLKYxCACmkXLMPu0wIVx64y0C7m2bsTVA=,tag:fMHzU9aQm0bRr8pTKwpuHQ==,type:str]
|
||||
temp.ssh: ENC[AES256_GCM,data:XG9WpTR8Bw==,iv:XiMTPN8Gx1nNssf4r+VXTvUATiUNsOYJ2jeHjhDSyTs=,tag:JS3NlA4cs/6IA19PJYrStg==,type:str]
|
||||
store:
|
||||
signingKey: ENC[AES256_GCM,data:TsB1nA0Rf2AsYyH59WpUK53pTCX2JdrGQjkJ9A9BfWLLmw3EMnPoaLHG12rv1R2/xRU7rP+iVhXb77g60I/Kn4ehun3ogMmK1oEAKyQcxudBUJFk+SeijaQLr2A=,iv:e2rdGBVOPS1nyC3pXhs5r0WyEkqxcpCnX3eAcBCj93M=,tag:HwccjH2Wms5/TevU2IuzNw==,type:str]
|
||||
postgresql:
|
||||
@@ -16,8 +11,6 @@ mariadb:
|
||||
slurm: ENC[AES256_GCM,data:fGvNMmqk7Cee28VJ1QoBVrBbgIUbj/F1W0SRjdP8N4K/M8Wx4AVm1kAr0IAhPWyDLXlIjM1NUvuEV5BpYDBdjg==,iv:rFTMJ4x2kgENQUA8ftSaLjdOc25i5mWR3UYbdq54vjs=,tag:6feD0eCSv7bcHWBveLNJwg==,type:str]
|
||||
nix:
|
||||
remote: ENC[AES256_GCM,data:uosYkxTCB0wiY+Uufk//OcBZFN3EzbZoQGZ95M9eZMjQ5AobAZqosi4laE+EMcZL1CqYqlWXaSoEUOB8biUaZPseo+1AX1TlmUgZ7QpkfOX0VKZu01C6C+lVyqVqMFq6z1BFyX/oeITMIfnd4a/2KwJCHLAZ4hMkJ5p+aJwByKGa3N/2m41HH/1S3z7pYQWj7YJxunTPPG6WNSiRncQki11rvmddwnXmsBF89+jW1Phge8U295haC57T5oIGPxR645IeTK4ZUlL8eVuZ+BhsnwbkYcaxvjSwe+DOIVPupR8GW+gis7KxwE89kqvnQhinamexcPUz4lGHlqO/Xn6jrJx6T/wXF+19epAzeHapYte3dTWNsdPwPLPJihT16YT5fwrLnH3zq8kexWz1crmnCGUoaBs4S2tHWHLgv2lTv0IHLx5F6ijpDBj/Avg9YILIURzdeea+rBxdycHasUDTVlJtYKRH5J+WbAKWI+oJ5qmXjIRUYL+O9xIUfOGO+1b3xs8MYxRWuvDV2P88N8vN,iv:yQQp5wjbSVn1oia5yL7d6GF9Vo704G0iOQRGMbzQHzg=,tag:bpBag5y5n+7ojOa8QOcDvA==,type:str]
|
||||
wechat2tg:
|
||||
token: ENC[AES256_GCM,data:PrZWR8WiZ7grkpTLqMxwbnkwZttl7n0e1lc1mdHJiFUWq/PqG2wNBC27C58jMg==,iv:02XHhfpN8YPix0REbJDnsBbvCwifbdwBwfuJ2glbvjo=,tag:6aWNqBfwulsjMbl+D6L9vw==,type:str]
|
||||
searx:
|
||||
secret-key: ENC[AES256_GCM,data:KhIP+Rz3rMfNgPEGTlKGvm6gl1/ZuPI=,iv:GcaLEJHKJO3n6IaeiFr9PaJ6eNx04/VjX3UgmBF429g=,tag:HkplyH9hTHUaEZ709TyitA==,type:str]
|
||||
sops:
|
||||
@@ -44,8 +37,8 @@ sops:
|
||||
OUlxNjdQaXdXMkZ6bnV1ek4yZ2dpbkEKpKGOAxo5Eef2jtGrg4iSzmGCeg+vTgvu
|
||||
+K8b+O19MIkGMDBm6UbYUPtc/7eqoEZRiTUzNMTmfkLVS4ul5zou9A==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-04-13T05:59:15Z"
|
||||
mac: ENC[AES256_GCM,data:/m/cioV71s7HJ7ObIDCr69wDLn2xk/lTRqmUCx46u7tzOwMsYqU6DghBsZuaUN1r22CbMi1wtmSziDisKStOGY27pswNe7IuEo4IhVz5sJNxcWCxpYo8ttrCUeaJ7Y0vFbseIn1l1UObfubhhvVdxDsE0RoxLK7Ka8hJW5aEksM=,iv:GKmlbRXFexMegBWBVx4vusA0ceZZnwGIN2FkSpGXMdY=,tag:yoCnH94Ph0AUjkN3CTg6wA==,type:str]
|
||||
lastmodified: "2025-05-24T11:27:02Z"
|
||||
mac: ENC[AES256_GCM,data:uNkThOX3NEUeiaJVavZ0rCpQRT+GbRXADiMuAwb/tg38fBrKQeUO9ohicl/UfiDFRTfCaiuH3T757jX2b51go2s0B6n7DOvPYYZ5EWGnM69RFxrdDfWfge8n8/SHmuKR9dPJb/eSa8HAs8uDnqBPoR5SqG5lnyZs3a7P/kjK2T4=,iv:snmnuYmcuyhGs4YrIGFLmDffFE9yecB/vsM0MvxBR4k=,tag:vbqA7jvVCFHvLoLmKbfO4g==,type:str]
|
||||
pgp: []
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.9.2
|
||||
version: 3.10.2
|
||||
|
||||
@@ -62,6 +62,7 @@ inputs:
|
||||
];
|
||||
};
|
||||
};
|
||||
packages.vasp = {};
|
||||
user.users = [ "chn" "xll" "zem" "yjq" "gb" "wp" "hjp" "wm" "GROUPIII-1" "GROUPIII-2" "GROUPIII-3" ];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -18,7 +18,6 @@ inputs:
|
||||
{
|
||||
xray.client = { enable = true; dnsmasq.extraInterfaces = [ "eno146" ]; };
|
||||
beesd."/" = { hashTableSizeMB = 128; threads = 4; };
|
||||
xrdp = { enable = true; hostname = [ "srv1.chn.moe" ]; };
|
||||
samba = { hostsAllowed = ""; shares = { home.path = "/home"; root.path = "/"; }; };
|
||||
};
|
||||
packages.packages._prebuildPackages =
|
||||
|
||||
@@ -15,7 +15,7 @@ inputs:
|
||||
btrfs."/dev/disk/by-partlabel/${clusterName}-${nodeName}-root1" =
|
||||
{ "/nix" = "/nix"; "/nix/rootfs/current" = "/"; };
|
||||
nfs."${inputs.topInputs.self.config.dns."chn.moe".getAddress "wg1.pc"}:/" =
|
||||
{ mountPoint = "/nix/pc"; hard = false; };
|
||||
{ mountPoint = "/nix/remote/pc"; hard = false; };
|
||||
};
|
||||
swap = [ "/nix/swap/swap" ];
|
||||
rollingRootfs = {};
|
||||
@@ -32,7 +32,7 @@ inputs:
|
||||
"8.9"
|
||||
];
|
||||
};
|
||||
hardware.gpu = { type = "nvidia"; nvidia.open = false; };
|
||||
hardware.gpu.type = "nvidia";
|
||||
services =
|
||||
{
|
||||
sshd = { passwordAuthentication = true; groupBanner = true; };
|
||||
@@ -80,6 +80,7 @@ inputs:
|
||||
};
|
||||
};
|
||||
};
|
||||
packages.vasp = {};
|
||||
user.users = [ "chn" "xll" "zem" "yjq" "gb" "wp" "hjp" "wm" "lly" "yxf" "hss" "zzn" ];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -23,7 +23,6 @@ inputs:
|
||||
dnsmasq = { extraInterfaces = [ "eno2" ]; hosts."hpc.xmu.edu.cn" = "121.192.191.11"; };
|
||||
};
|
||||
beesd."/" = { hashTableSizeMB = 16 * 128; loadAverage = 8; };
|
||||
xrdp = { enable = true; hostname = [ "srv2.chn.moe" ]; };
|
||||
samba = { hostsAllowed = ""; shares = { home.path = "/home"; root.path = "/"; }; };
|
||||
groupshare = {};
|
||||
hpcstat = {};
|
||||
|
||||
@@ -90,7 +90,6 @@ inputs:
|
||||
freshrss.enable = true;
|
||||
send = {};
|
||||
huginn = {};
|
||||
fz-new-order = {};
|
||||
httpapi.enable = true;
|
||||
gitea = { enable = true; ssh = {}; };
|
||||
grafana = {};
|
||||
|
||||
@@ -66,27 +66,6 @@ freshrss:
|
||||
chn: ENC[AES256_GCM,data:Z4UmsXv1KiVfZMIQOEHH,iv:pF5lQLggkxm9y7taDVcp366JKp8U+8akNEdPA+Nf9Uo=,tag:0TajgUI/VgM3FxG1j6c/jA==,type:str]
|
||||
huginn:
|
||||
invitationCode: ENC[AES256_GCM,data:JDN913i+zf6+obWxrNAbgx1NJGPyewRm,iv:lqnjbSk46J0ZJN6ccbbiCiOK92W8fj2mWRwQHKqy2dc=,tag:UYZesryRlfAMo7xhKQ7zgw==,type:str]
|
||||
fz-new-order:
|
||||
token: ENC[AES256_GCM,data:JdMiu4du4S4fLg7b8LATG4g8NlahIFPvilGd1MsXNeMtnQs=,iv:fWBFYAVlfzi1dD/TpiA5N0JMY/LHTYPZGSh4sbK1BZc=,tag:LQTZe3DNk8xoy2+G4zld9A==,type:str]
|
||||
uids:
|
||||
#ENC[AES256_GCM,data:btt80rJcGg==,iv:DCBo36NMFiQO+dXom+AYTrSMYEAGCNXdMTJDIQVRlFA=,tag:LzoynD0J9surdmcFvVf/NQ==,type:comment]
|
||||
user0: ENC[AES256_GCM,data:53ag/e8f4aVEkUVszd7MzxNpDBBIkqGMneASW9/m5xU=,iv:LEZoitbzvTFAiXKZAPPOok/WaKsuTWgvd41Rq4/FMP4=,tag:opV15bhvDF1FR0UURsm+Iw==,type:str]
|
||||
#ENC[AES256_GCM,data:jXeZGm4rrw==,iv:hxZ6AU6FLzoUSJIeUh4zjuR6kvDfDhJCpvG47M+jRdc=,tag:AqMF7SJ96OEh0G8cgqvvuA==,type:comment]
|
||||
user1: ENC[AES256_GCM,data:emM3ffDBmymM9367YJG0lvYpw7iRl24fHSd5G4C4g6U=,iv:sJ9zLlgU2zZGFpeuIZXtL0Dqvd8RwbKU/a6HFdZTnvU=,tag:L6M7H24DXMvV55pYRiX8WA==,type:str]
|
||||
#ENC[AES256_GCM,data:gMDlZq2HXQ==,iv:hyJ2gkzrt0BZ3rO5rmz1tiS3jbrrA3VjpqjgPXQymjQ=,tag:aOWFyhuTjV9umsWJ0VjJDg==,type:comment]
|
||||
user2: ENC[AES256_GCM,data:b4jqm4Xm9dU2tYqqddKcHYcOh0Ol9W309fpQPcG2cQo=,iv:EKUDKnbYX8MTqd/G4NaQUVZ4mZAw3GvAlDe7XIVvVZQ=,tag:+oO6MaA6PFVbnP2ahfAArw==,type:str]
|
||||
#ENC[AES256_GCM,data:L0wkMIIuSA==,iv:j0LGq9Xe+Dru8bCwt93T51ZaK0ex/7CZJdBDn6jhq7w=,tag:EU4/62fe3p7QjpfSMAYHCQ==,type:comment]
|
||||
user3: ENC[AES256_GCM,data:dWJzu6S6T598TiKqX48LUcT1BAc0/gVy1tAknkvmg8k=,iv:KWl/av7a3hj27p+S2hhe2QpcNMFGJPsnnCjcaqzjOqc=,tag:HQbtRPxO8OnfKIBqTDjKlA==,type:str]
|
||||
#ENC[AES256_GCM,data:8/kYjPRSEA==,iv:etABb0TqNHhEs3/HGuRixEJUGhyXSTXI3cvhTTAUlXA=,tag:IfPzvdSamLcY1dRJls74GQ==,type:comment]
|
||||
user4: ENC[AES256_GCM,data:F6tbn2WBo9HrM+fmtf70GrNJyZ6qJ2HrNdJG788zMKM=,iv:Dx/7MUJVZO61u/DqwrrqmWIVpx4Qpi88SMflCRvj7Wc=,tag:WH6tsk/69+EEz2DS1srrNw==,type:str]
|
||||
config0:
|
||||
username: ENC[AES256_GCM,data:DDGErXyt,iv:7Z3U++o930QhngC+NzNna32F2AKSWjEFnJYXY00rCM4=,tag:L83e1KTQkVwSWSwhTwTzYQ==,type:str]
|
||||
password: ENC[AES256_GCM,data:Jy9Gbo0i,iv:ZthlQ0x5At9TUbh6MUiLkZUoVdCG0gp0SEyMtxKhnjM=,tag:fKmnopQ/sVFQsmb2ISOk0A==,type:str]
|
||||
comment: ENC[AES256_GCM,data:lb51oO8l,iv:4Iac4P+zfa7/T+aq5429VbdHoK7+WZkj1nC+yPOoIy0=,tag:NRl5GjjKn4OHfIGDNh+3MA==,type:str]
|
||||
config1:
|
||||
username: ENC[AES256_GCM,data:/QlSea1D,iv:0gMEI2JJudtKHE9J7IlI8Hsfo0jQwCy2Ap8EXxVqUVo=,tag:2DnWRv1b2VhtV5wSnnOzqg==,type:str]
|
||||
password: ENC[AES256_GCM,data:FHd4UPV2,iv:jI5BwcfxTBj2igdFUQtKS4LGnt5O96Kp3RPvnpXxFR8=,tag:Lfe8paHNQ44nRb/gk0oUbg==,type:str]
|
||||
comment: ENC[AES256_GCM,data:QILd5mRa,iv:mmM6h721UIXTuRL7k9TDOPdRrqMuq5M8krz5yWR20Mw=,tag:ALpQZjR6W0X44rST8U74NQ==,type:str]
|
||||
grafana:
|
||||
secret: ENC[AES256_GCM,data:1Wfq8QmhzKBObdktheFPySzXYlOJzHWbYYQXgn3beLOwSlW9f7bUn+wIrRoj1e8WlFJkAU2xywzjzzy/UwpSYA==,iv:/0YoHTs54O+cT6VVt1U5CYXr2qEdY2kijOlnMZMW4d0=,tag:SD/IELlcgfS7p9NBEa6D/g==,type:str]
|
||||
chn: ENC[AES256_GCM,data:8R92k7RH1491u6lfQdM0U3SG8TPi3vWhZyj810XSjnA=,iv:8v6ijLHgoTPT6MGoP/lWB+UEZCCgOpvfskWCJJ63Udo=,tag:k9SHzJ9d54Rny3n8EbksOw==,type:str]
|
||||
@@ -165,7 +144,7 @@ sops:
|
||||
d0h3aDh5QXFZYWJFdmNVYnJxQ3pBeVUKTl0XVvtwJcz+RpSylgDPl/R8msInxvWX
|
||||
eQGmrDHibeE1V+KSDiuNzC4MVRIrOnh1beHrhnVQ86HwPVgJqs2FoQ==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-05-16T02:55:19Z"
|
||||
mac: ENC[AES256_GCM,data:fsqb3NvXwyoGWfcJEV04XcWiifB/zEW+LU8twQ2sY3cZWR5KHAWgVXCXrCunYiSy/Q5nf+ldTgoXKdmNu1pVOJQQXRCY1q1y9MV36msAfIUc1hdkDlo2ka5+d4aBcpqr5nPo5ZU6GJ5by1p8WIPSOWCGfsqMMlKhIWJ+8YaqokU=,iv:cfveyxa/0/qKRHc6wsjAC9stZSkgF85khnp3LTtF+K0=,tag:5vVFg0isyJcg3Twhq5Ouaw==,type:str]
|
||||
lastmodified: "2025-05-26T10:55:01Z"
|
||||
mac: ENC[AES256_GCM,data:ek8oYslh51198fhnYy8LgZQBo3QEnCumeSzLEIEFp/bQshfPVtiMt29n37y89GZjfvd/UL/J/i4sxHqF328+MoMtIYwcDzJoHp/ZNJYZoM19UjEsPL5YemRRXz++gw3tvDgqPzYvtr93pg6+WcPNToIhzsew7QzYj2xLiSaecvQ=,iv:wk8RcTUbZwUHRAgNRuZ3SWWv6O57hHBCkccYNZiMwPQ=,tag:8bwhsrkk8bVMwThZQPkNXg==,type:str]
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.10.2
|
||||
|
||||
@@ -7,47 +7,44 @@ xray-server:
|
||||
#ENC[AES256_GCM,data:OVgDU+zqcQ==,iv:8KuEqBuL5Ca6pUOFFA+vySJx/h3BhGAAC0CgnxiW46o=,tag:TY1MajSSy2RjKVI2SSAAFw==,type:comment]
|
||||
user1: ENC[AES256_GCM,data:S3IHO9FcVHTJOsRxjSohM9MgnrEwLdDpFU+efLkQaXT2jNJG,iv:KOesvPzjDfm1EDLFiegbk0wgjp7di5mUwUuuY2hwvOQ=,tag:ZsYyUyyEhO5S3weCw/gPMw==,type:str]
|
||||
#ENC[AES256_GCM,data:OQOPobpbbhajgA==,iv:4jG3bHKzWcR+JnvSlJsc0Qlv5kywqVN5UE96J31CP7Q=,tag:P+jJkRxPu99tLXyO5k6dRA==,type:comment]
|
||||
user2: ENC[AES256_GCM,data:e7ITe2ZouKr8dXT7SYATyzbzHaVeu6AKt1OcQKk3U0nsQgoa,iv:UbOOuojy6OAFEH8lGhKe5Hs+2K6FX5MZ8Br9AB007gs=,tag:5XeB4YngzTcHZvCpXe/ZXA==,type:str]
|
||||
#ENC[AES256_GCM,data:93BxR0AEdQ==,iv:rf69GWpuxYt7fu1Fyv55pynuQDhi+TA5CwZK3cc3yBo=,tag:/hLy6atNMxLw6G3/qgMM4g==,type:comment]
|
||||
#ENC[AES256_GCM,data:s6BwbmIwmC1J+vA27pPGh0Q+Rmowkd8ES3hYOny3vX+tjWtW+qiWBz2A9M4=,iv:XXPPaVyP7fEUhNJay2mjjC2f3Vg3wYtBUDoSYQt1Iew=,tag:B2WAfg2Oqwp0t0gE7Jdq6w==,type:comment]
|
||||
#ENC[AES256_GCM,data:m0iCqLI8ELaPb9g=,iv:bsh7JHILbOZJ+bgGr0U0rDanjUVGgDzYGhboezspEjE=,tag:o7A4SXoCXk5LXmZ1bidg/w==,type:comment]
|
||||
user3: ENC[AES256_GCM,data:r+6jXaIj4HJoYLnJcnjJB+WEZlGaoSy/ktc1Aw77hFtNrrGp,iv:P+YUKns1yaOZokH5WkDB0jssGyHg3ncc54tF1PyA7Oc=,tag:/pxMEr7l4ye5EDAOsllxJA==,type:str]
|
||||
#ENC[AES256_GCM,data:4gqZh391hg==,iv:No22DrD6EBs2FA4/qH8msWEjs20fc+ZpEeZep+HIv+c=,tag:aHrYNbI83POI4PRj1nd+Yw==,type:comment]
|
||||
user4: ENC[AES256_GCM,data:ujiml/r4aFiKOkSJkaD/KE8rKuBtLSnpZREBH3vRJUzDT0QM,iv:a3VFlXpMLNFihvFa7gloANtHmBLg4szTL5LTm8E2kNs=,tag:W9KZ1GAVx9IBKfda7Zedng==,type:str]
|
||||
#ENC[AES256_GCM,data:RVChRrOl3R8DiKPS7yduAu5RG7d4VkOZ5akRTp18mK7Hz/xQ7FpxlNqGJcQ=,iv:j7naYq9tD+G5dDB8+hyUVosA3p2O4wlkcxIBlO7hRdo=,tag:TvlSmZwTDGLCX7qOR5Clhg==,type:comment]
|
||||
#ENC[AES256_GCM,data:AzzKMw==,iv:Z73ISOLhPWP40wTy8PucY3KaB9nS7WQECK3tZFYC1ao=,tag:KJuiCODhHyDl5bXInUSI5g==,type:comment]
|
||||
user5: ENC[AES256_GCM,data:iDuLRb4dhLUOjpamioMwoTYrn7Cy+Ln4SaedVXkwVD05rjJ0,iv:AqzBBvLpJuIJCUJq0IyDcHrlqb0e84nQC0c94Rj85uw=,tag:0xou1i/iwAxGngO74OIMXg==,type:str]
|
||||
#ENC[AES256_GCM,data:D5xiJW0Oyg==,iv:9a/6myiT9Crf/fff6ZkXj/obW2k95cABUNqQdPmcwcc=,tag:chs8BA8YtVkM9m3Ey9ETlA==,type:comment]
|
||||
user6: ENC[AES256_GCM,data:YzLlf37SxKmU1/QA7gUIJsGid3KZNoAGOew8xR7cmw5l8ZmX,iv:SfKubo2jfjtxKn9odDiokMEZyPFfYZ/wwyYtBrgvgmM=,tag:+hxwIU5uBhzQyrKX4r3oiw==,type:str]
|
||||
#ENC[AES256_GCM,data:nTsDaAIVIP28YBCw0XONqWoYziAYhszJhLBlJfbFM6w2NB0nQcYWAanhkkA=,iv:rezGcsfxcAUjTtBFd099TDrV+K59cb0gbJCCVqH+nCA=,tag:5g2Zl82MNuHTf12Tb0GWcg==,type:comment]
|
||||
#ENC[AES256_GCM,data:8FxApg==,iv:vPa5p3QVHAvw+ECusWGqx1ugTcHh42CVFDQcMhG59wM=,tag:lHiZtydcYFBQiXnWh8pCrw==,type:comment]
|
||||
user7: ENC[AES256_GCM,data:H/jje9ONEY6XuBXTZmTVGIcWUgGSMf5OB1NNRPtqGCgRP1ei,iv:xew+0BkRqz3nfOoBXTPbBv5hRczy/3tgYSKq432q4iw=,tag:da2ljcffiCVJCsMZaNPZyQ==,type:str]
|
||||
#ENC[AES256_GCM,data:QdaYYH3RGJ4qIg==,iv:79NBTEKCPtgVVv3G7wg+vdoLOWxc+bdqT1lF4HJpTC8=,tag:8mRFGjy7lBrdyGyX9vaSOQ==,type:comment]
|
||||
user8: ENC[AES256_GCM,data:H1gPtqF8vryD0rVH7HYzpMuZ3lufOBYczKwaTr4PidQtTyQK,iv:wh7NwFc/1ogNrnTTpm5L9dBqDVkvWiIsJZelR2mtR4Q=,tag:oEFdMFZJ9UYhsSVdefJ4rg==,type:str]
|
||||
#ENC[AES256_GCM,data:hG7EUK7V9QObh7rHKtgTESwNLOf16WXoQrCAAEiK8Nzsr7atwh9DqNIJAww=,iv:3zAY7CImCzvNmsVK/OG3VgYSUL1wdt+keYtuskGO7Gg=,tag:7JeGHrlVkAUOX7bhd8UJaA==,type:comment]
|
||||
#ENC[AES256_GCM,data:aYWIiLxs1UvupQ==,iv:AisokHuAzD5B6fEF6ak8WfAe151CM3a8MsaWC4uJPnw=,tag:cdk5S4n9ulyWrqsD+jcqYg==,type:comment]
|
||||
user9: ENC[AES256_GCM,data:HVK9KvGfOcwn1joc3VrkjBjE6hrxQPOBD5RTtQUgBPepToh6,iv:VK9aQ64L/GajpledBxC8PNB1BdNYEqwcdL3GKttgxvs=,tag:O/piztCYBARtAFxTMNXGaA==,type:str]
|
||||
#ENC[AES256_GCM,data:C6ri4a3iCXf7I3PWSoPk1y4143TTFugot1MMxdawWxGyfg/P7SYUBMs+T0U=,iv:v2lCOw+p0hJhXNsUpTSCvqNSBtPaPJGMrk6ukJYtB+w=,tag:WXq9rUYDQKN/cZzZ7CFQvA==,type:comment]
|
||||
#ENC[AES256_GCM,data:eCl1bK4=,iv:oYA2CFW6OGGrRYx6OHRYJpbEyFh575UjztvHaXA8UG8=,tag:Pw7xsisQB2Dd0KJeWFq6bQ==,type:comment]
|
||||
user10: ENC[AES256_GCM,data:xjVkr/wy7OxRuNZKfQagfNxdVxTEyQP1ZhnR6jHy2gjBQ0RD,iv:G6iOBCHOqlvfEENY/ega/TUm81wgT2OOdZKZ6bPfg9o=,tag:p8AMa3bGsIl0hWQ09lSzgA==,type:str]
|
||||
#ENC[AES256_GCM,data:Gs2pJl4YMPRBDZCmd/1ycXJcArdIb8cUAQ+09OuRm7z/x1ATc9xVr7dE+C4b,iv:JYf4sTzJh7PoQe5yFAC60mJ5zKUIof7QKm5jMfiF5xE=,tag:/CJPT/OmblQvzqkQ1VCP/Q==,type:comment]
|
||||
#ENC[AES256_GCM,data:+s3MMeNU5Q==,iv:CUrg+nNxCpJFbHQmMNXmSE+JcZK6Dfu8cGwtznx3CFY=,tag:G5CYMtao+hz3hs0fPVPmcw==,type:comment]
|
||||
user11: ENC[AES256_GCM,data:BIZ2zRgGv5/9AexiZZvu+m4A62YUWtAkjWWMu89GteqpWMBq,iv:13IJcDf18LjoxJk7uoKnuFZT6Ihxrxsy7DBaAaiFqus=,tag:RN7wj+uPneCkqNlMRyYrXw==,type:str]
|
||||
#ENC[AES256_GCM,data:JOabknMamJFImHErEcsrAMuYBXzJkw/Gm0+6rWrer2ePsoOakN/A3ByCPzwQ,iv:wnUFMeGfkUMkkpJBrFswy1SwJzVBDehEoilnzb43MgY=,tag:sXCKkiwtDp9v7ptpuAfOhQ==,type:comment]
|
||||
#ENC[AES256_GCM,data:spyQkQIHwg==,iv:7+0DUK95MPH7lpr+GMbbLu4/5yA11/4gTuLhQKlStfE=,tag:G/gIXML8UhYoCi9FfoTvSA==,type:comment]
|
||||
user12: ENC[AES256_GCM,data:FAF9lXOzXW9CrZgnQ1a2+E8snZj2+JHqP5Gny92k09o/Wzga,iv:/qZuAtFmUQE7A9lMzJUoCvGx+3Sv9Ioh2ahch3puaC4=,tag:urwbLwGkSX3e85NCjyPhhg==,type:str]
|
||||
#ENC[AES256_GCM,data:LRRsL6u+FH3jHa8UAhEXrb3UTQss9piBle2aH2xuuFw0cupmRd5PlSOBIbvQ,iv:0cccpn4bWkrla6COI5g6pDDW1JoVK4UULYteXoJp38s=,tag:+EFlWxGIw7k85Q2RIL/YHg==,type:comment]
|
||||
#ENC[AES256_GCM,data:HueqiREBet2bxQ==,iv:WCjTAGg2gXgBSvY3zc/YyB/1X0XjvphPduVXLsjOwH8=,tag:wC+On6lyyYQ1Dt/BHDvONw==,type:comment]
|
||||
user13: ENC[AES256_GCM,data:ExbnvWDIBqga5+k2mpoT8AKBOXAvUNMjBTPXUKrmtWzz4l+L,iv:UI7CvSx2FHYGf6BEHS4e3iwHZZWkl2Zt5xg2WdKbLvY=,tag:ad0c7YW2Bxo+Dn+BoSZ0Ng==,type:str]
|
||||
#ENC[AES256_GCM,data:JFKeeVBSBO8pWttZy/fTX1YaVV69Et1GmHVDLZ1E5vUY3BvajjjS04t7V5TG,iv:rZJQTe5+YgJ6X6uPoQcpTw4AF+gQCVSMe7maFetLEPg=,tag:H4ravqgOgQYgVXMayv7tXw==,type:comment]
|
||||
#ENC[AES256_GCM,data:R8lN5T0=,iv:FXLf8Vtjg+PkwNhxXWDViMKqwn7tFMaPhio9zhnudZw=,tag:34gxRH+P9lmkUxlOPKcYMg==,type:comment]
|
||||
user14: ENC[AES256_GCM,data:dgNPPlJD5JOFPbKhlvlRHBLmUNKeDm/JAiawUVpBE7H07Box,iv:w+t9BkqYvlxVKr+x0MwtBz0/YSR/7z1OnZLIoPdW4gc=,tag:CR3GLbaO0jSQgA2HuwzRqg==,type:str]
|
||||
#ENC[AES256_GCM,data:X80nhW5a/JQ1IQ==,iv:2UTsNLLDr4uBAEcPyvmep1fqH43JLUiHc/zqQWChfDk=,tag:DJEArs1nVnlcJgqM2uy17A==,type:comment]
|
||||
user15: ENC[AES256_GCM,data:6AskiMLLl0HV6tm2rYpV46XW0jePQy+wme2oi3M7He7WsgVM,iv:lGfnFn69Vnjv5J3rp5sRazD5/B+8Nk8MNG7HIyf4HKA=,tag:Vbg82tdn3noOfhKVVx0Phg==,type:str]
|
||||
#ENC[AES256_GCM,data:dpOaSMuXhIiwb+yD3TgOIKkeWBusQvqHbj4PuvH/anF5/P8JagplDpBSIimJ,iv:PkVIthbA21sFC4J4VmwZ/1HZqA6qbjVPnJoRszmeVbs=,tag:PcXPRYLzuC9F0YfNT4mi3A==,type:comment]
|
||||
#ENC[AES256_GCM,data:4jJkbMD9Psxrag==,iv:arRtRaNrqnYcT7vE3wqgl/y8/65ORaxqTdGw55AKDP8=,tag:pRpta6mXfy0XCyzMA4+cEQ==,type:comment]
|
||||
user16: ENC[AES256_GCM,data:fo6KJXlPDn7+FmxjEJQo9d79rDYemLFx6LanYZcJpKJR7Gxq,iv:yEUKPNZ9idrSqyVO9fhksP/7bjPMT/LzNK2VSq503/c=,tag:M87D44SIo9JzDB3ZyKu7fA==,type:str]
|
||||
#ENC[AES256_GCM,data:DeWybZ68gAH4cukohO+OQqeNrnRlUdclGHFeH8aBcn0aq1iWh1UCgtiT5xXd,iv:HYq+CiPWCswr+7+uwUblN8N6T38WU/qu9F5VzaLp4Gg=,tag:YKunlBxH4H71FRSuPxR8Uw==,type:comment]
|
||||
#ENC[AES256_GCM,data:/Kec+CdtnT11EA==,iv:DnmbWfgriaE6XAnMqq2UXhHhN+Rd/3YRodKVUCJo6p4=,tag:NimqZpbslKxwzoljaZqEdw==,type:comment]
|
||||
user17: ENC[AES256_GCM,data:gQInIcNFxJuCSsMDGq4yTp5JdMMmJRy1tY3PGLoLuuIXWV0a,iv:ya4n9Z7T9/bxeHqi5QqwJprEzDMsT6X0BuEXRS67wWk=,tag:RcjQfAHv8uc3PgN5c4bySA==,type:str]
|
||||
#ENC[AES256_GCM,data:tkJTZZjJfQdU0EDQw9mmc1GRlSpqdwOdsE/QCw4BedDbixjElKqUC5MPRR/b,iv:/3obljBcGiXJfzlTQivkVcaWWcsiqokuU/DmUTchpwg=,tag:E80OLtqoM5XuGk2/xYBYKw==,type:comment]
|
||||
#ENC[AES256_GCM,data:h7E4P6BiGjktYg==,iv:DhkK3NNppBqo3sXt9U7kbgfaBPYcSEX2hu6VOAesDiE=,tag:XoVbZklwCmU1EBhv0ujcSw==,type:comment]
|
||||
user18: ENC[AES256_GCM,data:dssxPEv8srXydunolaaDAYYo+BOXhp2PoqidOWH3z6NYBpyB,iv:WCLcMMwQJiHZBwreQpaOZp2saXvjBwgYUqSf7HQhMgA=,tag:5jsAVcgAgO+7JhBINz6tzQ==,type:str]
|
||||
#ENC[AES256_GCM,data:LXBBph+nPScs6CSHPKwMSvcgFtWrmcOHEhhDZUNClb/7ixJFno82QnRwrnTp,iv:00I8csKFj65qeK8RPbbQ18oQZBrYKeFV3eGwfFXyGDc=,tag:uWUPNfu5Tmqr2LDkijc5cA==,type:comment]
|
||||
#ENC[AES256_GCM,data:qGsMmWrUIzVdHw==,iv:DXayEA5zquwOzm+TqECYNHM98r0WSzcP3gA8zkzdPy4=,tag:OKTx12RqP9VxJQOnrBLkmw==,type:comment]
|
||||
user19: ENC[AES256_GCM,data:+Mh15DR9xvFAwks86iuHEA9FpObKWTSuVOEzUDpBUS/h0hOz,iv:zYIkic2bibvwCBpomnJ9465mda1rbm3RERBZY9twXuc=,tag:bwdL6DAGgkGYhYFI2C4A+A==,type:str]
|
||||
#ENC[AES256_GCM,data:ttTvPgRtQ4tYmYBSNaO+Bbs/Kz85vuNX+2Od4cOG6yD9yqrSdfLRwVvedVol,iv:ZWZX5rytwefvte/NgNlmmp9FN9vuZ62KVhVgVwX+g7s=,tag:uXx87i/ly6GkLgXA4+QULw==,type:comment]
|
||||
#ENC[AES256_GCM,data:1g2gohLbiixMes8=,iv:E3HA6cAdv3BdLMcrrcWW4Zsc2KLtW7L8Xrk9Z57l49o=,tag:rZ7W9ckf7lzJ23u5zwQiwg==,type:comment]
|
||||
user20: ENC[AES256_GCM,data:3UbVnn9oMRc0zZR46tWxwM9VFOvMOYm690csUomEVBcS3xPm,iv:KHuPXttLAFr7WT/qa/UYLY8GRsPWYZPyKNmdUh4iFQQ=,tag:jN8rQ0Gv+qnhwOWGH+CwlA==,type:str]
|
||||
#ENC[AES256_GCM,data:GzxXsTbEvdHV7A0=,iv:uxUG4hnYEsmJtnqbEwamwhtLt3UClt7ktmkGyAFdxsc=,tag:sF8YQ2cejAezI3Bbp9qKIw==,type:comment]
|
||||
user21: ENC[AES256_GCM,data:hgDJ11crZaWcKrc+ZDQklXwpnvt/sMbARkx3sLZfQGZqQZeA,iv:2Re+hdJuT5yg/qTymfpN+KdU3criOmwuqqg+SHb8iAo=,tag:s16N6u5cRDaoWxnrCkamuw==,type:str]
|
||||
#ENC[AES256_GCM,data:U0CcBBJraJj9,iv:9kuHsHkSDdDT0Gi/3Oy608RArrg+4cgeii5zWbsGuPA=,tag:EvqqMNvNcWBwie28t0+52w==,type:comment]
|
||||
user22: ENC[AES256_GCM,data:G+Ls2+bbcP4RmeYhPF44STdbqNiw0UZVxac6GQXJUyCehgjm,iv:vXbwtGWgBINUauS4rsDj+4yoropzZ4IHOZxF9/jLPTY=,tag:SN1BZbQTOfcAF6krXEXtjA==,type:str]
|
||||
#ENC[AES256_GCM,data:FnindYeqk6g6aZgajHVejfHPqeF+uSX3QzbrDS6XLZz52aQF5ZQSiJQCaDha,iv:c/mrS0jfy5EzQe4Tkm0QqBH9/okJnCsRZFGhzSjeit0=,tag:e5otDw+I2d7moybCx4jeqw==,type:comment]
|
||||
private-key: ENC[AES256_GCM,data:ts/LRGFAsYqvGvkvlxUI42IW1a8cGsSkpZhMDd3QVceRKvhPb1SRDaXoSw==,iv:6xX9xFIFUNlLBZ6CPBOz9JbHpvC4+QG9ZaCZcWdl12c=,tag:DYIa+QTV8vyl1l7OKKykTw==,type:str]
|
||||
send:
|
||||
redis-password: ENC[AES256_GCM,data:6zVKw9AmKwSWvHUZhzy0F2KcJW96uFoZY/N1Zq8ilUJOLZeX,iv:viwLIgJz9v8oadr8784OgETbEsxzGsJvVoxmOwWEFxo=,tag:XEYFnoCGwlnrkqaUbgeH+Q==,type:str]
|
||||
@@ -55,10 +52,6 @@ coturn:
|
||||
auth-secret: ENC[AES256_GCM,data:50KqO4GQ1ERbCnK4IjYu6aywT+IPMtVlTzh/TE4MwWApU4pO9yqz25ENGUAKRLi4p+Ecug+Rn3InRl1b+q6bAQ==,iv:SgHkHvHg/+yA1Z5E9effgCnZMVXv5amGNUsVKErai54=,tag:PoYLV9Xr0IXXsA39n7wiTQ==,type:str]
|
||||
wireguard: ENC[AES256_GCM,data:5M7EAy/6+2UASWkjxE0Jrxwl0aNdAVZaUjQnD1wU3YvOAQ/c2DSL8hVtKf8=,iv:a2tXFf1+aP0JhdNtzP8e82KJ71m2o8nx+G0wIx4VMig=,tag:l4TS4QBz2fIkC9/GnZgHnQ==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age:
|
||||
- recipient: age19ax6vm3pv8rph5tq3mmehd9sy9jk823tw8svsd790r0lkslycquqvlwz9m
|
||||
enc: |
|
||||
@@ -78,8 +71,7 @@ sops:
|
||||
ZXFTU3ZCaW1pTVh0RUJzdDdGdHlPYTgK2mlgcX2kEc8+2UDdBnhUm6IIuh8V6agW
|
||||
ooxH9OEPXUVI/4JcDo4v8ZUhAyU1ehLH0Ef7PJCChOZe2KZmWSNbhA==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-04-16T14:15:31Z"
|
||||
mac: ENC[AES256_GCM,data:XOG+e115arZG1uvFoLxCfAqr2pLI2ndS6bZKRyQlWaJK0Gti8RpQt1jVZ+Q3y5Ga8tpAvd7k5MYgRL0/H400ENCleM3vsh5s3VXjlSSxq4mfdkwhUH2E0t8OQyf8VXvs0SXZKhTOljETPu1pggB6iFUfEZ5e0kKRLRYWI4Tt94Y=,iv:mt60iMiKTcQP4b/f684j2IyFSWYzmq3XGK19CfZB53c=,tag:NyhQ0Lptv2E4jHuYAxcelA==,type:str]
|
||||
pgp: []
|
||||
lastmodified: "2025-05-18T07:37:52Z"
|
||||
mac: ENC[AES256_GCM,data:nfUU2BsDuErJGm8sVB9shRv4N+cIFZmAF1vWF4iZmcJwjP2PekVWcp4COPAlapy5oVhMutr39oW6VsltTR27jVxhI4+dueurMU7KRLD5Bwpk5hQmMAfZxvl4GaP50zehJbCwfApiX9CcjwCUxUjraTs4rG6LK2+8d5Z0PYosm2A=,iv:TR63cpbe3z0K4bWpbEnv/DE9jnAJV1Zv+Aj0HXoA16Y=,tag:fS78JUapMvBtZCFtM1z07A==,type:str]
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.9.2
|
||||
version: 3.10.2
|
||||
|
||||
13
doc/todo.md
13
doc/todo.md
@@ -1,6 +1,7 @@
|
||||
* 使用 wrap 好的 intel 编译器。
|
||||
* 在挂载根目录前(创建 rootfs 时),按用户复制需要的文件
|
||||
* 挑选一个好看的主题
|
||||
* 尝试一些别的计算软件
|
||||
* 解决 vscode 中的英语语法检查插件,尝试 valentjn.vscode-ltex
|
||||
* 调整 xmupc1 xmupc2 启动分区
|
||||
* 完善 slurm 文档,调整 slurm 设置:内存,nice
|
||||
* 调整 sbatch-tui 选项
|
||||
* 打包 cachyos
|
||||
* 打包 intel 编译器
|
||||
* 切换到 niri,清理 plasma
|
||||
* 调整其它用户的 zsh 配置
|
||||
* 调整 motd
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
* merge upstream, update flake
|
||||
* update src
|
||||
* fix all build errors
|
||||
* update modules
|
||||
* update postgresql nextcloud mariadb
|
||||
* update modules (synapse)
|
||||
* update postgresql nextcloud
|
||||
* update stateVersion
|
||||
* switch
|
||||
* fix disabled packages
|
||||
|
||||
777
flake.lock
generated
777
flake.lock
generated
File diff suppressed because it is too large
Load Diff
24
flake.nix
24
flake.nix
@@ -13,31 +13,21 @@
|
||||
sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||
nix-index-database = { url = "github:Mic92/nix-index-database"; 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-vscode-extensions =
|
||||
{
|
||||
url = "github:nix-community/nix-vscode-extensions?ref=4a7f92bdabb365936a8e8958948536cc2ceac7ba";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
impermanence.url = "github:CHN-beta/impermanence";
|
||||
qchem = { url = "github:Nix-QChem/NixOS-QChem/master"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||
plasma-manager =
|
||||
{
|
||||
url = "github:pjones/plasma-manager";
|
||||
inputs = { nixpkgs.follows = "nixpkgs"; home-manager.follows = "home-manager"; };
|
||||
};
|
||||
nur-linyinfeng = { url = "github:linyinfeng/nur-packages"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||
envfs = { url = "github:Mic92/envfs"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||
nix-flatpak.url = "github:gmodena/nix-flatpak";
|
||||
chaotic =
|
||||
{
|
||||
url = "github:chaotic-cx/nyx";
|
||||
inputs = { nixpkgs.follows = "nixpkgs"; home-manager.follows = "home-manager"; };
|
||||
};
|
||||
gricad = { url = "github:Gricad/nur-packages"; flake = false; };
|
||||
catppuccin = { url = "github:catppuccin/nix"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||
bscpkgs = { url = "github:CHN-beta/bscpkgs"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||
winapps = { url = "github:winapps-org/winapps/feat-nix-packaging"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||
# TODO: switch to stable branch
|
||||
aagl = { url = "github:ezKEa/aagl-gtk-on-nix"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||
cachyos-lts.url = "github:drakon64/nixos-cachyos-kernel";
|
||||
nixvirt = { url = "github:CHN-beta/NixVirt"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||
shadowrz = { url = "github:ShadowRZ/nur-packages"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||
|
||||
misskey = { url = "git+https://github.com/CHN-beta/misskey?submodules=1"; flake = false; };
|
||||
rsshub = { url = "github:DIYgod/RSSHub"; flake = false; };
|
||||
@@ -50,13 +40,10 @@
|
||||
tgbot-cpp = { url = "github:reo7sp/tgbot-cpp"; flake = false; };
|
||||
v-sim = { url = "gitlab:l_sim/v_sim/master"; flake = false; };
|
||||
rycee = { url = "gitlab:rycee/nur-expressions"; flake = false; };
|
||||
blurred-wallpaper = { url = "github:bouteillerAlan/blurredwallpaper"; flake = false; };
|
||||
slate = { url = "github:TheBigWazz/Slate"; flake = false; };
|
||||
lepton = { url = "github:black7375/Firefox-UI-Fix"; flake = false; };
|
||||
mumax = { url = "github:CHN-beta/mumax"; 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; };
|
||||
nc4nix = { url = "github:helsinki-systems/nc4nix"; flake = false; };
|
||||
hextra = { url = "github:imfing/hextra"; flake = false; };
|
||||
nu-scripts = { url = "github:nushell/nu_scripts"; flake = false; };
|
||||
@@ -64,7 +51,6 @@
|
||||
pocketfft = { url = "github:mreineck/pocketfft"; flake = false; };
|
||||
blog = { url = "git+https://git.chn.moe/chn/blog-public.git?lfs=1"; flake = false; };
|
||||
nixos-wallpaper = { url = "git+https://git.chn.moe/chn/nixos-wallpaper.git?lfs=1"; flake = false; };
|
||||
spectroscopy = { url = "github:skelton-group/Phonopy-Spectroscopy"; flake = false; };
|
||||
vaspberry = { url = "github:Infant83/VASPBERRY"; flake = false; };
|
||||
ufo = { url = "git+https://git.chn.moe/chn/ufo.git?lfs=1"; flake = false; };
|
||||
stickerpicker = { url = "github:maunium/stickerpicker"; flake = false; };
|
||||
|
||||
@@ -34,20 +34,6 @@
|
||||
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";
|
||||
};
|
||||
mirism = pkgs.mkShell.override { stdenv = pkgs.clang18Stdenv; }
|
||||
{
|
||||
inputsFrom = [ pkgs.localPackages.mirism ];
|
||||
packages = [ pkgs.clang-tools_18 ];
|
||||
CMAKE_EXPORT_COMPILE_COMMANDS = "1";
|
||||
};
|
||||
info = pkgs.mkShell.override { stdenv = pkgs.clang18Stdenv; }
|
||||
{
|
||||
inputsFrom = [ pkgs.localPackages.info ];
|
||||
|
||||
@@ -45,13 +45,13 @@
|
||||
{
|
||||
patch = pkgs.fetchzip
|
||||
{
|
||||
url = "http://theory.cm.utexas.edu/code/vtstcode-205.tgz";
|
||||
sha256 = "008c3q67v5f0ld1f8wdrz2z2kmlzicnxh2bm0akk7i8mnsph0lal";
|
||||
url = "http://theory.cm.utexas.edu/code/vtstcode-204.tgz";
|
||||
sha256 = "00qpqiabl568fwqjnmwqwr0jwg7s56xd9lv9lw8q4qxqy19cpg62";
|
||||
};
|
||||
script = pkgs.fetchzip
|
||||
{
|
||||
url = "http://theory.cm.utexas.edu/code/vtstscripts.tgz";
|
||||
sha256 = "0ixzaqwca5l9yvdq03czgqknszb769pxgc9zq1bgxsp921nvk8mq";
|
||||
sha256 = "0wz9sw72w5gydvavm6sbcfssvvdiw8gh8hs0d0p0b23839dw4w6j";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -63,35 +63,7 @@
|
||||
finalImageName = "ghcr.io/huginn/huginn";
|
||||
finalImageTag = "latest";
|
||||
};
|
||||
misskey =
|
||||
{
|
||||
"https://github.com/aiscript-dev/aiscript-languageserver/releases/download/0.1.6/aiscript-dev-aiscript-languageserver-0.1.6.tgz" = "0092d5r67bhf4xkvrdn4a2rm1drjzy7b5sw8mi7hp4pqvpc20ylr";
|
||||
"https://github.com/misskey-dev/tabler-icons/archive/refs/tags/3.30.0-mi.1932+ab127beee.tar.gz" = "09aa34a02rdpcvrhl6xddzy173pg7pi9i551s692ggc3pq7fmdhw";
|
||||
};
|
||||
xmuvpn = pkgs.dockerTools.pullImage
|
||||
{
|
||||
imageName = "hagb/docker-easyconnect";
|
||||
imageDigest = "sha256:1c3a86e41c1d2425a4fd555d279deaec6ff1e3c2287853eb16d23c9cb6dc3409";
|
||||
sha256 = "1jpk2y46lnk0mi6ir7hdx0p6378p0v6qjbh6jm9a4cv5abw0mb2k";
|
||||
finalImageName = "hagb/docker-easyconnec";
|
||||
finalImageTag = "7.6.7";
|
||||
};
|
||||
lumerical =
|
||||
{
|
||||
lumerical = pkgs.requireFile
|
||||
{
|
||||
name = "lumerical.zip";
|
||||
sha256 = "03nfacykfzal29jdmygrgkl0fqsc3yqp4ig86h1h9sirci87k94c";
|
||||
hashMode = "recursive";
|
||||
message = "Source not found.";
|
||||
};
|
||||
licenseManagerImage = pkgs.requireFile
|
||||
{
|
||||
name = "lumericalLicenseManager.tar";
|
||||
sha256 = "VOtYMnDRUP74O2lAqMqBDLnXtNS8AhbBhyZBj/2aVoE=";
|
||||
message = "Source not found.";
|
||||
};
|
||||
};
|
||||
misskey = {};
|
||||
vesta =
|
||||
{
|
||||
version = "3.90.5a";
|
||||
@@ -142,12 +114,24 @@
|
||||
mathematica = pkgs.mathematica.src;
|
||||
oneapi =
|
||||
{
|
||||
src = pkgs.fetchurl
|
||||
src = pkgs.fetchurl
|
||||
{
|
||||
url = "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/2cf9c083-82b5-4a8f-a515-c599b09dcefc/"
|
||||
+ "intel-oneapi-hpc-toolkit-2025.1.1.40_offline.sh";
|
||||
sha256 = "1qjy9dsnskwqsk66fm99b3cch1wp3rl9dx7y884p3x5kwiqdma2x";
|
||||
};
|
||||
version = "2025.1";
|
||||
fullVersion = "2025.1.1.40";
|
||||
components =
|
||||
[
|
||||
"intel.oneapi.lin.dpcpp-cpp-common,v=2025.1.1+10"
|
||||
"intel.oneapi.lin.dpcpp-cpp-common.runtime,v=2025.1.1+10"
|
||||
"intel.oneapi.lin.ifort-compiler,v=2025.1.1+10"
|
||||
"intel.oneapi.lin.compilers-common.runtime,v=2025.1.1+10"
|
||||
"intel.oneapi.lin.mpi.runtime,v=2021.15.0+493"
|
||||
"intel.oneapi.lin.umf,v=0.10.0+355"
|
||||
"intel.oneapi.lin.tbb.runtime,v=2022.1.0+425"
|
||||
"intel.oneapi.lin.compilers-common,v=2025.1.1+10"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -6,11 +6,7 @@ inputs: let inherit (inputs) topInputs; in
|
||||
topInputs.sops-nix.nixosModules.sops
|
||||
topInputs.nix-index-database.nixosModules.nix-index
|
||||
topInputs.impermanence.nixosModules.impermanence
|
||||
topInputs.nix-flatpak.nixosModules.nix-flatpak
|
||||
topInputs.chaotic.nixosModules.default
|
||||
{ config.chaotic.nyx.overlay.onTopOf = "user-pkgs"; }
|
||||
topInputs.catppuccin.nixosModules.catppuccin
|
||||
topInputs.aagl.nixosModules.default
|
||||
topInputs.nixvirt.nixosModules.default
|
||||
(inputs:
|
||||
{
|
||||
|
||||
@@ -100,7 +100,7 @@ inputs:
|
||||
inputs.lib.mkIf (inputs.lib.strings.hasPrefix "amd" gpu.type) { hardware.amdgpu =
|
||||
{
|
||||
opencl.enable = true;
|
||||
initrd.enable = true; # needed for waydroid
|
||||
initrd.enable = true;
|
||||
legacySupport.enable = true;
|
||||
amdvlk = { enable = true; support32Bit.enable = true; supportExperimental.enable = true; };
|
||||
};}
|
||||
|
||||
17
modules/packages/bash.nix
Normal file
17
modules/packages/bash.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
inputs:
|
||||
{
|
||||
options.nixos.packages.bash = let inherit (inputs.lib) mkOption types; in mkOption
|
||||
{ type = types.nullOr (types.submodule {}); default = {}; };
|
||||
config = let inherit (inputs.config.nixos.packages) bash; in inputs.lib.mkIf (bash != null)
|
||||
{
|
||||
nixos.user.sharedModules = [(homeInputs:
|
||||
{
|
||||
config =
|
||||
{
|
||||
# set bash history file path, avoid overwriting zsh history
|
||||
programs.bash = { enable = true; historyFile = "${homeInputs.config.xdg.dataHome}/bash/bash_history"; };
|
||||
home.shell.enableBashIntegration = true;
|
||||
};
|
||||
})];
|
||||
};
|
||||
}
|
||||
@@ -15,8 +15,7 @@ inputs:
|
||||
[
|
||||
# system management
|
||||
# TODO: module should add yubikey-touch-detector into path
|
||||
gparted wayland-utils clinfo glxinfo vulkan-tools dracut yubikey-touch-detector btrfs-assistant snapper-gui
|
||||
kdePackages.qtstyleplugin-kvantum ventoy-full cpu-x wl-mirror geekbench xpra
|
||||
gparted yubikey-touch-detector btrfs-assistant kdePackages.qtstyleplugin-kvantum cpu-x wl-mirror xpra
|
||||
(
|
||||
writeShellScriptBin "xclip"
|
||||
''
|
||||
@@ -24,69 +23,51 @@ inputs:
|
||||
else exec ${wl-clipboard-x11}/bin/xclip "$@"; fi
|
||||
''
|
||||
)
|
||||
# color management
|
||||
argyllcms xcalib
|
||||
# networking
|
||||
remmina putty mtr-gui
|
||||
remmina putty kdePackages.krdc
|
||||
# media
|
||||
mpv nomacs simplescreenrecorder imagemagick gimp-with-plugins netease-cloud-music-gtk qcm
|
||||
waifu2x-converter-cpp blender paraview vlc whalebird spotify obs-studio
|
||||
(inkscape-with-extensions.override { inkscapeExtensions = null; })
|
||||
# themes
|
||||
klassy-qt6 localPackages.slate localPackages.blurred-wallpaper tela-circle-icon-theme
|
||||
catppuccin catppuccin-sddm catppuccin-cursors catppuccinifier-gui catppuccinifier-cli catppuccin-plymouth
|
||||
(catppuccin-kde.override { flavour = [ "latte" ]; }) (catppuccin-kvantum.override { variant = "latte"; })
|
||||
# terminal
|
||||
warp-terminal
|
||||
mpv nomacs simplescreenrecorder imagemagick gimp-with-plugins qcm waifu2x-converter-cpp blender paraview vlc
|
||||
obs-studio (inkscape-with-extensions.override { inkscapeExtensions = null; }) kdePackages.kcolorchooser
|
||||
kdePackages.kdenlive
|
||||
# development
|
||||
adb-sync scrcpy dbeaver-bin cling aircrack-ng
|
||||
weston cage openbox krita fprettify # jetbrains.clion
|
||||
# desktop sharing
|
||||
rustdesk-flutter
|
||||
adb-sync scrcpy dbeaver-bin aircrack-ng fprettify
|
||||
# password and key management
|
||||
yubikey-manager yubikey-manager-qt yubikey-personalization yubikey-personalization-gui bitwarden hashcat
|
||||
electrum jabref john crunch
|
||||
kdePackages.kleopatra
|
||||
# download
|
||||
qbittorrent nur-xddxdd.baidupcs-go wgetpaste onedrive onedrivegui rclone
|
||||
qbittorrent wgetpaste rclone
|
||||
# editor
|
||||
typora appflowy notion-app-enhanced joplin-desktop standardnotes logseq obsidian code-cursor
|
||||
typora
|
||||
# news
|
||||
fluent-reader rssguard newsflash newsboat follow
|
||||
fluent-reader newsflash follow
|
||||
# nix tools
|
||||
nixpkgs-fmt appimage-run nixd nix-serve node2nix nix-prefetch-github prefetch-npm-deps nix-prefetch-docker
|
||||
nix-template nil bundix
|
||||
nixpkgs-fmt nixd nix-serve nix-prefetch-github prefetch-npm-deps nix-prefetch-docker
|
||||
# required by vscode nix tools
|
||||
nil
|
||||
# instant messager
|
||||
element-desktop telegram-desktop discord zoom-us slack nur-linyinfeng.wemeet nheko
|
||||
fluffychat signal-desktop qq nur-xddxdd.wechat-uos-sandboxed cinny-desktop
|
||||
element-desktop telegram-desktop discord zoom-us slack nheko
|
||||
# browser
|
||||
google-chrome tor-browser microsoft-edge
|
||||
google-chrome tor-browser
|
||||
# office
|
||||
crow-translate zotero pandoc texliveFull poppler_utils pdftk pdfchain davinci-resolve
|
||||
ydict texstudio panoply pspp libreoffice-qt6-fresh ocrmypdf typst # paperwork
|
||||
crow-translate zotero pandoc texliveFull poppler_utils pdftk pdfchain
|
||||
ydict pspp libreoffice-qt6-fresh ocrmypdf typst
|
||||
# required by ltex-plus.vscode-ltex-plus
|
||||
ltex-ls ltex-ls-plus
|
||||
# matplot++ needs old gnuplot
|
||||
inputs.pkgs.pkgs-2311.gnuplot
|
||||
# math, physics and chemistry
|
||||
octaveFull ovito localPackages.vesta localPackages.v-sim jmol mpi geogebra6 localPackages.ufo
|
||||
(quantum-espresso.override { stdenv = gcc14Stdenv; gfortran = gfortran14;
|
||||
wannier90 = inputs.pkgs.wannier90.overrideAttrs { buildFlags = [ "dynlib" ]; }; })
|
||||
inputs.pkgs.pkgs-2311.hdfview numbat qalculate-qt
|
||||
octaveFull ovito localPackages.vesta localPackages.v-sim mpi geogebra6 localPackages.ufo
|
||||
inputs.pkgs.pkgs-2311.hdfview qalculate-qt
|
||||
# virtualization
|
||||
virt-viewer bottles wineWowPackages.stagingFull genymotion playonlinux
|
||||
bottles wineWowPackages.stagingFull
|
||||
# media
|
||||
nur-xddxdd.svp
|
||||
# for kdenlive auto subtitle
|
||||
openai-whisper
|
||||
]
|
||||
++ (builtins.filter (p: !((p.meta.broken or false) || (builtins.elem p.pname or null [ "falkon" "kalzium" ])))
|
||||
(builtins.filter inputs.lib.isDerivation (builtins.attrValues kdePackages.kdeGear)));
|
||||
];
|
||||
_pythonPackages = [(pythonPackages: with pythonPackages;
|
||||
[
|
||||
phonopy scipy scikit-learn jupyterlab autograd inputs.pkgs.localPackages.phono3py
|
||||
tensorflow keras
|
||||
# for phonopy
|
||||
inputs.pkgs.localPackages.spectroscopy numpy
|
||||
phonopy scipy scikit-learn jupyterlab autograd inputs.pkgs.localPackages.phono3py numpy
|
||||
])];
|
||||
};
|
||||
user.sharedModules =
|
||||
@@ -134,9 +115,7 @@ inputs:
|
||||
wireshark = { enable = true; package = inputs.pkgs.wireshark; };
|
||||
yubikey-touch-detector.enable = true;
|
||||
kdeconnect.enable = true;
|
||||
anime-game-launcher = { enable = true; package = inputs.pkgs.anime-game-launcher; };
|
||||
honkers-railway-launcher = { enable = true; package = inputs.pkgs.honkers-railway-launcher; };
|
||||
sleepy-launcher = { enable = true; package = inputs.pkgs.sleepy-launcher; };
|
||||
kde-pim = { enable = true; kmail = true; };
|
||||
};
|
||||
services.pcscd.enable = true;
|
||||
};
|
||||
|
||||
@@ -12,11 +12,10 @@ inputs:
|
||||
{
|
||||
enable = true;
|
||||
languagePacks = [ "zh-CN" "en-US" ];
|
||||
nativeMessagingHosts.packages = with inputs.pkgs; [ uget-integrator firefoxpwa ];
|
||||
nativeMessagingHosts.packages = with inputs.pkgs; [ uget-integrator ];
|
||||
};
|
||||
nixos =
|
||||
{
|
||||
packages.packages._packages = [ inputs.pkgs.firefoxpwa ];
|
||||
user.sharedModules =
|
||||
[{
|
||||
config =
|
||||
@@ -25,7 +24,7 @@ inputs:
|
||||
{
|
||||
enable = true;
|
||||
nativeMessagingHosts = with inputs.pkgs;
|
||||
[ kdePackages.plasma-browser-integration uget-integrator firefoxpwa ];
|
||||
[ kdePackages.plasma-browser-integration uget-integrator ];
|
||||
# TODO: use fixed-version of plugins
|
||||
policies.DefaultDownloadDirectory = "\${home}/Downloads";
|
||||
profiles.default =
|
||||
@@ -33,8 +32,8 @@ inputs:
|
||||
extensions.packages = with inputs.pkgs.firefox-addons;
|
||||
[
|
||||
tampermonkey bitwarden cookies-txt dualsub firefox-color i-dont-care-about-cookies
|
||||
metamask pakkujs switchyomega rsshub-radar rsspreview tabliss tree-style-tab ublock-origin wallabagger
|
||||
wappalyzer grammarly plasma-integration zotero-connector pwas-for-firefox smartproxy kiss-translator
|
||||
metamask pakkujs rsshub-radar rsspreview tabliss tree-style-tab ublock-origin
|
||||
wappalyzer grammarly plasma-integration zotero-connector smartproxy kiss-translator
|
||||
];
|
||||
search = { default = "google"; force = true; };
|
||||
userChrome = builtins.readFile "${inputs.topInputs.lepton}/userChrome.css";
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
inputs:
|
||||
{
|
||||
options.nixos.packages.flatpak = let inherit (inputs.lib) mkOption types; in mkOption
|
||||
{
|
||||
type = types.nullOr (types.submodule {});
|
||||
default = if builtins.elem inputs.config.nixos.model.type [ "desktop" "server" ] then {} else null;
|
||||
};
|
||||
config = let inherit (inputs.config.nixos.packages) flatpak; in inputs.lib.mkIf (flatpak != null)
|
||||
{
|
||||
services.flatpak = { enable = true; uninstallUnmanaged = true; };
|
||||
};
|
||||
}
|
||||
@@ -9,8 +9,8 @@ inputs:
|
||||
_packages = with inputs.pkgs;
|
||||
[
|
||||
# basic tools
|
||||
beep dos2unix gnugrep pv tmux screen parallel tldr cowsay jq yq zellij ipfetch localPackages.pslist
|
||||
fastfetch reptyr duc ncdu progress libva-utils ksh neofetch dateutils kitty
|
||||
beep dos2unix gnugrep pv tmux screen parallel tldr cowsay jq yq ipfetch localPackages.pslist
|
||||
fastfetch reptyr duc ncdu progress libva-utils ksh neofetch dateutils kitty glib
|
||||
# lsxx
|
||||
pciutils usbutils lshw util-linux lsof dmidecode lm_sensors hwloc acpica-tools
|
||||
# top
|
||||
@@ -24,7 +24,7 @@ inputs:
|
||||
# compress
|
||||
pigz upx unzip zip lzip p7zip rar
|
||||
# file system management
|
||||
sshfs e2fsprogs duperemove compsize exfatprogs
|
||||
sshfs e2fsprogs compsize exfatprogs
|
||||
# disk management
|
||||
smartmontools hdparm gptfdisk megacli
|
||||
# encryption and authentication
|
||||
@@ -39,7 +39,7 @@ inputs:
|
||||
# stupid things
|
||||
toilet lolcat localPackages.stickerpicker graph-easy
|
||||
# office
|
||||
pdfgrep ffmpeg-full hdf5 # todo-txt-cli
|
||||
pdfgrep ffmpeg-full hdf5
|
||||
]
|
||||
++ (with inputs.config.boot.kernelPackages; [ cpupower usbip ]);
|
||||
_pythonPackages = [(pythonPackages: with pythonPackages;
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
inputs:
|
||||
{
|
||||
options.nixos.packages.vasp = let inherit (inputs.lib) mkOption types; in mkOption
|
||||
{
|
||||
type = types.nullOr (types.submodule {});
|
||||
# default = if builtins.elem inputs.config.nixos.model.type [ "desktop" "server" ] then {} else null;
|
||||
# TODO: fix vasp
|
||||
default = null;
|
||||
};
|
||||
# TODO: add more options to correctly configure VASP
|
||||
{ type = types.nullOr (types.submodule {}); default = null; };
|
||||
config = let inherit (inputs.config.nixos.packages) vasp; in inputs.lib.mkIf (vasp != null)
|
||||
{
|
||||
nixos.packages.packages = with inputs.pkgs;
|
||||
|
||||
@@ -18,9 +18,15 @@ inputs:
|
||||
(set:
|
||||
{
|
||||
name = set;
|
||||
value = vscode-extensions.${set} or {}
|
||||
// nix-vscode-extensions.vscode-marketplace.${set}
|
||||
// nix-vscode-extensions.vscode-marketplace-release.${set} or {};
|
||||
value =
|
||||
# provided by nixpkgs
|
||||
vscode-extensions.${set} or {}
|
||||
# provided by nix-vscode-extensions, including pre-release versions, but prefer stable version
|
||||
// nix-vscode-extensions.vscode-marketplace.${set} or {}
|
||||
// nix-vscode-extensions.vscode-marketplace-release.${set} or {}
|
||||
# some versions are too high for the current vscode, use old version from here to override it
|
||||
// (nix-vscode-extensions.forVSCodeVersion inputs.pkgs.vscode.version)
|
||||
.vscode-marketplace-release.${set} or {};
|
||||
})
|
||||
(inputs.lib.unique
|
||||
(
|
||||
@@ -29,7 +35,7 @@ inputs:
|
||||
++ (builtins.attrNames nix-vscode-extensions.vscode-marketplace-release)
|
||||
)));
|
||||
in with extensions;
|
||||
(with github; [ copilot github-vscode-theme ])
|
||||
(with github; [ copilot copilot-chat github-vscode-theme ])
|
||||
++ (with intellsmi; [ comment-translate ])
|
||||
++ (with ms-vscode; [ cmake-tools cpptools-extension-pack hexeditor remote-explorer ])
|
||||
++ (with ms-vscode-remote; [ remote-ssh ])
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
inputs:
|
||||
{
|
||||
options.nixos.packages.winapps = let inherit (inputs.lib) mkOption types; in mkOption
|
||||
{
|
||||
type = types.nullOr (types.submodule {});
|
||||
default = if builtins.elem inputs.config.nixos.model.type [ "desktop" "server" ] then {} else null;
|
||||
};
|
||||
config = let inherit (inputs.config.nixos.packages) winapps; in inputs.lib.mkIf (winapps != null)
|
||||
{
|
||||
nixos.packages.packages._packages =
|
||||
[
|
||||
(inputs.pkgs.callPackage "${inputs.topInputs.winapps}/packages/winapps" {})
|
||||
(inputs.pkgs.runCommand "winapps-windows" {}
|
||||
''
|
||||
mkdir -p $out/share/applications
|
||||
cp ${inputs.pkgs.replaceVars ./windows.desktop { path = inputs.topInputs.winapps; }} \
|
||||
$out/share/applications/windows.desktop
|
||||
'')
|
||||
]
|
||||
++ builtins.map
|
||||
(p: inputs.pkgs.runCommand "winapps-${p}" {}
|
||||
''
|
||||
mkdir -p $out/share/applications
|
||||
source ${inputs.topInputs.winapps}/apps/${p}/info
|
||||
# replace \ with \\
|
||||
WIN_EXECUTABLE=$(echo $WIN_EXECUTABLE | sed 's/\\/\\\\/g')
|
||||
# replace space with \s
|
||||
WIN_EXECUTABLE=$(echo $WIN_EXECUTABLE | sed 's/ /\\s/g')
|
||||
cat > $out/share/applications/${p}.desktop << EOF
|
||||
[Desktop Entry]
|
||||
Name=$NAME
|
||||
Exec=winapps manual "$WIN_EXECUTABLE" %F
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Icon=${inputs.topInputs.winapps}/apps/${p}/icon.svg
|
||||
StartupWMClass=$FULL_NAME
|
||||
Comment=$FULL_NAME
|
||||
Categories=$CATEGORIES
|
||||
MimeType=$MIME_TYPES
|
||||
EOF
|
||||
'')
|
||||
[
|
||||
"access-o365" "acrobat-x-pro" "cmd" "excel-o365" "explorer" "illustrator-cc" "powerpoint-o365"
|
||||
"visual-studio-comm" "word-o365"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Name=Windows
|
||||
Exec=winapps windows %F
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Icon=@path@/icons/windows.svg
|
||||
StartupWMClass=Micorosoft Windows
|
||||
Comment=Micorosoft Windows
|
||||
Categories=Windows
|
||||
17
modules/packages/zellij.nix
Normal file
17
modules/packages/zellij.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
inputs:
|
||||
{
|
||||
options.nixos.packages.zellij = let inherit (inputs.lib) mkOption types; in mkOption
|
||||
{ type = types.nullOr (types.submodule {}); default = {}; };
|
||||
config = let inherit (inputs.config.nixos.packages) zellij; in inputs.lib.mkIf (zellij != null)
|
||||
{
|
||||
nixos =
|
||||
{
|
||||
packages.packages._packages = [ inputs.pkgs.zellij ];
|
||||
user.sharedModules =
|
||||
[{
|
||||
config.programs.zellij =
|
||||
{ enable = true; settings = { show_startup_tips = false; show_release_notes = false; }; };
|
||||
}];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -4,85 +4,71 @@ inputs:
|
||||
{ type = types.nullOr (types.submodule {}); default = {}; };
|
||||
config = let inherit (inputs.config.nixos.packages) zsh; in inputs.lib.mkIf (zsh != null)
|
||||
{
|
||||
nixos.user.sharedModules = [(home-inputs: { config.programs = inputs.lib.mkMerge
|
||||
[
|
||||
# general config
|
||||
{
|
||||
zsh =
|
||||
nixos.user.sharedModules = [(home-inputs:
|
||||
{
|
||||
config = inputs.lib.mkMerge
|
||||
[
|
||||
{
|
||||
enable = true;
|
||||
history =
|
||||
{
|
||||
path = "${home-inputs.config.xdg.dataHome}/zsh/zsh_history";
|
||||
extended = true;
|
||||
save = 100000000;
|
||||
size = 100000000;
|
||||
};
|
||||
syntaxHighlighting.enable = true;
|
||||
autosuggestion.enable = true;
|
||||
enableCompletion = true;
|
||||
oh-my-zsh =
|
||||
programs.zsh =
|
||||
{
|
||||
enable = true;
|
||||
plugins = [ "git" "colored-man-pages" "extract" "history-substring-search" "autojump" ];
|
||||
theme = inputs.lib.mkDefault "clean";
|
||||
history =
|
||||
{
|
||||
path = "${home-inputs.config.xdg.dataHome}/zsh/zsh_history";
|
||||
extended = true;
|
||||
save = 100000000;
|
||||
size = 100000000;
|
||||
};
|
||||
syntaxHighlighting.enable = true;
|
||||
autosuggestion.enable = true;
|
||||
enableCompletion = true;
|
||||
oh-my-zsh =
|
||||
{
|
||||
enable = true;
|
||||
plugins = [ "git" "colored-man-pages" "extract" "history-substring-search" "autojump" ];
|
||||
theme = inputs.lib.mkDefault "clean";
|
||||
};
|
||||
# ensure ~/.zlogin exists
|
||||
loginExtra = " ";
|
||||
};
|
||||
# ensure ~/.zlogin exists
|
||||
loginExtra = " ";
|
||||
};
|
||||
# set bash history file path, avoid overwriting zsh history
|
||||
bash = { enable = true; historyFile = "${home-inputs.config.xdg.dataHome}/bash/bash_history"; };
|
||||
}
|
||||
# config for root and chn
|
||||
{
|
||||
zsh = inputs.lib.mkIf (builtins.elem home-inputs.config.home.username [ "chn" "root" "aleksana" "alikia" ])
|
||||
home.shell.enableZshIntegration = true;
|
||||
}
|
||||
{
|
||||
plugins =
|
||||
[
|
||||
programs.zsh = inputs.lib.mkIf
|
||||
(builtins.elem home-inputs.config.home.username [ "chn" "root" "aleksana" "alikia" ])
|
||||
{
|
||||
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=";
|
||||
};
|
||||
}
|
||||
];
|
||||
initContent = inputs.lib.mkOrder 550
|
||||
''
|
||||
# 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"
|
||||
'';
|
||||
oh-my-zsh.theme = "";
|
||||
};
|
||||
}
|
||||
];})];
|
||||
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=";
|
||||
};
|
||||
}
|
||||
];
|
||||
initContent = inputs.lib.mkOrder 550
|
||||
''
|
||||
# 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
|
||||
'';
|
||||
oh-my-zsh.theme = "";
|
||||
};
|
||||
}
|
||||
];
|
||||
})];
|
||||
environment.pathsToLink = [ "/share/zsh" ];
|
||||
programs.zsh.enable = true;
|
||||
};
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
inputs:
|
||||
{
|
||||
options.nixos.services.btrbk = let inherit (inputs.lib) mkOption types; in mkOption
|
||||
{ type = types.listOf types.nonEmptyStr; default = []; };
|
||||
config = let inherit (inputs.config.nixos.services) btrbk; in inputs.lib.mkMerge
|
||||
[
|
||||
{
|
||||
services.btrbk.sshAccess =
|
||||
[{
|
||||
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC6VCXHvPZO7tB0Xo2VNEXkaijWCDxVIpfSuz8OrcUfU btrbk";
|
||||
roles = [ "source" "info" ];
|
||||
}];
|
||||
}
|
||||
(inputs.lib.mkIf (btrbk != [])
|
||||
{
|
||||
services.btrbk =
|
||||
{
|
||||
ioSchedulingClass = "idle";
|
||||
instances = builtins.listToAttrs (builtins.map
|
||||
(host:
|
||||
{
|
||||
name = host;
|
||||
value =
|
||||
{
|
||||
onCalendar = "*-*-* 4:00:00";
|
||||
settings =
|
||||
{
|
||||
timestamp_format = "short";
|
||||
snapshot_dir = "/nix/btrbk/snapshot";
|
||||
snapshot_preserve_min = "1w";
|
||||
target_preserve_min = "1m";
|
||||
ssh_user = "btrbk";
|
||||
ssh_identity = inputs.config.sops.secrets.btrbk.path;
|
||||
volume."ssh://${host}.chn.moe/nix" = { subvolume.persistent= {}; target = "/nix/btrbk/${host}"; };
|
||||
};
|
||||
};
|
||||
})
|
||||
btrbk);
|
||||
};
|
||||
sops.secrets.btrbk.owner = "btrbk";
|
||||
systemd.timers = builtins.listToAttrs (builtins.map
|
||||
(host: { name = "btrbk-${host}"; value.timerConfig.RandomizedDelaySec = 7200; }) btrbk);
|
||||
})
|
||||
];
|
||||
}
|
||||
@@ -21,6 +21,7 @@ inputs:
|
||||
dns = [ "1.1.1.1" ];
|
||||
# prevent create btrfs subvol
|
||||
storage-driver = "overlay2";
|
||||
live-restore = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
inputs:
|
||||
{
|
||||
options.nixos.services.fz-new-order = let inherit (inputs.lib) mkOption types; in mkOption
|
||||
{ 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 =
|
||||
{
|
||||
users.fz-new-order =
|
||||
{
|
||||
uid = inputs.config.nixos.user.uid.fz-new-order;
|
||||
group = "fz-new-order";
|
||||
home = "/var/lib/fz-new-order";
|
||||
createHome = true;
|
||||
isSystemUser = true;
|
||||
};
|
||||
groups.fz-new-order.gid = inputs.config.nixos.user.gid.fz-new-order;
|
||||
};
|
||||
systemd =
|
||||
{
|
||||
timers.fz-new-order =
|
||||
{
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = { OnBootSec = "10m"; OnUnitActiveSec = "10m"; Unit = "fz-new-order.service"; };
|
||||
};
|
||||
services.fz-new-order = rec
|
||||
{
|
||||
description = "fz-new-order";
|
||||
after = [ "network.target" ];
|
||||
requires = after;
|
||||
serviceConfig =
|
||||
{
|
||||
User = inputs.config.users.users."fz-new-order".name;
|
||||
Group = inputs.config.users.users."fz-new-order".group;
|
||||
WorkingDirectory = "/var/lib/fz-new-order";
|
||||
ExecStart =
|
||||
let
|
||||
src = inputs.pkgs.replaceVars ./main.cpp
|
||||
{ config_file = inputs.config.sops.templates."fz-new-order/config.json".path; };
|
||||
binary = inputs.pkgs.stdenv.mkDerivation
|
||||
{
|
||||
name = "fz-new-order";
|
||||
inherit src;
|
||||
buildInputs = with inputs.pkgs; [ jsoncpp.dev cereal fmt httplib ];
|
||||
dontUnpack = true;
|
||||
buildPhase =
|
||||
''
|
||||
runHook preBuild
|
||||
g++ -std=c++20 -O2 -o fz-new-order ${src} -ljsoncpp -lfmt
|
||||
runHook postBuild
|
||||
'';
|
||||
installPhase =
|
||||
''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin
|
||||
cp fz-new-order $out/bin/fz-new-order
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
in "${binary}/bin/fz-new-order";
|
||||
};
|
||||
};
|
||||
tmpfiles.rules =
|
||||
[
|
||||
"d /var/lib/fz-new-order 0700 fz-new-order fz-new-order"
|
||||
"Z /var/lib/fz-new-order - fz-new-order fz-new-order"
|
||||
];
|
||||
};
|
||||
sops = let userNum = 5; configNum = 2; in
|
||||
{
|
||||
templates."fz-new-order/config.json" =
|
||||
{
|
||||
owner = inputs.config.users.users."fz-new-order".name;
|
||||
group = inputs.config.users.users."fz-new-order".group;
|
||||
content = let placeholder = inputs.config.sops.placeholder; in builtins.toJSON
|
||||
{
|
||||
token = placeholder."fz-new-order/token";
|
||||
uids = builtins.map (j: placeholder."fz-new-order/uids/user${builtins.toString j}")
|
||||
(builtins.genList (n: n) userNum);
|
||||
config = builtins.map
|
||||
(i: builtins.listToAttrs (builtins.map
|
||||
(attrName: { name = attrName; value = placeholder."fz-new-order/config${toString i}/${attrName}"; })
|
||||
[ "username" "password" "comment" ]))
|
||||
(builtins.genList (n: n) configNum);
|
||||
};
|
||||
};
|
||||
secrets =
|
||||
{ "fz-new-order/token" = {}; }
|
||||
// (builtins.listToAttrs (builtins.map
|
||||
(i: { name = "fz-new-order/uids/user${toString i}"; value = {}; })
|
||||
(builtins.genList (n: n) userNum)))
|
||||
// (builtins.listToAttrs (builtins.concatLists (builtins.map
|
||||
(i: builtins.map
|
||||
(attrName: { name = "fz-new-order/config${builtins.toString i}/${attrName}"; value = {}; })
|
||||
[ "username" "password" "comment" ])
|
||||
(builtins.genList (n: n) configNum))));
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,244 +0,0 @@
|
||||
# include <iostream>
|
||||
# include <set>
|
||||
# include <sstream>
|
||||
# include <filesystem>
|
||||
# include <cereal/types/set.hpp>
|
||||
# include <cereal/archives/json.hpp>
|
||||
# include <fmt/format.h>
|
||||
# include <fmt/ranges.h>
|
||||
# include <httplib.h>
|
||||
# include <json/json.h>
|
||||
|
||||
std::string urlencode(std::string s)
|
||||
{
|
||||
auto hexchar = [](unsigned char c, unsigned char &hex1, unsigned char &hex2)
|
||||
{
|
||||
hex1 = c / 16;
|
||||
hex2 = c % 16;
|
||||
hex1 += hex1 <= 9 ? '0' : 'a' - 10;
|
||||
hex2 += hex2 <= 9 ? '0' : 'a' - 10;
|
||||
};
|
||||
const char *str = s.c_str();
|
||||
std::vector<char> v(s.size());
|
||||
v.clear();
|
||||
for (std::size_t i = 0, l = s.size(); i < l; i++)
|
||||
{
|
||||
char c = str[i];
|
||||
if
|
||||
(
|
||||
(c >= '0' && c <= '9')
|
||||
|| (c >= 'a' && c <= 'z')
|
||||
|| (c >= 'A' && c <= 'Z')
|
||||
|| c == '-' || c == '_' || c == '.' || c == '!' || c == '~'
|
||||
|| c == '*' || c == '\'' || c == '(' || c == ')'
|
||||
)
|
||||
v.push_back(c);
|
||||
else
|
||||
{
|
||||
v.push_back('%');
|
||||
unsigned char d1, d2;
|
||||
hexchar(c, d1, d2);
|
||||
v.push_back(d1);
|
||||
v.push_back(d2);
|
||||
}
|
||||
}
|
||||
return std::string(v.cbegin(), v.cend());
|
||||
}
|
||||
|
||||
void oneshot
|
||||
(
|
||||
const std::string& username, const std::string& password, const std::string& comment,
|
||||
const std::set<std::string>& wxuser, const std::string& token
|
||||
)
|
||||
{
|
||||
httplib::Client fzclient("http://scmv9.fengzhansy.com:8882");
|
||||
httplib::Client wxclient("http://wxpusher.zjiecode.com");
|
||||
auto& log = std::clog;
|
||||
|
||||
try
|
||||
{
|
||||
// get JSESSIONID
|
||||
auto cookie_jsessionid = [&]() -> std::string
|
||||
{
|
||||
log << "get /scmv9/login.jsp\n";
|
||||
auto result = fzclient.Get("/scmv9/login.jsp");
|
||||
if (result.error() != httplib::Error::Success)
|
||||
throw std::runtime_error("request failed");
|
||||
auto it = result.value().headers.find("Set-Cookie");
|
||||
if (it == result.value().headers.end() || it->first != "Set-Cookie")
|
||||
throw std::runtime_error("find cookie failed");
|
||||
log << fmt::format("set_cookie JSESSIONID {}\n", it->second.substr(0, it->second.find(';')));
|
||||
return it->second.substr(0, it->second.find(';'));
|
||||
}();
|
||||
|
||||
// login
|
||||
auto cookie_pppp = [&]() -> std::string
|
||||
{
|
||||
auto body = fmt::format("method=dologinajax&rand=1234&userc={}&mdid=P&passw={}", username, password);
|
||||
httplib::Headers headers =
|
||||
{
|
||||
{ "X-Requested-With", "XMLHttpRequest" },
|
||||
{
|
||||
"User-Agent",
|
||||
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36"
|
||||
},
|
||||
{ "Content-Type", "application/x-www-form-urlencoded; charset=UTF-8" },
|
||||
{ "Origin", "http://scmv9.fengzhansy.com:8882" },
|
||||
{ "Referer", "http://scmv9.fengzhansy.com:8882/scmv9/login.jsp" },
|
||||
{ "Cookie", cookie_jsessionid }
|
||||
};
|
||||
log << "post /scmv9/data.jsp\n";
|
||||
auto result = fzclient.Post("/scmv9/data.jsp", headers, body, "application/x-www-form-urlencoded; charset=UTF-8");
|
||||
if (result.error() != httplib::Error::Success)
|
||||
throw std::runtime_error("request failed");
|
||||
log << fmt::format("set_cookie pppp {}\n", fmt::format("pppp={}%40{}", username, password));
|
||||
return fmt::format("pppp={}%40{}", username, password);
|
||||
}();
|
||||
|
||||
// get order list
|
||||
auto order_list = [&]() -> std::map<std::string, std::pair<std::string, std::string>>
|
||||
{
|
||||
auto body = fmt::format("method=dgate&rand=1234&op=scmmgr_pcggl&nv%5B%5D=opmode&nv%5B%5D=dd_qry&nv%5B%5D=bill&nv%5B%5D=&nv%5B%5D=storeid&nv%5B%5D=&nv%5B%5D=vendorid&nv%5B%5D={}&nv%5B%5D=qr_status&nv%5B%5D=&nv%5B%5D=ddprt&nv%5B%5D=%25&nv%5B%5D=fdate&nv%5B%5D=&nv%5B%5D=tdate&nv%5B%5D=&nv%5B%5D=shfdate&nv%5B%5D=&nv%5B%5D=shtdate&nv%5B%5D=&nv%5B%5D=fy_pno&nv%5B%5D=1&nv%5B%5D=fy_psize&nv%5B%5D=10", username);
|
||||
httplib::Headers headers =
|
||||
{
|
||||
{ "X-Requested-With", "XMLHttpRequest" },
|
||||
{
|
||||
"User-Agent",
|
||||
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36"
|
||||
},
|
||||
{ "Content-Type", "application/x-www-form-urlencoded; charset=UTF-8" },
|
||||
{ "Origin", "http://scmv9.fengzhansy.com:8882"
|
||||
},
|
||||
{ "Referer", "http://scmv9.fengzhansy.com:8882/scmv9/SCM/cggl_po_qry.jsp" },
|
||||
{ "Cookie", fmt::format("{}; {}", cookie_jsessionid, cookie_pppp) }
|
||||
};
|
||||
log << "post /scmv9/data.jsp\n";
|
||||
auto result = fzclient.Post("/scmv9/data.jsp", headers, body, "application/x-www-form-urlencoded; charset=UTF-8");
|
||||
if (result.error() != httplib::Error::Success)
|
||||
throw std::runtime_error("request failed");
|
||||
log << fmt::format("get result {}\n", result.value().body);
|
||||
std::stringstream result_body(result.value().body);
|
||||
Json::Value root;
|
||||
result_body >> root;
|
||||
std::map<std::string, std::pair<std::string, std::string>> orders;
|
||||
for (unsigned i = 0; i < root["dt"][1].size(); i++)
|
||||
{
|
||||
log << fmt::format
|
||||
(
|
||||
"insert order {} {} {}\n", root["dt"][1][i].asString(), root["dt"][2][i].asString(),
|
||||
root["dt"][4][i].asString()
|
||||
);
|
||||
orders.insert({root["dt"][1][i].asString(), {root["dt"][2][i].asString(), root["dt"][4][i].asString()}});
|
||||
}
|
||||
return orders;
|
||||
}();
|
||||
|
||||
// read order old
|
||||
auto order_old = [&]() -> std::set<std::string>
|
||||
{
|
||||
if (!std::filesystem::exists("orders.json"))
|
||||
return {};
|
||||
else
|
||||
{
|
||||
std::ifstream ins("orders.json");
|
||||
cereal::JSONInputArchive ina(ins);
|
||||
std::set<std::string> data;
|
||||
cereal::load(ina, data);
|
||||
return data;
|
||||
}
|
||||
}();
|
||||
|
||||
// push new order info
|
||||
for (const auto& order : order_list)
|
||||
if (!order_old.contains(order.first))
|
||||
{
|
||||
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={}",
|
||||
order.first
|
||||
);
|
||||
httplib::Headers headers =
|
||||
{
|
||||
{ "X-Requested-With", "XMLHttpRequest" },
|
||||
{
|
||||
"User-Agent",
|
||||
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36"
|
||||
},
|
||||
{ "Content-Type", "application/x-www-form-urlencoded; charset=UTF-8" },
|
||||
{ "Origin", "http://scmv9.fengzhansy.com:8882" },
|
||||
{ "Referer", "http://scmv9.fengzhansy.com:8882/scmv9/SCM/cggl_po_qry.jsp" },
|
||||
{ "Cookie", fmt::format("{}; {}", cookie_jsessionid, cookie_pppp) }
|
||||
};
|
||||
log << "post /scmv9/data.jsp\n";
|
||||
auto result = fzclient.Post
|
||||
("/scmv9/data.jsp", headers, body, "application/x-www-form-urlencoded; charset=UTF-8");
|
||||
if (result.error() != httplib::Error::Success)
|
||||
throw std::runtime_error("request failed");
|
||||
log << fmt::format("get result {}\n", result.value().body);
|
||||
std::stringstream result_body(result.value().body);
|
||||
Json::Value root;
|
||||
result_body >> root;
|
||||
|
||||
std::stringstream push_body;
|
||||
double all_cost = 0;
|
||||
push_body << fmt::format
|
||||
(
|
||||
"{} {} {}店\n", comment, order.second.second.substr(order.second.second.find('-') + 1),
|
||||
order.second.first.substr(1, 2)
|
||||
);
|
||||
for (unsigned i = 0; i < root["dt"][6].size(); i++)
|
||||
{
|
||||
push_body << fmt::format
|
||||
(
|
||||
"{} {}{}\n", root["dt"][6][i].asString().substr(root["dt"][6][i].asString().length() - 4),
|
||||
root["dt"][7][i].asString(), root["dt"][5][i].asString()
|
||||
);
|
||||
// 订货金额 maybe empty ???
|
||||
if (root["dt"][10][i].asString() != "")
|
||||
all_cost += std::stod(root["dt"][10][i].asString());
|
||||
}
|
||||
push_body << fmt::format("共{:.2f}元\n", all_cost);
|
||||
log << fmt::format("push to wx {}\n", push_body.str());
|
||||
auto encoded = urlencode(push_body.str());
|
||||
|
||||
for (const auto& wxu : wxuser)
|
||||
{
|
||||
auto path = fmt::format
|
||||
("/api/send/message/?appToken={}&content={}&uid={}", token, encoded, wxu);
|
||||
auto wxresult = wxclient.Get(path.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
// save data
|
||||
{
|
||||
for (const auto& order : order_list)
|
||||
if (!order_old.contains(order.first))
|
||||
order_old.insert(order.first);
|
||||
std::ofstream os("orders.json");
|
||||
cereal::JSONOutputArchive oa(os);
|
||||
cereal::save(oa, order_old);
|
||||
}
|
||||
}
|
||||
catch (const std::exception& ex)
|
||||
{
|
||||
log << ex.what() << "\n" << std::flush;
|
||||
std::terminate();
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
Json::Value configs;
|
||||
std::ifstream("@config_file@") >> configs;
|
||||
auto config_uids = configs["uids"];
|
||||
std::set<std::string> uids;
|
||||
for (auto& uid : config_uids)
|
||||
uids.insert(uid.asString());
|
||||
for (auto& config : configs["config"])
|
||||
oneshot
|
||||
(
|
||||
config["username"].asString(), config["password"].asString(), config["comment"].asString(),
|
||||
uids, configs["token"].asString()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
inputs:
|
||||
{
|
||||
options.nixos.services.gamemode = let inherit (inputs.lib) mkOption types; in
|
||||
{
|
||||
enable = mkOption { type = types.bool; default = false; };
|
||||
drmDevice = mkOption { type = types.int; };
|
||||
};
|
||||
config = let inherit (inputs.config.nixos.services) gamemode; in inputs.lib.mkIf gamemode.enable
|
||||
{
|
||||
programs.gamemode =
|
||||
{
|
||||
enable = true;
|
||||
settings =
|
||||
{
|
||||
general.renice = 10;
|
||||
gpu =
|
||||
{
|
||||
apply_gpu_optimisations = "accept-responsibility";
|
||||
nv_powermizer_mode = 1;
|
||||
gpu_device = builtins.toString gamemode.drmDevice;
|
||||
};
|
||||
custom = let notify-send = "${inputs.pkgs.libnotify}/bin/notify-send"; in
|
||||
{
|
||||
start = "${notify-send} 'GameMode started'";
|
||||
end = "${notify-send} 'GameMode ended'";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -43,7 +43,7 @@ inputs:
|
||||
{
|
||||
persistence."/nix/nodatacow".directories = inputs.lib.mkIf kvm.nodatacow
|
||||
[{ directory = "/var/lib/libvirt/images"; mode = "0711"; }];
|
||||
systemPackages = with inputs.pkgs; [ qemu_full win-spice guestfs-tools virt-manager ];
|
||||
systemPackages = with inputs.pkgs; [ qemu_full win-spice guestfs-tools virt-manager virt-viewer ];
|
||||
};
|
||||
systemd =
|
||||
{
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
# 大概这样做:
|
||||
# cp ~/repo/stuff/44/xxxx/{LicenseManager,Crack,License} .
|
||||
# sed -i s/xxxx/000123456789/ License/license.txt
|
||||
# docker build . -t lumericallicensemanager:2023r1
|
||||
# docker image save > image.tar
|
||||
# nix store add-file ./image.tar --name lumericalLicenseManager.tar
|
||||
# nix hash file /nix/store/g9f9xjfkvp1kbarz19i6qw7i9fg9pagx-lumericalLicenseManager.tar
|
||||
|
||||
FROM centos:7
|
||||
|
||||
USER root
|
||||
|
||||
COPY ./LicenseManager /tmp/LicenseManager
|
||||
RUN chmod +x /tmp/LicenseManager/INSTALL && \
|
||||
/tmp/LicenseManager/INSTALL -silent -install_dir /home/ansys_inc -lm && \
|
||||
rm -rf /tmp/LicenseManager
|
||||
COPY ./Crack/ansys_inc/ /home/ansys_inc
|
||||
RUN sed -i "s|127.0.0.1|0.0.0.0|g" /home/ansys_inc/shared_files/licensing/tools/tomcat/conf/server.xml
|
||||
RUN chmod -R 777 /home/ansys_inc
|
||||
RUN ln -s ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3
|
||||
COPY ./License/license.txt /home/ansys_inc/shared_files/licensing/license_files/ansyslmd.lic
|
||||
|
||||
WORKDIR /home/ansys_inc/shared_files/licensing
|
||||
CMD ["/bin/sh", "-c", "(./start_ansysli &); (./start_lmcenter &); tail -f /dev/null"]
|
||||
@@ -1,17 +0,0 @@
|
||||
inputs:
|
||||
{
|
||||
options.nixos.services.lumericalLicenseManager = let inherit (inputs.lib) mkOption types; in mkOption
|
||||
{ type = types.nullOr (types.submodule {}); default = null; };
|
||||
config = let inherit (inputs.config.nixos.services) lumericalLicenseManager;
|
||||
in inputs.lib.mkIf (lumericalLicenseManager != null)
|
||||
{
|
||||
virtualisation.oci-containers.containers.lumericalLicenseManager =
|
||||
{
|
||||
image = "lumericallicensemanager:2023r1";
|
||||
imageFile = inputs.topInputs.self.src.lumerical.licenseManagerImage;
|
||||
ports = [ "127.0.0.1:1084:1084/tcp" "127.0.0.1:1055:1055/tcp" "127.0.0.1:2325:2325/tcp" ];
|
||||
extraOptions = [ "--mac-address=00:01:23:45:67:89" ];
|
||||
};
|
||||
nixos.services.docker = {};
|
||||
};
|
||||
}
|
||||
@@ -16,7 +16,7 @@ inputs:
|
||||
hostName = nextcloud.hostname;
|
||||
appstoreEnable = false;
|
||||
https = true;
|
||||
package = inputs.pkgs.nextcloud30;
|
||||
package = inputs.pkgs.nextcloud31;
|
||||
maxUploadSize = "10G";
|
||||
config =
|
||||
{
|
||||
|
||||
@@ -362,6 +362,7 @@ inputs:
|
||||
access_log syslog:server=unix:/dev/log transparent_proxy;
|
||||
}
|
||||
'';
|
||||
# TODO: use existing options
|
||||
systemd.services.nginx-proxy =
|
||||
let
|
||||
ip = "${inputs.pkgs.iproute2}/bin/ip";
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
inputs:
|
||||
{
|
||||
options.nixos.services.nixseparatedebuginfo = let inherit (inputs.lib) mkOption types; in mkOption
|
||||
{
|
||||
type = types.nullOr (types.submodule {});
|
||||
default = if builtins.elem inputs.config.nixos.model.type [ "desktop" "server" ] then {} else null;
|
||||
};
|
||||
{ type = types.nullOr (types.submodule {}); default = null; };
|
||||
config =
|
||||
let inherit (inputs.config.nixos.services) nixseparatedebuginfo; in inputs.lib.mkIf (nixseparatedebuginfo != {})
|
||||
let inherit (inputs.config.nixos.services) nixseparatedebuginfo; in inputs.lib.mkIf (nixseparatedebuginfo != null)
|
||||
{
|
||||
services.nixseparatedebuginfod.enable = true;
|
||||
environment.persistence."/nix/nodatacow".directories =
|
||||
|
||||
@@ -80,21 +80,17 @@ inputs:
|
||||
(builtins.attrValues nixvirt.instance);
|
||||
in lib.network.writeXML (base // { ip = base.ip // { dhcp = base.ip.dhcp // { inherit host; }; }; });
|
||||
active = true;
|
||||
# never restart the network
|
||||
# when adding a new VM, add dhcp resolve manually, by:
|
||||
# sudo virsh net-update default add ip-dhcp-host "<host mac='' ip='192.168.122.' />" --live
|
||||
restart = false;
|
||||
}];
|
||||
pools =
|
||||
[{
|
||||
definition = lib.pool.writeXML
|
||||
{
|
||||
name = "default";
|
||||
uuid = "6fc75fcc-fb95-48b6-8fa4-0e59b6c1b6c7";
|
||||
type = "dir";
|
||||
target.path = "/var/lib/libvirt/images";
|
||||
};
|
||||
active = true;
|
||||
restart = false;
|
||||
# do not define image here, since it still needs to be created manually
|
||||
}];
|
||||
# do not use it to define disk, since it is not declartive
|
||||
# create disk manually, by:
|
||||
# sudo qemu-img create -f raw /var/lib/libvirt/images/test.img 20G
|
||||
# sudo chown qemu-libvirt:qemu-libvirt /var/lib/libvirt/images/test.img
|
||||
# sudo chmod 600 /var/lib/libvirt/images/test.img
|
||||
pools = [];
|
||||
};
|
||||
};
|
||||
libvirtd.qemu.verbatimConfig =
|
||||
@@ -139,7 +135,7 @@ inputs:
|
||||
inherit (vm) name;
|
||||
inherit (vm.value) uuid;
|
||||
memory = { count = vm.value.hardware.memoryMB; unit = "MiB"; };
|
||||
storage_vol = { pool = "default"; volume = "${vm.value.hardware.storage}.img"; };
|
||||
storage_vol = "/var/lib/libvirt/images/${vm.value.hardware.storage}.img";
|
||||
install_vol = "${inputs.topInputs.self.src.iso.netboot}";
|
||||
virtio_video = false;
|
||||
};
|
||||
@@ -208,6 +204,7 @@ inputs:
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = builtins.map (vm: vm.network.vnc.port)
|
||||
(builtins.filter (vm: vm.network.vnc.openFirewall) (builtins.attrValues nixvirt.instance));
|
||||
# TODO: use existing options
|
||||
systemd.services.nixvirt-forward =
|
||||
let
|
||||
nftRules = builtins.concatLists (builtins.concatLists (builtins.map
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# port from nixpkgs#70dc536a
|
||||
# TODO: update
|
||||
# port from nixpkgs#a87068b8
|
||||
inputs:
|
||||
{
|
||||
options.nixos.services.synapse.instances = let inherit (inputs.lib) mkOption types; in mkOption
|
||||
@@ -42,7 +41,7 @@ inputs:
|
||||
{
|
||||
services."synapse-${instance.name}" =
|
||||
let
|
||||
package = inputs.pkgs.pkgs-unstable.matrix-synapse.override
|
||||
package = inputs.pkgs.matrix-synapse.override
|
||||
{ extras = [ "url-preview" "postgres" "redis" ]; plugins = []; };
|
||||
config = inputs.config.sops.templates."synapse/${instance.name}/config.yaml".path;
|
||||
homeserver = "${package}/bin/synapse_homeserver";
|
||||
@@ -50,9 +49,11 @@ inputs:
|
||||
{
|
||||
description = "synapse-${instance.name}";
|
||||
enable = instance.value.autoStart;
|
||||
wants = [ "network-online.target" ];
|
||||
after = [ "network-online.target" "postgresql.service" ];
|
||||
requires = [ "network-online.target" "postgresql.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
environment = { LD_PRELOAD = "${inputs.pkgs.jemalloc}/lib/libjemalloc.so"; PYTHONMALLOC = "malloc"; };
|
||||
serviceConfig =
|
||||
{
|
||||
ExecStart = "${homeserver} --config-path ${config} --keys-directory ${workdir}";
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
inputs:
|
||||
{
|
||||
options.nixos.services.waydroid = let inherit (inputs.lib) mkOption types; in mkOption
|
||||
{ type = types.nullOr (types.submodule {}); default = null; };
|
||||
config = let inherit (inputs.config.nixos.services) waydroid; in inputs.lib.mkIf (waydroid != null)
|
||||
{ virtualisation.waydroid.enable = true; };
|
||||
}
|
||||
|
||||
# sudo waydroid shell wm set-fix-to-user-rotation enabled
|
||||
# /var/lib/waydroid/waydroid_base.prop
|
||||
# default:
|
||||
# ro.hardware.gralloc=gbm
|
||||
# ro.hardware.egl=mesa
|
||||
# nvidia:
|
||||
# ro.hardware.gralloc=default
|
||||
# ro.hardware.egl=swiftshader
|
||||
@@ -1,49 +0,0 @@
|
||||
inputs:
|
||||
{
|
||||
options.nixos.services.wechat2tg = let inherit (inputs.lib) mkOption types; in mkOption
|
||||
{ type = types.nullOr (types.submodule {}); default = null; };
|
||||
config = let inherit (inputs.config.nixos.services) wechat2tg; in inputs.lib.mkIf (wechat2tg != null)
|
||||
{
|
||||
virtualisation.oci-containers.containers.wechat2tg =
|
||||
{
|
||||
image = "finalpi/wechat2tg:v1.3.3";
|
||||
imageFile = inputs.pkgs.dockerTools.pullImage
|
||||
{
|
||||
imageName = "finalpi/wechat2tg";
|
||||
imageDigest = "sha256:48e3aff3f501847f063318b41ca34af7d83278847d2eee40d7ffbf439ee4c194";
|
||||
sha256 = "04hq577d981mdfz0xwklhj9ifgnpbv91d6zkf37awfrbsiqfkrr6";
|
||||
finalImageName = "finalpi/wechat2tg";
|
||||
finalImageTag = "v1.3.3";
|
||||
};
|
||||
volumes = [ "wechat2tg-config:/app/storage" "wechat2tg-files:/app/save-files" ];
|
||||
environmentFiles = [ inputs.config.sops.templates."wechat2tg/env".path ];
|
||||
};
|
||||
sops =
|
||||
{
|
||||
templates."wechat2tg/env".content = let placeholder = inputs.config.sops.placeholder; in
|
||||
''
|
||||
BOT_TOKEN=${placeholder."wechat2tg/token"}
|
||||
# PROXY_HOST: ""
|
||||
# PROXY_PORT: ""
|
||||
# Proxy type: socks5, http, https
|
||||
# PROXY_PROTOCOL: 'socks5'
|
||||
# Optional username and password
|
||||
# PROXY_USERNAME: ""
|
||||
# PROXY_PASSWORD: ""
|
||||
# API_ID: ""
|
||||
# API_HASH: ""
|
||||
ROOM_MESSAGE='<i>🌐#[topic]</i> ---- <b>👤#[(alias)] #[name]: </b>'
|
||||
OFFICIAL_MESSAGE='<b>📣#[name]: </b>'
|
||||
CONTACT_MESSAGE='<b>👤#[alias_first]: </b>'
|
||||
ROOM_MESSAGE_GROUP='<b>👤#[(alias)] #[name]: </b>'
|
||||
OFFICIAL_MESSAGE_GROUP='<b>📣#[name]: </b>'
|
||||
CONTACT_MESSAGE_GROUP='<b>👤#[alias_first]: </b>'
|
||||
CREATE_ROOM_NAME='#[topic]'
|
||||
CREATE_CONTACT_NAME='#[alias]#[[name]]'
|
||||
MESSAGE_DISPLAY='#[identity]#[br]#[body]'
|
||||
'';
|
||||
secrets."wechat2tg/token" = {};
|
||||
};
|
||||
nixos.services.docker = {};
|
||||
};
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
inputs:
|
||||
{
|
||||
options.nixos.services.xmuvpn = let inherit (inputs.lib) mkOption types; in mkOption
|
||||
{ type = types.nullOr (types.submodule {}); default = null; };
|
||||
config = let inherit (inputs.config.nixos.services) xmuvpn; in inputs.lib.mkIf (xmuvpn != null)
|
||||
{
|
||||
assertions =
|
||||
[{
|
||||
assertion = inputs.config.nixos.services.xray.client.enable;
|
||||
message = "Xray should be enabled.";
|
||||
}];
|
||||
virtualisation.oci-containers.containers.xmuvpn =
|
||||
{
|
||||
image = "hagb/docker-easyconnect";
|
||||
imageFile = inputs.topInputs.self.src.xmuvpn;
|
||||
ports = [ "127.0.0.1:5901:5901/tcp" "127.0.0.1:10069:1080/tcp" ];
|
||||
extraOptions = [ "--dns=223.5.5.5" "--device=/dev/net/tun" "--cap-add=NET_ADMIN" ];
|
||||
volumes = [ "xmuvpn:/root" ];
|
||||
environment = { PASSWORD = "xxxx"; PING_ADDR = "office.chn.moe"; };
|
||||
};
|
||||
nixos.services.docker = {};
|
||||
systemd.services.xmuvpn-forwarder =
|
||||
{
|
||||
description = "xmuvpn forwarder daemon";
|
||||
after = [ "network.target" "v2ray-forwarder.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig =
|
||||
let ipset = "${inputs.pkgs.ipset}/bin/ipset";
|
||||
in
|
||||
{
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
ExecStart = inputs.pkgs.writeShellScript "xmuvpn-forwarder.start"
|
||||
(builtins.concatStringsSep "\n" (builtins.map
|
||||
(host: "${ipset} add xmu_net ${host}")
|
||||
[
|
||||
# when add new ip, remember to also add it to router
|
||||
"218.193.58.125" "210.34.0.35" "121.192.191.10" "10.24.84.31" "59.77.0.143" "59.77.36.248"
|
||||
"172.27.124.24" "59.77.36.156" "59.77.36.223" "210.34.0.84" "218.193.50.157"
|
||||
"210.34.16.60" "10.26.14.70" "10.26.14.56" "210.34.16.20" "59.77.36.250"
|
||||
]));
|
||||
ExecStop = inputs.pkgs.writeShellScript "xmuvpn-forwarder.stop" "${ipset} flush xmu_net";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2010 Jo-Philipp Wich
|
||||
|
||||
START=99
|
||||
STOP=01
|
||||
|
||||
start() {
|
||||
ipset create xmunet hash:net
|
||||
ipset add xmunet 218.193.58.125
|
||||
ipset add xmunet 210.34.0.35
|
||||
ipset add xmunet 121.192.191.10
|
||||
ipset add xmunet 10.24.84.31
|
||||
ipset add xmunet 59.77.0.143
|
||||
ipset add xmunet 59.77.36.248
|
||||
ipset add xmunet 172.27.124.24
|
||||
ipset add xmunet 59.77.36.156
|
||||
ipset add xmunet 59.77.36.223
|
||||
ipset add xmunet 210.34.0.84
|
||||
ipset add xmunet 218.193.50.157
|
||||
ipset add xmunet 210.34.16.60
|
||||
ipset add xmunet 10.26.14.70
|
||||
ipset add xmunet 10.26.14.56
|
||||
ipset add xmunet 210.34.16.20
|
||||
ipset add xmunet 59.77.36.250
|
||||
iptables -t mangle -A PREROUTING ! -s 192.168.1.2 -m set --match-set xmunet dst -j MARK --set-mark 1/1
|
||||
ip route add unicast 0.0.0.0/0 via 192.168.1.2 dev br-lan table 100
|
||||
ip rule add fwmark 1/1 table 100
|
||||
}
|
||||
|
||||
stop() {
|
||||
iptables -t mangle -D PREROUTING ! -s 192.168.1.2 -m set --match-set xmunet dst -j MARK --set-mark 1/1 -w
|
||||
# somehow -w does not work
|
||||
sleep 1
|
||||
ip rule del fwmark 1/1 table 100
|
||||
ip route del table 100
|
||||
ipset flush xmunet
|
||||
ipset destroy xmunet
|
||||
}
|
||||
@@ -215,6 +215,7 @@ inputs:
|
||||
};
|
||||
restartTriggers = [ inputs.config.sops.templates."xray-client.json".file ];
|
||||
};
|
||||
# TODO: use existing options
|
||||
v2ray-forwarder =
|
||||
{
|
||||
description = "v2ray-forwarder Daemon";
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
inputs:
|
||||
{
|
||||
options.nixos.services.xrdp = let inherit (inputs.lib) mkOption types; in
|
||||
{
|
||||
enable = mkOption { type = types.bool; default = false; };
|
||||
port = mkOption { type = types.ints.unsigned; default = 3389; };
|
||||
hostname = mkOption { type = types.nullOr (types.nonEmptyListOf types.nonEmptyStr); default = null; };
|
||||
};
|
||||
config = let inherit (inputs.config.nixos.services) xrdp;
|
||||
in inputs.lib.mkIf xrdp.enable (inputs.lib.mkMerge
|
||||
[
|
||||
{
|
||||
services.xrdp =
|
||||
{
|
||||
enable = true;
|
||||
port = xrdp.port;
|
||||
openFirewall = true;
|
||||
defaultWindowManager = "${inputs.pkgs.plasma-workspace}/bin/startplasma-x11";
|
||||
};
|
||||
}
|
||||
(
|
||||
inputs.lib.mkIf (xrdp.hostname != null)
|
||||
(
|
||||
let mainDomain = builtins.elemAt xrdp.hostname 0;
|
||||
in
|
||||
{
|
||||
services.xrdp =
|
||||
let keydir = inputs.config.security.acme.certs.${mainDomain}.directory;
|
||||
in { sslCert = "${keydir}/full.pem"; sslKey = "${keydir}/key.pem"; };
|
||||
nixos.services.acme.cert.${mainDomain} =
|
||||
{ domains = xrdp.hostname; group = inputs.config.systemd.services.xrdp.serviceConfig.Group; };
|
||||
}
|
||||
)
|
||||
)
|
||||
]);
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
inputs:
|
||||
{
|
||||
config =
|
||||
options.nixos.system.binfmt = let inherit (inputs.lib) mkOption types; in mkOption
|
||||
{ type = types.nullOr (types.submodule {}); default = null; };
|
||||
config = let inherit (inputs.config.nixos.system) binfmt; in inputs.lib.mkIf (binfmt != null)
|
||||
{
|
||||
programs.java = { enable = true; binfmt = true; };
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" "x86_64-windows" ];
|
||||
|
||||
@@ -16,9 +16,6 @@ inputs:
|
||||
{
|
||||
supportedFilesystems = [ "ntfs" "nfs" "nfsv4" ];
|
||||
# consoleLogLevel = 7;
|
||||
kernelParams = inputs.lib.mkIf
|
||||
(builtins.elem inputs.config.nixos.system.grub.installDevice [ "efi" "efiRemovable" ])
|
||||
[ "plymouth.use-simpledrm" ];
|
||||
};
|
||||
hardware = { enableAllFirmware = true; bluetooth.enable = true; sensor.iio.enable = true; };
|
||||
environment =
|
||||
@@ -50,13 +47,12 @@ inputs:
|
||||
i18n = { defaultLocale = "C.UTF-8"; supportedLocales = [ "all" ]; };
|
||||
users.mutableUsers = false;
|
||||
virtualisation.oci-containers.backend = "docker";
|
||||
home-manager.sharedModules = [{ home.stateVersion = "22.11"; }];
|
||||
home-manager.sharedModules = [{ home.stateVersion = "25.05"; }];
|
||||
system =
|
||||
{
|
||||
stateVersion = "22.11";
|
||||
stateVersion = "25.05";
|
||||
configurationRevision = inputs.topInputs.self.rev or "dirty";
|
||||
nixos = { versionSuffix = inputs.lib.mkForce ""; tags = [ inputs.topInputs.self.config.branch ]; };
|
||||
};
|
||||
chaotic.nyx.cache.enable = false;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
inputs:
|
||||
{
|
||||
config =
|
||||
options.nixos.system.envfs = let inherit (inputs.lib) mkOption types; in mkOption
|
||||
{
|
||||
type = types.nullOr (types.submodule {});
|
||||
default = if builtins.elem inputs.config.nixos.model.type [ "desktop" "server" ] then {} else null;
|
||||
};
|
||||
config = let inherit (inputs.config.nixos.system) envfs; in inputs.lib.mkIf (envfs != null)
|
||||
{
|
||||
services.envfs.enable = true;
|
||||
environment.variables.ENVFS_RESOLVE_ALWAYS = "1";
|
||||
|
||||
@@ -4,10 +4,10 @@ inputs:
|
||||
[
|
||||
# for cluster master, export NFS
|
||||
(inputs.lib.mkIf (inputs.config.nixos.model.cluster.nodeType or null == "master")
|
||||
{ nixos.services.nfs."/nix/persistent/home" = "192.168.178.0/24"; })
|
||||
{ nixos.services.nfs."/" = "192.168.178.0/24"; })
|
||||
# for cluster worker, mount nfs, disable some home manager files
|
||||
(inputs.lib.mkIf (inputs.config.nixos.model.cluster.nodeType or null == "worker")
|
||||
{ nixos.system.fileSystems.mount.nfs."192.168.178.1:/nix/persistent/home" = "/remote/home"; })
|
||||
(let inherit (inputs.config.nixos.model) cluster; in inputs.lib.mkIf (cluster.nodeType or null == "worker")
|
||||
{ nixos.system.fileSystems.mount.nfs."192.168.178.1:/" = "/nix/remote/${cluster.clusterName}"; })
|
||||
# 将一部分由 home-manager 生成软链接的文件改为直接挂载,以兼容集群的设置
|
||||
(let files = [ ".zshrc" ".zshenv" ".profile" ".bashrc" ".bash_profile" ".zlogin" ]; in
|
||||
{
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
inputs:
|
||||
{
|
||||
options.nixos.system.fileSystems.impermanence = let inherit (inputs.lib) mkOption types; in
|
||||
{
|
||||
clusterPersistentDirectory = mkOption
|
||||
{
|
||||
type = types.str;
|
||||
default =
|
||||
let
|
||||
inherit (inputs.config.nixos.model) cluster;
|
||||
prefix = if cluster.nodeType or null == "worker" then "/nix/remote/${cluster.clusterName}" else "";
|
||||
in "${prefix}/nix/persistent";
|
||||
readOnly = true;
|
||||
};
|
||||
};
|
||||
config.environment.persistence = inputs.lib.mkMerge
|
||||
[
|
||||
# generic settings
|
||||
@@ -20,7 +33,7 @@ inputs:
|
||||
"/nix/rootfs/current" =
|
||||
{
|
||||
hideMounts = true;
|
||||
directories = [ { directory = "/var/lib/docker"; mode = "0710"; } "/var/lib/flatpak" ]
|
||||
directories = [ { directory = "/var/lib/docker"; mode = "0710"; } ]
|
||||
++ builtins.map (f: "/var/lib/systemd/${f}") [ "linger" "coredump" "backlight" ];
|
||||
};
|
||||
"/nix/nodatacow" =
|
||||
@@ -35,7 +48,7 @@ inputs:
|
||||
# 对于桌面用途的 chn,不需要挂载
|
||||
# 对于其它情况,则挂载 /nix/persistent/home/user 到 /home/user
|
||||
{
|
||||
"${if inputs.config.nixos.model.cluster.nodeType or null == "worker" then "/remote" else "/nix/persistent"}" =
|
||||
${inputs.config.nixos.system.fileSystems.impermanence.clusterPersistentDirectory} =
|
||||
{
|
||||
hideMounts = true;
|
||||
directories = builtins.map
|
||||
@@ -46,10 +59,10 @@ inputs:
|
||||
};
|
||||
}
|
||||
# 挂载更详细的目录
|
||||
# 对于任何情况,`.cache` 都应该在重启后丢失
|
||||
# 对于任何情况,`.cache` `.config/systemd` 都应该在重启后丢失
|
||||
{
|
||||
"/nix/rootfs/current".users = builtins.listToAttrs (builtins.map
|
||||
(user: { name = user; value.directories = [ ".cache" ]; })
|
||||
(user: { name = user; value.directories = [ ".cache" ".config/systemd" ]; })
|
||||
inputs.config.nixos.user.users);
|
||||
}
|
||||
# 对于桌面用途的 chn,有一些需要 persist 的目录
|
||||
|
||||
@@ -8,7 +8,6 @@ inputs:
|
||||
services =
|
||||
{
|
||||
desktopManager.plasma6.enable = true;
|
||||
xserver.enable = true;
|
||||
greetd =
|
||||
{
|
||||
enable = true;
|
||||
@@ -28,40 +27,35 @@ inputs:
|
||||
sessionVariables.GTK_USE_PORTAL = "1";
|
||||
persistence."/nix/persistent".directories =
|
||||
[{ directory = "/var/cache/tuigreet"; user = "greeter"; group = "greeter"; mode = "0700"; }];
|
||||
systemPackages = with inputs.pkgs; [ waybar ];
|
||||
};
|
||||
xdg.portal.extraPortals = builtins.map (p: inputs.pkgs."xdg-desktop-portal-${p}") [ "gtk" "wlr" ];
|
||||
i18n.inputMethod =
|
||||
{
|
||||
enable = true;
|
||||
type = "fcitx5";
|
||||
fcitx5.addons = builtins.map (p: inputs.pkgs."fcitx5-${p}")
|
||||
[ "rime" "chinese-addons" "mozc" "nord" "material-color" ];
|
||||
fcitx5.addons = builtins.map (p: inputs.pkgs."fcitx5-${p}") [ "chinese-addons" "mozc" "material-color" "gtk" ];
|
||||
};
|
||||
programs =
|
||||
programs.dconf.enable = true;
|
||||
nixos.user.sharedModules = [(hmInputs:
|
||||
{
|
||||
dconf.enable = true;
|
||||
# hyprland = { enable = true; withUWSM = true; };
|
||||
# waybar should not be pull in by graphical-session.target
|
||||
# waybar.enable = false;
|
||||
# iio-hyprland.enable = true;
|
||||
# hyprlock.enable = true;
|
||||
# uwsm.enable = true;
|
||||
};
|
||||
systemd.services.display-manager.after = [ "plymouth-quit.service" ];
|
||||
# 在 chromium 中输入汉字有可能会漏字,需要这个配置
|
||||
nixos.user.sharedModules = [(hmInputs: { gtk =
|
||||
{
|
||||
enable = true;
|
||||
iconTheme.name = "klassy";
|
||||
gtk2 =
|
||||
config =
|
||||
{
|
||||
extraConfig = ''gtk-im-module="fcitx"'';
|
||||
configLocation = "${hmInputs.config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||
gtk =
|
||||
{
|
||||
enable = true;
|
||||
gtk2 =
|
||||
{
|
||||
extraConfig = ''gtk-im-module="fcitx"'';
|
||||
configLocation = "${hmInputs.config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||
};
|
||||
gtk3.extraConfig.gtk-im-module = "fcitx";
|
||||
gtk4.extraConfig.gtk-im-module = "fcitx";
|
||||
};
|
||||
# somehow kde needs this
|
||||
# TODO: debug
|
||||
home.file.".cache/thumbnails/.keep".text = "";
|
||||
};
|
||||
gtk3.extraConfig.gtk-im-module = "fcitx";
|
||||
gtk4.extraConfig.gtk-im-module = "fcitx";
|
||||
};})];
|
||||
})];
|
||||
})
|
||||
# prefer gui or not
|
||||
(inputs.localLib.mkConditional (builtins.elem inputs.config.nixos.model.type [ "desktop" ])
|
||||
|
||||
@@ -3,7 +3,6 @@ inputs:
|
||||
options.nixos.system.initrd = let inherit (inputs.lib) mkOption types; in
|
||||
{
|
||||
sshd = mkOption { type = types.nullOr (types.submodule {}); default = null; };
|
||||
unl0kr = mkOption { type = types.nullOr (types.submodule {}); default = null; };
|
||||
};
|
||||
config = let inherit (inputs.config.nixos.system) initrd; in inputs.lib.mkMerge
|
||||
[
|
||||
@@ -34,6 +33,5 @@ inputs:
|
||||
};
|
||||
}
|
||||
)
|
||||
(inputs.lib.mkIf (initrd.unl0kr != null) { boot.initrd.unl0kr.enable = true; })
|
||||
];
|
||||
}
|
||||
|
||||
@@ -37,6 +37,8 @@ inputs:
|
||||
"r8712u"
|
||||
# network for srv3
|
||||
"igb"
|
||||
# touchscreen for one
|
||||
"pinctrl-tigerlake"
|
||||
]
|
||||
++ (inputs.lib.optionals (kernel.variant != "nixos") [ "crypto_simd" ]);
|
||||
extraModulePackages = with inputs.config.boot.kernelPackages; [ v4l2loopback zenpower ];
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
inputs:
|
||||
{
|
||||
config =
|
||||
options.nixos.system.nix-ld = let inherit (inputs.lib) mkOption types; in mkOption
|
||||
{
|
||||
type = types.nullOr (types.submodule {});
|
||||
default = if builtins.elem inputs.config.nixos.model.type [ "desktop" "server" ] then {} else null;
|
||||
};
|
||||
config = let inherit (inputs.config.nixos.system) nix-ld; in inputs.lib.mkIf (nix-ld != null)
|
||||
{
|
||||
programs.nix-ld =
|
||||
{
|
||||
|
||||
@@ -13,38 +13,32 @@ let
|
||||
{ cudaForwardCompat = nixpkgs.cuda.forwardCompat; })
|
||||
);
|
||||
allowInsecurePredicate = p: inputs.lib.warn "Allowing insecure package ${p.name or "${p.pname}-${p.version}"}" true;
|
||||
config = cudaConfig
|
||||
// {
|
||||
inherit allowInsecurePredicate;
|
||||
allowUnfree = true;
|
||||
android_sdk.accept_license = true;
|
||||
}
|
||||
// (inputs.lib.optionalAttrs (nixpkgs.march != null)
|
||||
{
|
||||
# TODO: test znver3 do use AVX
|
||||
oneapiArch = let match = {}; in match.${nixpkgs.march} or nixpkgs.march;
|
||||
nvhpcArch = nixpkgs.march;
|
||||
# contentAddressedByDefault = true;
|
||||
})
|
||||
// (inputs.lib.optionalAttrs (nixpkgs.nixRoot != null)
|
||||
{ nix = { storeDir = "${nixpkgs.nixRoot}/store"; stateDir = "${nixpkgs.nixRoot}/var"; }; });
|
||||
in platformConfig //
|
||||
{
|
||||
config = cudaConfig //
|
||||
{
|
||||
inherit allowInsecurePredicate;
|
||||
allowUnfree = true;
|
||||
qchem-config = { optArch = nixpkgs.march; useCuda = nixpkgs.cuda != null; };
|
||||
android_sdk.accept_license = true;
|
||||
}
|
||||
// (inputs.lib.optionalAttrs (nixpkgs.march != null)
|
||||
{
|
||||
# TODO: test znver3 do use AVX
|
||||
oneapiArch = let match = {}; in match.${nixpkgs.march} or nixpkgs.march;
|
||||
nvhpcArch = nixpkgs.march;
|
||||
# contentAddressedByDefault = true;
|
||||
})
|
||||
// (inputs.lib.optionalAttrs (nixpkgs.nixRoot != null)
|
||||
{ nix = { storeDir = "${nixpkgs.nixRoot}/store"; stateDir = "${nixpkgs.nixRoot}/var"; }; });
|
||||
inherit config;
|
||||
overlays =
|
||||
[
|
||||
inputs.topInputs.qchem.overlays.default
|
||||
inputs.topInputs.bscpkgs.overlays.default
|
||||
inputs.topInputs.aagl.overlays.default
|
||||
inputs.topInputs.nur-xddxdd.overlays.inSubTree
|
||||
inputs.topInputs.shadowrz.overlays.default
|
||||
inputs.topInputs.nix-vscode-extensions.overlays.default
|
||||
(final: prev:
|
||||
{
|
||||
inherit (inputs.topInputs.nix-vscode-extensions.overlays.default final prev) nix-vscode-extensions;
|
||||
nur-linyinfeng = (inputs.topInputs.nur-linyinfeng.overlays.default final prev).linyinfeng;
|
||||
firefox-addons = (import "${inputs.topInputs.rycee}" { inherit (prev) pkgs; }).firefox-addons;
|
||||
inherit (import inputs.topInputs.gricad { pkgs = final; }) intel-oneapi intel-oneapi-2022;
|
||||
linuxPackages_cachyos_lts =
|
||||
final.linuxPackagesFor (inputs.topInputs.cachyos-lts.overlays.default final prev).linuxPackages_cachyos;
|
||||
})
|
||||
@@ -64,11 +58,12 @@ in platformConfig //
|
||||
};
|
||||
libvirt = (prev.libvirt.override { iptables = final.nftables; }).overrideAttrs
|
||||
(prev: { patches = prev.patches or [] ++ [ ./libvirt.patch ]; });
|
||||
root = prev.root.overrideAttrs (prev:
|
||||
root = (prev.root.override { stdenv = final.gcc13Stdenv; }).overrideAttrs (prev:
|
||||
{
|
||||
patches = prev.patches or [] ++ [ ./root.patch ];
|
||||
cmakeFlags = prev.cmakeFlags ++ [ "-DCMAKE_CXX_STANDARD=23" ];
|
||||
});
|
||||
inherit (final.pkgs-2411) iio-sensor-proxy;
|
||||
}
|
||||
// (
|
||||
let
|
||||
@@ -76,7 +71,7 @@ in platformConfig //
|
||||
{
|
||||
pkgs-2305 = "nixpkgs-2305";
|
||||
pkgs-2311 = "nixpkgs-2311";
|
||||
pkgs-2411 = "nixpkgs-2411";
|
||||
pkgs-2411 = { source = "nixpkgs-2411"; overlay = inputs.topInputs.bscpkgs.overlays.default; };
|
||||
pkgs-unstable =
|
||||
{
|
||||
source = "nixpkgs-unstable";
|
||||
@@ -120,18 +115,12 @@ in platformConfig //
|
||||
packages = name: import inputs.topInputs.${source.${name}.source or source.${name}}
|
||||
{
|
||||
localSystem = platformConfig.hostPlatform or { inherit (platformConfig) system; };
|
||||
config = cudaConfig //
|
||||
{
|
||||
allowUnfree = true;
|
||||
# contentAddressedByDefault = true;
|
||||
inherit allowInsecurePredicate;
|
||||
};
|
||||
inherit config;
|
||||
overlays = [(source.${name}.overlay or (_: _: {}))];
|
||||
};
|
||||
in builtins.listToAttrs (builtins.map
|
||||
(name: { inherit name; value = packages name; }) (builtins.attrNames source))
|
||||
)
|
||||
# TODO: bring patch to upstream
|
||||
// (inputs.lib.optionalAttrs (prev.stdenv.hostPlatform.avx512Support)
|
||||
{ gsl = prev.gsl.overrideAttrs { doCheck = false; }; })
|
||||
// (inputs.lib.optionalAttrs (nixpkgs.march != null)
|
||||
@@ -162,8 +151,11 @@ in platformConfig //
|
||||
{
|
||||
scipy = prev.scipy.overridePythonAttrs (prev:
|
||||
{ disabledTests = prev.disabledTests or [] ++ [ "test_hyp2f1" ]; });
|
||||
rich = prev.rich.overridePythonAttrs (prev:
|
||||
{ disabledTests = prev.disabledTests or [] ++ [ "test_brokenpipeerror" ]; });
|
||||
# paperwork-backend = prev.paperwork-backend.overrideAttrs (prev: { doCheck = false; });
|
||||
})];
|
||||
inherit (final.pkgs-2411) intelPackages_2023;
|
||||
})
|
||||
# // (inputs.lib.optionalAttrs (nixpkgs.march == "silvermont")
|
||||
# { c-blosc = prev.c-blosc.overrideAttrs { doCheck = false; }; })
|
||||
|
||||
@@ -35,7 +35,6 @@ inputs:
|
||||
];
|
||||
# sops start before impermanence, so we need to use the absolute path
|
||||
age.sshKeyPaths = [ "/nix/persistent/etc/ssh/ssh_host_ed25519_key" ];
|
||||
gnupg.sshKeyPaths = [ "/nix/persistent/etc/ssh/ssh_host_rsa_key" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@ inputs:
|
||||
"vm.oom_kill_allocating_task" = true;
|
||||
"vm.oom_dump_tasks" = false;
|
||||
"vm.overcommit_memory" = inputs.lib.mkDefault 1;
|
||||
"kernel.sysrq" = 438;
|
||||
# enable all sysrq
|
||||
"kernel.sysrq" = 1;
|
||||
# set to larger value, otherwise the system will be very slow on low memory machines
|
||||
"vm.vfs_cache_pressure" = 100;
|
||||
};
|
||||
|
||||
@@ -57,7 +57,6 @@ inputs:
|
||||
)
|
||||
];
|
||||
};
|
||||
pam.yubico.authorizedYubiKeys.ids = [ "cccccbgrhnub" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,276 +0,0 @@
|
||||
################
|
||||
### MONITORS ###
|
||||
################
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||
monitor=,preferred,auto,auto
|
||||
|
||||
|
||||
###################
|
||||
### MY PROGRAMS ###
|
||||
###################
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/
|
||||
|
||||
# Set programs that you use
|
||||
$terminal = kitty
|
||||
$fileManager = dolphin
|
||||
$menu = wofi --show drun
|
||||
|
||||
|
||||
#################
|
||||
### AUTOSTART ###
|
||||
#################
|
||||
|
||||
# Autostart necessary processes (like notifications daemons, status bars, etc.)
|
||||
# Or execute your favorite apps at launch like this:
|
||||
|
||||
# exec-once = $terminal
|
||||
# exec-once = nm-applet &
|
||||
# exec-once = waybar & hyprpaper & firefox
|
||||
|
||||
|
||||
#############################
|
||||
### ENVIRONMENT VARIABLES ###
|
||||
#############################
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Environment-variables/
|
||||
|
||||
env = XCURSOR_SIZE,24
|
||||
env = HYPRCURSOR_SIZE,24
|
||||
|
||||
|
||||
#####################
|
||||
### LOOK AND FEEL ###
|
||||
#####################
|
||||
|
||||
# Refer to https://wiki.hyprland.org/Configuring/Variables/
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#general
|
||||
general {
|
||||
gaps_in = 5
|
||||
gaps_out = 20
|
||||
|
||||
border_size = 2
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
|
||||
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
|
||||
col.inactive_border = rgba(595959aa)
|
||||
|
||||
# Set to true enable resizing windows by clicking and dragging on borders and gaps
|
||||
resize_on_border = false
|
||||
|
||||
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
|
||||
allow_tearing = false
|
||||
|
||||
layout = dwindle
|
||||
}
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#decoration
|
||||
decoration {
|
||||
rounding = 10
|
||||
|
||||
# Change transparency of focused and unfocused windows
|
||||
active_opacity = 1.0
|
||||
inactive_opacity = 1.0
|
||||
|
||||
shadow {
|
||||
enabled = true
|
||||
range = 4
|
||||
render_power = 3
|
||||
color = rgba(1a1a1aee)
|
||||
}
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#blur
|
||||
blur {
|
||||
enabled = true
|
||||
size = 3
|
||||
passes = 1
|
||||
|
||||
vibrancy = 0.1696
|
||||
}
|
||||
}
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#animations
|
||||
animations {
|
||||
enabled = yes, please :)
|
||||
|
||||
# Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||
|
||||
bezier = easeOutQuint,0.23,1,0.32,1
|
||||
bezier = easeInOutCubic,0.65,0.05,0.36,1
|
||||
bezier = linear,0,0,1,1
|
||||
bezier = almostLinear,0.5,0.5,0.75,1.0
|
||||
bezier = quick,0.15,0,0.1,1
|
||||
|
||||
animation = global, 1, 10, default
|
||||
animation = border, 1, 5.39, easeOutQuint
|
||||
animation = windows, 1, 4.79, easeOutQuint
|
||||
animation = windowsIn, 1, 4.1, easeOutQuint, popin 87%
|
||||
animation = windowsOut, 1, 1.49, linear, popin 87%
|
||||
animation = fadeIn, 1, 1.73, almostLinear
|
||||
animation = fadeOut, 1, 1.46, almostLinear
|
||||
animation = fade, 1, 3.03, quick
|
||||
animation = layers, 1, 3.81, easeOutQuint
|
||||
animation = layersIn, 1, 4, easeOutQuint, fade
|
||||
animation = layersOut, 1, 1.5, linear, fade
|
||||
animation = fadeLayersIn, 1, 1.79, almostLinear
|
||||
animation = fadeLayersOut, 1, 1.39, almostLinear
|
||||
animation = workspaces, 1, 1.94, almostLinear, fade
|
||||
animation = workspacesIn, 1, 1.21, almostLinear, fade
|
||||
animation = workspacesOut, 1, 1.94, almostLinear, fade
|
||||
}
|
||||
|
||||
# Ref https://wiki.hyprland.org/Configuring/Workspace-Rules/
|
||||
# "Smart gaps" / "No gaps when only"
|
||||
# uncomment all if you wish to use that.
|
||||
# workspace = w[tv1], gapsout:0, gapsin:0
|
||||
# workspace = f[1], gapsout:0, gapsin:0
|
||||
# windowrulev2 = bordersize 0, floating:0, onworkspace:w[tv1]
|
||||
# windowrulev2 = rounding 0, floating:0, onworkspace:w[tv1]
|
||||
# windowrulev2 = bordersize 0, floating:0, onworkspace:f[1]
|
||||
# windowrulev2 = rounding 0, floating:0, onworkspace:f[1]
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
dwindle {
|
||||
pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = true # You probably want this
|
||||
}
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||
master {
|
||||
new_status = master
|
||||
}
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#misc
|
||||
misc {
|
||||
force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers
|
||||
disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :(
|
||||
}
|
||||
|
||||
|
||||
#############
|
||||
### INPUT ###
|
||||
#############
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#input
|
||||
input {
|
||||
kb_layout = us
|
||||
kb_variant =
|
||||
kb_model =
|
||||
kb_options =
|
||||
kb_rules =
|
||||
|
||||
follow_mouse = 1
|
||||
|
||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||
|
||||
touchpad {
|
||||
natural_scroll = false
|
||||
}
|
||||
}
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#gestures
|
||||
gestures {
|
||||
workspace_swipe = false
|
||||
}
|
||||
|
||||
# Example per-device config
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
|
||||
device {
|
||||
name = epic-mouse-v1
|
||||
sensitivity = -0.5
|
||||
}
|
||||
|
||||
|
||||
###################
|
||||
### KEYBINDINGS ###
|
||||
###################
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/
|
||||
$mainMod = SUPER # Sets "Windows" key as main modifier
|
||||
|
||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||
bind = $mainMod, Q, exec, $terminal
|
||||
bind = $mainMod, C, killactive,
|
||||
bind = $mainMod, M, exit,
|
||||
bind = $mainMod, E, exec, $fileManager
|
||||
bind = $mainMod, V, togglefloating,
|
||||
bind = $mainMod, R, exec, $menu
|
||||
bind = $mainMod, P, pseudo, # dwindle
|
||||
bind = $mainMod, J, togglesplit, # dwindle
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
bind = $mainMod, left, movefocus, l
|
||||
bind = $mainMod, right, movefocus, r
|
||||
bind = $mainMod, up, movefocus, u
|
||||
bind = $mainMod, down, movefocus, d
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
bind = $mainMod, 1, workspace, 1
|
||||
bind = $mainMod, 2, workspace, 2
|
||||
bind = $mainMod, 3, workspace, 3
|
||||
bind = $mainMod, 4, workspace, 4
|
||||
bind = $mainMod, 5, workspace, 5
|
||||
bind = $mainMod, 6, workspace, 6
|
||||
bind = $mainMod, 7, workspace, 7
|
||||
bind = $mainMod, 8, workspace, 8
|
||||
bind = $mainMod, 9, workspace, 9
|
||||
bind = $mainMod, 0, workspace, 10
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
||||
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
||||
bind = $mainMod SHIFT, 4, movetoworkspace, 4
|
||||
bind = $mainMod SHIFT, 5, movetoworkspace, 5
|
||||
bind = $mainMod SHIFT, 6, movetoworkspace, 6
|
||||
bind = $mainMod SHIFT, 7, movetoworkspace, 7
|
||||
bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
||||
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||
|
||||
# Example special workspace (scratchpad)
|
||||
bind = $mainMod, S, togglespecialworkspace, magic
|
||||
bind = $mainMod SHIFT, S, movetoworkspace, special:magic
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
bind = $mainMod, mouse_down, workspace, e+1
|
||||
bind = $mainMod, mouse_up, workspace, e-1
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = $mainMod, mouse:272, movewindow
|
||||
bindm = $mainMod, mouse:273, resizewindow
|
||||
|
||||
# Laptop multimedia keys for volume and LCD brightness
|
||||
bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
|
||||
bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
|
||||
bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||
bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
|
||||
bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 10%+
|
||||
bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 10%-
|
||||
|
||||
# Requires playerctl
|
||||
bindl = , XF86AudioNext, exec, playerctl next
|
||||
bindl = , XF86AudioPause, exec, playerctl play-pause
|
||||
bindl = , XF86AudioPlay, exec, playerctl play-pause
|
||||
bindl = , XF86AudioPrev, exec, playerctl previous
|
||||
|
||||
##############################
|
||||
### WINDOWS AND WORKSPACES ###
|
||||
##############################
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||
# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules
|
||||
|
||||
# Example windowrule v1
|
||||
# windowrule = float, ^(kitty)$
|
||||
|
||||
# Example windowrule v2
|
||||
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
|
||||
|
||||
# Ignore maximize requests from apps. You'll probably like this.
|
||||
windowrulev2 = suppressevent maximize, class:.*
|
||||
|
||||
# Fix some dragging issues with XWayland
|
||||
windowrulev2 = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0
|
||||
@@ -1,51 +0,0 @@
|
||||
inputs:
|
||||
{
|
||||
# config = inputs.lib.mkIf (inputs.config.nixos.packages.desktop != null)
|
||||
config = inputs.lib.mkIf (false)
|
||||
{
|
||||
home-manager.users.chn.config =
|
||||
{
|
||||
programs.hyprlock =
|
||||
{
|
||||
enable = true;
|
||||
settings =
|
||||
{
|
||||
general = { disable_loading_bar = true; hide_cursor = true; };
|
||||
background.path = "${inputs.topInputs.nixos-wallpaper}/twitter-1884592003595592025.jpg";
|
||||
input-field =
|
||||
[{
|
||||
# as least one entry is required even it is default
|
||||
position = "0, 0";
|
||||
# size = "200, 50";
|
||||
# position = "0, -80";
|
||||
# font_color = "rgb(202, 211, 245)";
|
||||
# inner_color = "rgb(91, 96, 120)";
|
||||
# outer_color = "rgb(24, 25, 38)";
|
||||
# outline_thickness = 5;
|
||||
# placeholder_text = '\'<span foreground="##cad3f5">Password...</span>'\';
|
||||
# shadow_passes = 2;
|
||||
}];
|
||||
};
|
||||
};
|
||||
wayland.windowManager.hyprland =
|
||||
{
|
||||
enable = true;
|
||||
settings =
|
||||
{
|
||||
};
|
||||
extraConfig = builtins.readFile ./hyprland.conf;
|
||||
systemd.enable = false;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
services.hyprpaper =
|
||||
{
|
||||
enable = true;
|
||||
settings =
|
||||
{
|
||||
preload = [ "${inputs.topInputs.nixos-wallpaper}/twitter-1884592003595592025.jpg" ];
|
||||
wallpaper = [ ",${inputs.topInputs.nixos-wallpaper}/twitter-1884592003595592025.jpg" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -11,16 +11,6 @@ inputs:
|
||||
fileName = "nheko.desktop";
|
||||
path = "${inputs.pkgs.nheko}/share/applications/${fileName}";
|
||||
};
|
||||
kclockd = rec
|
||||
{
|
||||
fileName = "org.kde.kclockd-autostart.desktop";
|
||||
path = "${inputs.pkgs.kdePackages.kdeGear.kclock}/etc/xdg/autostart/${fileName}";
|
||||
};
|
||||
yakuake = rec
|
||||
{
|
||||
fileName = "org.kde.yakuake.desktop";
|
||||
path = "${inputs.pkgs.kdePackages.yakuake}/share/applications/${fileName}";
|
||||
};
|
||||
telegram = rec
|
||||
{
|
||||
fileName = "org.telegram.desktop.desktop";
|
||||
@@ -55,8 +45,8 @@ inputs:
|
||||
};
|
||||
devices =
|
||||
{
|
||||
pc = [ "nheko" "kclockd" "yakuake" "telegram" "element" "kmail" "discord" "crow-translate" ];
|
||||
one = [ "kclockd" "yakuake" "telegram" "element" "kmail" "crow-translate" ];
|
||||
pc = [ "nheko" "telegram" "element" "kmail" "discord" "crow-translate" ];
|
||||
one = [ "telegram" "element" "kmail" "crow-translate" ];
|
||||
};
|
||||
in builtins.listToAttrs (builtins.map
|
||||
(file:
|
||||
|
||||
@@ -25,11 +25,7 @@ inputs:
|
||||
kwinrc =
|
||||
{
|
||||
Tiling.padding.value = 4;
|
||||
Wayland."InputMethod" =
|
||||
{
|
||||
value = "/run/current-system/sw/share/applications/org.fcitx.Fcitx5.desktop";
|
||||
shellExpand = true;
|
||||
};
|
||||
Wayland.InputMethod.value = "/run/current-system/sw/share/applications/fcitx5-wayland-launcher.desktop";
|
||||
Windows.RollOverDesktops.value = true;
|
||||
Compositing = { AllowTearing.value = false; WindowsBlockCompositing.value = false; };
|
||||
};
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
inputs:
|
||||
{
|
||||
config = inputs.lib.mkIf (inputs.config.nixos.packages.desktop != null)
|
||||
{
|
||||
home-manager.users.chn.config =
|
||||
{
|
||||
programs.plasma =
|
||||
{
|
||||
overrideConfig = true;
|
||||
resetFiles = [ "konsolerc" "yakuakerc" ];
|
||||
configFile =
|
||||
{
|
||||
yakuakerc =
|
||||
{
|
||||
Appearance =
|
||||
{
|
||||
HideSkinBorders.value = true;
|
||||
Skin.value = "Slate";
|
||||
Translucency.value = true;
|
||||
};
|
||||
"Desktop Entry".DefaultProfile.value = "plasma-manager.profile";
|
||||
Dialogs.FirstRun.value = false;
|
||||
Window =
|
||||
{
|
||||
KeepOpen.value = false;
|
||||
KeepOpenAfterLastSessionCloses.value = true;
|
||||
ShowSystrayIcon.value = false;
|
||||
};
|
||||
};
|
||||
konsolerc =
|
||||
{
|
||||
"Desktop Entry".DefaultProfile.value = "plasma-manager.profile";
|
||||
"MainWindow.Toolbar sessionToolbar".ToolButtonStyle.value = "IconOnly";
|
||||
};
|
||||
};
|
||||
dataFile."konsole/plasma-manager.profile" =
|
||||
{
|
||||
Appearance =
|
||||
{
|
||||
AntiAliasFonts.value = true;
|
||||
BoldIntense.value = true;
|
||||
ColorScheme.value = "Breeze";
|
||||
Font.value = "FiraCode Nerd Font Mono,10,-1,5,50,0,0,0,0,0";
|
||||
UseFontLineChararacters.value = true;
|
||||
WordModeAttr.value = false;
|
||||
};
|
||||
"Cursor Options".CursorShape.value = 1;
|
||||
General =
|
||||
{
|
||||
Name.value = "plasma-manager";
|
||||
Parent.value = "FALLBACK/";
|
||||
TerminalCenter.value = true;
|
||||
TerminalMargin.value = 1;
|
||||
};
|
||||
"Interaction Options" =
|
||||
{
|
||||
AutoCopySelectedText.value = true;
|
||||
TrimLeadingSpacesInSelectedText.value = true;
|
||||
TrimTrailingSpacesInSelectedText.value = true;
|
||||
UnderlineFilesEnabled.value = true;
|
||||
};
|
||||
Scrolling = { HistoryMode.value = 2; ReflowLines.value = false; };
|
||||
"Terminal Features".BlinkingCursorEnabled.value = true;
|
||||
};
|
||||
};
|
||||
home.file.".local/share/konsole/Breeze.colorscheme".text = builtins.replaceStrings
|
||||
[ "Opacity=1" ] [ "Opacity=0.9\nBlur=true" ]
|
||||
(builtins.readFile "${inputs.pkgs.libsForQt5.konsole}/share/konsole/Breeze.colorscheme");
|
||||
};
|
||||
environment.persistence."/nix/rootfs/current".users.chn.directories =
|
||||
[ ".local/share/konsole" ".local/share/yakuake" ];
|
||||
};
|
||||
}
|
||||
@@ -88,8 +88,6 @@ inputs:
|
||||
{ "org.kde.krunner.desktop"._launch = "Alt+Space"; }
|
||||
# settings
|
||||
{ "systemsettings.desktop"._launch = "Meta+I"; }
|
||||
# yakuake
|
||||
{ yakuake.toggle-window-state = "Meta+Space"; }
|
||||
# virt-manager
|
||||
{ "virt-manager.desktop"._launch = "Meta+V"; }
|
||||
# system monitor
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
inputs:
|
||||
{
|
||||
config = inputs.lib.mkIf (builtins.elem inputs.config.nixos.model.type [ "desktop" "server" ])
|
||||
{
|
||||
home-manager.users.chn.config =
|
||||
{
|
||||
programs.plasma =
|
||||
{
|
||||
workspace =
|
||||
{
|
||||
theme = "breeze-light";
|
||||
colorScheme = "BreezeLight";
|
||||
cursor.theme = "breeze_cursors";
|
||||
lookAndFeel = "org.kde.klassylighttraditional.desktop";
|
||||
# ~/.config/kdeglobals [Icons]
|
||||
iconTheme = "klassy";
|
||||
};
|
||||
configFile =
|
||||
{
|
||||
kwinrc =
|
||||
{
|
||||
Effect-blur.BlurStrength.value = 10;
|
||||
Effect-kwin4_effect_translucency.MoveResize.value = 75;
|
||||
Effect-wobblywindows =
|
||||
{
|
||||
AdvancedMode.value = true;
|
||||
Drag.value = 85;
|
||||
Stiffness.value = 10;
|
||||
WobblynessLevel.value = 1;
|
||||
ResizeWobble.value = false;
|
||||
};
|
||||
Plugins =
|
||||
{
|
||||
blurEnabled.value = true;
|
||||
kwin4_effect_dimscreenEnabled.value = true;
|
||||
kwin4_effect_translucencyEnabled.value = true;
|
||||
padding.value = 4;
|
||||
wobblywindowsEnabled.value = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,21 +1,5 @@
|
||||
inputs:
|
||||
{
|
||||
config.home-manager.users.chn.config.programs.plasma.configFile =
|
||||
let
|
||||
inherit (inputs.topInputs) nixos-wallpaper;
|
||||
wallpaper =
|
||||
{
|
||||
pc = "${nixos-wallpaper}/pixiv-117612023.png";
|
||||
}.${inputs.config.nixos.model.hostname} or "${nixos-wallpaper}/pixiv-96734339-x2.png";
|
||||
in
|
||||
{
|
||||
# "plasma-org.kde.plasma.desktop-appletsrc" =
|
||||
# {
|
||||
# "Containments/1".wallpaperplugin.value = "a2n.blur";
|
||||
# "Containments/1/Wallpaper/a2n.blur/General".Image.value = wallpaper;
|
||||
# };
|
||||
kscreenlockerrc."Greeter/Wallpaper/org.kde.image/General" =
|
||||
{ Image.value = wallpaper; PreviewImage.value = wallpaper; };
|
||||
kdeglobals.General.accentColorFromWallpaper.value = true;
|
||||
};
|
||||
config.home-manager.users.chn.config.programs.plasma.configFile.kdeglobals.General.accentColorFromWallpaper.value
|
||||
= true;
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
{ stdenv, src }: stdenv.mkDerivation
|
||||
{
|
||||
name = "blurred-wallpaper";
|
||||
inherit src;
|
||||
phases = [ "installPhase" ];
|
||||
installPhase =
|
||||
''
|
||||
mkdir -p $out/share/plasma/wallpapers
|
||||
cp -r $src/a2n.blur $out/share/plasma/wallpapers
|
||||
'';
|
||||
}
|
||||
@@ -34,8 +34,6 @@ inputs: rec
|
||||
};
|
||||
cppcoro = inputs.pkgs.callPackage ./cppcoro { src = inputs.topInputs.cppcoro; };
|
||||
date = inputs.pkgs.callPackage ./date.nix { src = inputs.topInputs.date; };
|
||||
blurred-wallpaper = inputs.pkgs.callPackage ./blurred-wallpaper.nix { src = inputs.topInputs.blurred-wallpaper; };
|
||||
slate = inputs.pkgs.callPackage ./slate.nix { src = inputs.topInputs.slate; };
|
||||
vasp =
|
||||
{
|
||||
gnu = inputs.pkgs.callPackage ./vasp/gnu
|
||||
@@ -94,19 +92,18 @@ inputs: rec
|
||||
stdenv = inputs.pkgs.clang18Stdenv;
|
||||
};
|
||||
chn-bsub = inputs.pkgs.callPackage ./chn-bsub { inherit biu; };
|
||||
winjob = inputs.pkgs.callPackage ./winjob { stdenv = inputs.pkgs.gcc14Stdenv; };
|
||||
sockpp = inputs.pkgs.callPackage ./sockpp.nix { src = inputs.topInputs.sockpp; };
|
||||
py4vasp = inputs.pkgs.python3Packages.callPackage ./py4vasp.nix { src = inputs.topInputs.py4vasp; };
|
||||
pocketfft = inputs.pkgs.callPackage ./pocketfft.nix { src = inputs.topInputs.pocketfft; };
|
||||
spectroscopy = inputs.pkgs.callPackage ./spectroscopy.nix { src = inputs.topInputs.spectroscopy; };
|
||||
mirism = inputs.pkgs.callPackage ./mirism { inherit biu; stdenv = inputs.pkgs.clang18Stdenv; };
|
||||
vaspberry = inputs.pkgs.callPackage ./vaspberry.nix { src = inputs.topInputs.vaspberry; };
|
||||
nvhpcPackages = inputs.pkgs.lib.makeScope inputs.pkgs.newScope (final:
|
||||
{
|
||||
stdenv = inputs.pkgs.callPackage ./nvhpc/stdenv.nix { src = inputs.topInputs.self.src.nvhpc; };
|
||||
fmt = (inputs.pkgs.fmt.override { inherit (final) stdenv; }).overrideAttrs { doCheck = false; };
|
||||
hdf5 = inputs.pkgs.hdf5.override
|
||||
{ inherit (final) stdenv; cppSupport = false; fortranSupport = true; enableShared = false; enableStatic = true; };
|
||||
hdf5 = (inputs.pkgs.hdf5-fortran.override { inherit (final) stdenv; cppSupport = false; }).overrideAttrs (prev:
|
||||
{
|
||||
patches = prev.patches or [] ++ [ ./nvhpc/hdf5.patch ];
|
||||
cmakeFlags = prev.cmakeFlags ++ [ "-DHDF5_ENABLE_NONSTANDARD_FEATURE_FLOAT16=OFF" ];
|
||||
});
|
||||
mpi = inputs.pkgs.callPackage ./nvhpc/mpi.nix
|
||||
{ inherit (final) stdenv; src = inputs.topInputs.self.src.nvhpc.mpi; };
|
||||
});
|
||||
@@ -125,14 +122,14 @@ inputs: rec
|
||||
info = inputs.pkgs.callPackage ./info { inherit biu; stdenv = inputs.pkgs.clang18Stdenv; };
|
||||
blog = inputs.pkgs.callPackage inputs.topInputs.blog { inherit (inputs.topInputs) hextra; };
|
||||
phono3py = inputs.pkgs.python3Packages.callPackage ./phono3py.nix { src = inputs.topInputs.phono3py; };
|
||||
lumerical = inputs.pkgs.callPackage ./lumerical.nix { src = inputs.topInputs.self.src.lumerical.lumerical; };
|
||||
vm = inputs.pkgs.callPackage ./vm { inherit biu; stdenv = inputs.pkgs.clang18Stdenv; };
|
||||
oneapiPackages =
|
||||
oneapiPackages = inputs.pkgs.lib.makeScope inputs.pkgs.newScope (final:
|
||||
{
|
||||
stdenv = inputs.pkgs.callPackage ./oneapi/stdenv.nix { src = inputs.topInputs.self.src.oneapi; };
|
||||
};
|
||||
stdenv = inputs.pkgs.callPackage ./oneapi/stdenv.nix { src = inputs.topInputs.self.src.oneapi; inherit gccFull; };
|
||||
fmt = (inputs.pkgs.fmt.override { inherit (final) stdenv; }).overrideAttrs { doCheck = false; env.VERBOSE = "1"; };
|
||||
});
|
||||
|
||||
fromYaml = content: builtins.fromJSON (builtins.readFile
|
||||
(inputs.pkgs.runCommand "toJSON" {}
|
||||
"${inputs.pkgs.remarshal}/bin/yaml2json ${builtins.toFile "content.yaml" content} $out"));
|
||||
"${inputs.pkgs.yj}/bin/yj < ${builtins.toFile "content.yaml" content} > $out"));
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
stdenv, src, autoPatchelfHook,
|
||||
libxml2, libz, freeglut, libGLU, xorg, alsa-lib, freetype, wayland, fontconfig, libxkbcommon, systemd, numactl, nss,
|
||||
at-spi2-atk, libxcrypt-legacy, glibtool, tbb, libxslt, glib, gtk3, libedit, gdbm, ncurses5, mesa, libdrm, xmlsec
|
||||
}: stdenv.mkDerivation
|
||||
{
|
||||
name = "lumerical";
|
||||
inherit src;
|
||||
buildInputs =
|
||||
[ stdenv.cc.cc libxml2 libz freeglut libGLU alsa-lib freetype wayland fontconfig libxkbcommon systemd numactl nss libxcrypt-legacy glibtool tbb libxslt glib gtk3 libedit gdbm ncurses5 mesa libdrm xmlsec ]
|
||||
++ (with xorg; [ libX11 libXt libICE libXdamage libXfixes xcbutilwm xcbutilimage xcbutilkeysyms xcbutilrenderutil libXcursor libXcomposite libXtst libXft libXScrnSaver ]);
|
||||
nativeBuildInputs = [ autoPatchelfHook ];
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
installPhase =
|
||||
''
|
||||
mkdir -p $out
|
||||
cp -r $src/v231 $out/opt
|
||||
chmod -R +w $out
|
||||
rm $out/opt/{bin/itkdb-bridge,lib/libxmlsec*}
|
||||
'';
|
||||
autoPatchelfIgnoreMissingDeps = [ "libmpi.so.12" "libmpi.so.40" "libmex.so" "iboaDesign.so" ];
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
use flake .#mirism
|
||||
@@ -1,23 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
project(mirism VERSION 0.0.0 LANGUAGES CXX)
|
||||
enable_testing()
|
||||
include(GNUInstallDirs)
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
message("Setting build type to 'Release' as none was specified.")
|
||||
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
|
||||
endif()
|
||||
|
||||
find_package(biu REQUIRED)
|
||||
find_package(httplib REQUIRED)
|
||||
|
||||
add_executable(mirism src/main.cpp)
|
||||
target_compile_features(mirism PUBLIC cxx_std_23)
|
||||
target_link_libraries(mirism PRIVATE biu::biu httplib::httplib)
|
||||
|
||||
install(TARGETS mirism RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
get_property(ImportedTargets DIRECTORY "${CMAKE_SOURCE_DIR}" PROPERTY IMPORTED_TARGETS)
|
||||
message("Imported targets: ${ImportedTargets}")
|
||||
message("List of compile features: ${CMAKE_CXX_COMPILE_FEATURES}")
|
||||
@@ -1,7 +0,0 @@
|
||||
{ stdenv, cmake, pkg-config, biu, httplib }: stdenv.mkDerivation
|
||||
{
|
||||
name = "mirism";
|
||||
src = ./.;
|
||||
buildInputs = [ biu httplib ];
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
# include <biu.hpp>
|
||||
# include <httplib.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
using namespace biu::literals;
|
||||
|
||||
httplib::SSLServer srv("/var/lib/acme/debug.mirism.one/fullchain.pem",
|
||||
"/var/lib/acme/debug.mirism.one/key.pem");
|
||||
srv.Get("/", [](const httplib::Request& req, httplib::Response& res) {
|
||||
std::cout << "{}"_f(req.headers) << std::endl;
|
||||
httplib::Client cli("https://github.com");
|
||||
auto upstream_res = cli.Get("/");
|
||||
res.headers = upstream_res->headers;
|
||||
res.body = upstream_res->body;
|
||||
res.status = upstream_res->status;
|
||||
std::cout << "{}"_f(upstream_res->headers) << std::endl;
|
||||
std::cout << "{}"_f(upstream_res->body) << std::endl;
|
||||
});
|
||||
srv.listen("127.0.0.1", 15641);
|
||||
}
|
||||
69
packages/nvhpc/hdf5.patch
Normal file
69
packages/nvhpc/hdf5.patch
Normal file
@@ -0,0 +1,69 @@
|
||||
From 09bc016321faca145169fcd0b5a9f871c1b40a6d Mon Sep 17 00:00:00 2001
|
||||
From: Luke Robison <108305344+lrbison@users.noreply.github.com>
|
||||
Date: Fri, 11 Apr 2025 14:24:09 -0500
|
||||
Subject: [PATCH] Fortran configury: Ensure F08 real_kinds are actually valid
|
||||
kinds (#5401)
|
||||
|
||||
Issue: https://github.com/HDFGroup/hdf5/issues/5090
|
||||
---
|
||||
m4/aclocal_fc.f90 | 24 ++++++++++++++++--------
|
||||
1 file changed, 16 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/m4/aclocal_fc.f90 b/m4/aclocal_fc.f90
|
||||
index 9e0dc1d14e8..40d380724fd 100644
|
||||
--- a/m4/aclocal_fc.f90
|
||||
+++ b/m4/aclocal_fc.f90
|
||||
@@ -183,8 +183,11 @@ END PROGRAM FC_AVAIL_KINDS
|
||||
PROGRAM FC08_AVAIL_KINDS
|
||||
USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY : stdout=>OUTPUT_UNIT, integer_kinds, real_kinds, logical_kinds
|
||||
IMPLICIT NONE
|
||||
- INTEGER :: ik, jk, k, max_decimal_prec
|
||||
+ INTEGER :: ik, jk, k, kk, max_decimal_prec
|
||||
INTEGER :: num_rkinds, num_ikinds, num_lkinds
|
||||
+ LOGICAL :: found_rkinds( 1:SIZE(real_kinds) )
|
||||
+ CHARACTER(LEN=1) :: sep
|
||||
+
|
||||
|
||||
! Find integer KINDs
|
||||
|
||||
@@ -203,28 +206,33 @@ PROGRAM FC08_AVAIL_KINDS
|
||||
|
||||
num_rkinds = SIZE(real_kinds)
|
||||
|
||||
+ ! some compilers (ACfL 24) reported REAL=16 kind, but refused to
|
||||
+ ! compile with it. Verify the kind can be selected in SELECTED_REAL_KIND.
|
||||
+ found_rkinds(:) = .FALSE.
|
||||
max_decimal_prec = 1
|
||||
|
||||
prec: DO ik = 2, 36
|
||||
exp: DO jk = 1, 700
|
||||
k = SELECTED_REAL_KIND(ik,jk)
|
||||
IF(k.LT.0) EXIT exp
|
||||
+ DO kk = 1,num_rkinds
|
||||
+ IF (real_kinds(kk) == k) found_rkinds(kk) = .TRUE.
|
||||
+ ENDDO
|
||||
max_decimal_prec = ik
|
||||
ENDDO exp
|
||||
ENDDO prec
|
||||
|
||||
+ sep = ""
|
||||
DO k = 1, num_rkinds
|
||||
- WRITE(stdout,'(I0)', ADVANCE='NO') real_kinds(k)
|
||||
- IF(k.NE.num_rkinds)THEN
|
||||
- WRITE(stdout,'(A)',ADVANCE='NO') ','
|
||||
- ELSE
|
||||
- WRITE(stdout,'()')
|
||||
- ENDIF
|
||||
+ IF(.NOT. found_rkinds(k)) CYCLE
|
||||
+ WRITE(stdout,'(A,I0)', ADVANCE='NO') TRIM(sep), real_kinds(k)
|
||||
+ sep = ","
|
||||
ENDDO
|
||||
+ WRITE(stdout,'()')
|
||||
|
||||
WRITE(stdout,'(I0)') max_decimal_prec
|
||||
WRITE(stdout,'(I0)') num_ikinds
|
||||
- WRITE(stdout,'(I0)') num_rkinds
|
||||
+ WRITE(stdout,'(I0)') COUNT(found_rkinds)
|
||||
|
||||
! Find logical KINDs
|
||||
|
||||
@@ -31,6 +31,7 @@ let
|
||||
rm -rf $out/Linux_x86_64/${src.version}/cuda/${src.cudaVersion}/bin/cuda-gdb-python*-tui
|
||||
rm -rf $out/Linux_x86_64/${src.version}/profilers
|
||||
rm -rf $out/Linux_x86_64/${src.version}/comm_libs/${src.cudaVersion}/hpcx/hpcx-*/ompi/tests
|
||||
rm $out/Linux_x86_64/${src.version}/compilers/bin/{ncu,nsys}-ui
|
||||
|
||||
# fix /usr/lib/crt1.o impure path used in link
|
||||
cat >> $out/Linux_x86_64/${src.version}/compilers/bin/localrc << EOF
|
||||
@@ -77,8 +78,7 @@ let
|
||||
cc = nvhpc;
|
||||
extraBuildCommands =
|
||||
''
|
||||
# provide libgcc_s.so but not libgomp.so
|
||||
echo "-L${gcc.cc.libgcc}/lib" >> $out/nix-support/cc-ldflags
|
||||
echo "-L${gcc.cc.libgcc.lib}/lib" >> $out/nix-support/cc-ldflags
|
||||
|
||||
echo "-tp=${config.nvhpcArch}" >> $out/nix-support/cc-cflags-before
|
||||
echo "-gpu=${cudaCapability}" >> $out/nix-support/cc-cflags-before
|
||||
|
||||
@@ -1,70 +1,87 @@
|
||||
{
|
||||
src, stdenv, autoPatchelfHook, wrapCCWith, config, overrideCC, makeSetupHook, writeScript, overrideInStdenv,
|
||||
runCommand,
|
||||
gcc, glibc, libz, zstd, libxml2, flock, numactl, ncurses, openssl, gmp, kdePackages,
|
||||
libxcrypt-legacy, libfabric, rdma-core, xorg, bash
|
||||
runCommand, lib, gccFull,
|
||||
gcc, glibc, zlib, zstd, libxml2, flock, numactl, ncurses, openssl, gmp, kdePackages,
|
||||
libxcrypt-legacy, libfabric, rdma-core, xorg, bash, p7zip, hwloc
|
||||
}:
|
||||
let
|
||||
oneapi = stdenv.mkDerivation
|
||||
{
|
||||
pname = "oneapi";
|
||||
inherit (src) src version;
|
||||
buildInputs = [];
|
||||
nativeBuildInputs = [ ncurses stdenv.cc.cc autoPatchelfHook ];
|
||||
buildInputs = [ zlib stdenv.cc.cc hwloc ];
|
||||
nativeBuildInputs = [ autoPatchelfHook p7zip ];
|
||||
langFortran = true;
|
||||
dontUnpack = true;
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
unpackPhase =
|
||||
''
|
||||
mkdir installer
|
||||
sh ${src.src} --extract-only --extract-folder installer
|
||||
addAutoPatchelfSearchPath installer/intel*/lib
|
||||
autoPatchelf installer/intel*/bootstrapper
|
||||
'';
|
||||
installPhase =
|
||||
let installComponents = builtins.concatStringsSep "\n" (builtins.map
|
||||
(component:
|
||||
''
|
||||
pushd ${component}
|
||||
7za x cupPayload.cup
|
||||
cp -r _installdir/* ../../../../install
|
||||
popd
|
||||
'')
|
||||
src.components);
|
||||
in
|
||||
''
|
||||
mkdir -p $out/install
|
||||
export HOME=$out
|
||||
echo "will install to $out/install"
|
||||
sh installer/intel*/install.sh --silent --eula accept --install-dir $out/install
|
||||
mv $out/install/compiler/${src.version}/{bin,include,lib,share,opt/compiler/include} $out
|
||||
mv $out/bin/compiler/* $out/bin
|
||||
rm -rf $out/install
|
||||
# addAutoPatchelfSearchPath
|
||||
mkdir -p installer install $out
|
||||
sh ${src.src} --extract-only --extract-folder installer
|
||||
pushd installer/intel-oneapi-hpc-toolkit-${src.fullVersion}_offline/packages
|
||||
${installComponents}
|
||||
popd
|
||||
cp -r install/compiler/${src.version}/{bin,include,lib,share} $out
|
||||
cp -r install/{mpi,tbb,umf}/*/lib $out
|
||||
|
||||
# mv $out/bin/compiler/* $out/bin
|
||||
# rm -r $out/bin/compiler
|
||||
# mv $out/bin/clang%2B%2B $out/bin/clang++
|
||||
mv $out/bin/compiler/clang%2B%2B $out/bin/compiler/clang++
|
||||
|
||||
# mv $out/lib/crt/* $out/lib
|
||||
# rm -r $out/lib/crt
|
||||
'';
|
||||
autoPatchelfIgnoreMissingDeps = [];
|
||||
autoPatchelfIgnoreMissingDeps = [ "libze_loader.so.1" "libcuda.so.1" "libhwloc.so.5" ];
|
||||
passthru = { inherit src; };
|
||||
};
|
||||
wrapper = (wrapCCWith
|
||||
{
|
||||
cc = oneapi;
|
||||
extraBuildCommands =
|
||||
''
|
||||
# provide libgcc_s.so but not libgomp.so
|
||||
echo "-L${gcc.cc.libgcc}/lib" >> $out/nix-support/cc-ldflags
|
||||
let
|
||||
gcc = stdenv.cc.cc;
|
||||
gccVersion = builtins.concatStringsSep "." (lib.take 3 (builtins.splitVersion gcc.version));
|
||||
in
|
||||
''
|
||||
echo "-isystem ${oneapi}/include" >> $out/nix-support/cc-cflags
|
||||
echo "-isystem ${oneapi}/include/intel64" >> $out/nix-support/cc-cflags
|
||||
echo "-isystem ${oneapi}/include/icx" >> $out/nix-support/cc-cflags
|
||||
echo "-isystem ${gcc}/include/c++/${gcc.version}/${stdenv.targetPlatform.config}" >> $out/nix-support/cc-cflags
|
||||
echo "-isystem ${gcc}/include/c++/${gcc.version}" >> $out/nix-support/cc-cflags
|
||||
echo "--gcc-toolchain=${stdenv.cc}/lib/gcc/x86_64-unknown-linux-gnu/14.2.1" >> $out/nix-support/cc-cflags
|
||||
echo "-march=${config.oneapiArch}" >> $out/nix-support/cc-cflags-before
|
||||
|
||||
echo "-tp=${config.nvhpcArch}" >> $out/nix-support/cc-cflags-before
|
||||
echo "-L${gcc.lib}/lib" >> $out/nix-support/cc-ldflags
|
||||
echo "-L${gcc}/lib/gcc/${stdenv.targetPlatform.config}/${gccVersion}" >> $out/nix-support/cc-ldflags
|
||||
echo "-L${oneapi}/lib" >> $out/nix-support/cc-ldflags
|
||||
echo "-Lsome_path_does_not_exist" >> $out/nix-support/cc-ldflags
|
||||
|
||||
echo "-noswitcherror" >> $out/nix-support/cc-cflags
|
||||
# echo 'export "PATH=${gcc}/bin:$PATH"' >> $out/nix-support/cc-wrapper-hook
|
||||
|
||||
# print verbose output for debugging
|
||||
# echo "-v" >> $out/nix-support/cc-cflags
|
||||
echo "" > $out/nix-support/add-hardening.sh
|
||||
|
||||
# echo "" > $out/nix-support/add-hardening.sh
|
||||
echo "-v" >> $out/nix-support/cc-cflags
|
||||
|
||||
# substitute -idirafter in libc-cflags
|
||||
# somehow -isystem does not work
|
||||
sed -i 's/-idirafter/-I/g' $out/nix-support/libc-cflags
|
||||
|
||||
for i in nvc nvc++ nvcc nvfortran; do
|
||||
wrap $i $wrapper ${oneapi}/bin/$i
|
||||
done
|
||||
'';
|
||||
for i in icx icpx ifx; do
|
||||
wrap $i $wrapper ${oneapi}/bin/$i
|
||||
done
|
||||
'';
|
||||
}).overrideAttrs (prev: { installPhase = prev.installPhase +
|
||||
''
|
||||
export named_cc=nvc
|
||||
export named_cxx=nvc++
|
||||
export named_fc=nvfortran
|
||||
export named_cc=icx
|
||||
export named_cxx=icpx
|
||||
export named_fc=ifx
|
||||
'';});
|
||||
# in overrideInStdenv (overrideCC stdenv wrapper) [ ]
|
||||
in oneapi
|
||||
in overrideInStdenv (overrideCC stdenv wrapper) [ ]
|
||||
|
||||
@@ -17,6 +17,9 @@ int main()
|
||||
std::string UserCommand;
|
||||
std::string SubmitCommand;
|
||||
std::string CurrentInterface = "Program";
|
||||
std::string JobName = std::filesystem::current_path().filename().string();
|
||||
std::string OutputFile = "output.txt";
|
||||
bool LowPriority = false;
|
||||
} State;
|
||||
std::vector<std::unique_ptr<Program>> Programs;
|
||||
auto ConfigFile = YAML::LoadFile(SBATCH_CONFIG);
|
||||
@@ -64,6 +67,9 @@ int main()
|
||||
return ftxui::Container::Vertical
|
||||
({
|
||||
Programs[State.ProgramSelected]->get_interface() | with_bottom_heavy,
|
||||
input(&State.JobName, "Job name: "),
|
||||
input(&State.OutputFile, "Output file: "),
|
||||
checkbox("Low priority", &State.LowPriority),
|
||||
// 操作按钮
|
||||
ftxui::Container::Horizontal
|
||||
({
|
||||
@@ -111,7 +117,9 @@ int main()
|
||||
else if (State.UserCommand == "Continue")
|
||||
{
|
||||
State.CurrentInterface = "Confirm";
|
||||
State.SubmitCommand = Programs[State.ProgramSelected]->get_submit_command();
|
||||
State.SubmitCommand = Programs[State.ProgramSelected]->get_submit_command()
|
||||
+ "\n--job-name='{}' --output='{}'{}"_f
|
||||
(State.JobName, State.OutputFile, State.LowPriority ? " --nice=10000" : "");
|
||||
}
|
||||
else std::unreachable();
|
||||
}
|
||||
|
||||
@@ -16,8 +16,6 @@ namespace sbatch
|
||||
int MemorySchemeSelected = 0;
|
||||
std::vector<std::string> MemorySchemeEntries = { "Default", "All", "Custom" };
|
||||
std::string Memory = "1";
|
||||
std::string JobName = std::filesystem::current_path().filename().string();
|
||||
std::string OutputFile = "output.txt";
|
||||
std::string InputFile = "input.txt";
|
||||
};
|
||||
protected: StateType State_;
|
||||
@@ -47,7 +45,6 @@ namespace sbatch
|
||||
if (saved_state.MemorySchemeSelected < State_.MemorySchemeEntries.size())
|
||||
State_.MemorySchemeSelected = saved_state.MemorySchemeSelected;
|
||||
State_.Memory = saved_state.Memory;
|
||||
State_.OutputFile = saved_state.OutputFile;
|
||||
State_.InputFile = saved_state.InputFile;
|
||||
}
|
||||
catch (...) {}
|
||||
@@ -90,12 +87,8 @@ namespace sbatch
|
||||
}) | with_title("Memory:", ftxui::Color::GrayDark) | with_separator
|
||||
}) | with_title("Resource allocation:") | with_bottom,
|
||||
// 第三行:任务名和输入输出文件
|
||||
ftxui::Container::Vertical
|
||||
({
|
||||
input(&State_.JobName, "Job name: "),
|
||||
input(&State_.InputFile, "Input file: "),
|
||||
input(&State_.OutputFile, "Output file: "),
|
||||
}) | with_title("Misc:")
|
||||
ftxui::Container::Vertical({input(&State_.InputFile, "Input file: ")})
|
||||
| with_title("Misc:")
|
||||
});
|
||||
}
|
||||
public: virtual std::string get_submit_command() const override
|
||||
@@ -116,11 +109,8 @@ namespace sbatch
|
||||
else if (State_.MemorySchemeSelected == 2) return "--mem={}G"_f(State_.Memory);
|
||||
else std::unreachable();
|
||||
}();
|
||||
return "sbatch --partition={}\n{}{} {}\n--job-name='{}' --output='{}'\n--wrap=\"mumax3 {}\""_f
|
||||
(
|
||||
State_.QueueEntries[State_.QueueSelected], gpu_string, cpu_string, mem_string,
|
||||
State_.JobName, State_.OutputFile, State_.InputFile
|
||||
);
|
||||
return "sbatch --partition={}\n{}{} {}\n--wrap=\"mumax3 {}\""_f
|
||||
(State_.QueueEntries[State_.QueueSelected], gpu_string, cpu_string, mem_string, State_.InputFile);
|
||||
}
|
||||
};
|
||||
template void Program::register_child_<Mumax3>();
|
||||
|
||||
@@ -18,8 +18,6 @@ namespace sbatch
|
||||
int MemorySchemeSelected = 0;
|
||||
std::vector<std::string> MemorySchemeEntries = { "Default", "All", "Custom" };
|
||||
std::string Memory = "1";
|
||||
std::string JobName = std::filesystem::current_path().filename().string();
|
||||
std::string OutputFile = "output.txt";
|
||||
bool OptcellEnable = false;
|
||||
int OptcellSelected = 0;
|
||||
std::vector<std::string> OptcellEntries = { "fix ab", "fix c" };
|
||||
@@ -96,8 +94,7 @@ namespace sbatch
|
||||
// 第三行:任务名和输出文件
|
||||
ftxui::Container::Vertical
|
||||
({
|
||||
input(&State_.JobName, "Job name: "),
|
||||
input(&State_.OutputFile, "Output file: "),
|
||||
|
||||
ftxui::Container::Horizontal
|
||||
({
|
||||
checkbox("Generate OPTCELL", &State_.OptcellEnable),
|
||||
@@ -141,11 +138,11 @@ namespace sbatch
|
||||
else return ""s;
|
||||
}();
|
||||
return
|
||||
"{}sbatch --partition={} --nodes=1-1\n{}{}\n--job-name='{}' --output='{}'\n"
|
||||
"{}sbatch --partition={} --nodes=1-1\n{}{}\n"
|
||||
"--wrap=\"srun{} vasp-intel vasp-{}\""_f
|
||||
(
|
||||
optcell_string, State_.QueueEntries[State_.QueueSelected], cpu_string, mem_string,
|
||||
State_.JobName, State_.OutputFile, srun_string, State_.VaspEntries[State_.VaspSelected]
|
||||
srun_string, State_.VaspEntries[State_.VaspSelected]
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -21,8 +21,6 @@ namespace sbatch
|
||||
int MemorySchemeSelected = 0;
|
||||
std::vector<std::string> MemorySchemeEntries = { "Default", "All", "Custom" };
|
||||
std::string Memory = "1";
|
||||
std::string JobName = std::filesystem::current_path().filename().string();
|
||||
std::string OutputFile = "output.txt";
|
||||
bool OptcellEnable = false;
|
||||
int OptcellSelected = 0;
|
||||
std::vector<std::string> OptcellEntries = { "fix ab", "fix c" };
|
||||
@@ -116,8 +114,6 @@ namespace sbatch
|
||||
// 第三行:任务名和输出文件
|
||||
ftxui::Container::Vertical
|
||||
({
|
||||
input(&State_.JobName, "Job name: "),
|
||||
input(&State_.OutputFile, "Output file: "),
|
||||
ftxui::Container::Horizontal
|
||||
({
|
||||
checkbox("Generate OPTCELL", &State_.OptcellEnable),
|
||||
@@ -158,10 +154,10 @@ namespace sbatch
|
||||
else if (State_.MemorySchemeSelected == 2) return " --mem={}G"_f(State_.Memory);
|
||||
else std::unreachable();
|
||||
}();
|
||||
return "{}sbatch --partition={}\n{} {}{}\n--job-name='{}' --output='{}'\n--wrap=\"srun vasp-nvidia vasp-{}\""_f
|
||||
return "{}sbatch --partition={}\n{} {}{}\n--wrap=\"srun vasp-nvidia vasp-{}\""_f
|
||||
(
|
||||
optcell_string, State_.QueueEntries[State_.QueueSelected], gpu_string, cpu_string, mem_string,
|
||||
State_.JobName, State_.OutputFile, State_.VaspEntries[State_.VaspSelected]
|
||||
State_.VaspEntries[State_.VaspSelected]
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
{ stdenv, src }: stdenv.mkDerivation
|
||||
{
|
||||
name = "slate";
|
||||
src = "${src}/Slate.tar.gz";
|
||||
installPhase =
|
||||
''
|
||||
mkdir -p $out/share/yakuake/skins/Slate
|
||||
cp -r * $out/share/yakuake/skins/Slate
|
||||
'';
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{ stdenv, src, cmake, pkg-config }: stdenv.mkDerivation
|
||||
{
|
||||
name = "sockpp";
|
||||
inherit src;
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [];
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
{ src, python3, stdenv }: stdenv.mkDerivation
|
||||
{
|
||||
name = "spectroscopy";
|
||||
phases = [ "installPhase" "fixupPhase" ];
|
||||
buildInputs = [ python3 ];
|
||||
installPhase =
|
||||
''
|
||||
mkdir -p $out/${python3.sitePackages}
|
||||
cp -r ${src}/lib/spectroscopy $out/${python3.sitePackages}
|
||||
cp -r ${src}/scripts $out/bin
|
||||
'';
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
CompileFlags:
|
||||
Add: [ -Wall, -Wextra, -std=c++26 ]
|
||||
Compiler: g++
|
||||
@@ -1 +0,0 @@
|
||||
use flake .#winjob
|
||||
@@ -1,36 +0,0 @@
|
||||
# cmake_minimum_required(VERSION 3.30)
|
||||
cmake_minimum_required(VERSION 3.29)
|
||||
project(winjob VERSION 0.0.0 LANGUAGES CXX)
|
||||
enable_testing()
|
||||
include(GNUInstallDirs)
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
message("Setting build type to 'Release' as none was specified.")
|
||||
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
|
||||
endif()
|
||||
|
||||
set(WINJOB_VERSION "unknown" CACHE STRING "Version of the winjob")
|
||||
|
||||
find_package(Boost REQUIRED COMPONENTS headers filesystem)
|
||||
|
||||
add_executable(winjob src/winjob.cpp src/windows.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 ws2_32 wsock32)
|
||||
target_compile_definitions(winjob PRIVATE winjob_VERSION="${winjob_VERSION}")
|
||||
|
||||
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 ws2_32 wsock32)
|
||||
target_compile_definitions(winjobd PRIVATE winjob_VERSION="${winjob_VERSION}")
|
||||
|
||||
install(TARGETS winjob RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
install(TARGETS winjobd RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
get_property(ImportedTargets DIRECTORY "${CMAKE_SOURCE_DIR}" PROPERTY IMPORTED_TARGETS)
|
||||
message("Imported targets: ${ImportedTargets}")
|
||||
message("List of compile features: ${CMAKE_CXX_COMPILE_FEATURES}")
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
stdenv, cmake, pkg-config, version ? null, lib,
|
||||
boost
|
||||
}: stdenv.mkDerivation
|
||||
{
|
||||
name = "winjob";
|
||||
src = ./.;
|
||||
buildInputs = [ boost ];
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
cmakeFlags = lib.optionals (version != null) [ "-DWINJOB_VERSION=${version}" ];
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
# include <optional>
|
||||
# include <string>
|
||||
# include <utility>
|
||||
|
||||
namespace winjob
|
||||
{
|
||||
std::optional<std::pair<std::string, std::string>> get_owner(const std::string& file_name);
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
# include <winjob/windows.hpp>
|
||||
# include <windows.h>
|
||||
# include <tchar.h>
|
||||
# include <accctrl.h>
|
||||
# include <aclapi.h>
|
||||
|
||||
namespace winjob
|
||||
{
|
||||
std::optional<std::pair<std::string, std::string>> get_owner(const std::string& file_name)
|
||||
{
|
||||
DWORD dwRtnCode = 0;
|
||||
PSID pSidOwner = NULL;
|
||||
BOOL bRtnBool = TRUE;
|
||||
LPTSTR AcctName = NULL;
|
||||
LPTSTR DomainName = NULL;
|
||||
DWORD dwAcctName = 1, dwDomainName = 1;
|
||||
SID_NAME_USE eUse = SidTypeUnknown;
|
||||
HANDLE hFile;
|
||||
PSECURITY_DESCRIPTOR pSD = NULL;
|
||||
|
||||
// Get the handle of the file object.
|
||||
hFile = CreateFile
|
||||
(file_name.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
|
||||
// Check GetLastError for CreateFile error code.
|
||||
if (hFile == INVALID_HANDLE_VALUE) return {};
|
||||
|
||||
// Get the owner SID of the file.
|
||||
dwRtnCode = GetSecurityInfo(hFile, SE_FILE_OBJECT, OWNER_SECURITY_INFORMATION, &pSidOwner, NULL, NULL, NULL, &pSD);
|
||||
|
||||
// Check GetLastError for GetSecurityInfo error condition.
|
||||
if (dwRtnCode != ERROR_SUCCESS) return {};
|
||||
|
||||
// First call to LookupAccountSid to get the buffer sizes.
|
||||
bRtnBool = LookupAccountSid
|
||||
(NULL, pSidOwner, AcctName, (LPDWORD)&dwAcctName, DomainName, (LPDWORD)&dwDomainName, &eUse);
|
||||
|
||||
// Reallocate memory for the buffers.
|
||||
AcctName = (LPTSTR)GlobalAlloc(GMEM_FIXED, dwAcctName * sizeof(wchar_t));
|
||||
|
||||
// Check GetLastError for GlobalAlloc error condition.
|
||||
if (AcctName == NULL) return {};
|
||||
|
||||
DomainName = (LPTSTR)GlobalAlloc(GMEM_FIXED, dwDomainName * sizeof(wchar_t));
|
||||
|
||||
// Check GetLastError for GlobalAlloc error condition.
|
||||
if (DomainName == NULL) return {};
|
||||
|
||||
// Second call to LookupAccountSid to get the account name.
|
||||
bRtnBool = LookupAccountSid
|
||||
(NULL, pSidOwner, AcctName, (LPDWORD)&dwAcctName, DomainName, (LPDWORD)&dwDomainName, &eUse);
|
||||
|
||||
// Check GetLastError for LookupAccountSid error condition.
|
||||
if (bRtnBool == FALSE) return {};
|
||||
|
||||
return std::make_pair(std::string(DomainName), std::string(AcctName));
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
# include <boost/asio.hpp>
|
||||
# include <iostream>
|
||||
|
||||
int main()
|
||||
{
|
||||
boost::asio::io_context io_context;
|
||||
boost::asio::local::stream_protocol::endpoint ep("winjobd.sock");
|
||||
// send a message to the server
|
||||
boost::asio::local::stream_protocol::socket socket(io_context);
|
||||
socket.connect(ep);
|
||||
std::string message;
|
||||
std::getline(std::cin, message);
|
||||
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;
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
# include <boost/asio.hpp>
|
||||
# include <iostream>
|
||||
|
||||
int main()
|
||||
{
|
||||
boost::asio::io_context io_context;
|
||||
boost::asio::local::stream_protocol::endpoint ep("winjobd.sock");
|
||||
boost::asio::local::stream_protocol::acceptor acceptor(io_context, ep, false);
|
||||
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';
|
||||
// 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();
|
||||
}
|
||||
Reference in New Issue
Block a user