Skip to content

Commit

Permalink
Vite module now avoids breaking in Darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickShaw committed Feb 20, 2024
1 parent db13dbf commit 7cee625
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 16 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"yarn-error.log": true,
"**/.yarn": true,
"**/.pnp.*": true,
".direnv/**": true
},
"typescript.enablePromptUseWorkspaceTsdk": true,
"stylelint.stylelintPath": ".yarn/sdks/stylelint/lib/index.js",
Expand Down
40 changes: 24 additions & 16 deletions packages/vite/nix/flake.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
{
outputs = {...}: {
nixosModules.default = {
# See: https://vitejs.dev/guide/troubleshooting.html#requests-are-stalled-foreverw
boot.kernel.sysctl= {
"fs.inotify.max_user_watches" = 1048576;
"fs.inotify.max_queued_events" = 16384;
"fs.inotify.max_user_instances" = 8192;
};
security.pam.loginLimits = [
# Probably not necessary to have it quite so high but it avoids running into problems with other apps like wine.
# See: https://github.com/lutris/docs/blob/master/HowToEsync.md
# Might be worth adding a separate config in the future to opt into a higher value
{ domain = "*"; item = "nofile"; type = "-"; value = "1048576"; }
];
};
};
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs = { nixpkgs, ...}@inputs: {
nixosModules.default =
({ pkgs, lib, options, ... }: lib.mkMerge [
(lib.optionalAttrs (options?boot) {
# See: https://vitejs.dev/guide/troubleshooting.html#requests-are-stalled-forever
boot.kernel.sysctl = {
"fs.inotify.max_user_watches" = 1048576;
"fs.inotify.max_queued_events" = 16384;
"fs.inotify.max_user_instances" = 8192;
};
})
(lib.optionalAttrs (options.security.pam?loginLimits) {
security.pam.loginLimits = [
# Probably not necessary to have it quite so high but it avoids running into problems with other apps like wine.
# See: https://github.com/lutris/docs/blob/master/HowToEsync.md
# Might be worth adding a separate config in the future to opt into a higher value
{ domain = "*"; item = "nofile"; type = "-"; value = "1048576"; }
];
})
])
};
}

0 comments on commit 7cee625

Please sign in to comment.