dotfiles/modules/nixos/system/default.nix

21 lines
525 B
Nix
Raw Normal View History

2022-12-21 21:18:03 +00:00
{ config, pkgs, lib, ... }: {
2022-07-26 03:15:26 +00:00
imports = [ ./user.nix ./timezone.nix ./doas.nix ];
2022-12-21 21:18:03 +00:00
config = lib.mkIf pkgs.stdenv.isLinux {
# Pin a state version to prevent warnings
system.stateVersion =
config.home-manager.users.${config.user}.home.stateVersion;
2023-04-19 20:47:36 +00:00
# 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";
2022-12-21 21:18:03 +00:00
};
2022-07-26 03:15:26 +00:00
}