migrate systemd units and timers over to fedora
This commit is contained in:
6
.config/systemd/user/git-auto-sync.service
Normal file
6
.config/systemd/user/git-auto-sync.service
Normal file
@@ -0,0 +1,6 @@
|
||||
[Unit]
|
||||
Description=Automated Git Sync Service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=%h/scripts/git-auto-sync.sh
|
||||
10
.config/systemd/user/git-auto-sync.timer
Normal file
10
.config/systemd/user/git-auto-sync.timer
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Automated Git Sync Timer
|
||||
|
||||
[Timer]
|
||||
OnBootSec=5m
|
||||
OnUnitActiveSec=5m
|
||||
Unit=git-auto-sync.service
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -8,7 +8,6 @@
|
||||
../modules/development.nix
|
||||
../modules/gaming.nix
|
||||
../modules/secrets.nix
|
||||
../modules/systemd.nix
|
||||
inputs.home-manager.nixosModules.default
|
||||
];
|
||||
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
{ config, pkgs, ... }: {
|
||||
|
||||
systemd.timers."git-auto-sync" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnBootSec = "5m";
|
||||
OnUnitActiveSec = "5m";
|
||||
Unit = "git-auto-sync.service";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services."git-auto-sync" = {
|
||||
script = "$HOME/scripts/git-auto-sync.sh";
|
||||
path = [
|
||||
pkgs.git
|
||||
pkgs.gh
|
||||
pkgs.keychain
|
||||
pkgs.openssh
|
||||
];
|
||||
serviceConfig = { Type = "oneshot"; User = "kyren"; };
|
||||
};
|
||||
|
||||
###########################################################################
|
||||
|
||||
systemd.timers."k-sleep-tracker" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnBootSec = "1m";
|
||||
OnUnitActiveSec = "1m";
|
||||
Unit = "k-sleep-tracker.service";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services."k-sleep-tracker" = {
|
||||
script = "$HOME/projects/k/bin/k tracker sleep";
|
||||
serviceConfig = { Type = "oneshot"; User = "kyren"; };
|
||||
};
|
||||
|
||||
###########################################################################
|
||||
|
||||
# systemd.timers."git-auto-mirror" = {
|
||||
# wantedBy = [ "timers.target" ];
|
||||
# timerConfig = {
|
||||
# OnBootSec = "1m";
|
||||
# OnUnitActiveSec = "5h";
|
||||
# Unit = "git-auto-mirror.service";
|
||||
# };
|
||||
# };
|
||||
|
||||
sops.secrets.gitea-sync-token = { owner = "kyren"; };
|
||||
sops.secrets.github-mirror-token = { owner = "kyren"; };
|
||||
systemd.services."git-auto-mirror" = {
|
||||
script = "python $HOME/scripts/gitea.py";
|
||||
path = [
|
||||
(pkgs.python312.withPackages (pypkgs: [
|
||||
pypkgs.matplotlib
|
||||
pypkgs.pandas
|
||||
pypkgs.pygithub
|
||||
]))
|
||||
];
|
||||
environment = {
|
||||
GITEA_TOKEN_FILE = config.sops.secrets.gitea-sync-token.path;
|
||||
GITHUB_TOKEN_FILE = config.sops.secrets.github-mirror-token.path;
|
||||
};
|
||||
serviceConfig = { Type = "oneshot"; User = "kyren"; };
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user