mirror of
https://github.com/blahai/nyx.git
synced 2025-01-18 19:10:21 +00:00
my poor attempt at fixing sops (still doesn't work)
This commit is contained in:
parent
8c72101f6d
commit
b39aae582a
2 changed files with 11 additions and 9 deletions
|
@ -1,8 +1,8 @@
|
||||||
{ pkgs, inputs, ... }:
|
{ lib, config, pkgs, inputs, ... }:
|
||||||
let
|
|
||||||
secrets = import ../../../secrets/secrets.nix;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
../../../secrets/secrets.nix
|
||||||
|
];
|
||||||
|
|
||||||
users.users.cloudflared = {
|
users.users.cloudflared = {
|
||||||
group = "cloudflared";
|
group = "cloudflared";
|
||||||
|
@ -14,7 +14,7 @@ in
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network-online.target" "systemd-resolved.service" ];
|
after = [ "network-online.target" "systemd-resolved.service" ];
|
||||||
serviceConfig = {
|
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";
|
Restart = "always";
|
||||||
User = "cloudflared";
|
User = "cloudflared";
|
||||||
Group = "cloudflared";
|
Group = "cloudflared";
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
{ pkgs, inputs, config, ... }:
|
{ inputs, lib, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [ inputs.sops-nix.nixosModules.sops ];
|
||||||
inputs.sops-nix.nixosModules.sops
|
|
||||||
];
|
|
||||||
|
|
||||||
sops = {
|
sops = {
|
||||||
defaultSopsFile = ./secrets.yaml;
|
defaultSopsFile = ./secrets.yaml;
|
||||||
defaultSopsFormat = "yaml";
|
defaultSopsFormat = "yaml";
|
||||||
age.keyFile = "/home/pingu/.config/sops/age/keys.txt";
|
age.keyFile = "/home/pingu/.config/sops/age/keys.txt";
|
||||||
|
|
||||||
|
secrets = {
|
||||||
|
cloudflared.nyx.token = {};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue