diff --git a/home/opdavies/hosts/t480.nix b/home/opdavies/hosts/t480.nix index 2df8c031..ffcd4415 100644 --- a/home/opdavies/hosts/t480.nix +++ b/home/opdavies/hosts/t480.nix @@ -1,32 +1 @@ -{ config, pkgs, ... }: - -{ - home.packages = with pkgs; [ - backup-websites - displayselect - isync - upload-to-files - - (pkgs.writeShellApplication ( - let - remoteIpAddresses = [ - "116.203.11.255" - "192.168.1.116" - ]; - - wikiPath = "${config.xdg.userDirs.documents}/wiki"; - in - { - name = "wiki-push"; - - text = builtins.concatStringsSep "\n" ( - map (ipAddress: '' - ${lib.getExe pkgs.rsync} -avz --update \ - --delete --delete-after \ - ${wikiPath}/ ${ipAddress}:${wikiPath} "$@" - '') remoteIpAddresses - ); - } - )) - ]; -} +{ } diff --git a/hosts/t480/configuration.nix b/hosts/t480/configuration.nix index eecd55d9..27d42ed5 100644 --- a/hosts/t480/configuration.nix +++ b/hosts/t480/configuration.nix @@ -33,6 +33,7 @@ ./modules/neomutt.nix ./modules/newsboat ./modules/notes.nix + ./modules/wiki.nix ]; nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; @@ -63,12 +64,16 @@ environment.systemPackages = with pkgs; [ abook + backup-websites + displayselect gtypist + isync pam_gnupg peek slack sxiv ttyper + upload-to-files yt-dlp zeroad zoom-us diff --git a/hosts/t480/modules/wiki.nix b/hosts/t480/modules/wiki.nix new file mode 100644 index 00000000..31a85ad6 --- /dev/null +++ b/hosts/t480/modules/wiki.nix @@ -0,0 +1,33 @@ +{ lib, ... }: + +with lib; + +{ + home-manager.users.opdavies = + { config, pkgs, ... }: + { + home.packages = with pkgs; [ + (pkgs.writeShellApplication ( + let + remoteIpAddresses = [ + "116.203.11.255" + "192.168.1.116" + ]; + + 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 + ); + } + )) + ]; + }; +}