forked from pub-solar/os
users: home-manager only configurations
for non-root users or non-nixos systems
This commit is contained in:
parent
a1fade8411
commit
88eecddab5
17
flake.nix
17
flake.nix
|
@ -29,7 +29,8 @@
|
||||||
inherit (builtins) attrValues;
|
inherit (builtins) attrValues;
|
||||||
inherit (flake-utils.lib) eachDefaultSystem flattenTreeSystem;
|
inherit (flake-utils.lib) eachDefaultSystem flattenTreeSystem;
|
||||||
inherit (nixos.lib) recursiveUpdate;
|
inherit (nixos.lib) recursiveUpdate;
|
||||||
inherit (self.lib) overlays nixosModules genPackages pkgImport;
|
inherit (self.lib) overlays nixosModules genPackages pkgImport
|
||||||
|
genHomeActivationPackages;
|
||||||
|
|
||||||
externOverlays = [ nur.overlay devshell.overlay ];
|
externOverlays = [ nur.overlay devshell.overlay ];
|
||||||
externModules = [
|
externModules = [
|
||||||
|
@ -52,6 +53,11 @@
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
homeConfigurations =
|
||||||
|
builtins.mapAttrs
|
||||||
|
(_: config: config.config.home-manager.users)
|
||||||
|
self.nixosConfigurations;
|
||||||
|
|
||||||
overlay = import ./pkgs;
|
overlay = import ./pkgs;
|
||||||
|
|
||||||
lib = import ./lib {
|
lib = import ./lib {
|
||||||
|
@ -90,10 +96,17 @@
|
||||||
in
|
in
|
||||||
pkgImport nixos overlays system;
|
pkgImport nixos overlays system;
|
||||||
|
|
||||||
packages = flattenTreeSystem system
|
packages =
|
||||||
|
let
|
||||||
|
packages' = flattenTreeSystem system
|
||||||
(genPackages {
|
(genPackages {
|
||||||
inherit self pkgs;
|
inherit self pkgs;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
homeActivationPackages = genHomeActivationPackages
|
||||||
|
self.homeConfigurations;
|
||||||
|
in
|
||||||
|
recursiveUpdate packages' homeActivationPackages;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
inherit packages;
|
inherit packages;
|
||||||
|
|
|
@ -73,6 +73,15 @@ in
|
||||||
(recursiveUpdate cachixAttrs modulesAttrs)
|
(recursiveUpdate cachixAttrs modulesAttrs)
|
||||||
profilesAttrs;
|
profilesAttrs;
|
||||||
|
|
||||||
|
genHomeActivationPackages = hmConfigs: {
|
||||||
|
hmActivationPackages =
|
||||||
|
builtins.mapAttrs
|
||||||
|
(_: x: builtins.mapAttrs
|
||||||
|
(_: cfg: cfg.home.activationPackage)
|
||||||
|
x)
|
||||||
|
hmConfigs;
|
||||||
|
};
|
||||||
|
|
||||||
genPackages = { self, pkgs }:
|
genPackages = { self, pkgs }:
|
||||||
let
|
let
|
||||||
inherit (self) overlay overlays;
|
inherit (self) overlay overlays;
|
||||||
|
|
Loading…
Reference in a new issue