mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 10:29:23 +08:00
Compare commits
96 Commits
fix-libvir
...
debug
| Author | SHA1 | Date | |
|---|---|---|---|
| bf223cf347 | |||
| 5b6a2623bc | |||
| dec023fcaa | |||
| 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
|
||||
|
||||
@@ -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 =
|
||||
{
|
||||
@@ -58,7 +58,7 @@ inputs:
|
||||
hardware =
|
||||
{
|
||||
cpus = [ "amd" ];
|
||||
gpu = { type = "nvidia"; nvidia = { dynamicBoost = true; driver = "beta"; }; };
|
||||
gpu = { type = "nvidia"; nvidia.dynamicBoost = true; };
|
||||
legion = {};
|
||||
};
|
||||
services =
|
||||
@@ -99,21 +99,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,7 +124,6 @@ inputs:
|
||||
docker = {};
|
||||
ananicy = {};
|
||||
keyd = {};
|
||||
lumericalLicenseManager = {};
|
||||
searx = {};
|
||||
kvm = {};
|
||||
nspawn = [ "arch" "ubuntu-22.04" "fedora" ];
|
||||
@@ -144,6 +131,7 @@ inputs:
|
||||
};
|
||||
bugs = [ "xmunet" "backlight" "amdpstate" "iwlwifi" ];
|
||||
packages = { android-studio = {}; mathematica = {}; };
|
||||
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
|
||||
|
||||
@@ -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; };
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
737
flake.lock
generated
737
flake.lock
generated
File diff suppressed because it is too large
Load Diff
22
flake.nix
22
flake.nix
@@ -13,28 +13,18 @@
|
||||
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"; };
|
||||
@@ -56,7 +46,6 @@
|
||||
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 +53,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";
|
||||
|
||||
@@ -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,8 @@ 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,56 +24,43 @@ inputs:
|
||||
else exec ${wl-clipboard-x11}/bin/xclip "$@"; fi
|
||||
''
|
||||
)
|
||||
# color management
|
||||
argyllcms xcalib
|
||||
# networking
|
||||
remmina putty mtr-gui
|
||||
remmina putty
|
||||
# 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; })
|
||||
mpv nomacs simplescreenrecorder imagemagick gimp-with-plugins qcm waifu2x-converter-cpp blender paraview vlc
|
||||
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
|
||||
klassy-qt6 localPackages.slate localPackages.blurred-wallpaper
|
||||
# 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
|
||||
# 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
|
||||
@@ -83,10 +70,7 @@ inputs:
|
||||
(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 +118,6 @@ 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; };
|
||||
};
|
||||
services.pcscd.enable = true;
|
||||
};
|
||||
|
||||
@@ -33,8 +33,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;
|
||||
|
||||
@@ -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,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,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" ];
|
||||
|
||||
@@ -5,7 +5,6 @@ inputs:
|
||||
{
|
||||
services =
|
||||
{
|
||||
dbus.implementation = "broker";
|
||||
fstrim.enable = true;
|
||||
acpid.enable = true;
|
||||
# TODO: set ipfs as separate service
|
||||
@@ -50,13 +49,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; })
|
||||
];
|
||||
}
|
||||
|
||||
@@ -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 =
|
||||
{
|
||||
|
||||
@@ -19,7 +19,6 @@ in platformConfig //
|
||||
{
|
||||
inherit allowInsecurePredicate;
|
||||
allowUnfree = true;
|
||||
qchem-config = { optArch = nixpkgs.march; useCuda = nixpkgs.cuda != null; };
|
||||
android_sdk.accept_license = true;
|
||||
}
|
||||
// (inputs.lib.optionalAttrs (nixpkgs.march != null)
|
||||
@@ -33,18 +32,13 @@ in platformConfig //
|
||||
{ nix = { storeDir = "${nixpkgs.nixRoot}/store"; stateDir = "${nixpkgs.nixRoot}/var"; }; });
|
||||
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;
|
||||
})
|
||||
|
||||
@@ -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,7 @@ inputs:
|
||||
)
|
||||
];
|
||||
};
|
||||
pam.yubico.authorizedYubiKeys.ids = [ "cccccbgrhnub" ];
|
||||
gtk.iconTheme.name = "klassy";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
inputs:
|
||||
{
|
||||
config = inputs.lib.mkIf (builtins.elem inputs.config.nixos.model.type [ "desktop" "server" ])
|
||||
{
|
||||
home-manager.users.chn.config.home.file =
|
||||
let
|
||||
programs =
|
||||
{
|
||||
nheko = rec
|
||||
{
|
||||
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";
|
||||
path = inputs.pkgs.writeText fileName (builtins.replaceStrings
|
||||
[ "Exec=telegram-desktop -- %u" ] [ "Exec=telegram-desktop -autostart" ]
|
||||
(builtins.readFile "${inputs.pkgs.telegram-desktop}/share/applications/${fileName}"));
|
||||
};
|
||||
element = rec
|
||||
{
|
||||
fileName = "element-desktop.desktop";
|
||||
path = inputs.pkgs.writeText fileName (builtins.replaceStrings
|
||||
[ "Exec=element-desktop %u" ] [ "Exec=element-desktop --hidden" ]
|
||||
(builtins.readFile "${inputs.pkgs.element-desktop.desktopItem}/share/applications/${fileName}"));
|
||||
};
|
||||
kmail = rec
|
||||
{
|
||||
fileName = "org.kde.kmail2.desktop";
|
||||
path = "${inputs.pkgs.kdePackages.kmail}/share/applications/${fileName}";
|
||||
};
|
||||
discord = rec
|
||||
{
|
||||
fileName = "discord.desktop";
|
||||
path = inputs.pkgs.writeText fileName (builtins.replaceStrings
|
||||
[ "Exec=Discord" ] [ "Exec=Discord --start-minimized" ]
|
||||
(builtins.readFile "${inputs.pkgs.discord.desktopItem}/share/applications/${fileName}"));
|
||||
};
|
||||
crow-translate = rec
|
||||
{
|
||||
fileName = "org.kde.CrowTranslate.desktop";
|
||||
path = "${inputs.pkgs.crow-translate}/share/applications/${fileName}";
|
||||
};
|
||||
};
|
||||
devices =
|
||||
{
|
||||
pc = [ "nheko" "kclockd" "yakuake" "telegram" "element" "kmail" "discord" "crow-translate" ];
|
||||
one = [ "kclockd" "yakuake" "telegram" "element" "kmail" "crow-translate" ];
|
||||
};
|
||||
in builtins.listToAttrs (builtins.map
|
||||
(file:
|
||||
{
|
||||
name = ".config/autostart/${programs.${file}.fileName}";
|
||||
value.source = programs.${file}.path;
|
||||
})
|
||||
(devices.${inputs.config.nixos.model.hostname} or []));
|
||||
environment.persistence."/nix/rootfs/current".users.chn.directories = [ ".config/autostart" ];
|
||||
};
|
||||
}
|
||||
@@ -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; };
|
||||
};
|
||||
|
||||
@@ -94,19 +94,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,7 +124,6 @@ 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 =
|
||||
{
|
||||
@@ -134,5 +132,5 @@ inputs: rec
|
||||
|
||||
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,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