summaryrefslogtreecommitdiff
path: root/modules/system.nix
diff options
context:
space:
mode:
authorfreya <Freya Murphy>2025-01-21 02:43:35 +0000
committerFreya Murphy <freya@freyacat.org>2025-01-21 02:45:29 +0000
commit05ea082c5fed25655e59ed7851c0cd53b0624b35 (patch)
tree87390bf699e04027f042ccfc10743a42bf768788 /modules/system.nix
downloaddotfiles-nix-05ea082c5fed25655e59ed7851c0cd53b0624b35.tar.gz
dotfiles-nix-05ea082c5fed25655e59ed7851c0cd53b0624b35.tar.bz2
dotfiles-nix-05ea082c5fed25655e59ed7851c0cd53b0624b35.zip
initial
Diffstat (limited to 'modules/system.nix')
-rw-r--r--modules/system.nix101
1 files changed, 101 insertions, 0 deletions
diff --git a/modules/system.nix b/modules/system.nix
new file mode 100644
index 0000000..25e1944
--- /dev/null
+++ b/modules/system.nix
@@ -0,0 +1,101 @@
+{ 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"
+ ];
+ };
+ };
+}