2024-02-27 16:11:10 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
2022-06-07 00:51:35 +00:00
|
|
|
{
|
|
|
|
imports = [
|
2024-06-04 14:12:28 +00:00
|
|
|
./boot.nix
|
2023-01-08 05:24:56 +00:00
|
|
|
./feeds.nix
|
2022-11-22 04:29:17 +00:00
|
|
|
./fs.nix
|
2023-01-27 07:01:23 +00:00
|
|
|
./home
|
2023-09-19 15:32:31 +00:00
|
|
|
./hosts.nix
|
2023-01-08 06:46:07 +00:00
|
|
|
./ids.nix
|
2022-11-22 04:29:17 +00:00
|
|
|
./machine-id.nix
|
2024-01-15 01:11:13 +00:00
|
|
|
./net
|
2024-06-12 23:32:18 +00:00
|
|
|
./nix.nix
|
2023-01-31 03:28:59 +00:00
|
|
|
./persist.nix
|
2024-02-19 06:20:06 +00:00
|
|
|
./polyunfill.nix
|
2023-04-25 23:28:21 +00:00
|
|
|
./programs
|
2024-06-04 14:14:14 +00:00
|
|
|
./quirks.nix
|
2022-11-22 03:37:57 +00:00
|
|
|
./secrets.nix
|
2022-11-22 04:29:17 +00:00
|
|
|
./ssh.nix
|
2024-02-20 12:18:28 +00:00
|
|
|
./systemd.nix
|
2023-06-28 03:21:05 +00:00
|
|
|
./users
|
2022-06-07 00:51:35 +00:00
|
|
|
];
|
2022-11-22 03:07:11 +00:00
|
|
|
|
2024-06-04 14:58:55 +00:00
|
|
|
|
|
|
|
# docs: https://nixos.org/manual/nixos/stable/options.html#opt-system.stateVersion
|
|
|
|
# this affects where nixos modules look for stateful data which might have been migrated across releases.
|
|
|
|
system.stateVersion = "21.11";
|
|
|
|
|
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;
|
2023-03-11 08:36:14 +00:00
|
|
|
sane.persist.enable = lib.mkDefault true;
|
2023-11-09 00:15:30 +00:00
|
|
|
sane.root-on-tmpfs = lib.mkDefault true;
|
2023-02-21 01:11:30 +00:00
|
|
|
sane.programs.sysadminUtils.enableFor.system = lib.mkDefault true;
|
|
|
|
sane.programs.consoleUtils.enableFor.user.colin = lib.mkDefault true;
|
2022-11-22 03:09:41 +00:00
|
|
|
|
2022-11-22 04:51:03 +00:00
|
|
|
# time.timeZone = "America/Los_Angeles";
|
|
|
|
time.timeZone = "Etc/UTC"; # DST is too confusing for me => use a stable timezone
|
|
|
|
|
2023-07-07 23:34:12 +00:00
|
|
|
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>
|
2023-12-01 01:51:37 +00:00
|
|
|
# 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
|
2023-07-07 23:34:12 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2022-11-22 04:51:03 +00:00
|
|
|
# link debug symbols into /run/current-system/sw/lib/debug
|
|
|
|
# hopefully picked up by gdb automatically?
|
|
|
|
environment.enableDebugInfo = true;
|
2022-06-07 00:51:35 +00:00
|
|
|
}
|