dotfiles/modules/nixos/system/default.nix
2023-06-05 03:09:38 +00:00

21 lines
540 B
Nix

{ config, pkgs, lib, ... }: {
imports = [ ./doas.nix ./journald.nix ./user.nix ./timezone.nix ];
config = lib.mkIf pkgs.stdenv.isLinux {
# Pin a state version to prevent warnings
system.stateVersion =
config.home-manager.users.${config.user}.home.stateVersion;
# This setting only applies to NixOS, different on Darwin
nix.gc.dates = "weekly";
systemd.timers.nix-gc.timerConfig = { WakeSystem = true; };
systemd.services.nix-gc.postStop =
lib.mkIf (!config.server) "systemctl suspend";
};
}