mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-21 21:50:43 -06:00
add a secret
This commit is contained in:
parent
f29fcf634b
commit
0447eb645a
2 changed files with 38 additions and 26 deletions
|
@ -2,6 +2,7 @@
|
|||
enabled,
|
||||
enableAttrs,
|
||||
listify,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
@ -28,6 +29,13 @@
|
|||
|
||||
sops.defaultSopsFile = ./secrets.yaml;
|
||||
# This will automatically import SSH keys as age keys
|
||||
sops.age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
||||
sops.secrets.restic-othalan = {};
|
||||
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||
sops.secrets.restic-othalan = {
|
||||
# Permission modes are in octal representation (same as chmod),
|
||||
mode = "0440";
|
||||
# It is recommended to get the group/name name from
|
||||
# `config.users.users.<?name>.{name,group}` to avoid misconfiguration
|
||||
owner = config.users.users.daylin.name;
|
||||
group = config.users.users.daylin.group;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,35 +1,39 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
notes-git = ''${pkgs.git}/bin/git -C /home/daylin/stuff/notes'';
|
||||
in
|
||||
{
|
||||
config,
|
||||
# pkgs,
|
||||
...
|
||||
}:
|
||||
# let
|
||||
# notes-git = ''${pkgs.git}/bin/git -C /home/daylin/stuff/notes'';
|
||||
# in
|
||||
{
|
||||
services.restic.backups.gdrive = {
|
||||
user = "daylin";
|
||||
repository = "rclone:g:archives/othalan";
|
||||
passwordFile = "/home/daylin/.config/restic/othalan-pass";
|
||||
passwordFile = config.sops.secrets.restic-othalan.path;
|
||||
paths = [
|
||||
"/home/daylin/stuff/"
|
||||
"/home/daylin/dev/"
|
||||
];
|
||||
};
|
||||
|
||||
systemd.services.notes-bot = {
|
||||
description = "auto commit changes to notes";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "daylin";
|
||||
ExecStart = ''
|
||||
${pkgs.bash}/bin/bash -c '${notes-git} commit -m ":memo: :robot: $(${pkgs.coreutils}/bin/date +\'%%T\')" --no-gpg-sign -- notes'
|
||||
'';
|
||||
};
|
||||
};
|
||||
systemd.timers.notes-bot-timer = {
|
||||
description = "run notes commit service";
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
Persistent = true;
|
||||
Unit = "notes-bot.service";
|
||||
};
|
||||
};
|
||||
# systemd.services.notes-bot = {
|
||||
# description = "auto commit changes to notes";
|
||||
# serviceConfig = {
|
||||
# Type = "oneshot";
|
||||
# User = "daylin";
|
||||
# ExecStart = ''
|
||||
# ${pkgs.bash}/bin/bash -c '${notes-git} commit -m ":memo: :robot: $(${pkgs.coreutils}/bin/date +\'%%T\')" --no-gpg-sign -- notes'
|
||||
# '';
|
||||
# };
|
||||
# };
|
||||
# systemd.timers.notes-bot-timer = {
|
||||
# description = "run notes commit service";
|
||||
# wantedBy = [ "timers.target" ];
|
||||
# timerConfig = {
|
||||
# OnCalendar = "daily";
|
||||
# Persistent = true;
|
||||
# Unit = "notes-bot.service";
|
||||
# };
|
||||
# };
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue