Working on reshuffling

This commit is contained in:
2026-03-19 09:21:04 +00:00
parent 360fc531a9
commit 3dda311dbd
4 changed files with 202 additions and 160 deletions
+101 -80
View File
@@ -360,19 +360,26 @@ let
coreEnabled = config.mySystem.system.core.enable or false;
in
{
# Top-level option for this module
options.mySystem.system.locale.enable =
lib.mkEnableOption "Flake & Nix settings";
lib.mkEnableOption "Enable Nix & Flake specific settings";
# Top-level container for all custom program configs (your myPrograms idea)
options.myPrograms = lib.mkOption {
type = lib.types.attrsOf lib.types.any;
default = {};
description = "Container for all custom program configurations";
};
# Apply the configuration only if core or locale is enabled
config = lib.mkIf (coreEnabled || config.mySystem.system.locale.enable) {
# --- Flakes & Nix Settings ---
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
download-buffer-size = 536870912; # 512 MB
cores = 2;
max-jobs = 1;
};
cores = 2;
max-jobs = 1;
};
};
}
#+END_SRC
@@ -1411,84 +1418,87 @@ This sets up the emacs terminal
#+BEGIN_SRC nix :tangle generated/modules/apps/emacs/emacs.nix :noweb tangle :mkdirp yes :eval never-html
{ lib, ... }:
let
enableEmacs = true; # Toggle to enable/disable Emacs module
in
{
flake.nixosModules.emacs = { config, pkgs, lib, ... }:
# Top-level option to enable Emacs
options.enableEmacs = lib.mkEnableOption "Enable Emacs configuration";
{
# Optie om de module aan/uit te zetten
options.mySystem.system.emacs.enable = lib.mkEnableOption "Enable Emacs config";
# Module configuration wrapped safely with mkIf
config = lib.mkIf enableEmacs {
myApps = {
emacs = {
enable = true;
config = lib.mkIf (config.mySystem.system.emacs.enable or false) {
# System packages (optioneel)
environment.systemPackages = with pkgs; [
# Voeg systeem-brede packages toe als je wilt
];
# Home Manager user (top-level default can be used)
user = config.defaultUser or "henrov";
# Home Manager configuratie
home-manager.users.henrov = {
programs.emacs = {
enable = true;
package = pkgs.emacs-pgtk.override { withTreeSitter = true; };
extraPackages = epkgs: with epkgs; [
# Tree-sitter and language support
manualPackages.treesit-grammars.with-all-grammars
rust-mode
rustic
nix-mode
hcl-mode
# UI/UX and navigation
nerd-icons
doom-modeline
diminish
eldoc
eldoc-box
pulsar
which-key
avy
consult
vertico
marginalia
crux
shell-pop
# Completion and snippets
nerd-icons-corfu
corfu
cape
orderless
yasnippet
yasnippet-snippets
# Utilities and tools
rg
exec-path-from-shell
eat
f
gptel
nixpkgs-fmt
envrc
# Theming
catppuccin-theme
# Git
magit
# Editing and workflow
expreg
vundo
puni
# Error and side panel support
sideline
sideline-flymake
sideline-eglot
];
# Emacs package specification and extra packages
package = {
name = "emacs-pgtk";
withTreeSitter = true;
};
home.sessionVariables = {
extraPackages = [
# Tree-sitter and language support
"manualPackages.treesit-grammars.with-all-grammars"
"rust-mode"
"rustic"
"nix-mode"
"hcl-mode"
# UI/UX and navigation
"nerd-icons"
"doom-modeline"
"diminish"
"eldoc"
"eldoc-box"
"pulsar"
"which-key"
"avy"
"consult"
"vertico"
"marginalia"
"crux"
"shell-pop"
# Completion and snippets
"nerd-icons-corfu"
"corfu"
"cape"
"orderless"
"yasnippet"
"yasnippet-snippets"
# Utilities and tools
"rg"
"exec-path-from-shell"
"eat"
"f"
"gptel"
"nixpkgs-fmt"
"envrc"
# Theming
"catppuccin-theme"
# Git
"magit"
# Editing and workflow
"expreg"
"vundo"
"puni"
# Error and side panel support
"sideline"
"sideline-flymake"
"sideline-eglot"
];
# Optional environment/session variables
sessionVariables = {
EDITOR = "emacs";
XDG_SCREENSHOTS_DIR = "~/screenshots";
};
@@ -2006,27 +2016,38 @@ the top of the file."
** =generated/modules/apps/wofi.nix=
This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder
#+BEGIN_SRC nix :tangle generated/modules/apps/wofi.nix :noweb tangle :mkdirp yes :eval never-html
# wofi.nix
{ lib, ... }:
{ lib, config, ... }:
let
# Path to your configuration assets
wofiAssets = ../../../assets/system/conf/wofi;
# Read the files in that directory
wofiFiles = builtins.readDir wofiAssets;
# Build an attribute set mapping filenames to their full paths
wofiConfs = lib.genAttrs (builtins.attrNames wofiFiles) (name: {
src = "${wofiAssets}/${name}";
});
# Toggle for enabling Wofi
enableWofi = true;
in
{
# Module option to enable/disable Wofi
options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
# Everything in config is wrapped safely with mkIf
config = lib.mkIf enableWofi {
# Use myApps as a container for all your programs
myApps = {
wofi = {
enable = true;
assetsDir = wofiAssets;
files = wofiConfs;
# Example: you could reference a top-level user option
user = config.defaultUser or "henrov";
};
};
};
+13 -6
View File
@@ -4,17 +4,24 @@ let
coreEnabled = config.mySystem.system.core.enable or false;
in
{
# Top-level option for this module
options.mySystem.system.locale.enable =
lib.mkEnableOption "Flake & Nix settings";
lib.mkEnableOption "Enable Nix & Flake specific settings";
# Top-level container for all custom program configs (your myPrograms idea)
options.myPrograms = lib.mkOption {
type = lib.types.attrsOf lib.types.any;
default = {};
description = "Container for all custom program configurations";
};
# Apply the configuration only if core or locale is enabled
config = lib.mkIf (coreEnabled || config.mySystem.system.locale.enable) {
# --- Flakes & Nix Settings ---
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
download-buffer-size = 536870912; # 512 MB
cores = 2;
max-jobs = 1;
};
cores = 2;
max-jobs = 1;
};
};
}
+75 -72
View File
@@ -1,83 +1,86 @@
{ lib, ... }:
let
enableEmacs = true; # Toggle to enable/disable Emacs module
in
{
flake.nixosModules.emacs = { config, pkgs, lib, ... }:
# Top-level option to enable Emacs
options.enableEmacs = lib.mkEnableOption "Enable Emacs configuration";
{
# Optie om de module aan/uit te zetten
options.mySystem.system.emacs.enable = lib.mkEnableOption "Enable Emacs config";
# Module configuration wrapped safely with mkIf
config = lib.mkIf enableEmacs {
myApps = {
emacs = {
enable = true;
config = lib.mkIf (config.mySystem.system.emacs.enable or false) {
# System packages (optioneel)
environment.systemPackages = with pkgs; [
# Voeg systeem-brede packages toe als je wilt
];
# Home Manager user (top-level default can be used)
user = config.defaultUser or "henrov";
# Home Manager configuratie
home-manager.users.henrov = {
programs.emacs = {
enable = true;
package = pkgs.emacs-pgtk.override { withTreeSitter = true; };
extraPackages = epkgs: with epkgs; [
# Tree-sitter and language support
manualPackages.treesit-grammars.with-all-grammars
rust-mode
rustic
nix-mode
hcl-mode
# UI/UX and navigation
nerd-icons
doom-modeline
diminish
eldoc
eldoc-box
pulsar
which-key
avy
consult
vertico
marginalia
crux
shell-pop
# Completion and snippets
nerd-icons-corfu
corfu
cape
orderless
yasnippet
yasnippet-snippets
# Utilities and tools
rg
exec-path-from-shell
eat
f
gptel
nixpkgs-fmt
envrc
# Theming
catppuccin-theme
# Git
magit
# Editing and workflow
expreg
vundo
puni
# Error and side panel support
sideline
sideline-flymake
sideline-eglot
];
# Emacs package specification and extra packages
package = {
name = "emacs-pgtk";
withTreeSitter = true;
};
home.sessionVariables = {
extraPackages = [
# Tree-sitter and language support
"manualPackages.treesit-grammars.with-all-grammars"
"rust-mode"
"rustic"
"nix-mode"
"hcl-mode"
# UI/UX and navigation
"nerd-icons"
"doom-modeline"
"diminish"
"eldoc"
"eldoc-box"
"pulsar"
"which-key"
"avy"
"consult"
"vertico"
"marginalia"
"crux"
"shell-pop"
# Completion and snippets
"nerd-icons-corfu"
"corfu"
"cape"
"orderless"
"yasnippet"
"yasnippet-snippets"
# Utilities and tools
"rg"
"exec-path-from-shell"
"eat"
"f"
"gptel"
"nixpkgs-fmt"
"envrc"
# Theming
"catppuccin-theme"
# Git
"magit"
# Editing and workflow
"expreg"
"vundo"
"puni"
# Error and side panel support
"sideline"
"sideline-flymake"
"sideline-eglot"
];
# Optional environment/session variables
sessionVariables = {
EDITOR = "emacs";
XDG_SCREENSHOTS_DIR = "~/screenshots";
};
+13 -2
View File
@@ -1,24 +1,35 @@
# wofi.nix
{ lib, ... }:
{ lib, config, ... }:
let
# Path to your configuration assets
wofiAssets = ../../../assets/system/conf/wofi;
# Read the files in that directory
wofiFiles = builtins.readDir wofiAssets;
# Build an attribute set mapping filenames to their full paths
wofiConfs = lib.genAttrs (builtins.attrNames wofiFiles) (name: {
src = "${wofiAssets}/${name}";
});
# Toggle for enabling Wofi
enableWofi = true;
in
{
# Module option to enable/disable Wofi
options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
# Everything in config is wrapped safely with mkIf
config = lib.mkIf enableWofi {
# Use myApps as a container for all your programs
myApps = {
wofi = {
enable = true;
assetsDir = wofiAssets;
files = wofiConfs;
# Example: you could reference a top-level user option
user = config.defaultUser or "henrov";
};
};
};