diff options
Diffstat (limited to 'modules/system.nix')
-rw-r--r-- | modules/system.nix | 101 |
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" + ]; + }; + }; +} |