From 90e14b438051396c486f7ace016b4b96823a5828 Mon Sep 17 00:00:00 2001 From: xenia Date: Sun, 23 Jun 2024 23:23:26 +0200 Subject: [PATCH] Use home manager with nixos, not as separate module --- flake.nix | 71 ++++++++++++++++++++++++++----------------------------- 1 file changed, 33 insertions(+), 38 deletions(-) diff --git a/flake.nix b/flake.nix index 85b4d39c..3da7fb1b 100644 --- a/flake.nix +++ b/flake.nix @@ -82,44 +82,6 @@ ]; }; - homeConfigurations."coral" = - let - system = "x86_64-linux"; - pkgs = mkPkgs system; - home = mkHome { - username = "coral"; - home-dir = "/home/coral"; - prompt-color = 243; - inherit system pkgs; - }; - in home-manager.lib.homeManagerConfiguration { - inherit pkgs; - - modules = [ - home - ]; - }; - - homeConfigurations."xenia" = - let - system = "x86_64-linux"; - pkgs = mkPkgs system; - home = mkHome { - username = "xenia"; - home-dir = "/home/xenia"; - prompt-color = 205; - inherit system pkgs; - }; - pc = mkPC { inherit system pkgs; }; - in home-manager.lib.homeManagerConfiguration { - inherit pkgs; - - modules = [ - home - pc - ]; - }; - darwinConfigurations."Joe-Bidens-MacBook-Pro" = let system = "aarch64-darwin"; @@ -147,6 +109,31 @@ eth-interface = "enp0s31f6"; static-ip = "192.168.0.199"; }; + + coral = + let + system = "x86_64-linux"; + pkgs = mkPkgs system; + home = mkHome { + username = "coral"; + home-dir = "/home/coral"; + prompt-color = 243; + inherit system pkgs; + }; + in { home = home; }; + + xenia = + let + system = "x86_64-linux"; + pkgs = mkPkgs system; + home = mkHome { + username = "xenia"; + home-dir = "/home/xenia"; + prompt-color = 205; + inherit system pkgs; + }; + pc = mkPC { inherit system pkgs; }; + in { home = home; pc = pc; }; in nixpkgs.lib.nixosSystem { inherit system; @@ -155,6 +142,14 @@ base graphical networking + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.coral = coral.home; + home-manager.users.xenia = xenia.home; + } + { home-manager.users.xenia = xenia.pc; } ]; }; };