Regenerated
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
{ lib, pkgs, config, ... }:
|
||||
|
||||
let
|
||||
enableProgram = config.enableThunar or false;
|
||||
username = config.defaultUser or "henrov";
|
||||
in
|
||||
{
|
||||
# Top-level toggle
|
||||
options.enableThunar = lib.mkEnableOption "Enable Thunar file manager";
|
||||
|
||||
# Only apply config if enabled
|
||||
config = lib.mkIf enableProgram {
|
||||
# Install Thunar and related packages system-wide
|
||||
environment.systemPackages = [
|
||||
pkgs.thunar
|
||||
pkgs.thunar-plugins
|
||||
pkgs.xarchiver
|
||||
];
|
||||
|
||||
# Remove invalid top-level 'home' reference
|
||||
# If you want sessionVariables, define them in Home Manager instead
|
||||
# Example for Home Manager:
|
||||
# home-manager.users.${username}.sessionVariables = {
|
||||
# FILE_MANAGER = "thunar";
|
||||
# USERNAME = username;
|
||||
# };
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
# --- Program definition ---
|
||||
programName = "wofi";
|
||||
|
||||
# Path to assets
|
||||
assetPath = ../../../assets/system/conf/${programName};
|
||||
|
||||
# Generate file mappings
|
||||
programFiles =
|
||||
if builtins.pathExists assetPath then builtins.readDir assetPath else {};
|
||||
files = lib.genAttrs (builtins.attrNames programFiles) (name: {
|
||||
src = "${assetPath}/${name}";
|
||||
});
|
||||
|
||||
# Top-level toggle for this module
|
||||
enableProgram = config.enableWofi or false;
|
||||
|
||||
# Default user
|
||||
username = config.defaultUser or "henrov";
|
||||
in
|
||||
{
|
||||
# --- Module option ---
|
||||
options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
|
||||
|
||||
# --- Config ---
|
||||
config = lib.mkIf enableProgram {
|
||||
|
||||
# --- Deploy assets to ~/.config/wofi ---
|
||||
environment.etc."${programName}".source = assetPath;
|
||||
|
||||
# --- Optional systemd service to sync config ---
|
||||
systemd.services."${programName}-sync" = {
|
||||
description = "Sync ${programName} configuration files";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = ''
|
||||
set -euo pipefail
|
||||
if [ -d "${assetPath}" ]; then
|
||||
for f in ${lib.concatStringsSep " " (builtins.attrNames files)}; do
|
||||
mkdir -p "/home/${username}/.config/${programName}"
|
||||
cp -u "${assetPath}/$f" "/home/${username}/.config/${programName}/$f"
|
||||
done
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
restartTriggers = [ assetPath ];
|
||||
path = [];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{ lib, pkgs, config, ... }:
|
||||
|
||||
{
|
||||
options.enableFonts = lib.mkEnableOption "Enable nerd fonts";
|
||||
|
||||
config = lib.mkIf (config.enableFonts or false) {
|
||||
fonts.packages = with pkgs; [
|
||||
nerd-fonts.iosevka
|
||||
nerd-fonts.fira-code
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
# --- Module variables ---
|
||||
moduleName = "waybar";
|
||||
username = config.defaultUser or "henrov";
|
||||
|
||||
# Assets directory (self-contained)
|
||||
assetPath = ../../../assets/system/conf/${moduleName};
|
||||
|
||||
# Read required config files
|
||||
waybarConfig = "${assetPath}/waybar.conf";
|
||||
waybarStyle = "${assetPath}/style.css";
|
||||
|
||||
# Top-level toggle
|
||||
enableProgram = config.enableWaybar or false;
|
||||
in
|
||||
{
|
||||
# --- Option ---
|
||||
options.enableWaybar =
|
||||
lib.mkEnableOption "Enable Waybar status bar";
|
||||
|
||||
# --- Config ---
|
||||
config = lib.mkIf enableProgram {
|
||||
|
||||
# Install Waybar (symbolic reference expected to be resolved elsewhere)
|
||||
environment.systemPackages = [
|
||||
"waybar"
|
||||
];
|
||||
|
||||
# Deploy only required files to ~/.config/waybar
|
||||
home-manager.users.${username}.xdg.configFile = {
|
||||
|
||||
"waybar/config".source =
|
||||
if builtins.pathExists waybarConfig
|
||||
then waybarConfig
|
||||
else null;
|
||||
|
||||
"waybar/style.css".source =
|
||||
if builtins.pathExists waybarStyle
|
||||
then waybarStyle
|
||||
else null;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
services.dbus = lib.mkForce {
|
||||
enable = true; # Force this to be true
|
||||
};
|
||||
|
||||
# Configure dbus-broker via its configuration file
|
||||
environment.etc."dbus-broker/launch.conf".text = ''
|
||||
[General]
|
||||
LogLevel=warning
|
||||
MaxConnectionsPerUser=2048
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user