46 lines
1.2 KiB
Nix
46 lines
1.2 KiB
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
networking.hostName = "loki-nixos";
|
|
imports = [ ../../nixos/custom.nix ./hardware-configuration.nix ];
|
|
|
|
fileSystems."/".options = [ "ssd" "noatime" "compress=zstd" ];
|
|
swapDevices = [{
|
|
device = "/swapfile";
|
|
size = 16 * 1024;
|
|
randomEncryption.enable = false;
|
|
}];
|
|
boot.kernel.sysctl."vm.swappiness" = 120;
|
|
# systemd.oomd.enable = true;
|
|
systemd.oomd = {
|
|
enable = true;
|
|
enableSystemSlice = true;
|
|
enableUserSlices = true;
|
|
};
|
|
zramSwap.enable = true; # more ram in
|
|
zramSwap.memoryPercent = 150;
|
|
# boot.resumeDevice = "/dev/nvme0n1p2";
|
|
|
|
# -- tmp --
|
|
|
|
services.xserver.enable = false;
|
|
services.displayManager.gdm.enable = false;
|
|
#services.getty.autologinUser = "krosh";
|
|
#services.getty.autologinOnce = true;
|
|
services.getty = {
|
|
autologinUser = "krosh";
|
|
autologinOnce = true;
|
|
greetingLine = "";
|
|
helpLine = "";
|
|
extraArgs = [ "--noissue" "--nohostname" "--nonewline" "--nohints" ];
|
|
};
|
|
|
|
programs.zsh.enable = true;
|
|
programs.zsh.loginShellInit = ''
|
|
if [ "$(tty)" = "/dev/tty1" ] && [ -z "$WAYLAND_DISPLAY" ] && [ -z "$DISPLAY" ] && [ -z "$SSH_CONNECTION" ]; then
|
|
exec Hyprland 2>/dev/null 1>&2
|
|
fi
|
|
'';
|
|
|
|
}
|