summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2022-08-20 23:41:45 -0600
committerAlejandro Soto <alejandro@34project.org>2022-08-20 23:44:28 -0600
commitda1b745ae60fa2532ef145337dba2a9ccb1cc95b (patch)
tree18e2e8d89385b0e4cba329ff7a8ca0215d8b3aac
parent93c1eda82304d458af1152823e61f259a1e473ec (diff)
flake: add hm-isolation dependency
Diffstat (limited to '')
-rw-r--r--flake.nix22
-rw-r--r--home/default.nix7
2 files changed, 20 insertions, 9 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; });
};
}
diff --git a/home/default.nix b/home/default.nix
index 131d8f9..2f928bf 100644
--- a/home/default.nix
+++ b/home/default.nix
@@ -1,7 +1,10 @@
-{ self, nixpkgs, nixpkgsUnstable, nur }:
+{ self, nixpkgs, nixpkgsUnstable, nur, hm-isolation }:
{ lib, config, pkgs, ... }:
with lib; {
- imports = [ ./unfree.nix ];
+ imports = [
+ hm-isolation.homeManagerModule
+ ./unfree.nix
+ ];
options.local.workstation = with lib.types; mkOption {
type = bool;