configured sops

This commit is contained in:
revol-xut 2022-08-16 15:40:59 +02:00
parent 6525c45ca2
commit 806a5078ca
No known key found for this signature in database
GPG key ID: 4F56FF7759627D07
3 changed files with 13 additions and 3 deletions

View file

@ -3,7 +3,6 @@
nixpkgs.url = github:NixOS/nixpkgs/nixos-22.05;
sops-nix.url = github:Mic92/sops-nix;
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
fsr-infoscreen.url = github:fsr/infoscreen;
};
outputs = { self, nixpkgs, sops-nix, fsr-infoscreen, ... }@inputs:
@ -55,8 +54,14 @@
durian = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
inputs.sops-nix.nixosModules.sops
./hosts/durian/configuration.nix
./modules/base.nix
./modules/sops.nix
./modules/keycloak.nix
{
sops.defaultSopsFile = ./secrets/durian.yaml;
}
];
};
};

View file

@ -1,4 +1,4 @@
{pkgs, conifg, lib}: {
{pkgs, config, lib, ...}: {
sops.secrets.postgres_keycloak.owner = config.systemd.services.keycloak.serviceConfig.User;
@ -13,7 +13,7 @@
database = {
username = "keycloak";
type = "postgresql";
passwordFile = ;
passwordFile = config.sops.secrets.postgres_keycloak.path;
name = "keycloak";
host = "localhost";
};

5
modules/sops.nix Normal file
View file

@ -0,0 +1,5 @@
{ config, lib, pkgs, ... }:
{
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
sops.age.generateKey = false;
}