sgx: add pccs
Signed-off-by: Harald Hoyer <harald@hoyer.xyz>
This commit is contained in:
		
							parent
							
								
									47b956331a
								
							
						
					
					
						commit
						e3ca974851
					
				
					 2 changed files with 40 additions and 0 deletions
				
			
		|  | @ -23,6 +23,14 @@ with lib.plusultra; | |||
|     flake = "git+https://git.hoyer.xyz/harald/nixcfg#sgx"; | ||||
|   }; | ||||
| 
 | ||||
|   sops.secrets.pccs = { | ||||
|     sopsFile = ../.secrets/sgx/pccs.yaml; # bring your own password file | ||||
|   }; | ||||
| 
 | ||||
|   networking.wireless.enable = false; # Enables wireless support via wpa_supplicant. | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   plusultra.gui.enable = false; | ||||
|   plusultra.nix.enable = true; | ||||
|   plusultra.nix.extra-substituters = { | ||||
|  | @ -151,6 +159,37 @@ with lib.plusultra; | |||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   virtualisation.oci-containers.backend = "podman"; | ||||
|   virtualisation.oci-containers.containers = { | ||||
| 
 | ||||
|     # podman run --pull=always --name pccs -it --rm -v /dev/log:/dev/log --secret PCCS_CONFIG,type=mount -p 8081:8081 registry.gitlab.com/haraldh/pccs:dcap_1_19 | ||||
|     pccs = { | ||||
|       image = "registry.gitlab.com/haraldh/pccs:dcap_1_19"; | ||||
|       autoStart = true; | ||||
|       ports = [ "8081:8081" ]; | ||||
|       extraOptions = [ | ||||
|         "--volume=/dev/log:/dev/log" | ||||
|         "--secret=PCCS_CONFIG,type=mount" | ||||
|       ]; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   systemd.services.pccs-secret = | ||||
|     { | ||||
|       description = "Inject pccs secret"; | ||||
|       wantedBy = [ "multi-user.target" ]; | ||||
|       before = [ "podman-pccs.service" ]; | ||||
| 
 | ||||
|       serviceConfig = { | ||||
|         EnvironmentFile = config.sops.secrets.pccs.path; | ||||
|         ExecStart = '' | ||||
|           -${pkgs.podman}/bin/podman secret create --env PCCS_CONFIG PCCS_CONFIG | ||||
|         ''; | ||||
|         RemainAfterExit = true; | ||||
|       }; | ||||
|     }; | ||||
| 
 | ||||
| 
 | ||||
|   programs.nix-ld.enable = true; | ||||
| 
 | ||||
|   # Sets up all the libraries to load | ||||
|  |  | |||
|  | @ -13,6 +13,7 @@ | |||
|   boot.kernelModules = [ "kvm-intel" ]; | ||||
|   boot.extraModulePackages = [ ]; | ||||
|   boot.blacklistedKernelModules = [ "iwlwifi" "snd_hda_intel" "hdaudio" "btintel" "bluetooth" ]; | ||||
|   boot.extraModprobeConfig = "options kvm_intel nested=1"; | ||||
| 
 | ||||
|   fileSystems."/" = | ||||
|     { device = "/dev/disk/by-uuid/7aa17b01-785e-41c6-9723-79195af906c6"; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue