added comments for casual readers

This commit is contained in:
2026-11-08 17:09:59 +00:00
parent ce5062db24
commit 3b039c93ac
3 changed files with 14 additions and 1 deletions

View File

@@ -3,6 +3,11 @@
self, self,
... ...
}: { }: {
# Desktop Attribute, brings together all things you would need for a desktop
# Segmenting like this makes it easier to have different types of machines
# Using the same config, like having a "laptop" attribute if you need different
# packages there, etc.
flake.nixosModules.desktop = moduleWithSystem ({pkgs, ...}: let flake.nixosModules.desktop = moduleWithSystem ({pkgs, ...}: let
modules = with self.nixosModules; [ modules = with self.nixosModules; [
core core
@@ -12,6 +17,7 @@
in { in {
imports = modules; imports = modules;
# Add lazygit to every desktop
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
lazygit lazygit
]; ];

View File

@@ -8,15 +8,17 @@
foot foot
]; ];
}); });
# PerSystem, gives access to self' and inputs', as well as some helper functions
perSystem = { perSystem = {
inputs', inputs',
pkgs, pkgs,
... ...
}: { }: {
# Simple wrapper for foot, sets background color to bright red
packages.foot = inputs.wrappers.wrappers.foot.wrap { packages.foot = inputs.wrappers.wrappers.foot.wrap {
inherit pkgs; inherit pkgs;
settings = { settings = {
colors-dark.backround = "FF0000"; colors-dark.background = "FF0000";
}; };
}; };
}; };

View File

@@ -1,5 +1,7 @@
{moduleWithSystem, ...}: { {moduleWithSystem, ...}: {
# moduleWithSystem for Hyprland
flake.nixosModules.hyprland = moduleWithSystem ({self', ...}: { flake.nixosModules.hyprland = moduleWithSystem ({self', ...}: {
# Native wrapper for hyprland instead of environment.systemPackages
programs.hyprland = { programs.hyprland = {
enable = true; enable = true;
package = self'.packages.hyprland; package = self'.packages.hyprland;
@@ -11,11 +13,14 @@
self', self',
... ...
}: { }: {
# Override input pacakge (using inputs' for right version)
packages.hyprland = inputs'.hyprland.packages.default.override { packages.hyprland = inputs'.hyprland.packages.default.override {
# Change runtimePkgs to add custom foot version
runtimePkgs = with pkgs; runtimePkgs = with pkgs;
[ [
waybar waybar
] ]
# ++ adds two sets together
++ (with self'.packages; [ ++ (with self'.packages; [
foot foot
]); ]);