me like nix
0

Configure Feed

Select the types of activity you want to include in your feed.

Allow Noctalia to theme niri

author
Sean Aye
date (Jun 17, 2026, 7:38 PM -0400) commit 28b94d4a parent 5503f034 change-id wnsuultn
+50 -2
+38 -2
modules/desktop.nix
··· 3 3 { 4 4 flake.modules.nixos.desktop = 5 5 { pkgs, lib, ... }: 6 + let 7 + niriPackage = inputs.niri.packages.${pkgs.stdenv.hostPlatform.system}.niri-unstable; 8 + in 6 9 { 7 - programs.niri.enable = true; 10 + programs.niri = { 11 + enable = true; 12 + package = niriPackage; 13 + }; 8 14 9 15 programs.regreet = { 10 16 enable = true; ··· 71 77 }; 72 78 73 79 flake.modules.homeManager.desktop = 74 - { pkgs, config, ... }: 80 + { pkgs, lib, config, ... }: 75 81 let 82 + niriPackage = inputs.niri.packages.${pkgs.stdenv.hostPlatform.system}.niri-unstable; 76 83 wallpapers = import ./_data/wallpapers.nix; 77 84 downloads = builtins.concatStringsSep "\n" ( 78 85 map (wp: '' ··· 95 102 96 103 programs.niri = { 97 104 enable = true; 105 + package = niriPackage; 98 106 settings = { 99 107 window-rules = [ 100 108 { ··· 375 383 }; 376 384 }; 377 385 }; 386 + 387 + xdg.configFile.niri-config.source = lib.mkForce ( 388 + pkgs.runCommand "niri-config-with-noctalia-include" 389 + { 390 + config = '' 391 + include "noctalia.kdl" 392 + ${config.programs.niri.finalConfig} 393 + ''; 394 + passAsFile = [ "config" ]; 395 + buildInputs = [ config.programs.niri.package ]; 396 + } 397 + '' 398 + work="$TMPDIR/niri-config" 399 + mkdir -p "$work" 400 + cp "$configPath" "$work/config.kdl" 401 + : > "$work/noctalia.kdl" 402 + niri validate -c "$work/config.kdl" 403 + cp "$work/config.kdl" "$out" 404 + '' 405 + ); 406 + 407 + home.activation.ensureNiriNoctaliaConfig = config.lib.dag.entryAfter [ "writeBoundary" ] '' 408 + config_home="''${XDG_CONFIG_HOME:-$HOME/.config}" 409 + mkdir -p "$config_home/niri" 410 + if [ ! -e "$config_home/niri/noctalia.kdl" ]; then 411 + : > "$config_home/niri/noctalia.kdl" 412 + fi 413 + ''; 378 414 379 415 # Wallpaper downloads 380 416 home.activation.downloadWallpapers = config.lib.dag.entryAfter [ "writeBoundary" ] ''
+12
modules/noctalia.nix
··· 3 3 { 4 4 flake.modules.homeManager.noctalia = 5 5 { pkgs, config, ... }: 6 + let 7 + niriPackage = inputs.niri.packages.${pkgs.stdenv.hostPlatform.system}.niri-unstable; 8 + in 6 9 { 7 10 imports = [ inputs.noctalia.homeModules.default ]; 8 11 ··· 193 196 file="''${XDG_CONFIG_HOME:-$HOME/.config}/starship/noctalia.toml" 194 197 ${pkgs.gnugrep}/bin/grep -qE "^palette[[:space:]]*=" "$file" \ 195 198 || ${pkgs.gnused}/bin/sed -i "1ipalette = \"noctalia\"" "$file" 199 + ' 200 + ''; 201 + }; 202 + niri = { 203 + input_path = "${inputs.noctalia}/assets/templates/niri/niri.kdl"; 204 + output_path = "$XDG_CONFIG_HOME/niri/noctalia.kdl"; 205 + post_hook = '' 206 + ${pkgs.runtimeShell} -c ' 207 + ${niriPackage}/bin/niri msg action load-config-file >/dev/null 2>&1 || true 196 208 ' 197 209 ''; 198 210 };