add focus editor custom flake input

This commit is contained in:
2025-12-12 14:41:25 +00:00
parent 6f5fd4cd01
commit 12995724e9
3 changed files with 76 additions and 11 deletions
+13 -10
View File
@@ -5,20 +5,18 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
hyprland.url = "github:hyprwm/Hyprland"; hyprland.url = "github:hyprwm/Hyprland";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
dankMaterialShell = { dankMaterialShell = {
url = "github:AvengeMedia/DankMaterialShell"; url = "github:AvengeMedia/DankMaterialShell";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
focus-editor = {
quickshell = { url = "path:./pkgs/focus";
url = "github:quickshell-mirror/quickshell"; inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
hyprsysteminfo = { hyprsysteminfo = {
url = "github:hyprwm/hyprsysteminfo"; url = "github:hyprwm/hyprsysteminfo";
}; };
@@ -29,6 +27,10 @@
url = "github:hyprwm/hyprland-plugins"; url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland"; inputs.hyprland.follows = "hyprland";
}; };
quickshell = {
url = "github:quickshell-mirror/quickshell";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { self, nixpkgs, hyprland, ... }@inputs: outputs = { self, nixpkgs, hyprland, ... }@inputs:
@@ -40,12 +42,13 @@
config.allowUnfree = true; config.allowUnfree = true;
overlays = [ overlays = [
(final: prev: { (final: prev: {
focus = inputs.focus-editor.packages.${system};
hyprland = inputs.hyprland.packages.${system}.hyprland; hyprland = inputs.hyprland.packages.${system}.hyprland;
hyprsysteminfo = inputs.hyprsysteminfo.packages.${system}.hyprsysteminfo; hyprsysteminfo = inputs.hyprsysteminfo.packages.${system}.hyprsysteminfo;
hyprpwcenter = inputs.hyprpwcenter.packages.${system}.hyprpwcenter; hyprpwcenter = inputs.hyprpwcenter.packages.${system}.hyprpwcenter;
xdg-desktop-portal-hyprland = inputs.hyprland.packages.${system}.xdg-desktop-portal-hyprland;
quickshell = inputs.quickshell.packages.${system}.quickshell;
hyprPluginPkgs = inputs.hyprland-plugins.packages.${system}; hyprPluginPkgs = inputs.hyprland-plugins.packages.${system};
quickshell = inputs.quickshell.packages.${system}.quickshell;
xdg-desktop-portal-hyprland = inputs.hyprland.packages.${system}.xdg-desktop-portal-hyprland;
}) })
]; ];
}; };
+2 -1
View File
@@ -22,6 +22,7 @@
ffmpeg ffmpeg
filezilla filezilla
floorp-bin floorp-bin
focus
fuzzel fuzzel
fzf fzf
genymotion genymotion
@@ -34,7 +35,7 @@
hyprpicker hyprpicker
hyprpwcenter hyprpwcenter
imagemagick imagemagick
# hyprsysteminfo hyprsysteminfo
kdePackages.kdenlive kdePackages.kdenlive
kdePackages.polkit-kde-agent-1 kdePackages.polkit-kde-agent-1
keepassxc keepassxc
+61
View File
@@ -0,0 +1,61 @@
{
description = "Focus editor binary flake";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
focus = pkgs.stdenv.mkDerivation rec {
pname = "focus";
version = "0.3.8";
src = pkgs.fetchurl {
url = "https://github.com/focus-editor/focus/releases/download/${version}/focus-linux";
# Run once → Nix will tell you the correct hash and you paste it here
hash = "sha256-rjA8TtXL+hJSmIVsv24M3wC1vBMFZURGTIVauzueaZE=";
executable = true;
};
nativeBuildInputs = with pkgs; [ autoPatchelfHook makeWrapper ];
buildInputs = with pkgs; [
libxkbcommon
xorg.libxcb
xorg.libX11
xorg.libXcursor
xorg.libXrandr
xorg.libXi
libGL
vulkan-loader
wayland
];
unpackPhase = "true";
installPhase = ''
mkdir -p $out/bin
cp $src $out/bin/focus
chmod +x $out/bin/focus
wrapProgram $out/bin/focus \
--prefix LD_LIBRARY_PATH : ${pkgs.lib.makeLibraryPath buildInputs}
'';
meta = with pkgs.lib; {
description = "Focus a simple, fast, privacy-friendly text editor";
homepage = "https://github.com/focus-editor/focus";
license = licenses.mit;
platforms = platforms.linux;
mainProgram = "focus";
};
};
in {
packages.${system} = {
default = focus;
focus = focus;
};
};
}