From b979657a95b00414652904974ec8819761250a50 Mon Sep 17 00:00:00 2001 From: NullBite Date: Sun, 31 Dec 2023 12:03:46 -0500 Subject: [PATCH] Add a basic working home-manager config my idea didn't work --- flake.nix | 18 +++++++++++++++++- home.nix | 12 ++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 home.nix diff --git a/flake.nix b/flake.nix index 6df3e48..f0b65b2 100644 --- a/flake.nix +++ b/flake.nix @@ -12,11 +12,16 @@ }; }; - outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, ... }: + outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, ... }@inputs: let lib = nixpkgs.lib; lib-unstable = nixpkgs-unstable.lib; username = "nullbite"; + hmModule = home-manager.nixosModules.home-manager; + hmModuleDefaults = { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + }; # to use this add `homeModules [ ... ]` to a system's modules. homeModules = user: modules: home-manager.nixosModules.home-manager { @@ -28,6 +33,12 @@ }; }; in { + # for repl debugging via :lf . + inherit inputs; + lets = { + inherit lib lib-unstable username homeModules; + }; + nixosConfigurations = { slab = lib.nixosSystem { system = "x86_64-linux"; @@ -48,6 +59,11 @@ ./roles/plasma.nix ./fragments/hardware/nvidia-modeset.nix ./roles/gaming.nix + + hmModule (hmModuleDefaults // { + home-manager.users."${username}" = import ./home.nix; + }) + ]; }; }; diff --git a/home.nix b/home.nix new file mode 100644 index 0000000..37fb414 --- /dev/null +++ b/home.nix @@ -0,0 +1,12 @@ +{ lib, pkgs, osConfig, ... }: +{ + + # home.username = "nullbite"; + # home.homeDirectory = "/home/nullbite"; + + home.packages = with pkgs; [ + btop + ]; + + home.stateVersion = "23.11"; +}