152 lines
3.3 KiB
Nix
152 lines
3.3 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
userName,
|
|
...
|
|
}: {
|
|
imports = [
|
|
../../apps/flatpak.nix
|
|
../../sound/pipewire.nix
|
|
../../sound/shairport.nix
|
|
../../virtualization/podman.nix
|
|
../../virtualization/hardware.nix
|
|
(config.nixosModules.gpuHardware {gpuVendor = "amd";})
|
|
];
|
|
|
|
# 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;
|
|
|
|
# Enable Bluetooth if present
|
|
hardware.bluetooth.enable = true;
|
|
|
|
# Set your timezone
|
|
time.timeZone = "America/Detroit";
|
|
|
|
# Enable touchpad
|
|
services.libinput.enable = true;
|
|
|
|
# Install packages to be installed system-wide
|
|
environment.systemPackages = with pkgs; [
|
|
vim
|
|
neovim
|
|
git
|
|
wireguard-tools
|
|
buildah
|
|
podman-tui
|
|
podman-compose
|
|
podman-desktop
|
|
toolbox
|
|
grim
|
|
slurp
|
|
playerctl
|
|
light
|
|
brightnessctl
|
|
firefox
|
|
wttrbar
|
|
cliphist
|
|
xivlauncher
|
|
patchelf
|
|
];
|
|
|
|
# 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.openFirewall = true;
|
|
};
|
|
|
|
# Enable gamemode (gamemode, gamemoded, gamemoderun) when needed
|
|
programs.gamemode.enable = true;
|
|
|
|
# Enable gamescope (compositor) when needed
|
|
programs.gamescope.enable = true;
|
|
|
|
# Enable dconf
|
|
programs.dconf.enable = true;
|
|
|
|
# Add username to groups "wheel" and "video" - more may be added here later
|
|
users.users.${userName}.extraGroups = ["wheel" "video" "gamemode" "podman" "network"];
|
|
|
|
# XDG stuff
|
|
xdg = {
|
|
portal = {
|
|
enable = true;
|
|
wlr.enable = true;
|
|
config = {
|
|
common = {
|
|
default = [
|
|
"wlr"
|
|
];
|
|
};
|
|
};
|
|
xdgOpenUsePortal = true;
|
|
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 Podman (OCI containers)
|
|
virtualisation.podman = {
|
|
enable = true;
|
|
dockerSocket.enable = true;
|
|
defaultNetwork.settings.dns_enabled = true;
|
|
};
|
|
|
|
# users.users."${userName}" = {
|
|
# group = "${userName}";
|
|
# isNormalUser = true;
|
|
# };
|
|
|
|
system.stateVersion = "24.05";
|
|
}
|