Compare commits

...

34 Commits

Author SHA1 Message Date
chn
216117a30a yoga->surface 2024-01-11 21:28:06 +08:00
chn
c4af4de4ea packages.workstation: update wemeet 2024-01-10 20:04:22 +08:00
chn
daa824943f services.mirism: fix 2024-01-09 11:37:36 +08:00
chn
bcd64f2fe7 packages.desktop.vscode: add vasp support 2024-01-08 19:47:40 +08:00
chn
259dfd53f3 services.mirism: restart every day 2024-01-07 20:49:55 +08:00
chn
1a463ee716 add znver4 support 2024-01-06 14:10:12 +08:00
chn
78a0a55bed localPackages: update misskey 2024-01-06 13:06:36 +08:00
chn
2a465b55ec modules.system: fstrim set to weekly (default) 2024-01-05 12:41:58 +08:00
chn
ea3f4bb00c modules.system: remove versionSuffix 2024-01-05 12:26:40 +08:00
chn
bbf601f5a8 modules.packages.desktop-fat.steam: replace chinese comment 2024-01-04 22:32:54 +08:00
chn
8543130661 packages.desktop: add firefoxpwa 2024-01-03 23:01:04 +08:00
chn
aa93dd53b6 packages.server.ssh: prefer askPassword 2024-01-03 22:43:28 +08:00
chn
0031080837 system.kernel: enable preempt as default 2024-01-02 22:21:05 +08:00
chn
d3f38c3b55 packages.server: enable gpg 2023-12-31 10:46:57 +08:00
chn
0c49c71899 services.nginx.applications.main: fix 2023-12-29 20:22:21 +08:00
chn
b0e543d324 packages.server.ssh: enable ssh agent forward 2023-12-29 20:22:02 +08:00
chn
51c8a516ff packages.server: remove gnupg agent 2023-12-29 15:33:06 +08:00
chn
f3c8017959 Revert "try to enable codex"
This reverts commit 3867469fc5.
2023-12-28 21:04:45 +08:00
chn
3867469fc5 try to enable codex 2023-12-28 21:03:38 +08:00
chn
f23f7101e4 update zsh-lsd 2023-12-28 12:55:18 +08:00
chn
8eea6ffdc3 packages.server.zsh: remove zsh-nix-shell 2023-12-28 12:29:35 +08:00
chn
729df7ab63 update misskey 2023-12-28 11:05:52 +08:00
chn
c1737fcb08 packages.server.ssh: set askPassword to systemd-ask-password 2023-12-27 17:42:53 +08:00
chn
50862f0e33 users.chn: add forwardAgent 2023-12-27 17:18:04 +08:00
chn
5b30aebfae services.frpClient: stcp allow all users 2023-12-27 15:11:15 +08:00
chn
f5e82ee889 localPackages.misskey: use nodejs 21 2023-12-25 20:50:42 +08:00
chn
a6241a201a try to fix pc power bug 2023-12-25 20:50:15 +08:00
chn
db3571b8e5 revert nodejs update 2023-12-25 20:46:27 +08:00
chn
bd6a867ab3 localPackages.misskey: use nodejs 20 2023-12-24 22:46:33 +08:00
chn
045de2b18e update nodejs 2023-12-24 22:45:26 +08:00
chn
501df43b0c services.misskey: increase statement_timeout 2023-12-24 14:58:20 +08:00
chn
fee1f32a0a localPackages.misskey: remove re2 2023-12-24 14:40:27 +08:00
chn
71c4426e53 Merge branch 'misskey' 2023-12-24 09:22:30 +08:00
chn
7cd03dd163 packages.server: add hexo-cli 2023-12-23 22:43:39 +08:00
24 changed files with 332 additions and 89 deletions

251
flake.lock generated
View File

@@ -43,6 +43,28 @@
"type": "github"
}
},
"devshell": {
"inputs": {
"flake-utils": "flake-utils_8",
"nixpkgs": [
"nur-linyinfeng",
"nixpkgs"
]
},
"locked": {
"lastModified": 1704648272,
"narHash": "sha256-zCDhWGl3bVpBKpDZ0p3NuGksZVg69BAChsY5W4KARL4=",
"owner": "numtide",
"repo": "devshell",
"rev": "f54745fd4aae92443817ddc566ce06572b178b5a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"dguibert-nur-packages": {
"inputs": {
"dwl-src": "dwl-src",
@@ -388,6 +410,22 @@
}
},
"flake-compat_7": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_8": {
"flake": false,
"locked": {
"lastModified": 1673956053,
@@ -459,6 +497,27 @@
"type": "github"
}
},
"flake-parts_4": {
"inputs": {
"nixpkgs-lib": [
"nur-linyinfeng",
"nixpkgs"
]
},
"locked": {
"lastModified": 1704152458,
"narHash": "sha256-DS+dGw7SKygIWf9w4eNBUZsK+4Ug27NwEWmn2tnbycg=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "88a2cd8166694ba0b6cb374700799cec53aef527",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
@@ -498,6 +557,42 @@
"type": "github"
}
},
"flake-utils_10": {
"inputs": {
"systems": "systems_9"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_11": {
"inputs": {
"systems": "systems_10"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
@@ -605,11 +700,11 @@
"systems": "systems_7"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github"
},
"original": {
@@ -623,11 +718,11 @@
"systems": "systems_8"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github"
},
"original": {
@@ -1000,6 +1095,22 @@
"type": "github"
}
},
"nixos-stable": {
"locked": {
"lastModified": 1704420045,
"narHash": "sha256-C36QmoJd5tdQ5R9MC1jM7fBkZW9zBUqbUCsgwS6j4QU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c1be43e8e837b8dbee2b3665a007e761680f0c3d",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpak": {
"inputs": {
"flake-parts": "flake-parts_3",
@@ -1124,11 +1235,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1702961405,
"narHash": "sha256-H7TRw7SHZhC07K+E8YpDrDv19SMmA4sThQQPIrQ3vxg=",
"lastModified": 1704292225,
"narHash": "sha256-UVLp373pJ9AbsG1+aiwvPQRG3lJSjNLLGUIsflgWL/0=",
"owner": "CHN-beta",
"repo": "nixpkgs",
"rev": "530eea7ffc7a0c010557714f6d48981085d9b932",
"rev": "38bebe0e71de109725f1dbbfa8e4922e7b4095b3",
"type": "github"
},
"original": {
@@ -1140,11 +1251,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1702980585,
"narHash": "sha256-GvjQ462NjjmA2OXGT5ZjHJGA7BrqfsrUpMx4Iq6xkrI=",
"lastModified": 1704292168,
"narHash": "sha256-a2qeYhRSd7RFxyn52L/K0+rsKb7/HyMquHwzIsToCC4=",
"owner": "CHN-beta",
"repo": "nixpkgs",
"rev": "8439a9c91674ecef22fd1e5ab8643b813fb5229d",
"rev": "2d0e9eed1f0daef1fbc4791d6912a9fbc5b0be62",
"type": "github"
},
"original": {
@@ -1185,14 +1296,41 @@
"type": "github"
}
},
"nur-linyinfeng": {
"inputs": {
"devshell": "devshell",
"flake-compat": "flake-compat_7",
"flake-parts": "flake-parts_4",
"flake-utils": "flake-utils_9",
"nixos-stable": "nixos-stable",
"nixpkgs": [
"nixpkgs"
],
"nvfetcher": "nvfetcher",
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1704738212,
"narHash": "sha256-gZKun3wdpuFHwZdq/Qtlk3nAHDa/vm7HsInAZrUO3Ds=",
"owner": "linyinfeng",
"repo": "nur-packages",
"rev": "16a9c5d7ea6f546216d8205aebc2bd865b9a0e08",
"type": "github"
},
"original": {
"owner": "linyinfeng",
"repo": "nur-packages",
"type": "github"
}
},
"nur-xddxdd": {
"inputs": {
"flake-utils": "flake-utils_8",
"flake-utils": "flake-utils_10",
"flake-utils-plus": "flake-utils-plus",
"nixpkgs": [
"nixpkgs"
],
"nvfetcher": "nvfetcher"
"nvfetcher": "nvfetcher_2"
},
"locked": {
"lastModified": 1701418365,
@@ -1228,7 +1366,36 @@
},
"nvfetcher": {
"inputs": {
"flake-compat": "flake-compat_7",
"flake-compat": [
"nur-linyinfeng",
"flake-compat"
],
"flake-utils": [
"nur-linyinfeng",
"flake-utils"
],
"nixpkgs": [
"nur-linyinfeng",
"nixpkgs"
]
},
"locked": {
"lastModified": 1693539235,
"narHash": "sha256-ACmCq1+RnVq+EB7yeN6fThUR3cCJZb6lKEfv937WG84=",
"owner": "berberman",
"repo": "nvfetcher",
"rev": "2bcf73dea96497ac9c36ed320b457caa705f9485",
"type": "github"
},
"original": {
"owner": "berberman",
"repo": "nvfetcher",
"type": "github"
}
},
"nvfetcher_2": {
"inputs": {
"flake-compat": "flake-compat_8",
"flake-utils": [
"nur-xddxdd",
"flake-utils"
@@ -1357,7 +1524,7 @@
},
"pnpm2nix-nzbr": {
"inputs": {
"flake-utils": "flake-utils_9",
"flake-utils": "flake-utils_11",
"nixpkgs": [
"nixpkgs"
]
@@ -1432,6 +1599,7 @@
"nixpkgs-2305": "nixpkgs-2305",
"nixpkgs-unstable": "nixpkgs-unstable",
"nur": "nur",
"nur-linyinfeng": "nur-linyinfeng",
"nur-xddxdd": "nur-xddxdd",
"plasma-manager": "plasma-manager",
"pnpm2nix-nzbr": "pnpm2nix-nzbr",
@@ -1526,6 +1694,21 @@
"type": "github"
}
},
"systems_10": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
@@ -1631,6 +1814,42 @@
"type": "github"
}
},
"systems_9": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"nur-linyinfeng",
"nixpkgs"
]
},
"locked": {
"lastModified": 1704649711,
"narHash": "sha256-+qxqJrZwvZGilGiLQj3QbYssPdYCwl7ejwMImgH7VBQ=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "04f25d7bec9fb29d2c3bacaa48a3304840000d36",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"ts-fold": {
"flake": false,
"locked": {

View File

@@ -38,6 +38,7 @@
inputs = { nixpkgs.follows = "nixpkgs"; home-manager.follows = "home-manager"; };
};
nix-doom-emacs = { url = "github:nix-community/nix-doom-emacs"; inputs.nixpkgs.follows = "nixpkgs"; };
nur-linyinfeng = { url = "github:linyinfeng/nur-packages"; inputs.nixpkgs.follows = "nixpkgs"; };
};
outputs = inputs:
@@ -50,7 +51,7 @@
default = inputs.nixpkgs.legacyPackages.x86_64-linux.writeText "systems"
(builtins.concatStringsSep "\n" (builtins.map
(system: builtins.toString inputs.self.outputs.nixosConfigurations.${system}.config.system.build.toplevel)
[ "pc" "vps6" "vps7" "nas" "yoga" ]));
[ "pc" "vps6" "vps7" "nas" "surface" ]));
}
// (
builtins.listToAttrs (builtins.map
@@ -59,7 +60,7 @@
name = system;
value = inputs.self.outputs.nixosConfigurations.${system}.config.system.build.toplevel;
})
[ "pc" "vps6" "vps7" "nas" "yoga" "xmupc1" ])
[ "pc" "vps6" "vps7" "nas" "surface" "xmupc1" ])
);
# ssh-keygen -t rsa -C root@pe -f /mnt/nix/persistent/etc/ssh/ssh_host_rsa_key
# ssh-keygen -t ed25519 -C root@pe -f /mnt/nix/persistent/etc/ssh/ssh_host_ed25519_key
@@ -111,6 +112,8 @@
"znver2" "znver3"
# CX16 SAHF FXSR HLE RDSEED
"broadwell"
"znver4"
"skylake"
];
keepOutputs = true;
};
@@ -203,7 +206,7 @@
bugs =
[
"suspend-hibernate-no-platform" "hibernate-iwlwifi" "suspend-lid-no-wakeup" "xmunet"
"suspend-hibernate-waydroid"
"suspend-hibernate-waydroid" "power"
];
};
vps6 =
@@ -454,7 +457,7 @@
};
users.users = [ "chn" "xll" "zem" "yjq" "yxy" ];
};
yoga =
surface =
{
system =
{
@@ -474,12 +477,12 @@
swap = [ "/nix/swap/swap" ];
rollingRootfs = { device = "/dev/mapper/root"; path = "/nix/rootfs"; };
};
nixpkgs.march = "silvermont";
nixpkgs.march = "skylake";
grub.installDevice = "efi";
nix.substituters = [ "https://cache.nixos.org/" "https://nix-store.chn.moe" ];
kernel.patches = [ "cjktty" ];
impermanence.enable = true;
networking.hostname = "yoga";
networking.hostname = "surface";
};
hardware =
{
@@ -489,7 +492,6 @@
joystick.enable = true;
printer.enable = true;
sound.enable = true;
halo-keyboard.enable = true;
};
packages.packageSet = "desktop-fat";
virtualization.docker.enable = true;

View File

@@ -4,13 +4,13 @@
}:
let
pname = "misskey";
version = "2023.12.0";
version = "2023.12.2";
src = fetchFromGitHub
{
owner = "CHN-beta";
repo = "misskey";
rev = "bec1dc37598b71c377643ee77330d4d6f7eb31f2";
sha256 = "sha256-svLpG4xQ2mtsJ6gm+Ap8fZKTOl5V68XybGDvymsV4F4=";
rev = "cd1d0ab06eb6b7e06afdfae9a12b2d2829564229";
hash = "sha256-sKEZ1ZpyA/02CNwiOMIOS5f/csx6ELDwCVJYc+oMChM=";
fetchSubmodules = true;
};
originalPnpmPackage = mkPnpmPackage
@@ -25,53 +25,6 @@ let
export NODE_ENV=production
pnpm run migrateandstart
'';
re2 = stdenv.mkDerivation rec
{
pname = "re2";
version = "1.20.8";
srcs =
[
(fetchurl
{
url = "https://github.com/uhop/node-re2/releases/download/1.20.8/linux-x64-120.br";
sha256 = "0f2l658xxc2112mbqpkyfic3vhjgdyafbfi14b6n40skyd6lijcq";
})
(fetchurl
{
url = "https://github.com/uhop/node-re2/releases/download/1.20.8/linux-x64-120.gz";
sha256 = "1v5n8i16188xpwx1jr8gcc1a99v83hlbh5hldl4i376vh0lwsxlq";
})
(fetchurl
{
url = "https://github.com/uhop/node-re2/releases/download/1.20.8/linux-x64-115.br";
sha256 = "0cyqmgqk5cwik27wh4ynaf94v4w6p1fsavm07xh8xfmdim2sr9kd";
})
(fetchurl
{
url = "https://github.com/uhop/node-re2/releases/download/1.20.8/linux-x64-115.gz";
sha256 = "0i3iykw13d5qfd5s6pq6kx6cbd64vfb3w65f9bnj87qz44la84ic";
})
(fetchurl
{
url = "https://github.com/uhop/node-re2/releases/download/1.20.8/linux-x64-108.br";
sha256 = "1467frfapqhi839r2v0p0wh76si3lihwzwgl9098mj7mwhjfl4lx";
})
(fetchurl
{
url = "https://github.com/uhop/node-re2/releases/download/1.20.8/linux-x64-108.gz";
sha256 = "0hykpqdrn55x83v1kzz6bdvrp24hgz3rwmwbdfl2saz576krzg1c";
})
];
phases = [ "installPhase" ];
installPhase =
''
mkdir -p $out/${version}
for i in $srcs
do
cp $i $out/${version}/''${i#*-}
done
'';
};
in
stdenv.mkDerivation rec
{
@@ -83,8 +36,6 @@ in
nativeBuildInputs = buildInputs;
CYPRESS_RUN_BINARY = "${cypress}/bin/Cypress";
NODE_ENV = "production";
RE2_DOWNLOAD_MIRROR = "${re2}";
RE2_DOWNLOAD_SKIP_PATH = "true";
configurePhase =
''
export HOME=$NIX_BUILD_TOP # Some packages need a writable HOME
@@ -120,6 +71,6 @@ in
'';
passthru =
{
inherit originalPnpmPackage startScript re2;
inherit originalPnpmPackage startScript;
};
}

View File

@@ -78,6 +78,7 @@ inputs:
};
};
firefox.programs.firefox.enable = inputs.lib.mkForce false;
power.boot.kernelParams = [ "cpufreq.default_governor=powersave" ];
};
in
{

View File

@@ -31,6 +31,7 @@ inputs:
{
nix-vscode-extensions = topInputs.nix-vscode-extensions.extensions."${prev.system}";
nur-xddxdd = topInputs.nur-xddxdd.overlays.default final prev;
nur-linyinfeng = (topInputs.nur-linyinfeng.overlays.default final prev).linyinfeng;
deploy-rs =
{ inherit (prev) deploy-rs; inherit ((topInputs.deploy-rs.overlay final prev).deploy-rs) lib; };
# needed by mirism

View File

@@ -3,6 +3,7 @@ inputs:
imports = inputs.localLib.mkModules
[
./chromium.nix
./steam.nix
];
config =
let
@@ -42,6 +43,6 @@ inputs:
] ++ (with inputs.lib; filter isDerivation (attrValues plasma5Packages.kdeGear));
};
};
programs = { steam.enable = true; kdeconnect.enable = true; };
programs.kdeconnect.enable = true;
};
}

View File

@@ -0,0 +1,23 @@
inputs:
{
config =
let
inherit (inputs.lib) mkIf;
in mkIf (builtins.elem "desktop-fat" inputs.config.nixos.packages._packageSets)
{
programs.steam =
{
enable = true;
package = inputs.pkgs.steam.override (prev:
{
steam = prev.steam.overrideAttrs (prev:
{
postInstall = prev.postInstall +
''
sed -i 's#Comment\[zh_CN\]=.*$#Comment\[zh_CN\]=®#' $out/share/applications/steam.desktop
'';
});
});
};
};
}

View File

@@ -19,6 +19,7 @@ inputs:
mpv nomacs
# themes
tela-circle-icon-theme
firefoxpwa
];
users.sharedModules =
[{
@@ -33,7 +34,12 @@ inputs:
{
adb.enable = true;
wireshark = { enable = true; package = inputs.pkgs.wireshark; };
firefox = { enable = true; languagePacks = [ "zh-CN" "en-US" ]; };
firefox =
{
enable = true;
languagePacks = [ "zh-CN" "en-US" ];
nativeMessagingHosts.packages = [ inputs.pkgs.firefoxpwa ];
};
vim.package = inputs.pkgs.vim-full;
};
nixpkgs.config.packageOverrides = pkgs:

View File

@@ -44,6 +44,8 @@ inputs:
lextudio.restructuredtext trond-snekvik.simple-rst
# markdown
shd101wyy.markdown-preview-enhanced
# vasp
mystery.vasp-support
];
}
)];

View File

@@ -4,6 +4,7 @@ inputs:
[
./ssh
./zsh
./gpg.nix
];
config =
let
@@ -48,7 +49,7 @@ inputs:
# office
todo-txt-cli
# development
gdb try inputs.topInputs.plasma-manager.packages.x86_64-linux.rc2nix
gdb try inputs.topInputs.plasma-manager.packages.x86_64-linux.rc2nix hexo-cli
] ++ (with inputs.config.boot.kernelPackages; [ cpupower usbip ]);
};
users.sharedModules = [(home-inputs:
@@ -108,7 +109,6 @@ inputs:
nix-index-database.comma.enable = true;
nix-index.enable = true;
command-not-found.enable = false;
gnupg.agent = { enable = true; enableSSHSupport = true; };
autojump.enable = true;
git =
{

View File

@@ -0,0 +1,10 @@
inputs:
{
config =
let
inherit (inputs.lib) mkIf;
in mkIf (builtins.elem "server" inputs.config.nixos.packages._packageSets)
{
programs.gnupg.agent = { enable = true; pinentryFlavor = "tty"; };
};
}

View File

@@ -96,6 +96,14 @@ inputs:
else []
))
(attrsToList servers)));
programs.ssh =
{
startAgent = true;
enableAskPassword = true;
askPassword = "${inputs.pkgs.systemd}/bin/systemd-ask-password";
extraConfig = "AddKeysToAgent yes";
};
environment.sessionVariables.SSH_ASKPASS_REQUIRE = "prefer";
nixos.users.sharedModules =
[(hmInputs: {
config.programs.ssh =

View File

@@ -49,8 +49,8 @@ inputs:
{
owner = "z-shell";
repo = "zsh-lsd";
rev = "029a9cb0a9b39c9eb6c5b5100dd9182813332250";
sha256 = "sha256-oWjWnhiimlGBMaZlZB+OM47jd9hporKlPNwCx6524Rk=";
rev = "65bb5ac49190beda263aae552a9369127961632d";
hash = "sha256-JSNsfpgiqWhtmGQkC3B0R1Y1QnDKp9n0Zaqzjhwt7Xk=";
};
}
];
@@ -72,7 +72,6 @@ inputs:
{
enable = true;
plugins = [ "git" "colored-man-pages" "extract" "history-substring-search" "autojump" ];
customPkgs = with inputs.pkgs; [ zsh-nix-shell ];
};
};
};

View File

@@ -19,7 +19,7 @@ inputs:
nix-template appimage-run nil nixd nix-alien nix-serve node2nix nix-prefetch-github prefetch-npm-deps
nix-prefetch-docker pnpm-lock-export bundix
# instant messager
zoom-us signal-desktop qq nur-xddxdd.wechat-uos slack inputs.config.nur.repos.linyinfeng.wemeet
zoom-us signal-desktop qq nur-xddxdd.wechat-uos slack nur-linyinfeng.wemeet
cinny-desktop nheko
# office
libreoffice-qt texstudio poppler_utils pdftk gnuplot pdfchain hdfview

View File

@@ -113,6 +113,7 @@ inputs:
type = "stcp";
transport.useCompression = true;
secretKey = inputs.config.sops.placeholder."frp/stcp/${stcp.name}";
allowUsers = [ "*" ];
inherit (stcp.value) localIp localPort;
})
(attrsToList frpClient.stcp));

View File

@@ -32,6 +32,8 @@ inputs:
User = inputs.config.users.users.mirism.name;
Group = inputs.config.users.users.mirism.group;
ExecStart = "${inputs.pkgs.localPackages.mirism}/bin/${instance}";
RuntimeMaxSec = "1d";
Restart = "always";
};
};
})

View File

@@ -89,7 +89,7 @@ inputs:
user: misskey_${replaceStrings [ "-" ] [ "_" ] instance.name}
pass: ${placeholder."postgresql/misskey_${replaceStrings [ "-" ] [ "_" ] instance.name}"}
extra:
statement_timeout: 60000
statement_timeout: 600000
dbReplications: false
redis:
host: 127.0.0.1

View File

@@ -7,7 +7,8 @@ inputs:
config =
let
inherit (inputs.config.nixos.services.nginx.applications) main;
in
inherit (inputs.lib) mkIf;
in mkIf main.enable
{
nixos.services.nginx.https."chn.moe".location =
{

View File

@@ -19,7 +19,7 @@ inputs:
];
config =
{
services = { dbus.implementation = "broker"; fstrim = { enable = true; interval = "daily"; }; };
services = { dbus.implementation = "broker"; fstrim.enable = true; };
time.timeZone = "Asia/Shanghai";
boot =
{
@@ -51,5 +51,11 @@ inputs:
# environment.variables.LIBRARY_PATH = "/run/current-system/sw/lib";
virtualisation.oci-containers.backend = "docker";
home-manager.sharedModules = [{ home.stateVersion = "22.11"; }];
system =
{
stateVersion = "22.11";
configurationRevision = inputs.topInputs.self.rev or "dirty";
nixos.versionSuffix = inputs.lib.mkForce "";
};
};
}

View File

@@ -72,6 +72,12 @@ inputs:
PARAVIRT_TIME_ACCOUNTING = yes;
PM_AUTOSLEEP = yes;
WQ_POWER_EFFICIENT_DEFAULT = yes;
PREEMPT_VOLUNTARY = inputs.lib.mkForce no;
PREEMPT = inputs.lib.mkForce yes;
NO_HZ_FULL = yes;
HZ_1000 = inputs.lib.mkForce yes;
HZ_250 = inputs.lib.mkForce no;
HZ = inputs.lib.mkForce (freeform "1000");
};
};
};

View File

@@ -45,7 +45,6 @@ inputs:
};
nixPath = [ "nixpkgs=${inputs.topInputs.nixpkgs}" ];
};
system = { stateVersion = "22.11"; configurationRevision = inputs.topInputs.self.rev or "dirty"; };
systemd.services.nix-daemon =
{
serviceConfig = { CacheDirectory = "nix"; Slice = "-.slice"; Nice = "19"; };

View File

@@ -138,6 +138,7 @@ inputs:
sandybridge = "MSANDYBRIDGE";
silvermont = "MSILVERMONT";
broadwell = "MBROADWELL";
skylake = "MSKYLAKE";
znver2 = "MZEN2";
znver3 = "MZEN3";
};

View File

@@ -5,6 +5,7 @@ inputs:
let
inherit (inputs.lib) mkIf;
inherit (inputs.config.nixos) users;
inherit (builtins) listToAttrs;
in mkIf (builtins.elem "chn" users.users)
{
users.users.chn =
@@ -42,7 +43,10 @@ inputs:
# identityFile = "~/.ssh/xmuhk_id_rsa";
xmuhk = { host = "xmuhk"; hostname = "10.26.14.56"; user = "xmuhk"; };
xmuhk2 = { host = "xmuhk2"; hostname = "183.233.219.132"; user = "xmuhk"; port = 62022; };
};
}
// (listToAttrs (map
(system: { name = system; value.forwardAgent = true; })
[ "vps6" "wireguard.vps6" "vps7" "wireguard.vps7" "wireguard.pc" "nas" "wireguard.nas" ]));
};
home.packages =
[