From 522d19bf5b3f16ef8b224092c43439fbcc1e2a56 Mon Sep 17 00:00:00 2001 From: Antoine Viallon Date: Thu, 9 Jun 2022 01:16:07 +0200 Subject: [PATCH] [HomeManager] Use git repo instead of nix channel Prepare for flakes --- home-manager.nix | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/home-manager.nix b/home-manager.nix index de85ce8..b2caed4 100644 --- a/home-manager.nix +++ b/home-manager.nix @@ -1,16 +1,28 @@ -{config, pkgs, lib, ...}: +{config, pkgs, lib, utils, ...}: with lib; let cfg = config.aviallon.home-manager; - usersCfg = config.users; + usersCfg = attrByPath [ "users" ] { users = {}; groups = {}; } config; defaultUsers = attrNames (filterAttrs (name: value: value.isNormalUser) usersCfg.users); hmUserCfg = u: config.home-manager.users.${u}; userCfg = u: config.users.users.${u}; getUserCfgPath = u: "${(userCfg u).home}/.config/nixpkgs/home.nix"; + + homeManager = fetchGit { + url = "https://github.com/nix-community/home-manager"; + ref = "release-22.05"; + }; + + homeManagerNixos = import "${homeManager}/nixos" { + inherit config; + inherit pkgs; + inherit lib; + inherit utils; + }; in { imports = [ - + homeManagerNixos ]; options.aviallon.home-manager = {