hyprnix but I made it (and it hopefully works)
This commit is contained in:
parent
4402bf13d3
commit
444186a0df
3 changed files with 495 additions and 10 deletions
|
|
@ -6,14 +6,12 @@
|
|||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||
inherit (lib) mkIf trivial strings replaceStrings;
|
||||
cfg = config.horseman.wm.hyprland;
|
||||
in {
|
||||
options = {
|
||||
horseman.wm.hyprland = {
|
||||
enable = mkEnableOption "HyprLand";
|
||||
};
|
||||
};
|
||||
imports = [
|
||||
./options.nix
|
||||
];
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.hyprland = {
|
||||
|
|
@ -48,8 +46,90 @@ in {
|
|||
'';
|
||||
|
||||
system.activationScripts.script.text = ''
|
||||
cd /home/horseman;
|
||||
cp -r nix-config/modules/wm/hyprland/config/* .config;
|
||||
cd /home/horseman/.config
|
||||
rm -r hypr/*
|
||||
touch hypr/hyprland.conf
|
||||
|
||||
printf "# This file has been auto-generated.
|
||||
|
||||
${builtins.concatStringsSep "\n" (map (x: "exec-once = " + x) cfg.config.execOnce)}
|
||||
|
||||
${builtins.concatStringsSep "\n" (map (x: "env = " + x) cfg.config.env)}
|
||||
|
||||
general {
|
||||
gaps_in = ${toString cfg.config.general.gapsIn}
|
||||
gaps_out = ${toString cfg.config.general.gapsOut}
|
||||
border_size = ${toString cfg.config.general.borderSize}
|
||||
col.active_border = ${cfg.config.general.col.activeBorder}
|
||||
col.inactive_border = ${cfg.config.general.col.inactiveBorder}
|
||||
resize_on_border = ${trivial.boolToString cfg.config.general.resizeOnBorder}
|
||||
allow_tearing = ${trivial.boolToString cfg.config.general.allowTearing}
|
||||
layout = ${cfg.config.general.layout}
|
||||
}
|
||||
|
||||
decoration {
|
||||
rounding = ${toString cfg.config.decoration.rounding}
|
||||
|
||||
active_opacity = ${strings.floatToString cfg.config.decoration.activeOpacity}
|
||||
inactive_opacity = ${strings.floatToString cfg.config.decoration.inactiveOpacity}
|
||||
|
||||
shadow {
|
||||
enabled = ${trivial.boolToString cfg.config.decoration.shadow.enabled}
|
||||
range = ${toString cfg.config.decoration.shadow.range}
|
||||
render_power = ${toString cfg.config.decoration.shadow.renderPower}
|
||||
color = ${cfg.config.decoration.shadow.color}
|
||||
}
|
||||
|
||||
blur {
|
||||
enabled = ${trivial.boolToString cfg.config.decoration.blur.enabled}
|
||||
size = ${toString cfg.config.decoration.blur.size}
|
||||
passes = ${toString cfg.config.decoration.blur.passes}
|
||||
vibrancy = ${strings.floatToString cfg.config.decoration.blur.vibrancy}
|
||||
}
|
||||
}
|
||||
|
||||
animations {
|
||||
enabled = ${trivial.boolToString cfg.config.animations.enabled}
|
||||
|
||||
${builtins.concatStringsSep "\n " (map(bez: "bezier = ${bez.name}, ${strings.floatToString bez.startX}, ${strings.floatToString bez.startY}, ${strings.floatToString bez.endX}, ${strings.floatToString bez.endY}") cfg.config.animations.beziers)}
|
||||
|
||||
${builtins.concatStringsSep "\n " (map(anim: "animation = ${anim.name}, ${toString anim.on}, ${strings.floatToString anim.speed}, ${anim.curve}, ${replaceStrings ["%"] ["%%"] anim.style}") cfg.config.animations.animations)}
|
||||
}
|
||||
|
||||
dwindle {
|
||||
pseudotile = ${trivial.boolToString cfg.config.dwindle.pseudotile}
|
||||
preserve_split = ${trivial.boolToString cfg.config.dwindle.preserveSplit}
|
||||
}
|
||||
|
||||
master {
|
||||
new_status = ${cfg.config.master.newStatus}
|
||||
}
|
||||
|
||||
misc {
|
||||
force_default_wallpaper = ${toString cfg.config.misc.forceDefaultWallpaper}
|
||||
}
|
||||
|
||||
input {
|
||||
kb_layout = ${cfg.config.input.kbLayout}
|
||||
repeat_rate = ${toString cfg.config.input.repeatRate}
|
||||
repeat_delay = ${toString cfg.config.input.repeatDelay}
|
||||
follow_mouse = ${toString cfg.config.input.followMouse}
|
||||
sensitivity = ${strings.floatToString cfg.config.input.sensitivity}
|
||||
numlock_by_default = ${trivial.boolToString cfg.config.input.numlockByDefault}
|
||||
|
||||
touchpad {
|
||||
natural_scroll = ${trivial.boolToString cfg.config.input.touchpad.naturalScroll}
|
||||
}
|
||||
}
|
||||
|
||||
gestures {
|
||||
workspace_swipe = ${trivial.boolToString cfg.config.gestures.workspaceSwipe}
|
||||
}
|
||||
|
||||
${builtins.concatStringsSep "\n" (map (ws: "workspace = " + ws) cfg.config.workspaces)}
|
||||
|
||||
${builtins.concatStringsSep "\n" (map (wr: "windowrule = " + replaceStrings ["%"] ["%%"] wr) cfg.config.windowrules)}
|
||||
" >> hypr/hyprland.conf
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue