summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsinanmohd <sinan@firemail.cc>2023-07-18 08:11:52 +0530
committersinanmohd <sinan@firemail.cc>2023-07-18 15:12:56 +0530
commit4040aab8d1c99bf4dddbd39fb62778bac8b59606 (patch)
treee7c1866ec5956f39e0a3b0b36195c8f69dc379a7
parent3cef7beb464ffc10f45b3126119adedf807998aa (diff)
overlays: initial commit
-rw-r--r--configuration.nix21
-rw-r--r--features/wayland.nix9
-rw-r--r--overlays/dwl-sinan.nix14
3 files changed, 33 insertions, 11 deletions
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";
+ };
+ }
+ );
+}