From a3289ee611af8e7e0b6f4a2d49dc46198e3de99e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Tue, 16 Jan 2024 12:37:50 +0100 Subject: [PATCH] refactor!: use inputs directly instead of overlays --- flake.nix | 3 --- modules/programs/hyprland/default.nix | 2 ++ modules/programs/nvim/default.nix | 4 ++-- modules/services/timers.nix | 3 ++- overlays/packages.nix | 12 +----------- 5 files changed, 7 insertions(+), 17 deletions(-) diff --git a/flake.nix b/flake.nix index d2b6e40..e1d77a9 100644 --- a/flake.nix +++ b/flake.nix @@ -21,8 +21,6 @@ nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; # Programs - rofi-wayland.flake = false; - rofi-wayland.url = "github:lbonn/rofi/wayland"; nix-super.url = "github:privatevoid-net/nix-super"; timers.url = "git+https://gitea.moritzboeh.me/moritz/timers.git"; @@ -53,7 +51,6 @@ # Hyprland hypr-contrib.url = "github:hyprwm/contrib"; hyprland.url = "github:hyprwm/Hyprland"; - hyprpaper.url = "github:hyprwm/hyprpaper"; # Laptop asus-touchpad-numpad-driver.url = "github:MoritzBoehme/asus-touchpad-numpad-driver/german-layout"; diff --git a/modules/programs/hyprland/default.nix b/modules/programs/hyprland/default.nix index 9deeb57..a1edf3b 100644 --- a/modules/programs/hyprland/default.nix +++ b/modules/programs/hyprland/default.nix @@ -1,6 +1,7 @@ { config , lib , pkgs +, inputs , ... } @ args: @@ -60,6 +61,7 @@ in programs.hyprland = { enable = true; + package = inputs.hyprland.packages.${pkgs.system}.default; }; home-manager.users.moritz = { diff --git a/modules/programs/nvim/default.nix b/modules/programs/nvim/default.nix index 405a17f..c5ffc2c 100644 --- a/modules/programs/nvim/default.nix +++ b/modules/programs/nvim/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, inputs, ... }: with lib; let @@ -21,7 +21,7 @@ in programs.neovim = { enable = true; - package = pkgs.neovim-nightly; + package = inputs.neovim-nightly-overlay.packages.${pkgs.system}.default; vimAlias = true; vimdiffAlias = true; withNodeJs = true; diff --git a/modules/services/timers.nix b/modules/services/timers.nix index 52c4260..47039fa 100644 --- a/modules/services/timers.nix +++ b/modules/services/timers.nix @@ -1,4 +1,5 @@ { config +, inputs , lib , pkgs , ... @@ -12,7 +13,7 @@ in options.my.services.timers.enable = mkEnableOption "timers"; options.my.services.timers.package = mkOption { type = types.package; - default = pkgs.timers; + inherit (inputs.timers.packages.${pkgs.system}) default; }; config = lib.mkIf cfg.enable { diff --git a/overlays/packages.nix b/overlays/packages.nix index 80745ad..e40443b 100644 --- a/overlays/packages.nix +++ b/overlays/packages.nix @@ -1,17 +1,7 @@ -{ inputs, lib, ... }: +_: _: prev: { - agenix = inputs.agenix.packages.${prev.system}.default; - hyprpaper = inputs.hyprpaper.packages.${prev.system}.default; - rofi-wayland = prev.rofi-wayland.overrideAttrs (_: { - src = inputs.rofi-wayland; - version = lib.my.mkVersionInput inputs.rofi-wayland; - }); - timers = inputs.timers.packages.${prev.system}.default; - hyprland = inputs.hyprland.packages.${prev.system}.default; - neovim-nightly = inputs.neovim-nightly-overlay.packages.${prev.system}.default; - xorg = prev.xorg // { lndir = prev.xorg.lndir.overrideAttrs (_: { meta.mainProgram = "lndir";