nix-config-v2/modules/machine/cloud/configuration.nix

180 lines
3.7 KiB
Nix
Raw Permalink Normal View History

{
2024-12-12 19:41:58 -06:00
config,
2024-12-23 14:35:36 -06:00
lib,
pkgs,
2024-09-07 22:20:24 -05:00
userName,
...
}: let
flatpakPackages = [
2024-12-23 14:35:36 -06:00
"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"
];
in {
2024-12-12 19:41:58 -06:00
imports = [
2024-12-23 14:35:36 -06:00
(import ../../apps/flatpak.nix {
inherit lib pkgs flatpakPackages;
})
../../apps/gaming.nix
../../graphics
../../pwrMgmt
2025-01-04 18:07:36 -06:00
../../networking/core.nix
2024-12-12 19:41:58 -06:00
../../sound/pipewire.nix
../../sound/shairport.nix
../../virtualization/podman.nix
../../virtualization/hardware.nix
];
# Enable flakes for NixOS
nix.settings.experimental-features = ["nix-command" "flakes"];
# Custom kernel/boot stuff
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Enable Bluetooth if present
hardware.bluetooth.enable = true;
# Set your timezone
2024-12-15 21:37:43 -06:00
time.timeZone = "America/Detroit";
# Install packages to be installed system-wide
environment.systemPackages = with pkgs; [
vim
neovim
git
wireguard-tools
grim
slurp
playerctl
light
brightnessctl
firefox
wttrbar
cliphist
2024-10-30 21:41:37 -05:00
patchelf
];
# 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;
# Graphics module (../../graphics/default.nix)
2024-12-23 14:35:36 -06:00
graphics = {
enable = true;
gpuVendor = "nvidia"; # or "amd" or "intel"
wayland.enable = true;
vulkan.enable = true;
};
# Gaming module (see ../../apps/gaming.nix)
2024-12-23 14:35:36 -06:00
gaming = {
steam = {
enable = true;
firewall = {
remotePlay = true;
localNetworkGameTransfers = true;
};
};
gamemode.enable = true;
gamescope.enable = true;
lutris = {
enable = true;
wine = {
enable = true;
2024-12-23 14:35:36 -06:00
package = pkgs.wine-staging;
};
compatibility = {
protonSupport = true;
};
extraPackages = with pkgs; [
gamemode
mangohud
];
};
2024-12-23 14:35:36 -06:00
ffxiv.enable = true;
minecraft.enable = true;
};
# Power management (see ../../pwrMgmt/default.nix)
2024-12-23 14:35:36 -06:00
pwrMgmt = {
enable = true;
cpuFreqGovernor = "performance";
powertop.enable = false;
};
2024-09-07 22:20:24 -05:00
# Podman module (see ../../virtualization/podman.nix)
2024-12-23 14:35:36 -06:00
podman = {
enable = true;
extraPackages = with pkgs; [
docker-credential-helpers
toolbox
cosign
crane
podman-tui
podman-desktop
];
};
# Core networking module (see ../../networking/core.nix)
2025-01-04 18:07:36 -06:00
network = {
firewall.enable = true;
2024-12-23 14:35:36 -06:00
networkmanager.enable = true;
};
# Enable dconf
programs.dconf.enable = true;
2024-09-07 22:20:24 -05:00
# Add username to groups "wheel" and "video" - more may be added here later
2024-10-30 21:41:37 -05:00
users.users.${userName}.extraGroups = ["wheel" "video" "gamemode" "podman" "network"];
2024-12-23 14:35:36 -06:00
# Flatpak packages (see ../../apps/flatpak.nix)
services.flatpak.packages = flatpakPackages;
# XDG stuff
xdg = {
portal = {
enable = true;
wlr.enable = true;
2024-10-30 21:41:37 -05:00
config = {
common = {
default = [
"wlr"
];
};
};
xdgOpenUsePortal = true;
extraPortals = with pkgs; [
xdg-desktop-portal-wlr
xdg-desktop-portal-gtk
];
};
};
2024-12-23 14:35:36 -06:00
system.stateVersion = "24.11";
}