Working on reshuffling
This commit is contained in:
+101
-80
@@ -360,19 +360,26 @@ let
|
|||||||
coreEnabled = config.mySystem.system.core.enable or false;
|
coreEnabled = config.mySystem.system.core.enable or false;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
# Top-level option for this module
|
||||||
options.mySystem.system.locale.enable =
|
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) {
|
config = lib.mkIf (coreEnabled || config.mySystem.system.locale.enable) {
|
||||||
|
|
||||||
# --- Flakes & Nix Settings ---
|
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
download-buffer-size = 536870912; # 512 MB
|
download-buffer-size = 536870912; # 512 MB
|
||||||
cores = 2;
|
cores = 2;
|
||||||
max-jobs = 1;
|
max-jobs = 1;
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
#+END_SRC
|
#+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
|
#+BEGIN_SRC nix :tangle generated/modules/apps/emacs/emacs.nix :noweb tangle :mkdirp yes :eval never-html
|
||||||
{ lib, ... }:
|
{ 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";
|
||||||
|
|
||||||
{
|
# Module configuration wrapped safely with mkIf
|
||||||
# Optie om de module aan/uit te zetten
|
config = lib.mkIf enableEmacs {
|
||||||
options.mySystem.system.emacs.enable = lib.mkEnableOption "Enable Emacs config";
|
myApps = {
|
||||||
|
emacs = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
config = lib.mkIf (config.mySystem.system.emacs.enable or false) {
|
# Home Manager user (top-level default can be used)
|
||||||
# System packages (optioneel)
|
user = config.defaultUser or "henrov";
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
# Voeg systeem-brede packages toe als je wilt
|
|
||||||
];
|
|
||||||
|
|
||||||
# Home Manager configuratie
|
# Emacs package specification and extra packages
|
||||||
home-manager.users.henrov = {
|
package = {
|
||||||
programs.emacs = {
|
name = "emacs-pgtk";
|
||||||
enable = true;
|
withTreeSitter = 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
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
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";
|
EDITOR = "emacs";
|
||||||
XDG_SCREENSHOTS_DIR = "~/screenshots";
|
XDG_SCREENSHOTS_DIR = "~/screenshots";
|
||||||
};
|
};
|
||||||
@@ -2006,27 +2016,38 @@ the top of the file."
|
|||||||
** =generated/modules/apps/wofi.nix=
|
** =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
|
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
|
#+BEGIN_SRC nix :tangle generated/modules/apps/wofi.nix :noweb tangle :mkdirp yes :eval never-html
|
||||||
# wofi.nix
|
{ lib, config, ... }:
|
||||||
{ lib, ... }:
|
|
||||||
|
|
||||||
let
|
let
|
||||||
|
# Path to your configuration assets
|
||||||
wofiAssets = ../../../assets/system/conf/wofi;
|
wofiAssets = ../../../assets/system/conf/wofi;
|
||||||
|
|
||||||
|
# Read the files in that directory
|
||||||
wofiFiles = builtins.readDir wofiAssets;
|
wofiFiles = builtins.readDir wofiAssets;
|
||||||
|
|
||||||
|
# Build an attribute set mapping filenames to their full paths
|
||||||
wofiConfs = lib.genAttrs (builtins.attrNames wofiFiles) (name: {
|
wofiConfs = lib.genAttrs (builtins.attrNames wofiFiles) (name: {
|
||||||
src = "${wofiAssets}/${name}";
|
src = "${wofiAssets}/${name}";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
# Toggle for enabling Wofi
|
||||||
enableWofi = true;
|
enableWofi = true;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
# Module option to enable/disable Wofi
|
||||||
options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
|
options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
|
||||||
|
|
||||||
|
# Everything in config is wrapped safely with mkIf
|
||||||
config = lib.mkIf enableWofi {
|
config = lib.mkIf enableWofi {
|
||||||
|
# Use myApps as a container for all your programs
|
||||||
myApps = {
|
myApps = {
|
||||||
wofi = {
|
wofi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
assetsDir = wofiAssets;
|
assetsDir = wofiAssets;
|
||||||
files = wofiConfs;
|
files = wofiConfs;
|
||||||
|
|
||||||
|
# Example: you could reference a top-level user option
|
||||||
|
user = config.defaultUser or "henrov";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,17 +4,24 @@ let
|
|||||||
coreEnabled = config.mySystem.system.core.enable or false;
|
coreEnabled = config.mySystem.system.core.enable or false;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
# Top-level option for this module
|
||||||
options.mySystem.system.locale.enable =
|
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) {
|
config = lib.mkIf (coreEnabled || config.mySystem.system.locale.enable) {
|
||||||
|
|
||||||
# --- Flakes & Nix Settings ---
|
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
download-buffer-size = 536870912; # 512 MB
|
download-buffer-size = 536870912; # 512 MB
|
||||||
cores = 2;
|
cores = 2;
|
||||||
max-jobs = 1;
|
max-jobs = 1;
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,83 +1,86 @@
|
|||||||
{ lib, ... }:
|
{ 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";
|
||||||
|
|
||||||
{
|
# Module configuration wrapped safely with mkIf
|
||||||
# Optie om de module aan/uit te zetten
|
config = lib.mkIf enableEmacs {
|
||||||
options.mySystem.system.emacs.enable = lib.mkEnableOption "Enable Emacs config";
|
myApps = {
|
||||||
|
emacs = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
config = lib.mkIf (config.mySystem.system.emacs.enable or false) {
|
# Home Manager user (top-level default can be used)
|
||||||
# System packages (optioneel)
|
user = config.defaultUser or "henrov";
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
# Voeg systeem-brede packages toe als je wilt
|
|
||||||
];
|
|
||||||
|
|
||||||
# Home Manager configuratie
|
# Emacs package specification and extra packages
|
||||||
home-manager.users.henrov = {
|
package = {
|
||||||
programs.emacs = {
|
name = "emacs-pgtk";
|
||||||
enable = true;
|
withTreeSitter = 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
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
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";
|
EDITOR = "emacs";
|
||||||
XDG_SCREENSHOTS_DIR = "~/screenshots";
|
XDG_SCREENSHOTS_DIR = "~/screenshots";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,24 +1,35 @@
|
|||||||
# wofi.nix
|
{ lib, config, ... }:
|
||||||
{ lib, ... }:
|
|
||||||
|
|
||||||
let
|
let
|
||||||
|
# Path to your configuration assets
|
||||||
wofiAssets = ../../../assets/system/conf/wofi;
|
wofiAssets = ../../../assets/system/conf/wofi;
|
||||||
|
|
||||||
|
# Read the files in that directory
|
||||||
wofiFiles = builtins.readDir wofiAssets;
|
wofiFiles = builtins.readDir wofiAssets;
|
||||||
|
|
||||||
|
# Build an attribute set mapping filenames to their full paths
|
||||||
wofiConfs = lib.genAttrs (builtins.attrNames wofiFiles) (name: {
|
wofiConfs = lib.genAttrs (builtins.attrNames wofiFiles) (name: {
|
||||||
src = "${wofiAssets}/${name}";
|
src = "${wofiAssets}/${name}";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
# Toggle for enabling Wofi
|
||||||
enableWofi = true;
|
enableWofi = true;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
# Module option to enable/disable Wofi
|
||||||
options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
|
options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
|
||||||
|
|
||||||
|
# Everything in config is wrapped safely with mkIf
|
||||||
config = lib.mkIf enableWofi {
|
config = lib.mkIf enableWofi {
|
||||||
|
# Use myApps as a container for all your programs
|
||||||
myApps = {
|
myApps = {
|
||||||
wofi = {
|
wofi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
assetsDir = wofiAssets;
|
assetsDir = wofiAssets;
|
||||||
files = wofiConfs;
|
files = wofiConfs;
|
||||||
|
|
||||||
|
# Example: you could reference a top-level user option
|
||||||
|
user = config.defaultUser or "henrov";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user