feat(binto): add nvidia.nix and move some hm stuff to modules
This commit is contained in:
parent
9b4e7fac44
commit
8ea9debb5a
13 changed files with 96 additions and 52 deletions
|
@ -26,6 +26,11 @@
|
|||
};
|
||||
};
|
||||
|
||||
services.xserver = {
|
||||
layout = "ca";
|
||||
xkbVariant = "multix";
|
||||
};
|
||||
|
||||
home-manager.users = let
|
||||
default = {
|
||||
imports = [
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
users.users.matt = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "input" "uinput" "adm" "mlocate" "video" "libvirtd" ];
|
||||
};
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
||||
# TODO: use hm for tmux
|
||||
home-manager.users = {
|
||||
matt = {
|
||||
|
||||
imports = [
|
||||
../wim/home/dconf.nix
|
||||
../wim/home/firefox/main.nix
|
||||
];
|
||||
|
||||
home.stateVersion = "23.11";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -10,13 +10,9 @@
|
|||
../../modules/kmscon.nix
|
||||
../../modules/printer.nix
|
||||
|
||||
./binto.nix
|
||||
./modules/nvidia.nix
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.supportedFilesystems = [ "ntfs" ];
|
||||
|
||||
networking = {
|
||||
hostName = "binto";
|
||||
networkmanager.enable = true;
|
||||
|
@ -27,32 +23,49 @@
|
|||
time.timeZone = "America/Toronto";
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable the KDE Plasma Desktop Environment.
|
||||
services.xserver.displayManager.sddm.enable = true;
|
||||
services.xserver.desktopManager.plasma5.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
layout = "ca";
|
||||
xkbVariant = "multix";
|
||||
enable = true;
|
||||
|
||||
# Enable the KDE Plasma Desktop Environment.
|
||||
displayManager.sddm.enable = true;
|
||||
desktopManager.plasma5.enable = true;
|
||||
};
|
||||
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
extraUpFlags = [
|
||||
"--login-server https://headscale.nelim.org"
|
||||
"--operator=matt"
|
||||
];
|
||||
services = {
|
||||
tailscale = {
|
||||
enable = true;
|
||||
extraUpFlags = [
|
||||
"--login-server https://headscale.nelim.org"
|
||||
"--operator=matt"
|
||||
];
|
||||
};
|
||||
|
||||
openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
PermitRootLogin = "no";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
PermitRootLogin = "no";
|
||||
users.users.matt = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "input" "uinput" "adm" "mlocate" "video" "libvirtd" ];
|
||||
};
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
||||
# TODO: use hm for tmux
|
||||
home-manager.users = {
|
||||
matt = {
|
||||
|
||||
imports = [
|
||||
../../modules/dconf.nix
|
||||
../../modules/firefox/main.nix
|
||||
];
|
||||
|
||||
home.stateVersion = "23.11";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -1,13 +1,19 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, modulesPath, ... }:
|
||||
{ config, lib, modulesPath, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.supportedFilesystems = [ "ntfs" ];
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
|
|
40
hosts/binto/modules/nvidia.nix
Normal file
40
hosts/binto/modules/nvidia.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
# Enable OpenGL
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = 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+
|
||||
# Do not disable this unless your GPU is unsupported or if you have a good reason to.
|
||||
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;
|
||||
};
|
||||
}
|
|
@ -14,12 +14,13 @@
|
|||
matt = {
|
||||
|
||||
imports = [
|
||||
./dconf.nix
|
||||
./theme.nix
|
||||
./hyprland.nix
|
||||
./dotfiles.nix
|
||||
./packages.nix
|
||||
./firefox/main.nix
|
||||
|
||||
../../../modules/dconf.nix
|
||||
../../../modules/firefox/main.nix
|
||||
];
|
||||
|
||||
home.stateVersion = "23.05";
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# Home-manager module
|
||||
|
||||
{ ... }: {
|
||||
dconf.settings = {
|
||||
"org/virt-manager/virt-manager/connections" = {
|
Loading…
Reference in a new issue