diff --git a/home/opdavies/t480.nix b/home/opdavies/t480.nix index 6ad0a468..337eb367 100644 --- a/home/opdavies/t480.nix +++ b/home/opdavies/t480.nix @@ -72,24 +72,35 @@ }; }; - programs.dev-commit = { - enable = true; - - repoPaths = - let - personal = "${config.xdg.userDirs.extraConfig.XDG_REPOS_DIR}/personal"; - in - [ - "${personal}/email-filters" - "${personal}/nix-config" - "${personal}/oliverdavies.uk-tome" - "${personal}/opentofu-dns" - ]; - - schedule = { + programs = { + dev-commit = { enable = true; - time = "daily"; + + repoPaths = + let + personal = "${config.xdg.userDirs.extraConfig.XDG_REPOS_DIR}/personal"; + in + [ + "${personal}/email-filters" + "${personal}/nix-config" + "${personal}/oliverdavies.uk-tome" + "${personal}/opentofu-dns" + ]; + + schedule = { + enable = true; + time = "daily"; + }; }; + + zsh.shellAliases = + let + inherit (config.xdg.userDirs) documents; + in + { + "wiki-push" = + "rsync -avzP ${documents}/wiki nixedo.oliverdavies.uk:${documents} --delete --delete-after"; + }; }; xdg.configFile."pam-gnupg".text = '' diff --git a/hosts/PW05CH3L/configuration.nix b/hosts/PW05CH3L/configuration.nix index bfb54288..45b8f8e1 100644 --- a/hosts/PW05CH3L/configuration.nix +++ b/hosts/PW05CH3L/configuration.nix @@ -5,8 +5,6 @@ ../common ../../users/opdavies.nix - - ./modules/wiki.nix ]; cli = { diff --git a/hosts/PW05CH3L/modules/wiki.nix b/hosts/PW05CH3L/modules/wiki.nix deleted file mode 100644 index 7d0b7c9a..00000000 --- a/hosts/PW05CH3L/modules/wiki.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ lib, ... }: - -with lib; - -{ - home-manager.users.opdavies = - { config, pkgs, ... }: - { - home = - let - remoteIpAddress = "192.168.1.111"; - wikiPath = "${config.xdg.userDirs.documents}/wiki"; - in - { - packages = [ - (pkgs.writeShellApplication { - name = "wiki-pull"; - - text = '' - ${getExe pkgs.rsync} -avz --update \ - --exclude result \ - ${remoteIpAddress}:${wikiPath}/ ${wikiPath} "$@" - ''; - }) - - (pkgs.writeShellApplication { - name = "wiki-push"; - - text = '' - ${getExe pkgs.rsync} -avz --update \ - ${wikiPath}/ ${remoteIpAddress}:${wikiPath} "$@" - ''; - }) - ]; - }; - }; -} diff --git a/hosts/t480/modules/default.nix b/hosts/t480/modules/default.nix index 4d7442c0..c5f2ed09 100644 --- a/hosts/t480/modules/default.nix +++ b/hosts/t480/modules/default.nix @@ -4,6 +4,5 @@ ./neomutt.nix ./newsboat ./ollama.nix - ./wiki.nix ]; } diff --git a/hosts/t480/modules/wiki.nix b/hosts/t480/modules/wiki.nix deleted file mode 100644 index f475614f..00000000 --- a/hosts/t480/modules/wiki.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ lib, ... }: - -with lib; - -{ - home-manager.users.opdavies = - { config, pkgs, ... }: - { - home.packages = with pkgs; [ - (pkgs.writeShellApplication ( - let - remoteIpAddresses = [ - "nixedo.local" - ]; - - wikiPath = "${config.xdg.userDirs.documents}/wiki"; - in - { - name = "wiki-push"; - - text = builtins.concatStringsSep "\n" ( - map (ipAddress: '' - ${getExe pkgs.rsync} -avz --update \ - --delete --delete-after \ - ${wikiPath}/ ${ipAddress}:${wikiPath} "$@" - '') remoteIpAddresses - ); - } - )) - ]; - }; -}