diff options
| author | Alejandro Soto <alejandro@34project.org> | 2022-08-20 23:41:45 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2022-08-20 23:44:28 -0600 |
| commit | da1b745ae60fa2532ef145337dba2a9ccb1cc95b (patch) | |
| tree | 18e2e8d89385b0e4cba329ff7a8ca0215d8b3aac | |
| parent | 93c1eda82304d458af1152823e61f259a1e473ec (diff) | |
flake: add hm-isolation dependency
Diffstat (limited to '')
| -rw-r--r-- | flake.nix | 22 | ||||
| -rw-r--r-- | home/default.nix | 7 |
2 files changed, 20 insertions, 9 deletions
@@ -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; |
