nixos/systems/common.nix
Julian Sutter 3bf2b1bd9f updates
2025-04-23 14:31:15 -07:00

148 lines
3 KiB
Nix

{ config, pkgs, ... }:
{
fileSystems."/" =
{ device = "/dev/disk/by-partlabel/primary";
fsType = "btrfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-partlabel/ESP";
fsType = "vfat";
};
# hardware
hardware.enableRedistributableFirmware = true;
# Network
networking = {
extraHosts = "";
networkmanager = {
enable = true;
plugins = with pkgs; [
networkmanager-openvpn
networkmanager-openconnect
];
};
useDHCP = false; # Depreciated
};
# Bootloader
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Kernel
boot.kernelPackages = pkgs.linuxPackages_latest;
# Nix
nix = {
# Automate garbage collection
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
package = pkgs.nixVersions.stable;
settings = {
auto-optimise-store = true;
trusted-users = [ "root" "jsutter" ];
experimental-features = [ "nix-command" "flakes" ];
keep-outputs = true;
keep-derivations = true;
};
};
system.stateVersion = "24.11";
nixpkgs.config.allowUnfree = true;
nixpkgs.config.nvidia.acceptLicense = true;
nixpkgs.config.nvidia.libsOnly = false;
nixpkgs.config.allowBroken = true;
# Location & internationalisation
time.timeZone = "America/Los_Angeles";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Services
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
services.openssh.enable = true;
programs.java.enable = true;
security.polkit.enable = true;
programs.zsh.enable = true;
security.sudo.wheelNeedsPassword = false;
# System packages
environment.systemPackages = with pkgs; [
fzf
git
curl
file
gdb
unar
lsof
pciutils
htop
sysstat
nmap
powertop
gnupg
p7zip
rsync
bumblebee
glxinfo
libgdiplus
unzip
clinfo
virt-manager
adoptopenjdk-icedtea-web
javaPackages.openjfx17
s-tui
stress
wget
openssl
gnumake
kopia
dig
python3
pv
whois
kdePackages.xdg-desktop-portal-kde
];
services.flatpak.enable = true;
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk-sans
noto-fonts-emoji
liberation_ttf
fira-code
fira-code-symbols
mplus-outline-fonts.githubRelease
dina-font
proggyfonts
];
services.xserver.excludePackages = [ pkgs.xterm ];
documentation.nixos.enable = false;
systemd.network.wait-online.enable = false;
boot.initrd.systemd.network.wait-online.enable = false;
}