From 4040aab8d1c99bf4dddbd39fb62778bac8b59606 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Tue, 18 Jul 2023 08:11:52 +0530 Subject: overlays: initial commit --- configuration.nix | 21 +++++++++++++++++++-- features/wayland.nix | 9 --------- overlays/dwl-sinan.nix | 14 ++++++++++++++ 3 files changed, 33 insertions(+), 11 deletions(-) create mode 100644 overlays/dwl-sinan.nix diff --git a/configuration.nix b/configuration.nix index 1c5601d..2b408a8 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, pkgs, options, ... }: let user = "sinan"; @@ -73,8 +73,25 @@ in ]; }; system.stateVersion = "23.05"; - nix.settings.experimental-features = [ "nix-command" ]; + # nix + nix = { + settings.experimental-features = [ "nix-command" ]; + nixPath = + options.nix.nixPath.default ++ + [ "nixpkgs-overlays=/etc/nixos/overlays/" ] + ; + }; + nixpkgs.overlays = with builtins; + if pathExists ./overlays then + map + (overlay: import ./overlays/${overlay}) + (attrNames (readDir ./overlays)) + else + options.nixpkgs.overlays.default + ; + + # programs programs = { adb.enable = true; bash.promptInit = '' diff --git a/features/wayland.nix b/features/wayland.nix index b22bac7..dd068e7 100644 --- a/features/wayland.nix +++ b/features/wayland.nix @@ -31,15 +31,6 @@ let gsettings set $gnome_schema gtk-theme 'Dracula' ''; }; - - dwl-sinan = with pkgs; dwl.overrideAttrs (oldAttrs: { - name = "dwl-sinan"; - src = fetchgit { - url = "https://git.sinanmohd.com/dwl"; - rev = "f708547efb0b3afe4149f6eb7bcc685fc39f351a"; - sha256 = "04rb90hasicm4aj51403hjxyyszm87qiqz6phrjy3364vkqvrx3c"; - }; - }); in { # pkgs diff --git a/overlays/dwl-sinan.nix b/overlays/dwl-sinan.nix new file mode 100644 index 0000000..b329b39 --- /dev/null +++ b/overlays/dwl-sinan.nix @@ -0,0 +1,14 @@ +final: prev: + +{ + dwl-sinan = prev.dwl.overrideAttrs (finalAttrs: prevAttrs: + { + pname = prevAttrs.pname + "-sinan"; + src = prev.fetchgit { + url = "https://git.sinanmohd.com/dwl"; + rev = "f708547efb0b3afe4149f6eb7bcc685fc39f351a"; + sha256 = "04rb90hasicm4aj51403hjxyyszm87qiqz6phrjy3364vkqvrx3c"; + }; + } + ); +} -- cgit v1.2.3