From ec92f3bc5ff8e92cb34e4e3274cd4ed7522ac977 Mon Sep 17 00:00:00 2001 From: Tyler Beckman Date: Sun, 24 Nov 2024 21:38:00 -0700 Subject: [PATCH] Add home manager compatibility to flake rather than just nixos module --- flake.nix | 25 +++++++++++++++++++++---- home-manager/home.nix | 4 +++- hosts/laptop/modules/packages.nix | 1 + 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index 9fcfc33..7497a33 100755 --- a/flake.nix +++ b/flake.nix @@ -44,9 +44,11 @@ }; }; - outputs = inputs@{ nixpkgs, home-manager, sddm-sugar-candy-nix, ... }: { + outputs = inputs@{ nixpkgs, home-manager, plasma-manager, ... }: let + system = "x86_64-linux"; + in { nixosConfigurations.ty-nixos = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; + inherit system; modules = [ ./hosts/laptop @@ -57,8 +59,23 @@ ]; specialArgs = { - inherit inputs; - system = "x86_64-linux"; + inherit inputs system; + }; + }; + + # Add home manager configuration compatibility to the main flake + homeConfigurations."ty" = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.${system}; + + # Specify your home configuration modules here, for example, + # the path to your home.nix. + modules = [ + plasma-manager.homeManagerModules.plasma-manager + ./home-manager/home.nix + ]; + + extraSpecialArgs = { + inherit inputs system; }; }; }; diff --git a/home-manager/home.nix b/home-manager/home.nix index 7244921..947ff13 100755 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -1,7 +1,9 @@ { ... }: { home.stateVersion = "24.05"; - + home.username = "ty"; + home.homeDirectory = "/home/ty"; + imports = [ ./modules/packages.nix ./modules/plasma.nix diff --git a/hosts/laptop/modules/packages.nix b/hosts/laptop/modules/packages.nix index 62123a2..986f778 100644 --- a/hosts/laptop/modules/packages.nix +++ b/hosts/laptop/modules/packages.nix @@ -6,6 +6,7 @@ wget curl neovim + home-manager # VCS git jujutsu