Add Ansible configuration and remove NixOS
All checks were successful
Nix Format Check / check-format (pull_request) Successful in 39s
All checks were successful
Nix Format Check / check-format (pull_request) Successful in 39s
This commit is contained in:
@@ -1,64 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
/etc/nixos/hardware-configuration.nix
|
||||
./mennos-server/zfs.nix
|
||||
];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/dd3fa13c-a1bd-4dc9-bcb4-aee17c7f12d1";
|
||||
fsType = "ext4";
|
||||
options = [ "noatime" ];
|
||||
};
|
||||
|
||||
networking.hostName = "mennos-server";
|
||||
networking.hostId = "64519940";
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Load nvidia driver for Xorg and Wayland
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
# Enable graphics
|
||||
hardware.graphics.enable = true;
|
||||
|
||||
# nvtop, a system monitor for GPUs
|
||||
environment.systemPackages = with pkgs; [ nvtopPackages.nvidia ];
|
||||
|
||||
# Enable NVIDIA Docker support
|
||||
# test with: $ docker run --rm -it --device=nvidia.com/gpu=all ubuntu:latest nvidia-smi
|
||||
hardware.nvidia-container-toolkit.enable = true;
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# Swap file (Laptop has 64GB of RAM so 16GB swap should be enough)
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/swapfile";
|
||||
size = 16384;
|
||||
}
|
||||
];
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = false;
|
||||
powerManagement.finegrained = false;
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
|
||||
# Use the latest driver from the unstable channel
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user