infra/modules/darwin/common/default.nix

53 lines
1.1 KiB
Nix
Raw Normal View History

2023-07-17 13:53:06 +10:00
{ pkgs, ... }:
{
imports = [
./flake-inputs.nix
2023-07-21 20:12:20 +10:00
./reboot.nix
2023-07-17 13:53:06 +10:00
./telegraf.nix
2023-07-29 17:37:07 +10:00
../../shared/nix-daemon.nix
2023-07-17 13:53:06 +10:00
];
2023-07-29 09:29:02 +10:00
# use the same version as srvos
# https://github.com/numtide/srvos/blob/main/nixos/common/nix.nix#L4
nix.package = pkgs.nixVersions.nix_2_16;
2023-07-17 13:53:06 +10:00
services.nix-daemon.enable = true;
programs.zsh.enable = true;
documentation.enable = false;
programs.info.enable = false;
nix.settings.trusted-users = [
"@admin"
];
2023-07-29 17:37:07 +10:00
# srvos
2023-07-17 13:53:06 +10:00
nix.settings.builders-use-substitutes = true;
2023-07-29 17:37:07 +10:00
# srvos
2023-07-17 13:53:06 +10:00
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
environment.systemPackages = with pkgs; [
htop
];
# srvos
services.openssh.authorizedKeysFiles = pkgs.lib.mkForce [ "/etc/ssh/authorized_keys.d/%u" ];
# srvos
environment.etc."ssh/sshd_config.d/darwin.conf".text = ''
KbdInteractiveAuthentication no
PasswordAuthentication no
'';
2023-07-17 13:53:06 +10:00
# works but displays error message during activation
# https://github.com/LnL7/nix-darwin/issues/359
# sudo systemsetup -settimezone 'GMT'
#time.timeZone = "GMT";
}