mirror of
https://github.com/nmasur/dotfiles
synced 2024-12-25 18:14:52 +00:00
ed19eaafd1
only sleep again for non-servers
21 lines
525 B
Nix
21 lines
525 B
Nix
{ config, pkgs, lib, ... }: {
|
|
|
|
imports = [ ./user.nix ./timezone.nix ./doas.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";
|
|
|
|
};
|
|
|
|
}
|