update
This commit is contained in:
parent
98f309e72a
commit
8a32e2f31b
16 changed files with 645 additions and 271 deletions
158
mods/base.nix
Normal file
158
mods/base.nix
Normal file
|
@ -0,0 +1,158 @@
|
|||
# base.nix
|
||||
# configuration for all my computers
|
||||
|
||||
{ pkgs, config, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./gnome.nix
|
||||
./systemd.nix
|
||||
./fonts.nix
|
||||
./gpu.nix
|
||||
];
|
||||
|
||||
# Housekeeping: Garbage collection
|
||||
nix.optimise.automatic = true;
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "daily";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
|
||||
nix.settings.auto-optimise-store = true;
|
||||
|
||||
# Increase buffer size for NixOS-Rebuild
|
||||
nix.settings.download-buffer-size = "4G";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# Disable sudo password for the wheel group
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Asia/Taipei";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "zh_TW.UTF-8";
|
||||
LC_IDENTIFICATION = "zh_TW.UTF-8";
|
||||
LC_MEASUREMENT = "zh_TW.UTF-8";
|
||||
LC_MONETARY = "zh_TW.UTF-8";
|
||||
LC_NAME = "zh_TW.UTF-8";
|
||||
LC_NUMERIC = "zh_TW.UTF-8";
|
||||
LC_PAPER = "zh_TW.UTF-8";
|
||||
LC_TELEPHONE = "zh_TW.UTF-8";
|
||||
LC_TIME = "zh_TW.UTF-8";
|
||||
};
|
||||
|
||||
# Traditional Chinese input
|
||||
i18n.inputMethod = {
|
||||
enable = true;
|
||||
type = "fcitx5";
|
||||
fcitx5.addons = with pkgs; [
|
||||
fcitx5-chewing
|
||||
fcitx5-chinese-addons
|
||||
fcitx5-table-extra
|
||||
];
|
||||
};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable the GNOME Desktop Environment.
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
# remove xterm
|
||||
services.xserver.excludePackages = [ pkgs.xterm ];
|
||||
services.xserver.desktopManager.xterm.enable = false;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = false;
|
||||
|
||||
# Enable touchpad support (enabled default in most desktop>
|
||||
services.libinput.enable = true;
|
||||
|
||||
# Enable automatic login for the user.
|
||||
services.displayManager.autoLogin.enable = true;
|
||||
services.displayManager.autoLogin.user = "elias";
|
||||
|
||||
# PROGRAMS
|
||||
# ================
|
||||
# Install Firefox.
|
||||
programs.firefox.enable = true;
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
||||
# MOVE MOST TO HOME.NIX
|
||||
# terminal apps
|
||||
wget
|
||||
curl
|
||||
fastfetch
|
||||
gnome-tweaks
|
||||
btop
|
||||
htop
|
||||
tree
|
||||
restic # backup program
|
||||
lm_sensors
|
||||
hddtemp
|
||||
f3
|
||||
unzip
|
||||
git
|
||||
|
||||
# terminal editors
|
||||
neovim
|
||||
ptyxis
|
||||
|
||||
# nix helper apps
|
||||
nh
|
||||
];
|
||||
|
||||
# Services
|
||||
# =========================
|
||||
|
||||
# Enable OpenSSH
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
# require public key authentication for better security
|
||||
settings.PasswordAuthentication = true;
|
||||
settings.KbdInteractiveAuthentication = false;
|
||||
settings.PermitRootLogin = "no";
|
||||
};
|
||||
|
||||
# Enable Flatpak
|
||||
services.flatpak.enable = true;
|
||||
|
||||
# Enable Tailscale
|
||||
services.tailscale.enable = true;
|
||||
|
||||
# Enable Docker
|
||||
#virtualisation.docker.enable = true;
|
||||
|
||||
# Enable Firmware Updater
|
||||
services.fwupd.enable = true;
|
||||
# fwupdmgr refresh
|
||||
# fwupdmgr get-updates
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue