golgi/modules/common.nix

44 lines
1.1 KiB
Nix
Raw Permalink Normal View History

2022-07-29 15:42:48 +00:00
{ config, pkgs, inputs, ... }:
{
time.timeZone = "UTC";
2023-06-26 12:56:17 +00:00
services.openssh.enable = true;
2022-09-19 16:57:06 +00:00
services.journald.extraConfig = ''
SystemMaxUse=1G
SystemMaxFileSize=100M
MaxFileSec=1day
MaxRetentionSec=2months
''; # Limit journal accumulation
2023-06-26 13:28:33 +00:00
system.stateVersion = "23.05";
2022-07-29 15:42:48 +00:00
nix = {
# Currently needed for flake support, might not be needed in the future
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command flakes
2023-06-26 13:28:13 +00:00
min-free = ${toString (500 * 1024 * 1024)}
2022-07-29 15:42:48 +00:00
'';
2022-09-19 16:56:45 +00:00
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
settings.auto-optimise-store = true;
2022-07-29 15:42:48 +00:00
# from flake-utils-plus
# Sets NIX_PATH to follow this flake's nix inputs
# So legacy nix-channel is not needed
generateNixPathFromInputs = true;
linkInputs = true;
# Pin our nixpkgs flake to the one used to build the system
generateRegistryFromInputs = true;
};
# Set the system revision to the flake revision
# You can query this value with: $ nix-info -m
system.configurationRevision = (if inputs.self ? rev then inputs.self.rev else null);
}