mirror of
				https://github.com/Jokiller230/puzzlevision.git
				synced 2025-11-04 07:38:47 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			31 lines
		
	
	
	
		
			709 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
	
		
			709 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
{
 | 
						|
  lib,
 | 
						|
  namespace,
 | 
						|
  config,
 | 
						|
  host,
 | 
						|
  ...
 | 
						|
}:
 | 
						|
let
 | 
						|
  inherit (lib) mkEnableOption mkIf;
 | 
						|
  cfg = config.${namespace}.services.duckdns;
 | 
						|
in {
 | 
						|
  options.${namespace}.services.duckdns = {
 | 
						|
    enable = mkEnableOption "Enable DuckDNS, the dynamic dns service. Will periodically refresh your IP.";
 | 
						|
  };
 | 
						|
 | 
						|
  config = mkIf cfg.enable {
 | 
						|
    sops.secrets.duckdns = {
 | 
						|
      sopsFile = lib.snowfall.fs.get-file "secrets/duckdns.service.env";
 | 
						|
      format = "dotenv";
 | 
						|
    };
 | 
						|
 | 
						|
    virtualisation.oci-containers.containers.duckdns = {
 | 
						|
      image = "lscr.io/linuxserver/duckdns:latest";
 | 
						|
      autoStart = true;
 | 
						|
      hostname = host;
 | 
						|
      environmentFiles = [
 | 
						|
        config.sops.secrets.duckdns.path
 | 
						|
      ];
 | 
						|
    };
 | 
						|
  };
 | 
						|
}
 |