-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Vite module now avoids breaking in Darwin
- Loading branch information
1 parent
db13dbf
commit 7cee625
Showing
2 changed files
with
25 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; } | ||
]; | ||
}) | ||
]) | ||
}; | ||
} |