forked from Shinonome/dots-hyprland
converted hyprland conf to nix
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
# desktop.nix
|
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
@@ -13,19 +12,42 @@ in {
|
|||||||
];
|
];
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
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 = {
|
home.file = {
|
||||||
".config/quickshell".source = builtins.path {path = ../../.config/quickshell;};
|
".config/quickshell".source = builtins.path {path = ../../.config/quickshell;};
|
||||||
".config/hypr".source = builtins.path {path = ../../.config/hypr;};
|
".config/hypr" = lib.mkIf (!cfg.settings.hyprland.useNixForConf) {
|
||||||
".config/matugen".source = builtins.path {path = ../../.config/matugen;};
|
source = builtins.path {
|
||||||
".config/foot".source = builtins.path {path = ../../.config/foot;};
|
path = ../../.config/hypr;
|
||||||
|
executable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# dont forget hypridle and hyprlock!!!
|
||||||
".config/kitty".source = builtins.path {path = ../../.config/kitty;};
|
".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/qt5ct".source = builtins.path {path = ../../.config/qt5ct;};
|
||||||
".config/qt6ct".source = builtins.path {path = ../../.config/qt6ct;};
|
".config/qt6ct".source = builtins.path {path = ../../.config/qt6ct;};
|
||||||
".config/wlogout".source = builtins.path {path = ../../.config/wlogout;};
|
".config/wlogout".source = builtins.path {path = ../../.config/wlogout;};
|
||||||
".config/Kvantum".source = builtins.path {path = ../../.config/Kvantum;};
|
".config/Kvantum".source = builtins.path {path = ../../.config/Kvantum;};
|
||||||
".config/xdg-desktop-portal".source = builtins.path {path = ../../.config/xdg-desktop-portal;};
|
".config/xdg-desktop-portal".source = builtins.path {path = ../../.config/xdg-desktop-portal;};
|
||||||
# ".config/starship.toml".source = builtins.path {path = ../../.config/starship.toml;};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages =
|
home.packages =
|
||||||
import ../packages.nix {inherit pkgs;}
|
import ../packages.nix {inherit pkgs;}
|
||||||
++ [
|
++ [
|
||||||
|
|||||||
@@ -1,17 +1,29 @@
|
|||||||
{pkgs, ...}: {
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
./keybinds.nix
|
./hypr/keybinds.nix
|
||||||
./execs.nix
|
./hypr/execs.nix
|
||||||
./rules.nix
|
./hypr/rules.nix
|
||||||
./env.nix
|
./hypr/env.nix
|
||||||
./colours.nix
|
./hypr/colours.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
home.file = {
|
||||||
|
".config/hypr/scripts" = {
|
||||||
|
source = builtins.path {
|
||||||
|
path = ../../.config/hypr/hyprland/scripts;
|
||||||
|
executable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
systemd.enable = true;
|
systemd.enable = true;
|
||||||
settings = {
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-6
@@ -18,12 +18,10 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
hyprland = {
|
hyprland = {
|
||||||
useNixForConf = {
|
useNixForConf = lib.mkOption {
|
||||||
enable = lib.mkOption {
|
type = lib.types.bool;
|
||||||
type = lib.types.bool;
|
default = false;
|
||||||
default = false;
|
description = "Use .nix files for hyprland setup instead of exporting .config/hypr. Useful for modifiable configurations.";
|
||||||
description = "Use .nix files for hyprland setup instead of exporting .config/hypr. Useful for modifiable configurations.";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user