my poor attempt at fixing sops (still doesn't work)

This commit is contained in:
blahai 2024-10-25 18:54:42 +03:00
parent 8c72101f6d
commit b39aae582a
Signed by: blahai
SSH key fingerprint: SHA256:ZfCryi+V64yG+vC1ZIIsqgvBCmA31tTi7RJ6M8CvpRc
2 changed files with 11 additions and 9 deletions

View file

@ -1,8 +1,8 @@
{ pkgs, inputs, ... }:
let
secrets = import ../../../secrets/secrets.nix;
in
{ lib, config, pkgs, inputs, ... }:
{
imports = [
../../../secrets/secrets.nix
];
users.users.cloudflared = {
group = "cloudflared";
@ -14,7 +14,7 @@ in
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" "systemd-resolved.service" ];
serviceConfig = {
ExecStart = "${pkgs.cloudflared}/bin/cloudflared tunnel --no-autoupdate run --token=${secrets.cloudflared.nyx.token}";
ExecStart = "${pkgs.cloudflared}/bin/cloudflared tunnel --no-autoupdate run --token=${sops.secrets.cloudflared.nyx.token}";
Restart = "always";
User = "cloudflared";
Group = "cloudflared";

View file

@ -1,12 +1,14 @@
{ pkgs, inputs, config, ... }:
{ inputs, lib, ... }:
{
imports = [
inputs.sops-nix.nixosModules.sops
];
imports = [ inputs.sops-nix.nixosModules.sops ];
sops = {
defaultSopsFile = ./secrets.yaml;
defaultSopsFormat = "yaml";
age.keyFile = "/home/pingu/.config/sops/age/keys.txt";
secrets = {
cloudflared.nyx.token = {};
};
};
}