From eabe7277756d34f089f9e8ceff1b59661261c2e1 Mon Sep 17 00:00:00 2001 From: Alex Maldonado Date: Wed, 13 May 2026 11:28:54 -0400 Subject: [PATCH] home: modularize user packages --- flake.lock | 182 +++++++++++++++++++++++++++- flake.nix | 3 +- home/alex/default.nix | 17 +-- home/{alex => modules}/dropbox.nix | 0 home/{alex => modules}/fonts.nix | 0 home/{alex => modules}/ghostty.nix | 0 home/modules/globalprotect.nix | 7 ++ home/{alex => modules}/helix.nix | 0 home/{alex => modules}/pixi.nix | 0 home/{alex => modules}/ssh.nix | 0 home/{alex => modules}/starship.nix | 0 home/{alex => modules}/zsh.nix | 0 12 files changed, 199 insertions(+), 10 deletions(-) rename home/{alex => modules}/dropbox.nix (100%) rename home/{alex => modules}/fonts.nix (100%) rename home/{alex => modules}/ghostty.nix (100%) create mode 100644 home/modules/globalprotect.nix rename home/{alex => modules}/helix.nix (100%) rename home/{alex => modules}/pixi.nix (100%) rename home/{alex => modules}/ssh.nix (100%) rename home/{alex => modules}/starship.nix (100%) rename home/{alex => modules}/zsh.nix (100%) diff --git a/flake.lock b/flake.lock index 05ce418..9a59d2f 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,67 @@ { "nodes": { + "fenix": { + "inputs": { + "nixpkgs": [ + "globalprotect-openconnect", + "naersk", + "nixpkgs" + ], + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1752475459, + "narHash": "sha256-z6QEu4ZFuHiqdOPbYss4/Q8B0BFhacR8ts6jO/F/aOU=", + "owner": "nix-community", + "repo": "fenix", + "rev": "bf0d6f70f4c9a9cf8845f992105652173f4b617f", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "globalprotect-openconnect": { + "inputs": { + "flake-utils": "flake-utils", + "naersk": "naersk", + "nixpkgs": "nixpkgs_2", + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1778337824, + "narHash": "sha256-sJ6+Y9t4cIt6LItBb8ZTMQC2bBlQ1NIwrak2dM6HHI4=", + "owner": "yuezk", + "repo": "GlobalProtect-openconnect", + "rev": "7d63836e3571bf6fa800261621da6e78841913c0", + "type": "github" + }, + "original": { + "owner": "yuezk", + "repo": "GlobalProtect-openconnect", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -21,7 +83,74 @@ "type": "github" } }, + "naersk": { + "inputs": { + "fenix": "fenix", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1763384566, + "narHash": "sha256-r+wgI+WvNaSdxQmqaM58lVNvJYJ16zoq+tKN20cLst4=", + "owner": "nix-community", + "repo": "naersk", + "rev": "d4155d6ebb70fbe2314959842f744aa7cabbbf6a", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "naersk", + "type": "github" + } + }, "nixpkgs": { + "locked": { + "lastModified": 1752077645, + "narHash": "sha256-HM791ZQtXV93xtCY+ZxG1REzhQenSQO020cu6rHtAPk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "be9e214982e20b8310878ac2baa063a961c1bdf6", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1766410818, + "narHash": "sha256-ruVneSx6wFy5PMw1ow3BE+znl653TJ6+eeNUj4B/9y8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "3a7affa77a5a539afa1c7859e2c31abdb1aeadf3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1744536153, + "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { "locked": { "lastModified": 1778430510, "narHash": "sha256-Ti+ZBvW6yrWWAg2szExVTwCd4qOJ3KlVr1tFHfyfi8Q=", @@ -39,8 +168,59 @@ }, "root": { "inputs": { + "globalprotect-openconnect": "globalprotect-openconnect", "home-manager": "home-manager", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_4" + } + }, + "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1752428706, + "narHash": "sha256-EJcdxw3aXfP8Ex1Nm3s0awyH9egQvB2Gu+QEnJn2Sfg=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "591e3b7624be97e4443ea7b5542c191311aa141d", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, + "rust-overlay": { + "inputs": { + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1766457837, + "narHash": "sha256-aeBbkQ0HPFNOIsUeEsXmZHXbYq4bG8ipT9JRlCcKHgU=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "2c7510a559416d07242621d036847152d970612b", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index 91682b3..33237b7 100644 --- a/flake.nix +++ b/flake.nix @@ -8,9 +8,10 @@ url = "github:nix-community/home-manager/release-25.11"; inputs.nixpkgs.follows = "nixpkgs"; }; + globalprotect-openconnect.url = "github:yuezk/GlobalProtect-openconnect"; }; - outputs = { self, nixpkgs, home-manager, ... }@inputs: + outputs = { self, nixpkgs, home-manager, globalprotect-openconnect, ... }@inputs: let system = "x86_64-linux"; in { diff --git a/home/alex/default.nix b/home/alex/default.nix index 1c72af5..1f2deee 100644 --- a/home/alex/default.nix +++ b/home/alex/default.nix @@ -5,16 +5,17 @@ home.sessionPath = [ "$HOME/.local/bin" ]; imports = [ - ./zsh.nix - ./ghostty.nix - ./helix.nix - ./starship.nix + ../modules/dropbox.nix + ../modules/fonts.nix + ../modules/ghostty.nix + ../modules/globalprotect.nix + ../modules/helix.nix + ../modules/pixi.nix + ../modules/ssh.nix + ../modules/starship.nix + ../modules/zsh.nix ./git.nix ./gh.nix - ./ssh.nix - ./dropbox.nix - ./pixi.nix - ./fonts.nix ]; home.packages = with pkgs; [ diff --git a/home/alex/dropbox.nix b/home/modules/dropbox.nix similarity index 100% rename from home/alex/dropbox.nix rename to home/modules/dropbox.nix diff --git a/home/alex/fonts.nix b/home/modules/fonts.nix similarity index 100% rename from home/alex/fonts.nix rename to home/modules/fonts.nix diff --git a/home/alex/ghostty.nix b/home/modules/ghostty.nix similarity index 100% rename from home/alex/ghostty.nix rename to home/modules/ghostty.nix diff --git a/home/modules/globalprotect.nix b/home/modules/globalprotect.nix new file mode 100644 index 0000000..714ef96 --- /dev/null +++ b/home/modules/globalprotect.nix @@ -0,0 +1,7 @@ +{ pkgs, inputs, ... }: + +{ + home.packages = [ + inputs.globalprotect-openconnect.packages.${pkgs.stdenv.hostPlatform.system}.default + ]; +} diff --git a/home/alex/helix.nix b/home/modules/helix.nix similarity index 100% rename from home/alex/helix.nix rename to home/modules/helix.nix diff --git a/home/alex/pixi.nix b/home/modules/pixi.nix similarity index 100% rename from home/alex/pixi.nix rename to home/modules/pixi.nix diff --git a/home/alex/ssh.nix b/home/modules/ssh.nix similarity index 100% rename from home/alex/ssh.nix rename to home/modules/ssh.nix diff --git a/home/alex/starship.nix b/home/modules/starship.nix similarity index 100% rename from home/alex/starship.nix rename to home/modules/starship.nix diff --git a/home/alex/zsh.nix b/home/modules/zsh.nix similarity index 100% rename from home/alex/zsh.nix rename to home/modules/zsh.nix