Files
nix-config/hosts/default.nix
2024-03-07 09:54:11 -06:00

88 lines
1.7 KiB
Nix

{ config, lib, pkgs, ... }:
let timezone = "America/Chicago";
in {
imports = [ ../modules ../share ];
# Enable nix flakes and nix-command tools
nix = {
settings.experimental-features = [ "nix-command" "flakes" ];
# Garbage collect automatically every week
gc.automatic = true;
gc.options = "--delete-older-than 30d";
optimise.automatic = true;
};
# Configure nixpkgs
# Enable non free
nixpkgs.config.allowUnfree = true;
# Hardware configs
hardware = {
# Bluetooth
bluetooth.enable = true;
# Enable all firmware
enableAllFirmware = true;
# Disable pulse audio in favor of pipewire
pulseaudio.enable = false;
};
# Services configs
services = {
openssh.enable = true;
# Enable firmware updates
fwupd.enable = true;
fstrim.enable = lib.mkDefault true;
pcscd.enable = true;
# Enable CUPS to print documents.
printing.enable = true;
# configure pipewire
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
};
# Time config
time = {
# Set your time zone.
timeZone = timezone;
};
boot = {
# Enable AppImage
binfmt.registrations.appimage = {
wrapInterpreterInShell = false;
interpreter = "${pkgs.appimage-run}/bin/appimage-run";
recognitionType = "magic";
offset = 0;
mask = "\\xff\\xff\\xff\\xff\\x00\\x00\\x00\\x00\\xff\\xff\\xff";
magicOrExtension = "\\x7fELF....AI\\x02";
};
};
programs = {
fish.enable = true;
gnupg.agent = {
enable = true;
pinentryFlavor = "curses";
enableSSHSupport = true;
};
};
environment.systemPackages = with pkgs; [
pinentry-curses
];
}