container friendly passing of current system
This commit is contained in:
		
							parent
							
								
									b7f6576d64
								
							
						
					
					
						commit
						be2828ee29
					
				| @ -2,7 +2,7 @@ | |||||||
| 
 | 
 | ||||||
| let | let | ||||||
|   cfg = config.services.radio; |   cfg = config.services.radio; | ||||||
|   radioPackage = config.inputs.radio.packages.${builtins.currentSystem}.radio; |   radioPackage = config.inputs.radio.packages.${config.currentSystem}.radio; | ||||||
| in { | in { | ||||||
|   options.services.radio = { |   options.services.radio = { | ||||||
|     enable = lib.mkEnableOption "enable radio"; |     enable = lib.mkEnableOption "enable radio"; | ||||||
|  | |||||||
| @ -33,12 +33,13 @@ | |||||||
|             ./common/common.nix |             ./common/common.nix | ||||||
|             inputs.simple-nixos-mailserver.nixosModule |             inputs.simple-nixos-mailserver.nixosModule | ||||||
|             inputs.agenix.nixosModules.age |             inputs.agenix.nixosModules.age | ||||||
|             { |             ({ lib, ... }: { | ||||||
|               environment.systemPackages = [ inputs.agenix.defaultPackage.${system} ]; |               environment.systemPackages = [ inputs.agenix.defaultPackage.${system} ]; | ||||||
|                |                | ||||||
|               # because nixos specialArgs doesn't work for containers... need to pass in inputs a different way |               # because nixos specialArgs doesn't work for containers... need to pass in inputs a different way | ||||||
|               options.inputs = lib.mkOption { default = inputs; }; |               options.inputs = lib.mkOption { default = inputs; }; | ||||||
|             } |               options.currentSystem = lib.mkOption { default = system; }; | ||||||
|  |             }) | ||||||
|           ]; |           ]; | ||||||
|           # specialArgs = {}; |           # specialArgs = {}; | ||||||
|         }; |         }; | ||||||
|  | |||||||
| @ -147,16 +147,20 @@ in { | |||||||
|         ../../common/common.nix |         ../../common/common.nix | ||||||
|         config.inputs.agenix.nixosModules.age |         config.inputs.agenix.nixosModules.age | ||||||
|       ]; |       ]; | ||||||
|       pia.enable = true; |  | ||||||
|       nixpkgs.pkgs = pkgs; |  | ||||||
| 
 | 
 | ||||||
|       # because nixos specialArgs doesn't work for containers... need to pass in inputs a different way |       # because nixos specialArgs doesn't work for containers... need to pass in inputs a different way | ||||||
|       options.inputs = lib.mkOption { default = config.inputs; }; |       options.inputs = lib.mkOption { default = config.inputs; }; | ||||||
|  |       options.currentSystem = lib.mkOption { default = currentSystem; }; | ||||||
| 
 | 
 | ||||||
|       services.drastikbot.enable = true; |       config = { | ||||||
|       services.radio = { |         pia.enable = true; | ||||||
|         enable = true; |         nixpkgs.pkgs = pkgs; | ||||||
|         host = "radio.neet.space"; | 
 | ||||||
|  |         services.drastikbot.enable = true; | ||||||
|  |         services.radio = { | ||||||
|  |           enable = true; | ||||||
|  |           host = "radio.neet.space"; | ||||||
|  |         }; | ||||||
|       }; |       }; | ||||||
|     }; |     }; | ||||||
|   }; |   }; | ||||||
|  | |||||||
| @ -49,25 +49,29 @@ | |||||||
|         ../../common/common.nix |         ../../common/common.nix | ||||||
|         config.inputs.agenix.nixosModules.age |         config.inputs.agenix.nixosModules.age | ||||||
|       ]; |       ]; | ||||||
|       pia.enable = true; |  | ||||||
|       nixpkgs.pkgs = pkgs; |  | ||||||
| 
 | 
 | ||||||
|       # because nixos specialArgs doesn't work for containers... need to pass in inputs a different way |       # because nixos specialArgs doesn't work for containers... need to pass in inputs a different way | ||||||
|       options.inputs = lib.mkOption { default = config.inputs; }; |       options.inputs = lib.mkOption { default = config.inputs; }; | ||||||
|  |       options.currentSystem = lib.mkOption { default = currentSystem; }; | ||||||
| 
 | 
 | ||||||
|       services.radarr.enable = true; |       config = { | ||||||
|       services.radarr.openFirewall = true; |         pia.enable = true; | ||||||
|       services.bazarr.enable = true; |         nixpkgs.pkgs = pkgs; | ||||||
|       services.bazarr.openFirewall = true; | 
 | ||||||
|       services.sonarr.enable = true; |         services.radarr.enable = true; | ||||||
|       services.sonarr.openFirewall = true; |         services.radarr.openFirewall = true; | ||||||
|       services.jackett.enable = true; |         services.bazarr.enable = true; | ||||||
|       services.jackett.openFirewall = true; |         services.bazarr.openFirewall = true; | ||||||
|       services.jellyfin.enable = true; |         services.sonarr.enable = true; | ||||||
|       services.jellyfin.openFirewall = true; |         services.sonarr.openFirewall = true; | ||||||
|       services.deluge.enable = true; |         services.jackett.enable = true; | ||||||
|       services.deluge.web.enable = true; |         services.jackett.openFirewall = true; | ||||||
|       services.deluge.web.openFirewall = true; |         services.jellyfin.enable = true; | ||||||
|  |         services.jellyfin.openFirewall = true; | ||||||
|  |         services.deluge.enable = true; | ||||||
|  |         services.deluge.web.enable = true; | ||||||
|  |         services.deluge.web.openFirewall = true; | ||||||
|  |       }; | ||||||
|     }; |     }; | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user