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 = {
|
home-manager = {
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
useGlobalPkgs = true;
|
|
||||||
backupFileExtension = "bak";
|
backupFileExtension = "bak";
|
||||||
|
|
||||||
users."${my.name}" = {
|
users."${my.name}" = {
|
||||||
|
|
|
@ -50,18 +50,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs = {
|
nixpkgs = import ./nixpkgs.nix {inherit inputs;};
|
||||||
config = {
|
|
||||||
allowUnfree = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
overlays = [
|
|
||||||
inputs.nur.overlays.default
|
|
||||||
|
|
||||||
# Custom packages
|
|
||||||
(import ../../overlays/marleyos.nix)
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# More useful repl.
|
# More useful repl.
|
||||||
environment.systemPackages = let
|
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,
|
lib,
|
||||||
config,
|
config,
|
||||||
inputs,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
@ -10,11 +9,6 @@ in {
|
||||||
options.marleyos.programs.neovim.enable = lib.mkEnableOption "neovim";
|
options.marleyos.programs.neovim.enable = lib.mkEnableOption "neovim";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
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; [
|
environment.systemPackages = with pkgs; [
|
||||||
neovim
|
neovim
|
||||||
];
|
];
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
./options
|
./options
|
||||||
|
|
||||||
./home-manager.nix
|
./home-manager.nix
|
||||||
|
./nix.nix
|
||||||
|
|
||||||
./system
|
./system
|
||||||
./shell
|
./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,
|
config,
|
||||||
osConfig,
|
osConfig,
|
||||||
lib,
|
lib,
|
||||||
|
inputs,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
@ -15,6 +16,10 @@ in {
|
||||||
mkEnableOption' "neovim" osCfg.enable;
|
mkEnableOption' "neovim" osCfg.enable;
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(import ../../../overlays/marleyvim.nix {inherit inputs;})
|
||||||
|
];
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
nvim
|
nvim
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue