From 08aacf8c0d45938d5d197fade4c7a070a58bb3c0 Mon Sep 17 00:00:00 2001 From: Ulic-youthlic Date: Wed, 8 Jan 2025 00:02:29 +0800 Subject: [PATCH] wrap niri and spotx overlays into overlay.modifications. --- flake.nix | 1 + nixos/modules/default.nix | 11 ++++------- overlays/additions/default.nix | 9 +++++++++ overlays/modifications/default.nix | 2 ++ overlays/modifications/niri.nix | 1 + overlays/modifications/spotify.nix | 2 +- users/spotify.nix | 5 +---- 7 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 overlays/modifications/niri.nix diff --git a/flake.nix b/flake.nix index 6873c98..2fec30d 100644 --- a/flake.nix +++ b/flake.nix @@ -95,6 +95,7 @@ overlays = { modifications = (import ./overlays/modifications { inherit inputs; }); + additions = (import ./overlays/additions { inherit inputs; }); }; nixosConfigurations = diff --git a/nixos/modules/default.nix b/nixos/modules/default.nix index 5dee7a5..12af385 100644 --- a/nixos/modules/default.nix +++ b/nixos/modules/default.nix @@ -18,13 +18,10 @@ config = { nixpkgs = { - overlays = - (with outputs; [ - overlays.modifications - ]) - ++ (with inputs; [ - niri-flake.overlays.niri - ]); + overlays = with outputs.overlays; [ + modifications + additions + ]; }; }; } diff --git a/overlays/additions/default.nix b/overlays/additions/default.nix index e69de29..da50d99 100644 --- a/overlays/additions/default.nix +++ b/overlays/additions/default.nix @@ -0,0 +1,9 @@ +{ ... }@args: +final: prev: +let + inherit (prev) lib; + overlay-files = [ + ]; + overlay-list = map (file: import file args) overlay-files; +in +(lib.composeManyExtensions overlay-list) final prev diff --git a/overlays/modifications/default.nix b/overlays/modifications/default.nix index 5ab7d49..fbd3953 100644 --- a/overlays/modifications/default.nix +++ b/overlays/modifications/default.nix @@ -4,6 +4,8 @@ let inherit (prev) lib; overlay-files = [ ./helix.nix + ./spotify.nix + ./niri.nix ]; overlay-list = map (file: import file args) overlay-files; in diff --git a/overlays/modifications/niri.nix b/overlays/modifications/niri.nix new file mode 100644 index 0000000..5ba2cf6 --- /dev/null +++ b/overlays/modifications/niri.nix @@ -0,0 +1 @@ +{ inputs, ... }: inputs.niri-flake.overlays.niri diff --git a/overlays/modifications/spotify.nix b/overlays/modifications/spotify.nix index 8b13789..6db04ec 100644 --- a/overlays/modifications/spotify.nix +++ b/overlays/modifications/spotify.nix @@ -1 +1 @@ - +{ inputs, ... }: inputs.oskars-dotfiles.overlays.spotx diff --git a/users/spotify.nix b/users/spotify.nix index ffc896b..c2724d0 100644 --- a/users/spotify.nix +++ b/users/spotify.nix @@ -1,8 +1,5 @@ -{ pkgs, inputs, ... }: +{ pkgs, ... }: { - nixpkgs.overlays = [ - inputs.oskars-dotfiles.overlays.spotx - ]; environment.systemPackages = with pkgs; [ spotify ];