mirror of
https://codeberg.org/jopejoe1/nix-conf.git
synced 2025-06-07 21:39:23 +02:00
Clean up
This commit is contained in:
parent
673524b947
commit
9ad1975f72
33 changed files with 358 additions and 471 deletions
|
@ -1,9 +1,7 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.jopejoe1.repo-sync;
|
||||
in
|
||||
{
|
||||
let cfg = config.jopejoe1.repo-sync;
|
||||
in {
|
||||
options.jopejoe1.repo-sync = {
|
||||
enable = lib.mkEnableOption "Enable Repo Sync";
|
||||
};
|
||||
|
@ -20,13 +18,21 @@ in
|
|||
|
||||
systemd.services."repo-sync" = {
|
||||
script = ''
|
||||
${lib.getExe pkgs.git} clone git@codeberg.org:jopejoe1/nix-conf.git /var/lib/repo-sync
|
||||
${lib.getExe pkgs.git} -C /var/lib/repo-sync remote add github git@github.com:jopejoe1/nix-conf.git
|
||||
${lib.getExe pkgs.git} -C /var/lib/repo-sync remote add gitlab git@gitlab.com:jopejoe1/nix-conf.git
|
||||
${
|
||||
lib.getExe pkgs.git
|
||||
} clone git@codeberg.org:jopejoe1/nix-conf.git /var/lib/repo-sync
|
||||
${
|
||||
lib.getExe pkgs.git
|
||||
} -C /var/lib/repo-sync remote add github git@github.com:jopejoe1/nix-conf.git
|
||||
${
|
||||
lib.getExe pkgs.git
|
||||
} -C /var/lib/repo-sync remote add gitlab git@gitlab.com:jopejoe1/nix-conf.git
|
||||
${lib.getExe pkgs.git} -C /var/lib/repo-sync pull -r github main
|
||||
${lib.getExe pkgs.git} -C /var/lib/repo-sync pull -r gitlab main
|
||||
${lib.getExe pkgs.nix} flake update /var/lib/repo-sync
|
||||
${lib.getExe pkgs.git} -C /var/lib/repo-sync commit -m "flack.lock updated on `$(${pkgs.coreutils}/bin/date)`"
|
||||
${
|
||||
lib.getExe pkgs.git
|
||||
} -C /var/lib/repo-sync commit -m "flack.lock updated on `$(${pkgs.coreutils}/bin/date)`"
|
||||
${lib.getExe pkgs.git} -C /var/lib/repo-sync push origin
|
||||
${lib.getExe pkgs.git} -C /var/lib/repo-sync push github
|
||||
${lib.getExe pkgs.git} -C /var/lib/repo-sync push gitlab
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue