main
  1{
  2  pkgs,
  3  lib,
  4  config,
  5  inputs,
  6  system,
  7  ...
  8}:
  9let
 10  # Wrapper for jira-cli that injects API token from passage
 11  jira-wrapped = pkgs.writeShellScriptBin "jira" ''
 12    export JIRA_API_TOKEN=$(${pkgs.passage}/bin/passage show redhat/issues/atlassian/token)
 13    exec ${pkgs.jira-cli-go}/bin/jira "$@"
 14  '';
 15in
 16{
 17  imports = [
 18    ../../home/common/services/usage-metrics.nix
 19    ../../home/common/dev/containers.nix
 20    ../../home/common/dev/gh-news.nix
 21    ../../home/common/dev/github-notif-manager.nix
 22    ../../home/common/dev/lazyworktree.nix
 23    ../../home/common/dev/neovim.nix
 24    ../../home/common/dev/tektoncd.nix
 25    ../../home/common/services/color-scheme-timer.nix
 26    ../../home/common/services/gcal-to-org.nix
 27    ../../home/common/services/goimapnotify.nix
 28    ../../home/common/services/mail-monitor.nix
 29    ../../home/common/services/readwise-reader.nix
 30    ../../home/common/services/readwise-sync.nix
 31    ../../home/common/services/redhat.nix
 32    ../../home/common/shell/gh.nix
 33  ];
 34
 35  # Kanshi output profiles for okinawa (HDMI on dGPU)
 36  services.kanshi.settings = [
 37    {
 38      profile.name = "okinawa-hdmi";
 39      profile.outputs = [
 40        {
 41          criteria = "eDP-2";
 42          status = "disable";
 43        }
 44        {
 45          criteria = "LG Electronics LG ULTRAWIDE 0x0005D10C";
 46          status = "enable";
 47          position = "0,0";
 48          mode = "3440x1440";
 49          scale = 1.0;
 50        }
 51      ];
 52    }
 53    {
 54      profile.name = "okinawa-undocked";
 55      profile.outputs = [
 56        {
 57          criteria = "eDP-2";
 58          status = "enable";
 59          position = "0,0";
 60          mode = "1920x1200";
 61          scale = 1.0;
 62        }
 63      ];
 64    }
 65  ];
 66
 67  # llama-cpp defaults for RX 6700S (RDNA2)
 68  # Flash attention crashes on gfx1030 ROCm: GGML_ASSERT(max_blocks_per_sm > 0)
 69  home.sessionVariables = {
 70    LLAMA_ARG_FLASH_ATTN = "off";
 71    LLAMA_ARG_MAIN_GPU = "0";
 72    # Use local SSH key for passage instead of YubiKey identity
 73    PASSAGE_IDENTITIES_FILE = pkgs.lib.mkForce "${config.home.homeDirectory}/.ssh/id_ed25519";
 74  };
 75
 76  # Use Vulkan variant for GPU-accelerated transcription (RX 6700S / RDNA2)
 77  programs.voxtype.package = lib.mkForce inputs.voxtype.packages.${system}.vulkan;
 78
 79  home.packages = with pkgs; [
 80    nautilus
 81
 82    slack
 83
 84    libreoffice
 85
 86    gcalcli
 87    nextmeeting
 88
 89    calibre
 90
 91    ntfy-sh
 92    libnotify
 93
 94    monolith
 95
 96    feishin # navidrome - uses mpv-unwrapped via overlay
 97
 98    lazygit
 99
100    # Keyboard
101    qmk
102    qmk_hid
103
104    startpaac
105    abs-tui
106    batzconverter
107
108    simple-scan
109
110    jira-wrapped
111
112    go-org-readwise
113    radian
114    gh-pr
115    lazypr
116    nixpkgs-pr-watch
117    arr
118    toggle-color-scheme
119    shpool-remote
120    cliphist-cleanup
121
122    slackdump
123
124    ssh-to-age
125
126    jayrah
127    jayrat
128    daily-plan
129  ];
130
131  # Automatic color scheme switching
132  services.color-scheme-timer = {
133    enable = true;
134    latitude = "48.87"; # Paris coordinates
135    longitude = "2.33";
136    lightTime = "07:00"; # Switch to light mode at 7am
137    darkTime = "19:00"; # Switch to dark mode at 7pm
138  };
139
140  # Google Calendar sync to org-mode
141  services.gcal-to-org = {
142    enable = true;
143    interval = "hourly";
144  };
145
146  # Readwise sync to org-mode
147  services.readwise-sync = {
148    enable = true;
149    interval = "daily";
150  };
151
152  # Readwise Reader triage report
153  services.readwise-reader = {
154    enable = true;
155    model = "opus";
156    interval = "daily";
157    serve = {
158      enable = true;
159      port = 8880;
160    };
161  };
162
163  # ntfy notification subscriber
164  # disabled: auth token expired, causes ~7k retry log lines per boot
165  # systemd.user.services.ntfy-subscriber = {
166  #   Unit = {
167  #     Description = "ntfy notification subscriber";
168  #     Documentation = "https://ntfy.sh";
169  #     After = [
170  #       "graphical-session.target"
171  #       "network-online.target"
172  #     ];
173  #     Wants = [ "network-online.target" ];
174  #   };
175  #
176  #   Service = {
177  #     Type = "simple";
178  #     ExecStart = "${pkgs.ntfy-sh}/bin/ntfy subscribe --from-config";
179  #     Restart = "on-failure";
180  #     RestartSec = 10;
181  #     Environment = [
182  #       "PATH=${pkgs.bash}/bin:${pkgs.coreutils}/bin:${pkgs.libnotify}/bin:${pkgs.ntfy-sh}/bin:${pkgs.xdg-utils}/bin:${pkgs.curl}/bin:${pkgs.passage}/bin"
183  #       "PASSAGE_DIR=/home/vincent/.local/share/passage"
184  #       "PASSAGE_IDENTITIES_FILE=/home/vincent/.ssh/id_ed25519"
185  #     ];
186  #   };
187  #
188  #   Install = {
189  #     WantedBy = [ "graphical-session.target" ];
190  #   };
191  # };
192}