diff --git a/Droidnix/flake.nix b/Droidnix/flake.nix index 72d9b6989..2f8e3a763 100644 --- a/Droidnix/flake.nix +++ b/Droidnix/flake.nix @@ -56,7 +56,10 @@ { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.extraSpecialArgs = { inherit user inputs; flakeRoot = ./.; }; + home-manager.extraSpecialArgs = { + inherit user inputs; + flakeRoot = ./.; + }; } # Catppuccin theme module @@ -66,37 +69,40 @@ ./generated/top.nix # Ensure Home Manager is enabled for the user - ({ config, pkgs, ... }: { - programs.home-manager.enable = true; - systemd.users.services."home-manager-${user.username}" = { - description = "Home Manager service for ${user.username}"; - wantedBy = [ "multi-user.target" ]; - serviceConfig.Type = "oneshot"; - serviceConfig.RemainAfterExit = true; - serviceConfig.ExecStart = "${pkgs.home-manager}/bin/home-manager switch --flake ${self}#${user.username}@${machine}"; - }; - }) + ( + { config, pkgs, ... }: + { + programs.home-manager.enable = true; + systemd.users.services."home-manager-${user.username}" = { + description = "Home Manager service for ${user.username}"; + wantedBy = [ "multi-user.target" ]; + serviceConfig.Type = "oneshot"; + serviceConfig.RemainAfterExit = true; + serviceConfig.ExecStart = "${pkgs.home-manager}/bin/home-manager switch --flake ${self}#${user.username}@${machine}"; + }; + } + ) ]; - specialArgs = { inherit user inputs; flakeRoot = ./.; }; + specialArgs = { + inherit user inputs; + flakeRoot = ./.; + }; } ); # Home Manager configurations for each user/machine - homeConfigurations = lib.genAttrs [ - (user.username + "@" + machine) for machine in machines - ] ( - userMachine: - let - username = lib.splitString "@" userMachine !!""; - machine = lib.splitString "@" userMachine !!""; - in + homeConfigurations = lib.genAttrs machines ( + machine: home-manager.lib.homeManagerConfiguration { inherit system; - configuration = import ./assets/flake/users/${username}/home.nix { + configuration = import ./assets/flake/users/${user.username}/home.nix { inherit inputs user; pkgs = import nixpkgs { inherit system; }; }; - extraSpecialArgs = { inherit user inputs; flakeRoot = ./.; }; + extraSpecialArgs = { + inherit user inputs; + flakeRoot = ./.; + }; } );