summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2024-07-27 16:32:17 +0530
committersinanmohd <sinan@sinanmohd.com>2024-07-27 16:32:17 +0530
commitf28b2c3631e34d4899641bde9423bbb4c7225e75 (patch)
tree565ddd2d8d679142fc417e2bd63267ad82d6efb1
parent53cf883d602d21ab1cdb4e127a64f1e9f7e350ff (diff)
flake/makeHomeImports: init
-rw-r--r--flake.nix15
1 files changed, 9 insertions, 6 deletions
diff --git a/flake.nix b/flake.nix
index 9a411fc..f88e5d0 100644
--- a/flake.nix
+++ b/flake.nix
@@ -23,6 +23,11 @@
] ++ lib.optional (builtins.pathExists ./global/${host})
./global/${host};
+ makeHomeImports = host: [
+ ./home/common/home.nix
+ ] ++ lib.optional (builtins.pathExists ./home/${host})
+ ./home/${host}/home.nix;
+
makeNixos = host: system: lib.nixosSystem {
inherit system;
modules = [
@@ -42,9 +47,8 @@
useGlobalPkgs = true;
useUserPackages = true;
users.${username} = { ... }: {
- imports = [
- ./home/${host}/home.nix
- ] ++ (makeGlobalImports host);
+ imports = (makeHomeImports host)
+ ++ (makeGlobalImports host);
};
};
})
@@ -53,9 +57,8 @@
makeHome = host: system: home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.${system};
- modules = [
- ./home/${host}/home.nix
- ] ++ (makeGlobalImports host);
+ modules = (makeHomeImports host)
+ ++ (makeGlobalImports host);
};
in
{