56 lines
1.5 KiB
Nix
56 lines
1.5 KiB
Nix
{
|
|
description = "Dendritic Hyprland Configuration";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05";
|
|
wrappers.url = "github:nix-community/nix-wrapper-modules";
|
|
};
|
|
|
|
outputs = {
|
|
self,
|
|
nixpkgs,
|
|
wrappers,
|
|
# @ inputs passes through the inputs set, allowing you to call inputs.inputname
|
|
} @ inputs: let
|
|
# Hard code system for ease of use, hyprland only supports x86_64-linux anyway iirc
|
|
system = "x86_64-linux";
|
|
|
|
# Initialise pkgs
|
|
pkgs = import nixpkgs {inherit system;};
|
|
|
|
# Set of pacakges that hyprland depends on
|
|
runtimePkgs = with pkgs; [
|
|
foot
|
|
waybar
|
|
];
|
|
|
|
# Defined function so that makeOverridable knows what options exist
|
|
mkWrapper = {
|
|
pkgs,
|
|
package,
|
|
runtimePkgs,
|
|
env,
|
|
flags,
|
|
}: (wrappers.lib.wrapPackage ({...}: {
|
|
inherit pkgs package runtimePkgs env flags;
|
|
}));
|
|
in {
|
|
# Allows runtimePkgs to be accessed and manipulated in consuming flake (like the dendritic config)
|
|
# This isn't used for the tutorial but it is in my primary config
|
|
lib.runtimePkgs.${system} = runtimePkgs;
|
|
|
|
# Define default pacakge
|
|
packages.${system} = {
|
|
# Make the default pacakge ovveridable
|
|
default = pkgs.lib.makeOverridable mkWrapper {
|
|
# Sane defaults
|
|
inherit pkgs;
|
|
package = pkgs.hyprland;
|
|
runtimePkgs = runtimePkgs;
|
|
env."HYPRLAND_ROOT" = ./.;
|
|
flags."--config" = ./hyprland.lua;
|
|
};
|
|
};
|
|
};
|
|
}
|