mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 18:23:54 -05:00
122 lines
2.4 KiB
Nix
122 lines
2.4 KiB
Nix
|
inputs: {
|
||
|
config,
|
||
|
lib,
|
||
|
pkgs,
|
||
|
...
|
||
|
}: {
|
||
|
imports = [./nixpkgs.nix];
|
||
|
|
||
|
console.useXkbConfig = true;
|
||
|
|
||
|
environment.systemPackages = with pkgs; [
|
||
|
inputs.agenix.packages.${pkgs.system}.default
|
||
|
inxi
|
||
|
];
|
||
|
|
||
|
i18n = {
|
||
|
defaultLocale = lib.mkDefault "en_US.UTF-8";
|
||
|
extraLocaleSettings = {
|
||
|
LC_ADDRESS = config.i18n.defaultLocale;
|
||
|
LC_IDENTIFICATION = config.i18n.defaultLocale;
|
||
|
LC_MEASUREMENT = config.i18n.defaultLocale;
|
||
|
LC_MONETARY = config.i18n.defaultLocale;
|
||
|
LC_NAME = config.i18n.defaultLocale;
|
||
|
LC_NUMERIC = config.i18n.defaultLocale;
|
||
|
LC_PAPER = config.i18n.defaultLocale;
|
||
|
LC_TELEPHONE = config.i18n.defaultLocale;
|
||
|
LC_TIME = config.i18n.defaultLocale;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
hardware.keyboard.qmk.enable = true;
|
||
|
|
||
|
programs = {
|
||
|
gnupg.agent = {
|
||
|
enable = true;
|
||
|
enableSSHSupport = true;
|
||
|
};
|
||
|
|
||
|
nh.enable = true;
|
||
|
};
|
||
|
|
||
|
nix = {
|
||
|
gc = {
|
||
|
automatic = true;
|
||
|
dates = "daily";
|
||
|
options = "--delete-older-than 3d";
|
||
|
persistent = true;
|
||
|
randomizedDelaySec = "60min";
|
||
|
};
|
||
|
|
||
|
# Run GC when there is less than 100MiB left.
|
||
|
extraOptions = ''
|
||
|
min-free = ${toString (100 * 1024 * 1024)}
|
||
|
max-free = ${toString (1024 * 1024 * 1024)}
|
||
|
'';
|
||
|
|
||
|
optimise.automatic = true;
|
||
|
|
||
|
settings = {
|
||
|
auto-optimise-store = false;
|
||
|
experimental-features = ["nix-command" "flakes"];
|
||
|
};
|
||
|
};
|
||
|
|
||
|
security = {
|
||
|
polkit.enable = true;
|
||
|
rtkit.enable = true;
|
||
|
};
|
||
|
|
||
|
services = {
|
||
|
avahi = {
|
||
|
enable = true;
|
||
|
nssmdns4 = true;
|
||
|
openFirewall = true;
|
||
|
publish = {
|
||
|
enable = true;
|
||
|
addresses = true;
|
||
|
userServices = true;
|
||
|
workstation = true;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
logind.extraConfig = ''
|
||
|
# Don't shutdown when power button is short-pressed
|
||
|
HandlePowerKey=suspend
|
||
|
HandlePowerKeyLongPress=poweroff
|
||
|
'';
|
||
|
|
||
|
openssh = {
|
||
|
enable = true;
|
||
|
openFirewall = true;
|
||
|
settings.PasswordAuthentication = false;
|
||
|
};
|
||
|
|
||
|
printing.enable = true;
|
||
|
|
||
|
system-config-printer.enable = true;
|
||
|
};
|
||
|
|
||
|
sound.enable = true;
|
||
|
|
||
|
system.autoUpgrade = {
|
||
|
allowReboot = true;
|
||
|
dates = "04:00";
|
||
|
randomizedDelaySec = "20min";
|
||
|
enable = true;
|
||
|
flake = "github:alyraffauf/nixcfg";
|
||
|
operation = "boot";
|
||
|
rebootWindow = {
|
||
|
lower = "02:00";
|
||
|
upper = "05:00";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
time.timeZone = "America/New_York";
|
||
|
|
||
|
zramSwap = {
|
||
|
enable = lib.mkDefault true;
|
||
|
memoryPercent = lib.mkDefault 50;
|
||
|
};
|
||
|
}
|