nix-configs/modules/desktop/home/niri/default.nix
2026-06-20 15:13:38 +02:00

50 lines
1.3 KiB
Nix

# this file must only be saved via autosave due to the formatter.
# else it will be ugly
{ pkgs, lib, ... }:
{
home.packages = with pkgs; [
zenity
xwayland-satellite
];
home.file."config" =
let
kdlfiles =
builtins.readDir ./kdl
|> lib.filterAttrs (key: value: value == "regular")
|> lib.mapAttrsToList (filename: _value: "include \"${./kdl}/${filename}\"");
startups =
[
[
"eww"
"open-many"
"topBar"
"bottomBar"
]
[
"${pkgs.swaybg}/bin/swaybg"
"-i"
"${./wallpaper.jpg}"
"-m"
"fill"
]
[
"touch"
".config/niri/live.kdl"
]
]
|> map (map (word: "\"${word}\""))
|> map (lib.concatStringsSep " ")
|> map (it: "spawn-at-startup ${it}");
other = [
"include \"live.kdl\""
"output \"eDP-1\" { scale 1.1; }"
# conflicts with blur
# "animations { window-open { duration-ms 3000; curve \"linear\"; custom-shader r\"\n${builtins.readFile ./shaders/arc.frag}\";};}"
"binds {Mod+Shift+I { spawn \"${./scripts/cpdate.sh}\"; }; }"
];
in
{
target = ".config/niri/config.kdl";
text = lib.concatLines (startups ++ kdlfiles ++ other);
};
}