initial commit
This commit is contained in:
36
hosts/common/core/nixos.nix
Normal file
36
hosts/common/core/nixos.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
# Core functionality for every nixos host
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
# Database for aiding terminal-based programs
|
||||
environment.enableAllTerminfo = true;
|
||||
# Enable firmware with a license allowing redistribution
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
# This should be handled by config.security.pam.sshAgentAuth.enable
|
||||
security.sudo.extraConfig = ''
|
||||
Defaults lecture = never # rollback results in sudo lectures after each reboot, it's somewhat useless anyway
|
||||
Defaults pwfeedback # password input feedback - makes typed password visible as asterisks
|
||||
Defaults timestamp_timeout=120 # only ask for password every 2h
|
||||
# Keep SSH_AUTH_SOCK so that pam_ssh_agent_auth.so can do its magic.
|
||||
Defaults env_keep+=SSH_AUTH_SOCK
|
||||
'';
|
||||
|
||||
#
|
||||
# ========== Nix Helper ==========
|
||||
#
|
||||
# Provide better build output and will also handle garbage collection in place of standard nix gc (garbace collection)
|
||||
# FIXME(starter): customize garbage collection rules as desired.
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
clean.enable = true;
|
||||
clean.extraArgs = "--keep-since 20d --keep 20";
|
||||
flake = "/home/user/${config.hostSpec.home}/nix-config";
|
||||
};
|
||||
|
||||
#
|
||||
# ========== Localization ==========
|
||||
#
|
||||
# FIXME(starter): customize localization values as desired.
|
||||
i18n.defaultLocale = lib.mkDefault "en_US.UTF-8";
|
||||
time.timeZone = lib.mkDefault "America/Edmonton";
|
||||
}
|
||||
Reference in New Issue
Block a user