diff options
author | Franck Cuny <franck@fcuny.net> | 2023-05-05 19:41:58 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2023-05-05 19:41:58 -0700 |
commit | 43da9edb4598eef509c481ae0b305384418c45de (patch) | |
tree | a0ad614c90102757143e026e4fe1806431a3dbf4 /home/packages/default.nix | |
parent | profiles/default: users are immutable (diff) | |
download | world-43da9edb4598eef509c481ae0b305384418c45de.tar.gz |
home/profiles: move (almost) all modules to profiles
This is a major refactor, similar to what was done for the hosts, but in a single commit.
Diffstat (limited to 'home/packages/default.nix')
-rw-r--r-- | home/packages/default.nix | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/home/packages/default.nix b/home/packages/default.nix deleted file mode 100644 index e6e4a5b..0000000 --- a/home/packages/default.nix +++ /dev/null @@ -1,71 +0,0 @@ -{ config, lib, pkgs, ... }: -let - cfg = config.my.home.packages; - album-to-nas = pkgs.writeShellApplication { - name = "album-to-nas"; - runtimeInputs = [ pkgs.jq pkgs.tailscale ]; - text = '' - ALBUM_PATH="''${1}" - ALBUM_NAME=$(basename "''${ALBUM_PATH}") - - NAS=$(tailscale status --json | jq -r '.Peer | map(select(.HostName == "tahoe"))[0].TailscaleIPs[0]') - - scp "''${ALBUM_PATH}" "''${NAS}:~/import/album.zip" - ssh "''${NAS}" bc-to-beet ~/import/album.zip - ''; - }; - restic-nas = pkgs.writeShellApplication - { - name = "restic-nas"; - runtimeInputs = [ pkgs.restic pkgs.tailscale pkgs.jq ]; - text = '' - NAS=$(tailscale status --json | jq -r '.Peer | map(select(.HostName == "tahoe"))[0].TailscaleIPs[0]') - - RESTIC_REPOSITORY="sftp:''${NAS}:/$(hostname)" - export RESTIC_REPOSITORY - export RESTIC_PASSWORD_FILE=/run/agenix/restic/repo-users - - sudo -E restic -o sftp.command="ssh backup@''${NAS} -i /run/agenix/restic/ssh-key -s sftp" "$@" - ''; - }; -in -{ - options.my.home.packages = with lib; { - enable = mkEnableOption "user packages"; - additionalPackages = mkOption { - type = with types; listOf package; - default = [ ]; - example = literalExample '' - with pkgs; [ - pavucontrol - ] - ''; - }; - }; - config.home.packages = with pkgs; - lib.mkIf cfg.enable - ([ - dive # explore layers in docker images - jq - restic # in order to interact with my backups - ripgrep - util-linux - - # custom tools - album-to-nas - restic-nas - - # tools inside the tools directory - tools.gha-billing - tools.git-blame-stats - tools.git-broom - tools.ipconverter - tools.seqstat - - # tools from external repositories - # x509-info - # gh-ssh-keys - # masked-emails - ] - ++ cfg.additionalPackages); -} |