dotfiles-nix/modules/system.nix

102 lines
1.9 KiB
Nix
Raw Normal View History

2025-01-21 02:43:35 +00:00
{ config, pkgs, ... }:
{
# common system packages
environment.systemPackages = with pkgs; [
# editor
neovim
vim
# lib
libz
openssl
# shell
bash
zsh
# utility
acpi
curl
htop
openssh
p7zip
ripgrep
tree
unzip
wget
];
# timezone
time.timeZone = "Americia/New_York";
# locale
i18n.defaultLocale = "en_US.UTF-8";
# system component
networking.networkmanager.enable = config.system.enable;
services.fwupd.enable = config.system.enable;
services.pcscd.enable = config.system.enable;
services.printing.enable = config.system.enable;
services.pipewire = {
enable = config.system.enable;
alsa.enable = config.system.enable;
pulse.enable = config.system.enable;
jack.enable = config.system.enable;
};
# gui component
services.libinput.enable = config.desktop.enable;
# create user account
users.users.${config.user} = {
isNormalUser = true;
description = config.fullName;
extraGroups = if config.system.enable then [ "networkmanager" "wheel" "sys" "video" "audio" ] else [ "wheel" ];
home = config.homePath;
shell = pkgs.zsh;
};
# certs
security.pki.certificateFiles = [
../files/certs/freyanet.crt
];
# fonts
fonts.packages = with pkgs; [
dejavu_fonts
fira-code
fira-code-symbols
jetbrains-mono
material-icons
nerd-fonts.fira-code
noto-fonts
noto-fonts-cjk-sans
noto-fonts-emoji
twemoji-color-font
];
fonts.fontconfig = {
enable = true;
defaultFonts = {
serif = [
"Twemoji"
"DejaVu Serif"
];
sansSerif = [
"Twemoji"
"DejaVu Sans"
];
monospace = [
"Fira Code"
"FiraCode Nerd Font Mono"
"Font Awesome 6 Pro Regular"
"Twemoji"
"DejaVu Sans Mono"
];
emoji = [
"Twemoji"
"Noto Color Emoji"
];
};
};
}