Refining modules/nixos/base.nix to make sense for more machines

There is a few additional changes due to typos introduced while working
on other stuff.
This commit is contained in:
Jay Looney 2025-12-02 15:07:14 -06:00
parent 26f35df7ad
commit aa4a8347ec
11 changed files with 67 additions and 29 deletions

View file

@ -1,18 +1,23 @@
{ config, pkgs, lib, ... }:
{
nixpkgs.config.allowUnfree = true;
# TODO: Consider adding a randomized delay.
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
nix.settings = {
auto-optimise-store = true;
experimental-features = [ "nix-command" "flakes" ];
};
# Default to systemd-boot
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# https://datatracker.ietf.org/doc/html/rfc8375
networking.domain = "home.arpa";
networking.domain = lib.mkDefault "home.arpa";
time.timeZone = "America/Chicago";
# TODO: Consider enabling automatic-timezoned on laptops that move between TZs
time.timeZone = lib.mkDefault "America/Chicago";
services.automatic-timezoned.enable = lib.mkDefault false;
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
@ -73,38 +78,39 @@
];
# Render colors
# TODO: Figure out how to represent those termcap sequences properly.
#LESS_TERMCAP_mb=$'\E[1;31m' # begin bold
#LESS_TERMCAP_md=$'\E[1;36m' # begin blink
#LESS_TERMCAP_me=$'\E[0m' # reset bold/blink
#LESS_TERMCAP_so=$'\E[01;44;33m' # begin reverse video
#LESS_TERMCAP_se=$'\E[0m' # reset reverse video
#LESS_TERMCAP_us=$'\E[1;32m' # begin underline
#LESS_TERMCAP_ue=$'\E[0m' # reset underline
LESS_TERMCAP_mb="\E[1;31m"; # begin bold
LESS_TERMCAP_md="\E[1;36m"; # begin blink
LESS_TERMCAP_me="\E[0m"; # reset bold/blink
LESS_TERMCAP_so="\E[01;44;33m"; # begin reverse video
LESS_TERMCAP_se="\E[0m"; # reset reverse video
LESS_TERMCAP_us="\E[1;32m"; # begin underline
LESS_TERMCAP_ue="\E[0m"; # reset underline
};
};
git.enable = true;
htop.enable = true;
command-not-found.enable = false;
bat.enable = true;
bandwhich.enable = true;
command-not-found.enable = false;
#nix-index.enable = true;
nano.enable = false;
neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
withRuby = true;
withPython3 = true;
withNodeJs = true;
#configure = {};
};
};
# Services running on all machines
services.avahi.enable = true; # zeroconf/mDNS(.local)
services.openssh.enable = lib.mkDefault false;
# services.openssh = {
# enable = true;
# settings = {
# PasswordAuthentication = false;
# PermitRootLogin = "no";
# };
# };
}

View file

@ -2,12 +2,14 @@
{
imports = [
./calibre.nix
./fonts.nix
../fonts.nix
];
# TODO: Add options for enabling/switching between different Desktop Environments.
options = {};
# options = {};
# NOTE: Calibre is enabled this way because it also needs udisks2 for e-readers
# Ideally I move it somewhere else anyway.
zw.calibre.enable = true;
environment.systemPackages = with pkgs; [
@ -41,4 +43,5 @@
};
# screen sharing /w hyp
services.dbus.enable = true;
services.avahi.enable = true; # zeroconf/mDNS(.local)
}

View file

@ -1,4 +1,4 @@
{pkgs}:
{ pkgs, ... }:
{
fonts.packages = with pkgs; [
nerd-fonts.fira-code