Regenerated

This commit is contained in:
2026-03-23 17:28:26 +00:00
parent e4c812f755
commit 94881b5572
8 changed files with 95 additions and 273 deletions
+95 -26
View File
@@ -59,30 +59,6 @@ The =generated/= directory contains all generated configurations, divided into t
The =.assets/= folder contains all static files, such as configs, scripts, and themes. These files are not generated and can be edited directly.
* Module boilerplate look like this :code:
** =generated/boilerplate.nix=
#+BEGIN_SRC nix :tangle generated/template.nix :noweb tangle :mkdirp yes :eval never-html
{ lib, config, pkgs, _module, ... }:
let
username = config.defaultUser or "henrov";
in {
# System packages / options
environment.systemPackages = [ pkgs.feh pkgs.waybar ];
# Home Manager contribution
_module.args.hmUsers = lib.mkIf true {
${username} = {
home.file = {
".config/waybar/config" = { source = ./waybar/config; };
".config/waybar/style.css" = { source = ./waybar/style.css; };
};
};
};
}
#+END_SRC
* The Actual Code :code:
:PROPERTIES:
:CUSTOM_ID: the-actual-code
@@ -301,9 +277,102 @@ in
#+END_SRC
* Let's define the core of the system
* Following are the imported modules
* generated/modules/traveldroid/desktop
** =generated/modules/traveldroid/desktop/wayland.nix=
#+BEGIN_SRC nix :tangle generated/modules/traveldroid/desktop/wayland.nix :noweb tangle :mkdirp yes :eval never-html
{ lib, config, pkgs, ... }:
{
#################################
# Core Wayland packages
#################################
environment.systemPackages = with pkgs; [
wayland
wl-clipboard # optional but commonly used for copy/paste
];
#################################
# Optional: enable graphics stack
#################################
hardware.opengl.enable = true;
#################################
# Optional session variables for Wayland
#################################
environment.sessionVariables = {
# Forces some apps to use Wayland
NIXOS_OZONE_WL = "1";
};
}
#+END_SRC
** =generated/modules/traveldroid/desktop/stylix.nix=
#+BEGIN_SRC nix :tangle generated/modules/traveldroid/desktop/wayland.nix :noweb tangle :mkdirp yes :eval never-html
{ lib, config, pkgs, flakeRoot, ... }:
let
# Determine the default username from host config
username = config.defaultUser or "henrov";
moduleName = "stylix";
assetPath = "${flakeRoot}/assets/system/conf/${moduleName}";
# Read all files in the asset directory
programFiles = builtins.readDir assetPath;
files = lib.genAttrs (builtins.attrNames programFiles) (name: {
source = "${assetPath}/${name}";
});
# Optional stylix.conf
stylixConfFile = "${assetPath}/stylix.conf";
stylixConf =
if builtins.pathExists stylixConfFile
then builtins.readFile stylixConfFile
else "";
# Cursor defaults
cursorName = "phinger-cursors-light";
cursorSize = 24;
in
{
############################
# System-level packages
############################
environment.systemPackages = [
pkgs.feh
pkgs.st
];
############################
# Home Manager user config
############################
_module.args.hmUsers = {
${username} = {
# Map all config files into ~/.config/stylix/
xdg.configFile =
lib.mapAttrs' (name: value: {
name = "${moduleName}/${name}";
value = { inherit (value) source; };
}) files;
# Environment variables for the session
home.sessionVariables = {
STYLIX_CONF = "$HOME/.config/stylix/stylix.conf";
XCURSOR_THEME = cursorName;
XCURSOR_SIZE = toString cursorSize;
HYPRCURSOR_THEME = cursorName;
HYPRCURSOR_SIZE = toString cursorSize;
};
};
};
}
#+END_SRC
** Nix itself
** =generated/modules/traveldroid/system/nix.nix=
#+BEGIN_SRC nix :tangle generated/modules/traveldroid/system/nix.nix :noweb tangle :mkdirp yes :eval never-html