WIP: Proxmox LXC config.
Includes some refactoring for tailscale and impermanence.
This commit is contained in:
@@ -1,12 +1,21 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.tailscale;
|
||||
in
|
||||
{
|
||||
imports = [ ./tailscale_lib.nix ];
|
||||
|
||||
services.tailscaleAutoconnect.enable = true;
|
||||
options.custom.tailscale = {
|
||||
enable = mkEnableOption {
|
||||
description = "Enable Tailscale";
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.tailscale.package = pkgs.unstable.tailscale;
|
||||
|
||||
environment.persistence."/persist".directories = [ "/var/lib/tailscale" ];
|
||||
config = mkIf cfg.enable {
|
||||
services.tailscaleAutoconnect.enable = true;
|
||||
services.tailscale.package = pkgs.unstable.tailscale;
|
||||
environment.persistence."/persist".directories = [ "/var/lib/tailscale" ];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user