mirror of
https://github.com/CHN-beta/nixos.git
synced 2024-10-23 15:08:45 +08:00
42 lines
1015 B
Nix
42 lines
1015 B
Nix
{ hostName }: { pkgs, ... }@inputs:
|
|
{
|
|
config =
|
|
{
|
|
nixpkgs.hostPlatform = inputs.lib.mkDefault "x86_64-linux";
|
|
nix =
|
|
{
|
|
settings =
|
|
{
|
|
experimental-features = [ "nix-command" "flakes" ];
|
|
keep-outputs = true;
|
|
system-features = [ "big-parallel" ];
|
|
keep-failed = true;
|
|
auto-optimise-store = true;
|
|
};
|
|
daemonIOSchedClass = "idle";
|
|
daemonCPUSchedPolicy = "idle";
|
|
};
|
|
networking.hostName = hostName;
|
|
time.timeZone = "Asia/Shanghai";
|
|
system =
|
|
{
|
|
stateVersion = "22.11";
|
|
configurationRevision = inputs.inputs.self.rev or "dirty";
|
|
};
|
|
nixpkgs.config.allowUnfree = true;
|
|
systemd =
|
|
{
|
|
extraConfig =
|
|
"
|
|
DefaultTimeoutStopSec=10s
|
|
DefaultLimitNOFILE=1048576:1048576
|
|
";
|
|
user.extraConfig = "DefaultTimeoutStopSec=10s";
|
|
sleep.extraConfig = "SuspendState=freeze";
|
|
services.nix-daemon.serviceConfig = { Slice = "-.slice"; Nice = "19"; };
|
|
};
|
|
programs.nix-ld.enable = true;
|
|
boot = { supportedFilesystems = [ "ntfs" ]; consoleLogLevel = 7; };
|
|
};
|
|
}
|