Add a basic working home-manager config

my idea didn't work
This commit is contained in:
NullBite 2023-12-31 12:03:46 -05:00
parent c505d1dea6
commit b979657a95
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A
2 changed files with 29 additions and 1 deletions

View File

@ -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 <username> [ ... ]` 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;
})
];
};
};

12
home.nix Normal file
View File

@ -0,0 +1,12 @@
{ lib, pkgs, osConfig, ... }:
{
# home.username = "nullbite";
# home.homeDirectory = "/home/nullbite";
home.packages = with pkgs; [
btop
];
home.stateVersion = "23.11";
}