diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index c07b8ac..560e7dc 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -3,6 +3,7 @@ ## Architecture Overview This is a **NixOS flake-based configuration** managing multiple hosts (desktop, laptop, homelab, work, WSL) with: + - **flake-parts** for modular flake organization - **home-manager** integrated via `fireproof.home-manager` option (not standalone) - **agenix + agenix-rekey** for YubiKey-based secret management @@ -79,6 +80,7 @@ just new-host # Bootstrap new host config ## Secret Management Secrets use **agenix-rekey** with YubiKey master identity: + - Global secrets: `secrets/*.age` - Host-specific: `secrets/hosts//` (includes rekeyed secrets in `.rekey/`) - Reference secrets via `config.age.secrets..path` @@ -117,7 +119,7 @@ services.myapp.environmentFile = config.age.secrets.my-secret.path; ### Adding a homelab service -1. Create `modules/homelab/myservice.nix` +1. Create `modules/homelab/myservice.nix` 2. Guard with `lib.mkIf config.fireproof.homelab.enable` 3. Add nginx virtualHost for HTTPS proxy 4. Import in `modules/homelab/default.nix` diff --git a/hosts/desktop-wsl/default.nix b/hosts/desktop-wsl/default.nix index 03749db..b18f48d 100644 --- a/hosts/desktop-wsl/default.nix +++ b/hosts/desktop-wsl/default.nix @@ -8,6 +8,8 @@ wsl.enable = true; }; + wsl.usbip.autoAttach = ["1-9"]; + system.stateVersion = "25.11"; }; diff --git a/modules/homelab/glance.nix b/modules/homelab/glance.nix index 0bea176..d0f4743 100644 --- a/modules/homelab/glance.nix +++ b/modules/homelab/glance.nix @@ -385,12 +385,6 @@ in { { title = "Development"; links = [ - { - title = "GitHub"; - url = "https://github.com"; - icon = "si:github"; - same-tab = true; - } { title = "Copilot"; url = "https://github.com/copilot"; @@ -414,7 +408,7 @@ in { ]; } { - type = "split-column"; + type = "group"; widgets = [ { type = "hacker-news"; @@ -435,6 +429,140 @@ in { } ]; } + { + size = "small"; + widgets = [ + { + type = "custom-api"; + title = "Recent Repos"; + title-url = "https://github.com"; + cache = "10m"; + url = "https://api.github.com/user/repos?sort=pushed&per_page=15&affiliation=owner,collaborator,organization_member"; + headers = { + Authorization = "Bearer \${GITHUB_TOKEN}"; + Accept = "application/vnd.github.v3+json"; + }; + template = '' +
    + {{ $items := .JSON.Array "" }} + {{ range $i, $repo := $items }} + {{ $repoPath := $repo.String "full_name" }} + +
    + + + +
    + {{ $repoPath }} +
    + +
    +
    +
    + + {{ end }} +
+ ''; + } + { + type = "custom-api"; + title = "PRs Awaiting Review"; + title-url = "https://github.com/pulls/review-requested"; + cache = "10m"; + url = "https://api.github.com/search/issues?q=is:pr+is:open+review-requested:@me&per_page=15"; + headers = { + Authorization = "Bearer \${GITHUB_TOKEN}"; + Accept = "application/vnd.github.v3+json"; + }; + template = '' + {{ $items := .JSON.Array "items" }} + {{ if eq (len $items) 0 }} +

No PRs awaiting review 馃帀

+ {{ else }} + + {{ end }} + ''; + } + { + type = "custom-api"; + title = "My Pull Requests"; + title-url = "https://github.com/pulls"; + cache = "10m"; + url = "https://api.github.com/search/issues?q=is:pr+is:open+author:@me&per_page=15&sort=updated"; + headers = { + Authorization = "Bearer \${GITHUB_TOKEN}"; + Accept = "application/vnd.github.v3+json"; + }; + template = '' + {{ $items := .JSON.Array "items" }} + {{ if eq (len $items) 0 }} +

No open pull requests

+ {{ else }} + + {{ end }} + ''; + } + ]; + } ]; } ]; diff --git a/modules/system/wsl.nix b/modules/system/wsl.nix index 185cd9d..77f32a8 100644 --- a/modules/system/wsl.nix +++ b/modules/system/wsl.nix @@ -11,6 +11,7 @@ defaultUser = config.fireproof.username; startMenuLaunchers = true; interop.includePath = false; + usbip.enable = true; }; # WSL doesn't use a bootloader - disable systemd-boot