2024-03-30 14:48:48 -04:00
|
|
|
{ config, pkgs, lib, ... }:
|
2024-02-29 17:06:55 -05:00
|
|
|
|
|
|
|
{
|
2024-03-30 14:49:40 -04:00
|
|
|
imports =
|
|
|
|
[ ./network.nix ./sound.nix ./plymouth ./power-profiles-daemon ./zramSwap ];
|
2024-03-30 14:48:48 -04:00
|
|
|
|
|
|
|
systemConfig.power-profiles-daemon.enable = lib.mkDefault true;
|
2024-03-16 13:18:17 -04:00
|
|
|
|
2024-03-01 21:54:34 -05:00
|
|
|
# Set your time zone.
|
|
|
|
time.timeZone = "America/New_York";
|
|
|
|
|
|
|
|
# Select internationalisation properties.
|
2024-03-16 13:18:17 -04:00
|
|
|
i18n = {
|
|
|
|
defaultLocale = "en_US.UTF-8";
|
|
|
|
extraLocaleSettings = {
|
|
|
|
LC_ADDRESS = "en_US.UTF-8";
|
|
|
|
LC_IDENTIFICATION = "en_US.UTF-8";
|
|
|
|
LC_MEASUREMENT = "en_US.UTF-8";
|
|
|
|
LC_MONETARY = "en_US.UTF-8";
|
|
|
|
LC_NAME = "en_US.UTF-8";
|
|
|
|
LC_NUMERIC = "en_US.UTF-8";
|
|
|
|
LC_PAPER = "en_US.UTF-8";
|
|
|
|
LC_TELEPHONE = "en_US.UTF-8";
|
|
|
|
LC_TIME = "en_US.UTF-8";
|
|
|
|
};
|
2024-03-01 21:54:34 -05:00
|
|
|
};
|
2024-03-01 21:38:19 -05:00
|
|
|
|
2024-03-16 13:18:17 -04:00
|
|
|
hardware = {
|
|
|
|
# Enable Bluetooth connections.
|
|
|
|
bluetooth.enable = true;
|
|
|
|
# Add support for logitech unifying receivers.
|
|
|
|
logitech.wireless = {
|
|
|
|
enable = true;
|
|
|
|
enableGraphical = true;
|
|
|
|
};
|
|
|
|
# Add support for configuring QMK keyboards with Via.
|
|
|
|
keyboard.qmk.enable = true;
|
|
|
|
};
|
2024-03-11 18:37:01 -04:00
|
|
|
|
2024-03-26 17:24:31 -04:00
|
|
|
services.logind.extraConfig = ''
|
2024-03-29 07:41:04 -04:00
|
|
|
# Don't shutdown when power button is short-pressed
|
2024-03-26 17:24:31 -04:00
|
|
|
HandlePowerKey=suspend
|
|
|
|
HandlePowerKeyLongPress=poweroff
|
|
|
|
'';
|
|
|
|
|
2024-03-23 15:22:06 -04:00
|
|
|
security.polkit.enable = true;
|
|
|
|
|
2024-02-29 17:06:55 -05:00
|
|
|
# Allow unfree packages
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
|
2024-03-01 12:13:33 -05:00
|
|
|
system.autoUpgrade = {
|
2024-03-12 21:52:11 -04:00
|
|
|
allowReboot = true;
|
2024-03-29 07:41:04 -04:00
|
|
|
dates = "04:00";
|
2024-03-16 13:18:17 -04:00
|
|
|
enable = true;
|
|
|
|
flake = "github:alyraffauf/nixcfg";
|
2024-03-12 21:52:11 -04:00
|
|
|
operation = "boot";
|
2024-03-15 09:20:18 -04:00
|
|
|
rebootWindow = {
|
2024-03-16 13:18:17 -04:00
|
|
|
lower = "02:00";
|
2024-03-29 07:48:06 -04:00
|
|
|
upper = "05:00";
|
2024-03-15 09:36:01 -04:00
|
|
|
};
|
2024-03-01 12:13:33 -05:00
|
|
|
};
|
2024-02-29 17:06:55 -05:00
|
|
|
|
2024-03-16 13:18:17 -04:00
|
|
|
nix = {
|
|
|
|
gc = {
|
|
|
|
# Delete generations older than 7 days.
|
|
|
|
automatic = true;
|
|
|
|
dates = "daily";
|
|
|
|
options = "--delete-older-than 7d";
|
|
|
|
randomizedDelaySec = "60min";
|
|
|
|
};
|
|
|
|
# Run GC when there is less than 100MiB left.
|
|
|
|
extraOptions = ''
|
|
|
|
min-free = ${toString (100 * 1024 * 1024)}
|
|
|
|
max-free = ${toString (1024 * 1024 * 1024)}
|
|
|
|
'';
|
|
|
|
settings = {
|
|
|
|
# Automatically optimize the Nix store in the background.
|
|
|
|
auto-optimise-store = true;
|
|
|
|
# Enable experimental `nix` command and flakes.
|
|
|
|
experimental-features = [ "nix-command" "flakes" ];
|
2024-03-24 14:07:13 -04:00
|
|
|
substituters =
|
|
|
|
[ "https://nixcache.raffauflabs.com" "https://cache.nixos.org/" ];
|
2024-03-20 18:14:37 -04:00
|
|
|
trusted-public-keys = [
|
|
|
|
"nixcache.raffauflabs.com:yFIuJde/izA4aUDI3MZmBLzynEsqVCT1OfCUghOLlt8="
|
|
|
|
];
|
2024-03-16 13:18:17 -04:00
|
|
|
};
|
|
|
|
};
|
2024-02-29 17:06:55 -05:00
|
|
|
}
|