mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-09-19 08:11:26 +02:00
* feat(btrbk): make snapshots explicit and guarded Replace the always-on, hardcoded module with modules.btrbk options (enable/volume/subvolume/snapshotDir/target/onCalendar), and assert the btrfs top-level subvolume is mounted so a missing mount fails evaluation instead of silently failing at runtime. Store snapshots in the @snapshots subvolume (snapshot_dir=@snapshots) rather than next to the live subvolume, make the off-host target explicit and off by default, and document that local snapshots are not off-host backups. Enable the feature explicitly on idols-ai, shoukei and the three kubevirt hosts; qemu-guest now disables it through the option. Add eval tests for shoukei and ai. * feat(monitoring): alert on btrbk snapshot failure Add HostBtrbkSnapshotFailed on node_systemd_unit_state for btrbk-btrbk.service, so a broken snapshot schedule alerts instead of only surfacing in the journal.
48 lines
1.4 KiB
Nix
48 lines
1.4 KiB
Nix
{
|
||
lib,
|
||
myvars,
|
||
...
|
||
}:
|
||
#############################################################
|
||
#
|
||
# Shoukei - NixOS running on Macbook Pro 2022 M2 16G
|
||
#
|
||
#############################################################
|
||
let
|
||
hostName = "shoukei"; # Define your hostname.
|
||
in
|
||
{
|
||
imports = [
|
||
./hardware-configuration.nix
|
||
../idols-ai/preservation.nix
|
||
];
|
||
|
||
# disable sunshine for securrity
|
||
services.sunshine.enable = lib.mkForce false;
|
||
services.tuned.ppdSettings.main.default = lib.mkForce "power-saver";
|
||
|
||
# Laptop joins untrusted networks and is no longer scraped; don't expose :9100.
|
||
services.prometheus.exporters.node.enable = lib.mkForce false;
|
||
|
||
networking = {
|
||
inherit hostName;
|
||
inherit (myvars.networking) nameservers;
|
||
};
|
||
|
||
fileSystems."/btr_pool" = {
|
||
device = "/dev/disk/by-uuid/c2e8b249-240e-4eef-bf4e-81e7dbbf4887";
|
||
fsType = "btrfs";
|
||
options = [ "subvolid=5" ];
|
||
};
|
||
|
||
modules.btrbk.enable = true;
|
||
|
||
# This value determines the NixOS release from which the default
|
||
# settings for stateful data, like file locations and database versions
|
||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||
# this value at the release version of the first install of this system.
|
||
# Before changing this value read the documentation for this option
|
||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||
system.stateVersion = "25.11"; # Did you read the comment?
|
||
}
|