nixos-config/hosts/common.nix

62 lines
1.7 KiB
Nix
Raw Permalink Normal View History

2025-01-22 18:53:05 -05:00
{ inputs, ... }:
2024-12-19 02:32:58 -05:00
{
2024-12-13 22:26:27 -05:00
nix = {
settings = {
experimental-features = "nix-command flakes";
auto-optimise-store = true;
flake-registry = "";
2025-01-10 23:17:27 -05:00
trusted-users = [
"root"
"@wheel"
];
trusted-public-keys = [
"central:uWhjva6m6dhC2hqNisjn2hXGvdGBs19vPkA1dPEuwFg="
"niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
"cything.cachix.org-1:xqW1W5NNL+wrM9wfSELb0MLj/harD2ZyB4HbdaMyvPI="
];
substituters = [
"https://aseipp-nix-cache.global.ssl.fastly.net"
"https://cache.cything.io/central"
"https://niri.cachix.org"
"https://nix-community.cachix.org"
"https://cache.garnix.io"
"https://cything.cachix.org"
];
2024-12-13 22:26:27 -05:00
};
channel.enable = false;
optimise = {
automatic = true;
2024-12-19 02:32:58 -05:00
dates = [ "03:45" ];
2024-12-13 22:26:27 -05:00
};
gc = {
automatic = true;
dates = "19:00";
persistent = true;
2024-12-23 17:18:18 -05:00
options = "--delete-older-than 14d";
2024-12-13 22:26:27 -05:00
};
2025-01-05 06:58:28 -05:00
extraOptions = ''
builders-use-substitutes = true
'';
2025-01-22 18:53:05 -05:00
registry.nixpkgs.flake = inputs.nixpkgs;
2024-12-13 22:26:27 -05:00
};
time.timeZone = "America/Toronto";
2024-12-16 20:36:32 -05:00
networking.firewall.logRefusedConnections = false;
2025-01-07 22:41:29 -05:00
networking.nameservers = [
# quad9
"2620:fe::fe"
"2620:fe::9"
"9.9.9.9"
"149.112.112.112"
];
2024-12-22 21:07:38 -05:00
# this is true by default and mutually exclusive with
# programs.nix-index
programs.command-not-found.enable = false;
2024-12-30 18:06:16 -05:00
programs.nix-index.enable = false; # set above to false to use this
2024-12-29 01:10:11 -05:00
# see journald.conf(5)
services.journald.extraConfig = "MaxRetentionSec=2d";
2024-12-13 22:26:27 -05:00
}