infra/modules/nixos/common/default.nix

48 lines
1.1 KiB
Nix
Raw Normal View History

2024-07-24 19:05:26 +10:00
{
config,
inputs,
pkgs,
...
}:
2019-08-11 19:53:02 +01:00
{
2021-01-21 16:28:48 +01:00
imports = [
2024-03-16 11:52:48 +10:00
./comin.nix
2024-03-10 09:26:39 +10:00
../../shared/known-hosts.nix
2023-07-29 17:37:07 +10:00
../../shared/nix-daemon.nix
./reboot.nix
2021-01-21 16:28:48 +01:00
./security.nix
2022-12-03 12:45:45 +10:00
./sops-nix.nix
2024-05-04 18:51:58 +10:00
./telegraf.nix
./users.nix
2023-05-16 09:53:27 +10:00
inputs.sops-nix.nixosModules.sops
2024-07-09 11:41:05 +10:00
inputs.agenix.nixosModules.age
2023-05-16 09:53:27 +10:00
inputs.srvos.nixosModules.server
2019-08-12 11:33:34 +02:00
];
2023-07-29 17:37:07 +10:00
# users in trusted group are trusted by the nix-daemon
nix.settings.trusted-users = [ "@trusted" ];
users.groups.trusted = { };
# Sometimes it fails if a store path is still in use.
# This should fix intermediate issues.
systemd.services.nix-gc.serviceConfig = {
Restart = "on-failure";
};
2024-07-24 19:05:26 +10:00
boot.kernelPackages = pkgs.lib.mkIf (
!config.boot.supportedFilesystems.zfs or false
) pkgs.linuxPackages_latest;
zramSwap.enable = true;
security.acme.defaults.email = "trash@nix-community.org";
2021-03-04 10:55:37 +01:00
security.acme.acceptTerms = true;
# Without configuration this unit will fail...
# Just disable it since we are using telegraf to monitor raid health.
systemd.services.mdmonitor.enable = false;
2022-08-13 11:13:06 +02:00
networking.domain = "nix-community.org";
2019-08-11 19:53:02 +01:00
}