Initial commit

This commit is contained in:
Julien Hémono 2024-06-15 11:51:28 +02:00
commit a4da04692c
11 changed files with 543 additions and 0 deletions

24
hosts/sesame/sops.nix Normal file
View file

@ -0,0 +1,24 @@
{ inputs, pkgs, lib, config, ... }:
let
secretspath = builtins.toString inputs.mysecrets;
in
{
imports = [
inputs.sops-nix.nixosModules.sops
];
sops = {
defaultSopsFile = "${secretspath}/secrets.yaml";
validateSopsFiles = false;
age = {
# automatically import host SSH keys as age keys
sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
# this will use an age key that is expecte to already be in the filesystem
keyFile = "/var/lib/sops-nix/key.txt";
# generate a new key if the key specified above does not exist
generateKey = true;
};
};
}