mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-08-21 10:47:17 -05:00
102 lines
3.2 KiB
Nix
102 lines
3.2 KiB
Nix
{
|
|
inputs,
|
|
config,
|
|
pkgs,
|
|
mkRune,
|
|
...
|
|
}: {
|
|
users.motd = mkRune {
|
|
number = "2";
|
|
rune = "mannaz";
|
|
};
|
|
|
|
# Use the systemd-boot EFI boot loader.
|
|
boot.loader = {
|
|
systemd-boot.enable = true;
|
|
efi.canTouchEfiVariables = true;
|
|
};
|
|
|
|
# boot.kernelPackages = pkgs.linuxPackages_latest;
|
|
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_latest;
|
|
|
|
# this device doesn't have enough ram :/
|
|
swapDevices = [
|
|
{
|
|
device = "/var/lib/swapfile";
|
|
size = 24 * 1024;
|
|
}
|
|
];
|
|
|
|
hardware.opengl = {
|
|
enable = true;
|
|
driSupport = true;
|
|
driSupport32Bit = true;
|
|
extraPackages = with pkgs; [
|
|
libGL
|
|
];
|
|
setLdLibraryPath = true;
|
|
};
|
|
# Load nvidia driver for Xorg and Wayland
|
|
services.xserver.videoDrivers = ["nvidia"];
|
|
|
|
hardware.nvidia = {
|
|
# Modesetting is required.
|
|
modesetting.enable = true;
|
|
|
|
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
|
powerManagement.enable = false;
|
|
# Fine-grained power management. Turns off GPU when not in use.
|
|
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
|
powerManagement.finegrained = false;
|
|
|
|
# Use the NVidia open source kernel module (not to be confused with the
|
|
# independent third-party "nouveau" open source driver).
|
|
# Support is limited to the Turing and later architectures. Full list of
|
|
# supported GPUs is at:
|
|
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
|
# Only available from driver 515.43.04+
|
|
# Currently alpha-quality/buggy, so false is currently the recommended setting.
|
|
open = false;
|
|
|
|
# Enable the Nvidia settings menu,
|
|
# accessible via `nvidia-settings`.
|
|
nvidiaSettings = true;
|
|
|
|
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
|
};
|
|
|
|
programs.nix-ld.enable = true;
|
|
services.openssh.enable = true;
|
|
|
|
networking.hostName = "mannaz";
|
|
# networking.wireless.enable = true;
|
|
# networking.networkmanager.enable = true;
|
|
|
|
networking.firewall.allowedTCPPorts = [
|
|
7865
|
|
7860
|
|
];
|
|
|
|
time.timeZone = "America/Chicago";
|
|
security.sudo.wheelNeedsPassword = false;
|
|
|
|
# This option defines the first version of NixOS you have installed on this particular machine,
|
|
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
|
#
|
|
# Most users should NEVER change this value after the initial install, for any reason,
|
|
# even if you've upgraded your system to a new NixOS release.
|
|
#
|
|
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
|
# so changing it will NOT upgrade your system.
|
|
#
|
|
# This value being lower than the current NixOS release does NOT mean your system is
|
|
# out of date, out of support, or vulnerable.
|
|
#
|
|
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
|
# and migrated your data accordingly.
|
|
#
|
|
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
|
system.stateVersion = "23.11"; # Did you read the comment?
|
|
}
|