mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 12:29:19 -08:00
feat: bootable
This commit is contained in:
parent
ec29a3e56c
commit
a7cd9846a1
4 changed files with 7 additions and 1 deletions
29
nixos/bootable.nix
Normal file
29
nixos/bootable.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ config, lib, std, ... }: let
|
||||
inherit (lib.modules) mkDefault mkIf mkMerge;
|
||||
inherit (std) list;
|
||||
in {
|
||||
boot = mkMerge [
|
||||
{
|
||||
kernel.sysctl = {
|
||||
"fs.inotify.max_user_watches" = 524288;
|
||||
"net.core.rmem_max" = 16777216;
|
||||
"net.core.wmem_max" = 16777216;
|
||||
"net.ipv4.tcp_rmem" = "4096 87380 16777216";
|
||||
"net.ipv4.tcp_wmem" = "4096 65536 16777216";
|
||||
"net.ipv4.ip_forward" = "1";
|
||||
"net.ipv6.conf.all.forwarding" = "1";
|
||||
};
|
||||
loader = {
|
||||
grub.configurationLimit = 8;
|
||||
systemd-boot.configurationLimit = 8;
|
||||
};
|
||||
tmpOnTmpfs = true;
|
||||
tmpOnTmpfsSize = "80%";
|
||||
kernelPackages = mkIf (list.elem "zfs" config.boot.supportedFilesystems) (mkDefault config.boot.zfs.package.latestCompatibleLinuxPackages);
|
||||
}
|
||||
(mkIf (list.elem "zfs" config.boot.supportedFilesystems) {
|
||||
kernelPackages = mkDefault config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||
zfs.enableUnstable = true;
|
||||
})
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue