feat: let home-manager manage its own overlays
This commit is contained in:
parent
411080df71
commit
b73e2eecc5
7 changed files with 22 additions and 19 deletions
|
@ -16,7 +16,6 @@ in {
|
|||
|
||||
home-manager = {
|
||||
useUserPackages = true;
|
||||
useGlobalPkgs = true;
|
||||
backupFileExtension = "bak";
|
||||
|
||||
users."${my.name}" = {
|
||||
|
|
|
@ -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
12
modules/base/nixpkgs.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{inputs, ...}: {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
|
||||
overlays = [
|
||||
inputs.nur.overlays.default
|
||||
|
||||
# Custom packages.
|
||||
(import ../../overlays/marleyos.nix)
|
||||
];
|
||||
}
|
|
@ -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
|
||||
];
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
./options
|
||||
|
||||
./home-manager.nix
|
||||
./nix.nix
|
||||
|
||||
./system
|
||||
./shell
|
||||
|
|
3
modules/home/nix.nix
Normal file
3
modules/home/nix.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{inputs, ...}: {
|
||||
config.nixpkgs = import ../base/nixpkgs.nix {inherit inputs;};
|
||||
}
|
|
@ -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
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue