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" ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
imports = [ inputs.impermanence.nixosModules.impermanence ];
|
||||
|
||||
environment.persistence = {
|
||||
"/persist" = {
|
||||
directories = [ "/var/lib/nixos" ];
|
||||
|
||||
7
common/lxc-node.nix
Normal file
7
common/lxc-node.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
imports = [
|
||||
];
|
||||
|
||||
custom.tailscale.enable = false;
|
||||
proxmoxLXC.manageNetwork = true;
|
||||
}
|
||||
Reference in New Issue
Block a user