2024-09-07 21:22:12 -05:00
|
|
|
{
|
|
|
|
inputs,
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
2024-09-07 22:20:24 -05:00
|
|
|
userName,
|
2024-09-07 21:22:12 -05:00
|
|
|
...
|
|
|
|
}: {
|
|
|
|
# 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
|
2024-09-09 08:27:52 -05:00
|
|
|
# hardware.graphics.driSupport32Bit = true;
|
2024-09-07 21:22:12 -05:00
|
|
|
|
|
|
|
# For systems with AMD graphics, enable AMDVLK
|
2024-09-09 08:27:52 -05:00
|
|
|
#hardware.graphics = {
|
|
|
|
# extraPackages = with pkgs; [
|
|
|
|
# amdvlk
|
|
|
|
# ];
|
|
|
|
# extraPackages32 = with pkgs; [
|
|
|
|
# driversi686Linux
|
|
|
|
# ];
|
|
|
|
#};
|
2024-09-07 21:22:12 -05:00
|
|
|
|
|
|
|
# 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
|
2024-09-08 15:44:14 -05:00
|
|
|
grim
|
|
|
|
slurp
|
|
|
|
playerctl
|
|
|
|
light
|
|
|
|
brightnessctl
|
2024-09-09 08:27:52 -05:00
|
|
|
firefox
|
2024-09-08 15:44:14 -05:00
|
|
|
wttrbar
|
|
|
|
cliphist
|
2024-09-14 14:30:50 -05:00
|
|
|
xivlauncher # run with this: gamescope -f -w 2560 -h 1440 -b -- gamemoderun %command%
|
2024-09-07 21:22:12 -05:00
|
|
|
];
|
|
|
|
|
|
|
|
# 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;
|
2024-09-09 08:27:52 -05:00
|
|
|
localNetworkGameTransfers.openFirewall = true;
|
2024-09-07 21:22:12 -05:00
|
|
|
};
|
2024-09-07 22:20:24 -05:00
|
|
|
|
2024-09-14 14:30:50 -05:00
|
|
|
# Enable gamemode (gamemode, gamemoded, gamemoderun) when needed
|
|
|
|
programs.gamemode.enable = true;
|
|
|
|
|
2024-09-09 08:27:52 -05:00
|
|
|
# Enable gamescope (compositor) when needed
|
|
|
|
programs.gamescope.enable = true;
|
|
|
|
|
2024-09-07 22:20:24 -05:00
|
|
|
# Add username to groups "wheel" and "video" - more may be added here later
|
2024-09-14 14:30:50 -05:00
|
|
|
users.users.${userName}.extraGroups = ["wheel" "video" "gamemode"];
|
2024-09-08 15:44:14 -05:00
|
|
|
|
|
|
|
# XDG stuff
|
|
|
|
xdg = {
|
|
|
|
portal = {
|
|
|
|
enable = true;
|
2024-09-14 14:30:50 -05:00
|
|
|
wlr.enable = true;
|
|
|
|
config = {};
|
|
|
|
xdgOpenUsePortal = true;
|
2024-09-08 15:44:14 -05:00
|
|
|
extraPortals = with pkgs; [
|
|
|
|
xdg-desktop-portal-wlr
|
|
|
|
xdg-desktop-portal-gtk
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Firewall stuff not allowed in common user and network creation
|
|
|
|
networking.firewall.enable = true; # VERY important, do not touch
|
|
|
|
# networking.firewall.allowedTCPPorts = [];
|
|
|
|
# networking.firewall.allowedUDPPorts = [];
|
|
|
|
networking.networkmanager.enable = true; # Linux tool for managing network connections
|
|
|
|
|
|
|
|
# Enable Flatpak (app containerization)
|
2024-09-09 08:27:52 -05:00
|
|
|
# services.flatpak.enable = true;
|
|
|
|
services.flatpak = {
|
2024-09-14 14:30:50 -05:00
|
|
|
enable = true;
|
|
|
|
remotes = [
|
|
|
|
{
|
|
|
|
name = "flathub";
|
|
|
|
location = "https://dl.flathub.org/repo/flathub.flatpakrepo";
|
|
|
|
}
|
|
|
|
];
|
2024-09-09 08:27:52 -05:00
|
|
|
packages = [
|
|
|
|
"com.github.tchx84.Flatseal"
|
|
|
|
"com.slack.Slack"
|
|
|
|
"info.beyondallreason.bar"
|
|
|
|
"io.dbeaver.DBeaverCommunity"
|
|
|
|
"io.openrct2.OpenRCT2"
|
|
|
|
"md.obsidian.Obsidian"
|
|
|
|
"org.prismlauncher.PrismLauncher"
|
|
|
|
"sh.cider.Cider"
|
|
|
|
];
|
|
|
|
update = {
|
|
|
|
auto = {
|
|
|
|
enable = true;
|
|
|
|
onCalendar = "weekly";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-09-14 14:30:50 -05:00
|
|
|
|
|
|
|
system.stateVersion = "24.05";
|
2024-09-07 21:22:12 -05:00
|
|
|
}
|