From c912add857c1440032bebd723a16a2c16d3cdfa0 Mon Sep 17 00:00:00 2001 From: Vineet Kumar Date: Fri, 9 Aug 2024 18:29:01 -0400 Subject: try using home-manager --- flake.nix | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 06b7aa4..f344e40 100644 --- a/flake.nix +++ b/flake.nix @@ -1,22 +1,36 @@ { - description = "simple nixos flake"; + description = "my nixos configuration"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; - home-manager.url = "github:nix-community/home-manager"; + + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { self, nixpkgs, ... }@attrs: { + outputs = { self, home-manager, nixpkgs, ... }@attrs: { # TODO: deduplicate this - nixosConfigurations.demiurge = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = attrs; - modules = [ ./hosts/demiurge ]; - }; - nixosConfigurations.lappy = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = attrs; - modules = [ ./hosts/lappy ]; + nixosConfigurations = { + demiurge = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = attrs; + modules = [ ./hosts/demiurge ]; + }; + + lappy = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = attrs; + modules = [ + ./hosts/lappy + home-manager.nixosModules.home-manager { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.vin = import ./home.nix; + } + ]; + }; }; }; } -- cgit v1.2.3