feat: make options and conditionalize config

This commit is contained in:
2026-01-27 15:05:45 +01:00
parent 9642bae67d
commit 39da2abe9c
10 changed files with 196 additions and 125 deletions
+2
View File
@@ -1,5 +1,7 @@
{ {
imports = [ imports = [
../options.nix
./git.nix ./git.nix
./fish.nix ./fish.nix
./nixvim ./nixvim
+9 -1
View File
@@ -1,5 +1,12 @@
{ pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}:
{
config = lib.mkIf config.kekleo.graphical {
home.packages = with pkgs; [ nordzy-cursor-theme ]; home.packages = with pkgs; [ nordzy-cursor-theme ];
programs.waybar.enable = true; programs.waybar.enable = true;
@@ -77,4 +84,5 @@
cursor.no_warps = true; cursor.no_warps = true;
}; };
}; };
};
} }
+8 -1
View File
@@ -1,5 +1,11 @@
{ pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}:
{
config = lib.mkIf config.kekleo.graphical {
programs.kitty = { programs.kitty = {
enable = true; enable = true;
themeFile = "tokyo_night_night"; themeFile = "tokyo_night_night";
@@ -12,4 +18,5 @@
"ctrl+alt+enter" = "launch --cwd=current"; "ctrl+alt+enter" = "launch --cwd=current";
}; };
}; };
};
} }
+7
View File
@@ -1,3 +1,8 @@
{
config,
lib,
...
}:
{ {
imports = [ imports = [
./opts.nix ./opts.nix
@@ -5,6 +10,7 @@
./plugins ./plugins
]; ];
config = lib.mkIf config.kekleo.neovim {
programs.nixvim = { programs.nixvim = {
enable = true; enable = true;
viAlias = true; viAlias = true;
@@ -18,4 +24,5 @@
globals.mapleader = " "; globals.mapleader = " ";
}; };
};
} }
+7 -1
View File
@@ -1,5 +1,10 @@
{ ... }:
{ {
config,
lib,
...
}:
{
config = lib.mkIf config.kekleo.graphical {
programs.rofi = { programs.rofi = {
enable = true; enable = true;
font = "JetBrainsMono Nerd Font 11"; font = "JetBrainsMono Nerd Font 11";
@@ -35,4 +40,5 @@
kb-mode-complete = "Control+o"; kb-mode-complete = "Control+o";
}; };
}; };
};
} }
+2
View File
@@ -1,5 +1,7 @@
{ {
imports = [ imports = [
../options.nix
./fish.nix ./fish.nix
./firefox.nix ./firefox.nix
./hyprland.nix ./hyprland.nix
+7
View File
@@ -1,3 +1,10 @@
{ {
config,
lib,
...
}:
{
config = lib.mkIf config.kekleo.graphical {
programs.firefox.enable = true; programs.firefox.enable = true;
};
} }
+7
View File
@@ -1,3 +1,10 @@
{ {
config,
lib,
...
}:
{
config = lib.mkIf config.kekleo.graphical {
programs.hyprland.enable = true; programs.hyprland.enable = true;
};
} }
+7
View File
@@ -1,3 +1,10 @@
{ {
config,
lib,
...
}:
{
config = lib.mkIf config.kekleo.graphical {
services.displayManager.ly.enable = true; services.displayManager.ly.enable = true;
};
} }
+18
View File
@@ -0,0 +1,18 @@
{
lib,
...
}:
{
options.kekleo = {
graphical = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Enable GUI features and programs";
};
neovim = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Enable neovim";
};
};
}