Regenerated

This commit is contained in:
2026-03-21 21:12:16 +00:00
parent ab999378f9
commit 837642d104
30 changed files with 1526 additions and 0 deletions
@@ -0,0 +1,32 @@
{ lib, ... }:
let
# Path to your Starship config inside the flake
starshipAssets = ../../../assets/system/conf/starship.toml;
# Read and parse the TOML file as a symbolic value
starshipConfig = lib.importTOML starshipAssets;
# Toggle on/off
enableStarship = true;
in
{
# Declare a top-level module option
options.starship = {
enable = lib.mkEnableOption "Enable Starship prompt";
configFiles = lib.mkOption {
type = lib.types.attrsOf lib.types.any;
default = {};
description = "Symbolic Starship configuration files";
};
};
# Populate the option safely
config = lib.mkIf enableStarship {
starship.enable = true;
starship.configFiles = {
"starship.toml" = starshipConfig;
assetsDir = ../../../assets/system/conf;
};
};
}
@@ -0,0 +1,42 @@
{ lib, pkgs, config, ... }:
let
programName = "zsh";
programAssets = ../../../assets/system/conf/${programName};
# Read the config file that will be injected into Zsh
zshInitFile = "${programAssets}/zsh.conf";
# Toggle for this module
enableProgram = config.enableZsh or false;
# User reference
username = config.defaultUser or "henrov";
in
{
# Top-level toggle
options.enableZsh = lib.mkEnableOption "Enable Zsh terminal with Oh-My-Zsh";
# Only apply configuration if enabled
config = lib.mkIf enableProgram {
# Install Zsh system-wide
environment.systemPackages = [ pkgs.zsh ];
# Enable Zsh + Oh-My-Zsh
programs.zsh.enable = true;
programs.zsh.ohMyZsh.enable = true;
programs.zsh.ohMyZsh.theme = "catppuccin-mocha";
programs.zsh.ohMyZsh.plugins = [
"git"
"docker"
"direnv"
"zsh-autosuggestions"
"zsh-completions"
"zsh-history-substring-search"
];
# Use the contents of zsh.conf as shellInit
programs.zsh.shellInit = builtins.readFile zshInitFile;
};
}