Regenerated

This commit is contained in:
2026-03-22 06:41:50 +00:00
parent 92b0460b86
commit a689cf1071
31 changed files with 57 additions and 1539 deletions
+57 -34
View File
@@ -282,6 +282,33 @@ in {
}
#+END_SRC
* We have a nix file that will copy anything from ./assets/copy_2_home to $HOME
** =generated/modules/users/copy_2_root.nix=
This copies stuff to the user home-folder
#+BEGIN_SRC nix :tangle generated/modules/desktop/copy_2_root.nix :noweb tangle :mkdirp yes :eval never-html
{ lib, config, ... }:
let
username = config.defaultUser or "henrov";
assetPath = ../../../assets/copy_2_home;
in
{
_module.args.hmUsers = {
${username} = {
home.activation.copyAssets = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
echo "Copying assets to home directory..."
cp -r ${assetPath}/* "$HOME"/
echo "Done copying assets."
'';
};
};
}
#+END_SRC
* Let's define the core of the system
** =generated/parked/system/networking.nix=
@@ -552,64 +579,60 @@ in
** =generated/modules/desktop/stylix.nix=
This sets the stylix implementation
#+BEGIN_SRC nix :tangle generated/modules/desktop/stylix.nix :noweb tangle :mkdirp yes :eval never-html
{ lib, config, ... }:
{ lib, config, pkgs, ... }:
let
# --- Module variables ---
moduleName = "stylix";
username = config.defaultUser or "henrov";
username = config.defaultUser or "henrov";
# Assets directory for Stylix config
moduleName = "stylix";
assetPath = ../../../assets/system/conf/${moduleName};
# Read all config files
# Read all files in asset directory
programFiles = builtins.readDir assetPath;
files = lib.genAttrs (builtins.attrNames programFiles) (name: {
src = "${assetPath}/${name}";
source = "${assetPath}/${name}";
});
# Read the main stylix.conf
# Read optional stylix.conf
stylixConfFile = "${assetPath}/stylix.conf";
stylixConf = if builtins.pathExists stylixConfFile
then builtins.readFile stylixConfFile
else "";
stylixConf =
if builtins.pathExists stylixConfFile
then builtins.readFile stylixConfFile
else "";
# Default cursor values
# Cursor defaults
cursorName = "phinger-cursors-light";
cursorSize = 24;
in
{
# System packages
environment.systemPackages = [
pkgs.feh
pkgs.st
];
# --- Only apply configuration if enabled ---
config = lib.mkIf enableProgram {
# Home Manager user settings
_module.args.hmUsers = {
${username} = {
# Deploy Stylix configuration files to user's XDG config
home-manager.users.${username}.xdg.configFile =
lib.mapAttrs' (name: value: {
name = "${moduleName}/${name}";
value.source = value.src;
}) files;
# Copy all stylix config files into ~/.config/stylix/
xdg.configFile =
lib.mapAttrs' (name: value: {
name = "${moduleName}/${name}";
value = { inherit (value) source; };
}) files;
# Merge all session variables into a single map
home-manager.users.${username}.home.sessionVariables = lib.mkMerge [
{
# Session variables
home.sessionVariables = {
STYLIX_CONF = stylixConf;
}
{
XCURSOR_THEME = cursorName;
XCURSOR_SIZE = toString cursorSize;
HYPRCURSOR_THEME = cursorName;
HYPRCURSOR_SIZE = toString cursorSize;
}
];
# Optional wallpaper helper packages (symbolic, install manually or via packages)
environment.systemPackages = [
"feh"
"st"
];
};
};
};
}
#+END_SRC