Skip to content

Commit

Permalink
users: Initial home-manager only configurations
Browse files Browse the repository at this point in the history
for non-root users or non-nixos systems
  • Loading branch information
Pacman99 committed Jan 16, 2021
1 parent f72125c commit 79f41cd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
12 changes: 11 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@
inherit lib pkgset utils externModules system;
});

homeConfigurations =
builtins.mapAttrs
(_: config: config.config.home-manager.users)
self.nixosConfigurations;

overlay = import ./pkgs;

overlays = pathsToImportedAttrs overlayPaths;
Expand Down Expand Up @@ -77,7 +82,12 @@
});
in
{
inherit packages;
packages = packages //
utils.genHomeActivationPackages
self.homeConfigurations;

# Just for testing, can't build the activationPackage easily without this
defaultPackage = self.homeConfigurations.NixOS.nixos.home.activationPackage;

devShell = import ./shell.nix {
inherit pkgs;
Expand Down
6 changes: 6 additions & 0 deletions lib/utils.nix
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ in
(recursiveUpdate cachixAttrs modulesAttrs)
profilesAttrs;

genHomeActivationPackages = hmConfigs:
{ hmActivationPackages =
builtins.mapAttrs (_: x: builtins.mapAttrs
(_: cfg: cfg.home.activationPackage) x) hmConfigs;
};

genPackages = { self, pkgs }:
let
inherit (self) overlay overlays;
Expand Down

0 comments on commit 79f41cd

Please sign in to comment.