added nixos configuration and home mananger stuff
This commit is contained in:
117
modules/nixos/configuration.nix
Normal file
117
modules/nixos/configuration.nix
Normal file
@ -0,0 +1,117 @@
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# Bring in the hardware configuration
|
||||
imports = [
|
||||
/etc/nixos/hardware-configuration.nix
|
||||
];
|
||||
|
||||
# Enable flakes for NixOS
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
|
||||
# Utilize systemd-boot
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Install and enable common graphics drivers
|
||||
hardware.opengl = {
|
||||
driSupport = true;
|
||||
extraPackages = with pkgs; [
|
||||
mesa_drivers
|
||||
libvdpau-va-gl
|
||||
libva
|
||||
libva-utils
|
||||
intel-vaapi-driver # for Intel
|
||||
intel-media-driver # for Intel
|
||||
rocm-opencl-icd # for AMD
|
||||
];
|
||||
};
|
||||
|
||||
# For systems with AMD graphics, this enables Vulkan on 32-bit applications
|
||||
# For 64-bit application, however, Vulkan is enabled by default
|
||||
hardware.graphics.driSupport32Bit = true;
|
||||
|
||||
# For systems with AMD graphics, enable AMDVLK
|
||||
hardware.hardware = {
|
||||
extraPackages = with pkgs; [
|
||||
amdvlk
|
||||
];
|
||||
extraPackages32 = with pkgs; [
|
||||
driversi686Linux
|
||||
];
|
||||
};
|
||||
|
||||
# Enable Bluetooth if present
|
||||
hardware.bluetooth.enable = true;
|
||||
|
||||
# Set your timezone
|
||||
time.timeZone = "America/Detroit";
|
||||
|
||||
# Enable Pipewire (sound)
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
# Enable touchpad
|
||||
services.libinput.enable = true;
|
||||
|
||||
# Install packages to be installed system-wide
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
neovim
|
||||
git
|
||||
wireguard-tools
|
||||
podman
|
||||
toolbox
|
||||
];
|
||||
|
||||
# Install system-wide fonts
|
||||
fonts.packages = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
liberation_ttf
|
||||
monaspace
|
||||
nerdfonts
|
||||
];
|
||||
|
||||
# Set the EDITOR global environment variable to neovim
|
||||
environment.variables.EDITOR = "nvim";
|
||||
|
||||
# Enable OpenSSH
|
||||
services.openssh.enable = true;
|
||||
|
||||
# Enable keyring
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
|
||||
# Enable GnuPG
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
# Enable SUID wrappers (some programs need them)
|
||||
programs.mtr.enable = true;
|
||||
|
||||
# Enable Polkit
|
||||
security.polkit.enable = true;
|
||||
|
||||
# Enable power management
|
||||
powerManagement = {
|
||||
enable = true;
|
||||
powertop.enable = false; # TODO: to be enabled on laptops
|
||||
cpuFreqGovernor = "performace";
|
||||
};
|
||||
|
||||
# Enable Steam and open various firewall ports when applicable
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
localNetworkGameTransfers = true;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user