From 1593539fea3c3a6e604773ab65373580c3c6e20e Mon Sep 17 00:00:00 2001 From: Peter Selby Date: Mon, 6 Nov 2023 15:45:46 -0800 Subject: [PATCH] No...make it a module --- flake.nix | 11 ++++++++--- module.nix | 6 ++---- niten.nix | 3 ++- xiaoxuan.nix | 5 +++-- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/flake.nix b/flake.nix index 45f2010..cce5254 100644 --- a/flake.nix +++ b/flake.nix @@ -25,8 +25,13 @@ ]; }; mkHomeManagerConfiguration = { username, user-email, home-dir, enable-gui, pkgs, ... }: - home-manager.lib.homeManagerConfiguration (import ./niten.nix { - inherit username user-email home-dir enable-gui doom-emacs niten-doom-config pkgs; - }); + home-manager.lib.homeManagerConfiguration { + inherit pkgs; + modules = [ + (import ./niten.nix { + inherit username user-email home-dir enable-gui doom-emacs niten-doom-config; + }); + ]; + }; }; } diff --git a/module.nix b/module.nix index 9c22996..7da8b1f 100644 --- a/module.nix +++ b/module.nix @@ -38,7 +38,7 @@ in { user-email = if (user-cfg.email != null) then user-cfg.email else "${username}@${config.instance.local-domain}"; home-dir = config.users.users.${username}.home; - in (import user-configs.${username} { + in ((import user-configs.${username} { inherit doom-emacs niten-doom-config @@ -46,9 +46,7 @@ in { user-email home-dir enable-gui - lib, - pkgs; - }); + }) { inherit pkgs; }); in mapAttrs generate-config local-users; }; } diff --git a/niten.nix b/niten.nix index b41d7fa..1d89e96 100644 --- a/niten.nix +++ b/niten.nix @@ -5,10 +5,11 @@ user-email, home-dir, enable-gui, - pkgs, ... }: +{ pkgs, ... }: + with pkgs.lib; let diff --git a/xiaoxuan.nix b/xiaoxuan.nix index 5b34a36..b187aac 100644 --- a/xiaoxuan.nix +++ b/xiaoxuan.nix @@ -1,6 +1,7 @@ -{ config, lib, pkgs, username, user-email, home-dir, enable-gui, ... }: +{ username, user-email, home-dir, enable-gui, ... }: +{ pkgs, ... }: -with lib; if !enable-gui then {} else { +with pkgs.lib; if !enable-gui then {} else { home = { packages = with pkgs; [ fcitx5-configtool