Setup and utilize SOPS

This commit is contained in:
Gene Liverman 2023-12-18 15:34:47 -05:00
parent 0fc27eb75f
commit 5ab4df18b2
14 changed files with 213 additions and 14 deletions

View file

@ -1,4 +1,4 @@
{ config, pkgs, hostname, username, ... }: {
{ config, hostname, pkgs, sops-nix, username, ... }: {
imports = [
./linux/internationalisation.nix
];
@ -6,10 +6,13 @@
environment = {
shells = with pkgs; [ bash zsh ];
systemPackages = with pkgs; [
age
dconf2nix
file
neofetch
python3
sops
ssh-to-age
tailscale
unzip
wget
@ -44,8 +47,22 @@
security.sudo.wheelNeedsPassword = false;
services.tailscale = {
enable = true;
services = {
openssh.enable = true;
tailscale = {
enable = true;
authKeyFile = config.sops.secrets.tailscale_key.path;
};
};
sops = {
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
secrets = {
tailscale_key = {
restartUnits = [ "tailscaled-autoconnect.service" ];
sopsFile = ../../hosts/nixos/${hostname}/secrets.yaml;
};
};
};
time.timeZone = "America/New_York";