nix-files/hosts/common/default.nix

51 lines
1.5 KiB
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
{
imports = [
2023-01-08 05:24:56 +00:00
./feeds.nix
./fs.nix
./hardware
./home
./hosts.nix
./ids.nix
./machine-id.nix
./net
2024-02-20 12:13:52 +00:00
./nix
./persist.nix
./polyunfill.nix
2023-04-25 23:28:21 +00:00
./programs
2022-11-22 03:37:57 +00:00
./secrets.nix
./ssh.nix
./systemd.nix
2023-06-28 03:21:05 +00:00
./users
];
2022-11-22 03:07:11 +00:00
sane.nixcache.enable-trusted-keys = true;
2023-03-04 08:19:41 +00:00
sane.nixcache.enable = lib.mkDefault true;
sane.persist.enable = lib.mkDefault true;
sane.root-on-tmpfs = lib.mkDefault true;
sane.programs.sysadminUtils.enableFor.system = lib.mkDefault true;
sane.programs.consoleUtils.enableFor.user.colin = lib.mkDefault true;
2023-11-28 08:05:19 +00:00
nixpkgs.config.allowUnfree = true; # NIXPKGS_ALLOW_UNFREE=1
nixpkgs.config.allowBroken = true; # NIXPKGS_ALLOW_BROKEN=1
# time.timeZone = "America/Los_Angeles";
time.timeZone = "Etc/UTC"; # DST is too confusing for me => use a stable timezone
system.activationScripts.nixClosureDiff = {
supportsDryActivation = true;
text = ''
# show which packages changed versions or are new/removed in this upgrade
# source: <https://github.com/luishfonseca/dotfiles/blob/32c10e775d9ec7cc55e44592a060c1c9aadf113e/modules/upgrade-diff.nix>
# modified to not error on boot (when /run/current-system doesn't exist)
if [ -d /run/current-system ]; then
${pkgs.nvd}/bin/nvd --nix-bin-dir=${pkgs.nix}/bin diff /run/current-system "$systemConfig"
fi
'';
};
# link debug symbols into /run/current-system/sw/lib/debug
# hopefully picked up by gdb automatically?
environment.enableDebugInfo = true;
}