added comments for casual readers
This commit is contained in:
11
flake.nix
11
flake.nix
@@ -10,15 +10,21 @@
|
||||
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,
|
||||
@@ -29,10 +35,15 @@
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user