mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 01:50:44 -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,
|
enabled,
|
||||||
enableAttrs,
|
enableAttrs,
|
||||||
listify,
|
listify,
|
||||||
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
|
@ -28,6 +29,13 @@
|
||||||
|
|
||||||
sops.defaultSopsFile = ./secrets.yaml;
|
sops.defaultSopsFile = ./secrets.yaml;
|
||||||
# This will automatically import SSH keys as age keys
|
# This will automatically import SSH keys as age keys
|
||||||
sops.age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||||
sops.secrets.restic-othalan = {};
|
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
|
config,
|
||||||
notes-git = ''${pkgs.git}/bin/git -C /home/daylin/stuff/notes'';
|
# pkgs,
|
||||||
in
|
...
|
||||||
|
}:
|
||||||
|
# let
|
||||||
|
# notes-git = ''${pkgs.git}/bin/git -C /home/daylin/stuff/notes'';
|
||||||
|
# in
|
||||||
{
|
{
|
||||||
services.restic.backups.gdrive = {
|
services.restic.backups.gdrive = {
|
||||||
user = "daylin";
|
user = "daylin";
|
||||||
repository = "rclone:g:archives/othalan";
|
repository = "rclone:g:archives/othalan";
|
||||||
passwordFile = "/home/daylin/.config/restic/othalan-pass";
|
passwordFile = config.sops.secrets.restic-othalan.path;
|
||||||
paths = [
|
paths = [
|
||||||
"/home/daylin/stuff/"
|
"/home/daylin/stuff/"
|
||||||
"/home/daylin/dev/"
|
"/home/daylin/dev/"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.notes-bot = {
|
# systemd.services.notes-bot = {
|
||||||
description = "auto commit changes to notes";
|
# description = "auto commit changes to notes";
|
||||||
serviceConfig = {
|
# serviceConfig = {
|
||||||
Type = "oneshot";
|
# Type = "oneshot";
|
||||||
User = "daylin";
|
# User = "daylin";
|
||||||
ExecStart = ''
|
# ExecStart = ''
|
||||||
${pkgs.bash}/bin/bash -c '${notes-git} commit -m ":memo: :robot: $(${pkgs.coreutils}/bin/date +\'%%T\')" --no-gpg-sign -- notes'
|
# ${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 = {
|
# systemd.timers.notes-bot-timer = {
|
||||||
description = "run notes commit service";
|
# description = "run notes commit service";
|
||||||
wantedBy = [ "timers.target" ];
|
# wantedBy = [ "timers.target" ];
|
||||||
timerConfig = {
|
# timerConfig = {
|
||||||
OnCalendar = "daily";
|
# OnCalendar = "daily";
|
||||||
Persistent = true;
|
# Persistent = true;
|
||||||
Unit = "notes-bot.service";
|
# Unit = "notes-bot.service";
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue