summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--flake.nix22
1 files changed, 15 insertions, 7 deletions
diff --git a/flake.nix b/flake.nix
index 5780813..bf1c8c5 100644
--- a/flake.nix
+++ b/flake.nix
@@ -10,10 +10,12 @@
nur.url = "github:nix-community/NUR";
impermanence.url = "github:nix-community/impermanence";
+ hm-isolation.url = "/home/ale/hm-isolation";
};
outputs =
- { self, nixpkgs, nixpkgsUnstable, home-manager, nur, impermanence, ... }:
+ { self, nixpkgs, nixpkgsUnstable, home-manager
+ , nur, impermanence, hm-isolation, ... }:
with nixpkgs.lib; let
util = import ./util;
inherit (util nixpkgs.lib) importAll;
@@ -38,14 +40,20 @@
in mapAttrs (_: hostConfig) (importAll { root = ./sys/platform; });
homeConfigurations = let
+ configuration = import ./home {
+ inherit self nixpkgs nixpkgsUnstable nur hm-isolation;
+ };
+
+ username = "ale";
+
home = platform: home-manager.lib.homeManagerConfiguration {
system = "x86_64-linux";
- configuration = import ./home { inherit self nixpkgs nixpkgsUnstable nur; };
+ inherit configuration;
extraModules = [ platform ];
- username = "ale";
- homeDirectory = "/home/ale";
+ inherit username;
+ homeDirectory = "/home/${username}";
# Update the state version as needed.
# See the changelog here:
@@ -57,10 +65,10 @@
extraSpecialArgs = {};
};
- homeConfig = id: platform: {
- name = "ale@${id}";
+ platformHome = name: platform: {
+ name = "${username}@${name}";
value = home platform;
};
- in mapAttrs' homeConfig (importAll { root = ./home/platform; });
+ in mapAttrs' platformHome (importAll { root = ./home/platform; });
};
}