From 0919a5dd18dec67daaa4ffe2bf8ee77559225655 Mon Sep 17 00:00:00 2001 From: punkfairie Date: Wed, 13 Nov 2024 18:28:18 -0800 Subject: [PATCH] refactor(flake): Use self instead of relative imports --- flake.nix | 8 +++++--- home/programs/figlet.nix | 6 +++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 423dc01..9ea3e6c 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,8 @@ outputs = { self, ... }@inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } { + debug = true; + systems = [ "x86_64-linux" ]; @@ -18,9 +20,9 @@ { imports = [ inputs.rose-pine.homeManagerModules.rose-pine - ./modules/home/iconTheme.nix - ./modules/home/shellAbbrs.nix - ./home + "${self}/modules/home/iconTheme.nix" + "${self}/modules/home/shellAbbrs.nix" + "${self}/home" ]; }; }; diff --git a/home/programs/figlet.nix b/home/programs/figlet.nix index 776774e..73590cd 100644 --- a/home/programs/figlet.nix +++ b/home/programs/figlet.nix @@ -1,13 +1,17 @@ { + flake, pkgs, lib, config, ... }: +let + inherit (flake.inputs) self; +in { home.packages = with pkgs; [ # Could not get overlays or overrides to work. - (callPackage ./../../derivations/figlet-with-fonts.nix { }) + (callPackage "${self}/derivations/figlet-with-fonts.nix" { }) ]; programs.fish.functions = lib.mkIf config.programs.fish.enable {