(untested) config for stinky and diff script.

This commit is contained in:
2025-10-27 12:21:57 +00:00
parent 32a22c783d
commit 762037d17f
22 changed files with 899 additions and 37 deletions

View File

@@ -5,6 +5,7 @@
./console.nix
./cpufreq.nix
./flakes.nix
./impermanence-options.nix
./kernel.nix
./locale.nix
./network.nix

View File

@@ -0,0 +1,14 @@
{
lib,
...
}:
{
# Define impermanence options that need to be available to all modules
# The actual impermanence implementation is in common/impermanence.nix or common/impermanence-tmpfs.nix
options.custom.impermanence.persistPath = lib.mkOption {
type = lib.types.str;
default = "/persist";
description = "Path where persistent data is stored (e.g., /persist for btrfs, /nix/persist for tmpfs)";
};
}

View File

@@ -1,4 +1,4 @@
{ lib, ... }:
{ lib, config, ... }:
{
networking = {
useDHCP = true;
@@ -10,7 +10,7 @@
'';
};
environment.persistence."/persist" = {
environment.persistence.${config.custom.impermanence.persistPath} = {
directories = [ "/var/db/dhcpcd" ];
};
}

View File

@@ -22,6 +22,6 @@ in
config = mkIf cfg.enable {
services.tailscaleAutoconnect.enable = true;
services.tailscale.package = pkgs.unstable.tailscale;
environment.persistence."/persist".directories = [ "/var/lib/tailscale" ];
environment.persistence.${config.custom.impermanence.persistPath}.directories = [ "/var/lib/tailscale" ];
};
}