feat: let home-manager manage its own overlays

This commit is contained in:
punkfairie 2025-05-31 16:26:42 -07:00
parent 411080df71
commit b73e2eecc5
Signed by: punkfairie
GPG key ID: B3C5488E9A1A7CA6
7 changed files with 22 additions and 19 deletions

View file

@ -16,7 +16,6 @@ in {
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
backupFileExtension = "bak";
users."${my.name}" = {

View file

@ -50,18 +50,7 @@
};
};
nixpkgs = {
config = {
allowUnfree = true;
};
overlays = [
inputs.nur.overlays.default
# Custom packages
(import ../../overlays/marleyos.nix)
];
};
nixpkgs = import ./nixpkgs.nix {inherit inputs;};
# More useful repl.
environment.systemPackages = let

12
modules/base/nixpkgs.nix Normal file
View file

@ -0,0 +1,12 @@
{inputs, ...}: {
config = {
allowUnfree = true;
};
overlays = [
inputs.nur.overlays.default
# Custom packages.
(import ../../overlays/marleyos.nix)
];
}

View file

@ -1,7 +1,6 @@
{
lib,
config,
inputs,
pkgs,
...
}: let
@ -10,11 +9,6 @@ in {
options.marleyos.programs.neovim.enable = lib.mkEnableOption "neovim";
config = lib.mkIf cfg.enable {
# Has to be applied on the OS level to use in HM.
nixpkgs.overlays = [
(import ../../../overlays/marleyvim.nix {inherit inputs;})
];
environment.systemPackages = with pkgs; [
neovim
];

View file

@ -5,6 +5,7 @@
./options
./home-manager.nix
./nix.nix
./system
./shell

3
modules/home/nix.nix Normal file
View file

@ -0,0 +1,3 @@
{inputs, ...}: {
config.nixpkgs = import ../base/nixpkgs.nix {inherit inputs;};
}

View file

@ -3,6 +3,7 @@
config,
osConfig,
lib,
inputs,
pkgs,
...
}: let
@ -15,6 +16,10 @@ in {
mkEnableOption' "neovim" osCfg.enable;
config = lib.mkIf cfg.enable {
nixpkgs.overlays = [
(import ../../../overlays/marleyvim.nix {inherit inputs;})
];
home.packages = with pkgs; [
nvim
];