sops: Improve secrets provisioning to split out staging

This commit is contained in:
Tristan Daniël Maat 2022-10-12 02:03:22 +01:00
parent ab3aa19481
commit 6a81ce4c1d
Signed by: tlater
GPG key ID: 49670FD774E43268
8 changed files with 151 additions and 7 deletions

View file

@ -10,6 +10,7 @@
./services/webserver.nix
./services/starbound.nix
./ids.nix
./sops.nix
];
nix = {
@ -25,11 +26,6 @@
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) ["steam-runtime" "steamcmd"];
sops = {
defaultSopsFile = ../keys/external.yaml;
secrets.steam = {};
};
# Optimization for minecraft servers, see:
# https://bugs.mojang.com/browse/MC-183518
boot.kernelParams = ["highres=off" "nohz=off"];

View file

@ -16,7 +16,7 @@ in {
# Credential loading for steam auth (if necessary; prefer
# anonymous login wherever possible).
LoadCredential = "steam:/run/secrets/steam";
LoadCredential = "steam:/run/secrets/steam/tlater";
# Security settings
DynamicUser = true;

10
configuration/sops.nix Normal file
View file

@ -0,0 +1,10 @@
{
sops = {
defaultSopsFile = ../keys/production.yaml;
secrets."nextcloud/tlater" = {
owner = "nextcloud";
group = "nextcloud";
};
secrets."steam/tlater" = {};
};
}