From b54b143766aa42a7aa2c56064bb643abbb4edaa7 Mon Sep 17 00:00:00 2001 From: rafiq Date: Thu, 27 Feb 2025 04:23:18 +0800 Subject: [PATCH] refactor(nvf): add nvf as home package instead of system --- flake.nix | 13 +++++++------ users/rafiq/default.nix | 6 +++++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/flake.nix b/flake.nix index 915d900..59e15b5 100644 --- a/flake.nix +++ b/flake.nix @@ -7,11 +7,15 @@ home-manager, nvf, ... - } @ inputs: { + } @ inputs: + let + args = { inherit self inputs; }; + in + { # System Configurations nixosConfigurations = { nemesis = nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs; }; + specialArgs = args; modules = [ ./hosts/nemesis @@ -22,15 +26,12 @@ # Install user packages to /etc/profiles home-manager.useUserPackages = true; # Pass inputs to home-manager configurations - home-manager.extraSpecialArgs = { inherit inputs; }; + home-manager.extraSpecialArgs = args; # Add the users home-manager.users.rafiq.imports = [ ./users/rafiq ]; } - - # Include NVF in the system - ({ pkgs, ... }: { environment.systemPackages = [ self.packages.${pkgs.stdenv.system}.nvf ]; }) ]; }; }; diff --git a/users/rafiq/default.nix b/users/rafiq/default.nix index 8da4421..52dc470 100644 --- a/users/rafiq/default.nix +++ b/users/rafiq/default.nix @@ -1,8 +1,12 @@ -{ config, pkgs, inputs, ... }: +{ self, config, pkgs, inputs, ... }: { home.username = "rafiq"; home.homeDirectory = "/home/rafiq"; + + home.packages = [ + self.packages.${pkgs.stdenv.system}.nvf + ]; programs.git = { enable = true;