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 = [
../options.nix
./git.nix
./fish.nix
./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 ];
programs.waybar.enable = true;
@@ -77,4 +84,5 @@
cursor.no_warps = true;
};
};
};
}
+8 -1
View File
@@ -1,5 +1,11 @@
{ pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
{
config = lib.mkIf config.kekleo.graphical {
programs.kitty = {
enable = true;
themeFile = "tokyo_night_night";
@@ -12,4 +18,5 @@
"ctrl+alt+enter" = "launch --cwd=current";
};
};
};
}
+7
View File
@@ -1,3 +1,8 @@
{
config,
lib,
...
}:
{
imports = [
./opts.nix
@@ -5,6 +10,7 @@
./plugins
];
config = lib.mkIf config.kekleo.neovim {
programs.nixvim = {
enable = true;
viAlias = true;
@@ -18,4 +24,5 @@
globals.mapleader = " ";
};
};
}
+7 -1
View File
@@ -1,5 +1,10 @@
{ ... }:
{
config,
lib,
...
}:
{
config = lib.mkIf config.kekleo.graphical {
programs.rofi = {
enable = true;
font = "JetBrainsMono Nerd Font 11";
@@ -35,4 +40,5 @@
kb-mode-complete = "Control+o";
};
};
};
}
+2
View File
@@ -1,5 +1,7 @@
{
imports = [
../options.nix
./fish.nix
./firefox.nix
./hyprland.nix
+7
View File
@@ -1,3 +1,10 @@
{
config,
lib,
...
}:
{
config = lib.mkIf config.kekleo.graphical {
programs.firefox.enable = true;
};
}
+7
View File
@@ -1,3 +1,10 @@
{
config,
lib,
...
}:
{
config = lib.mkIf config.kekleo.graphical {
programs.hyprland.enable = true;
};
}
+7
View File
@@ -1,3 +1,10 @@
{
config,
lib,
...
}:
{
config = lib.mkIf config.kekleo.graphical {
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";
};
};
}