refactor: change to litterate config

Configuration is now held by the `.org` files. All `.nix` files are
tangled from the org-mode files.
This commit is contained in:
2026-10-08 15:18:56 +02:00
parent 5f4a7a4a42
commit 216065c4f2
80 changed files with 3099 additions and 581 deletions
+23
View File
@@ -0,0 +1,23 @@
{config, ...}: let
m = config.flake.modules.homeManager;
in {
flake.modules.homeManager.games = {
config,
lib,
...
}:
with lib; let
cfg = config.home.games;
in {
imports = [
m.mangohud
m.game-packages
];
options.home.games.fullDesktop = mkEnableOption "Enable all optional game-related modules";
config.home.games = {
mangohud.enable = mkDefault cfg.fullDesktop;
game-packages.enable = mkDefault cfg.fullDesktop;
};
};
}
+46
View File
@@ -0,0 +1,46 @@
#+title: Games
#+setupfile: ../../headers
* Games
A small category to group everything gaming-related: performance
overlays, launchers, and whatever else I add to it later. Here’s the
skeleton of the =homeManager.games= module.
#+begin_src nix :tangle yes
{config, ...}: let
m = config.flake.modules.homeManager;
in {
flake.modules.homeManager.games = {
config,
lib,
...
}:
with lib; let
cfg = config.home.games;
in {
imports = [
m.mangohud
m.game-packages
];
<<fulldesktop-option>>
<<fulldesktop-cascade>>
};
}
#+end_src
** The =fullDesktop= Toggle
Like my other categories, =fullDesktop= is the one switch that turns
everything in this category on by default, while still letting a host
override one specific piece if it wants to.
#+name: fulldesktop-option
#+begin_src nix
options.home.games.fullDesktop = mkEnableOption "Enable all optional game-related modules";
#+end_src
#+name: fulldesktop-cascade
#+begin_src nix
config.home.games = {
mangohud.enable = mkDefault cfg.fullDesktop;
game-packages.enable = mkDefault cfg.fullDesktop;
};
#+end_src
+16
View File
@@ -0,0 +1,16 @@
{
flake.modules.homeManager.mangohud = {
lib,
config,
...
}:
with lib; let
cfg = config.home.games.mangohud;
in {
options.home.games.mangohud.enable = mkEnableOption "Enable MangoHud performance overlay";
config.programs.mangohud = mkIf cfg.enable {
enable = true;
enableSessionWide = true;
};
};
}
+39
View File
@@ -0,0 +1,39 @@
#+title: MangoHud
#+setupfile: ../../headers
* MangoHud
[[https://github.com/flightlessmango/MangoHud][MangoHud]] is the performance overlay I use to keep an eye on FPS, frame
time and GPU/CPU usage while gaming. Here’s the =homeManager.mangohud=
module.
#+begin_src nix :tangle yes
{
flake.modules.homeManager.mangohud = {
lib,
config,
...
}:
with lib; let
cfg = config.home.games.mangohud;
in {
<<options>>
<<config>>
};
}
#+end_src
** Declaring the Option
#+name: options
#+begin_src nix
options.home.games.mangohud.enable = mkEnableOption "Enable MangoHud performance overlay";
#+end_src
** Enabling It Session-Wide
=enableSessionWide= turns MangoHud on for my whole session. It
auto-launches for any game or app that supports it.
#+name: config
#+begin_src nix
config.programs.mangohud = mkIf cfg.enable {
enable = true;
enableSessionWide = true;
};
#+end_src
+21
View File
@@ -0,0 +1,21 @@
{
flake.modules.homeManager.game-packages = {
pkgs,
lib,
config,
...
}:
with lib; let
cfg = config.home.games.game-packages;
in {
options.home.games.game-packages.enable = mkEnableOption "Install game launchers and clients";
config.home.packages = mkIf cfg.enable (with pkgs; [
atlauncher
heroic
openmw
openttd-jgrpp
moonlight-qt
vintagestory
]);
};
}
+51
View File
@@ -0,0 +1,51 @@
#+title: Game Launchers
#+setupfile: ../../headers
* Game Launchers
The actual game launchers and clients I use, kept separate from my
catch-all package list so they only show up on hosts that actually
want them. Here’s the =homeManager.game-packages= module.
#+begin_src nix :tangle yes
{
flake.modules.homeManager.game-packages = {
pkgs,
lib,
config,
...
}:
with lib; let
cfg = config.home.games.game-packages;
in {
<<options>>
<<config>>
};
}
#+end_src
** Declaring the Option
#+name: options
#+begin_src nix
options.home.games.game-packages.enable = mkEnableOption "Install game launchers and clients";
#+end_src
** The Packages
=atlauncher= and =heroic= are launchers for Minecraft and for
Epic/GOG/Amazon respectively. =openmw= is an open-source
reimplementation of Morrowind’s engine. It makes the experience a lot
more enjoyable, especially on a 2K 21:9 screen like the one I use on
my main computer. =openttd-jgrpp= is OpenTTD with the JGR patchpack.
=moonlight-qt= lets me stream from my gaming machine to another one on
the network (mostly via Tailscale). Lastly, =vintagestory= is, well,
Vintage Story, and where all my free time has been disappearing into
since early 2026.
#+name: config
#+begin_src nix
config.home.packages = mkIf cfg.enable (with pkgs; [
atlauncher
heroic
openmw
openttd-jgrpp
moonlight-qt
vintagestory
]);
#+end_src