converted hyprland conf to nix

This commit is contained in:
kenji
2025-08-19 18:17:33 -05:00
parent b1daadc71e
commit 3c496175dc
8 changed files with 51 additions and 19 deletions
+27 -5
View File
@@ -1,4 +1,3 @@
# desktop.nix
{
config,
lib,
@@ -13,19 +12,42 @@ in {
];
config = lib.mkIf cfg.enable {
wayland.windowManager.hyprland = lib.mkIf cfg.settings.hyprland.useNixForConf {
enable = true;
xwayland.enable = true;
systemd.enable = true;
};
imports = lib.optionals cfg.settings.hyprland.useNixForConf [
./hyprland/hypr/keybinds.nix
./hyprland/hypr/execs.nix
./hyprland/hypr/rules.nix
./hyprland/hypr/env.nix
./hyprland/hypr/colours.nix
];
home.file = {
".config/quickshell".source = builtins.path {path = ../../.config/quickshell;};
".config/hypr".source = builtins.path {path = ../../.config/hypr;};
".config/matugen".source = builtins.path {path = ../../.config/matugen;};
".config/foot".source = builtins.path {path = ../../.config/foot;};
".config/hypr" = lib.mkIf (!cfg.settings.hyprland.useNixForConf) {
source = builtins.path {
path = ../../.config/hypr;
executable = true;
};
};
# dont forget hypridle and hyprlock!!!
".config/kitty".source = builtins.path {path = ../../.config/kitty;};
".config/foot".source = builtins.path {path = ../../.config/foot;};
".config/matugen".source = builtins.path {path = ../../.config/matugen;};
# wont modify these in nix format, coz im lazy
".config/qt5ct".source = builtins.path {path = ../../.config/qt5ct;};
".config/qt6ct".source = builtins.path {path = ../../.config/qt6ct;};
".config/wlogout".source = builtins.path {path = ../../.config/wlogout;};
".config/Kvantum".source = builtins.path {path = ../../.config/Kvantum;};
".config/xdg-desktop-portal".source = builtins.path {path = ../../.config/xdg-desktop-portal;};
# ".config/starship.toml".source = builtins.path {path = ../../.config/starship.toml;};
};
home.packages =
import ../packages.nix {inherit pkgs;}
++ [
+20 -8
View File
@@ -1,17 +1,29 @@
{pkgs, ...}: {
{
pkgs,
config,
lib,
...
}: {
imports = [
./keybinds.nix
./execs.nix
./rules.nix
./env.nix
./colours.nix
./hypr/keybinds.nix
./hypr/execs.nix
./hypr/rules.nix
./hypr/env.nix
./hypr/colours.nix
];
home.file = {
".config/hypr/scripts" = {
source = builtins.path {
path = ../../.config/hypr/hyprland/scripts;
executable = true;
};
};
};
wayland.windowManager.hyprland = {
enable = true;
xwayland.enable = true;
systemd.enable = true;
settings = {
};
};
}
+1 -3
View File
@@ -18,8 +18,7 @@
};
};
hyprland = {
useNixForConf = {
enable = lib.mkOption {
useNixForConf = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Use .nix files for hyprland setup instead of exporting .config/hypr. Useful for modifiable configurations.";
@@ -27,5 +26,4 @@
};
};
};
};
}