Added lib.mkForce + backup = false

This commit is contained in:
2026-03-01 17:23:50 +01:00
parent 9e8c030646
commit 72006f36ea
47 changed files with 5121 additions and 5058 deletions
+345 -324
View File
File diff suppressed because it is too large Load Diff
+42 -21
View File
@@ -1,4 +1,4 @@
gf#+OPTIONS: toc:nil broken-links:t
f#+OPTIONS: toc:nil broken-links:t
#+PROPERTY: header-args :noweb yes :results silent :mkdirp yes
#+HTML: <div align="center">
#+HTML: <div>
@@ -1030,7 +1030,7 @@ in
};
# Deploy the config file for runtime visibility/debugging
environment.etc."flatpak/flatpaks.conf".source = flatpakConfPath;
environment.etc."flatpak/flatpaks.conf".source = lib.mkForce flatpakConfPath;
systemd.services.flatpak-sync = {
description = "Install Flatpak apps listed in flatpaks.conf";
@@ -1671,7 +1671,8 @@ in
{
# Ensure script exists in ~/.config/hypr/scripts/
xdg.configFile."${targetRel}" = {
source = repoScript;
source = lib.mkForce repoScript;
backup = lib.mkForce false;
executable = true;
};
}
@@ -1816,15 +1817,16 @@ in
};
# Hyprpaper config (hyprpaper reads this; it does NOT need to write it)
# `ipc = true` enables `hyprctl hyprpaper ...` commands. :contentReference[oaicite:0]{index=0}
xdg.configFile."hypr/hyprpaper.conf".text = ''
xdg.configFile."hypr/hyprpaper.conf".text = lib.mkForce ''
ipc = true
splash = false
'';
xdg.configFile."hypr/hyprpaper.conf".backup = lib.mkForce false;
# Workspace wallpaper daemon: listens to socket2, applies w-<id>=... mapping
# Uses workspacev2 to get numeric workspace id. :contentReference[oaicite:1]{index=1}
xdg.configFile."${daemonRel}" = {
executable = true;
text = ''
text = lib.mkForce ''
#!/usr/bin/env bash
set -euo pipefail
: "''${XDG_RUNTIME_DIR:?XDG_RUNTIME_DIR not set}"
@@ -1907,13 +1909,14 @@ in
handle "''${line}" || true
done
'';
backup = lib.mkForce false;
};
# CLI setter in the style of your inspiration script.
# Usage: set-wallpaper.sh <workspace_id> <monitor> [wallpaper]
xdg.configFile."${setRel}" = {
executable = true;
text = ''
text = lib.mkForce ''
#!/usr/bin/env bash
set -euo pipefail
@@ -1956,6 +1959,7 @@ in
hyprctl hyprpaper wallpaper "''${mon}, ''${wp}, fill" >/dev/null
fi
'';
backup = lib.mkForce false;
};
# Services
@@ -2002,13 +2006,15 @@ in
programs.waybar.enable = true;
# Ensure config matches repo (HM-managed symlink, not user-editable)
xdg.configFile."waybar/config" = {
source = repoWaybarDir + "/config.jsonc";
source = lib.mkForce repoWaybarDir + "/config.jsonc";
backup = lib.mkForce false;
force = true;
};
# Override HM's internally-generated waybar-style.css derivation
# and use your repo file instead.
xdg.configFile."waybar/style.css" = {
source = lib.mkForce (repoWaybarDir + "/style.css");
backup = lib.mkForce false;
force = true;
};
# Prevent HM from also trying to generate style content via programs.waybar.style
@@ -2029,8 +2035,10 @@ let
in
{
home.packages = [ pkgs.hyprlock ];
xdg.configFile."hypr/lock.png".source = lockPngSrc;
xdg.configFile."hypr/hyprlock.conf".source = hyprlockConf;
xdg.configFile."hypr/lock.png".source = lib.mkForce lockPngSrc;
xdg.configFile."hypr/lock.png".backup = lib.mkForce false;
xdg.configFile."hypr/hyprlock.conf".source = lib.mkForce hyprlockConf;
xdg.configFile."hypr/hyprlock.conf".backup = lib.mkForce false;
}
#+end_src
@@ -2043,7 +2051,8 @@ let
in
{
home.packages = [ pkgs.hypridle ];
xdg.configFile."hypr/hypridle.conf".source = hypridleConf;
xdg.configFile."hypr/hypridle.conf".source = lib.mkForce hypridleConf;
xdg.configFile."hypr/hypridle.conf".backup = lib.mkForce false ;
}
#+end_src
@@ -2082,18 +2091,21 @@ in
'';
};
# Copy repo configs/scripts into ~/.config
xdg.configFile."${targetRel}".source = repoConf;
xdg.configFile."${targetRel}".source = lib.mkForce repoConf;
xdg.configFile."${targetRel}".backup = lib.mkForce false;
xdg.configFile."${targetOverflowRel}" = {
source = repoOverflowScript;
source = lib.mkForce repoOverflowScript;
backup = lib.mkForce false;
executable = true; # makes it chmod +x
};
xdg.configFile."${targetPerMonitor}" = {
source = repoPerMonitorScript;
source = lib.mkForce repoPerMonitorScript;
backup = lib.mkForce false;
executable = true; # makes it chmod +x
};
xdg.configFile."${targetSwitchScript}" = {
source = repoSwitchScript;
source = lib.mkForce repoSwitchScript;
backup = lib.mkForce false;
executable = true; # makes it chmod +x
};
}
@@ -2113,8 +2125,10 @@ in
xdg.enable = true;
home.packages = [ pkgs.hyprshell ];
# Link repo -> ~/.config/hyprshell/...
xdg.configFile."hyprshell/config.ron".source = cfgRon;
xdg.configFile."hyprshell/styles.css".source = cssFile;
xdg.configFile."hyprshell/config.ron".source = lib.mkForce cfgRon;
xdg.configFile."hyprshell/config.ron".backup = lib.mkForce false;
xdg.configFile."hyprshell/styles.css".source = lib.mkForce cssFile;
xdg.configFile."hyprshell/styles.css".backup = lib.mkForce false;
# Autostart (systemd user service)
systemd.user.services.hyprshell = {
Unit = {
@@ -2160,7 +2174,8 @@ in
};
xdg.configFile."hypr/scripts/lid-lock.sh" = {
source = flakeRoot + "/assets/conf/desktop/hypr/scripts/lid-lock.sh";
source = lib.mkForce flakeRoot + "/assets/conf/desktop/hypr/scripts/lid-lock.sh";
backup = lib.mkForce false;
executable = true;
};
xdg.portal = {
@@ -2201,10 +2216,14 @@ in
xdg.enable = true;
home.packages = [ walkerPkg elephantPkg ];
# ~/.config/walker/themes/*
xdg.configFile."walker/themes/frosted/default.css".source = repoThemesDir + "/themes/frosted/default.css";
xdg.configFile."walker/themes/frosted/default.css".source = lib.mkForce repoThemesDir + "/themes/frosted/default.css";
xdg.configFile."walker/themes/frosted/default.css".backup = lib.mkForce false;
xdg.configFile."walker/themes/frosted/style.css".source = repoThemesDir + "/themes/frosted/style.css";
xdg.configFile."walker/themes/frosted/style.css".backup = lib.mkForce false;
xdg.configFile."walker/config.toml".source = repoThemesDir + "/config.toml";
# xdg.configFile."walker/themes/default.html".source = repoThemesDir + "/default.html";
xdg.configFile."walker/config.toml".backup = lib.mkForce false;
# xdg.configFile."walker/themes/default.html".source = lib.mkForce repoThemesDir + "/default.html";
# xdg.configFile."walker/themes/default.html".backup = lib.mkForce false;
# (services unchanged)
systemd.user.services.elephant = { /* ... your existing service ... */ };
systemd.user.services.walker = { /* ... your existing service ... */ };
@@ -2299,6 +2318,7 @@ in
programs.alacritty.enable = true;
# Override the config generated by programs.alacritty
xdg.configFile."alacritty/alacritty.toml".source = lib.mkForce repoAlacrittyConf;
xdg.configFile."alacritty/alacritty.toml".backup = lib.mkForce false
catppuccin.alacritty.enable = true;
catppuccin.alacritty.flavor = "mocha";
}
@@ -2365,7 +2385,8 @@ in
{
xdg.enable = true;
# Stable theme file so kitty.conf can include it without /nix/store paths
xdg.configFile."kitty/themes/Catppuccin-Mocha.conf".text = catppuccinMochaConf;
xdg.configFile."kitty/themes/Catppuccin-Mocha.conf".text = lib.mkForce catppuccinMochaConf;
xdg.configFile."kitty/themes/Catppuccin-Mocha.conf".backup = lib.mkForce false;
programs.kitty = {
enable = true;
# Home Manager generates ~/.config/kitty/kitty.conf; we append in-order:
@@ -86,7 +86,7 @@ in
};
# Deploy the config file for runtime visibility/debugging
environment.etc."flatpak/flatpaks.conf".source = flatpakConfPath;
environment.etc."flatpak/flatpaks.conf".source = lib.mkForce flatpakConfPath;
systemd.services.flatpak-sync = {
description = "Install Flatpak apps listed in flatpaks.conf";
+2 -1
View File
@@ -4,5 +4,6 @@ let
in
{
home.packages = [ pkgs.hypridle ];
xdg.configFile."hypr/hypridle.conf".source = hypridleConf;
xdg.configFile."hypr/hypridle.conf".source = lib.mkForce hypridleConf;
xdg.configFile."hypr/hypridle.conf".backup = lib.mkForce false ;
}
+2 -1
View File
@@ -20,7 +20,8 @@ in
};
xdg.configFile."hypr/scripts/lid-lock.sh" = {
source = flakeRoot + "/assets/conf/desktop/hypr/scripts/lid-lock.sh";
source = lib.mkForce flakeRoot + "/assets/conf/desktop/hypr/scripts/lid-lock.sh";
backup = lib.mkForce false;
executable = true;
};
xdg.portal = {
+4 -2
View File
@@ -5,6 +5,8 @@ let
in
{
home.packages = [ pkgs.hyprlock ];
xdg.configFile."hypr/lock.png".source = lockPngSrc;
xdg.configFile."hypr/hyprlock.conf".source = hyprlockConf;
xdg.configFile."hypr/lock.png".source = lib.mkForce lockPngSrc;
xdg.configFile."hypr/lock.png".backup = lib.mkForce false;
xdg.configFile."hypr/hyprlock.conf".source = lib.mkForce hyprlockConf;
xdg.configFile."hypr/hyprlock.conf".backup = lib.mkForce false;
}
+8 -5
View File
@@ -30,18 +30,21 @@ in
'';
};
# Copy repo configs/scripts into ~/.config
xdg.configFile."${targetRel}".source = repoConf;
xdg.configFile."${targetRel}".source = lib.mkForce repoConf;
xdg.configFile."${targetRel}".backup = lib.mkForce false;
xdg.configFile."${targetOverflowRel}" = {
source = repoOverflowScript;
source = lib.mkForce repoOverflowScript;
backup = lib.mkForce false;
executable = true; # makes it chmod +x
};
xdg.configFile."${targetPerMonitor}" = {
source = repoPerMonitorScript;
source = lib.mkForce repoPerMonitorScript;
backup = lib.mkForce false;
executable = true; # makes it chmod +x
};
xdg.configFile."${targetSwitchScript}" = {
source = repoSwitchScript;
source = lib.mkForce repoSwitchScript;
backup = lib.mkForce false;
executable = true; # makes it chmod +x
};
}
+4 -2
View File
@@ -9,8 +9,10 @@ in
xdg.enable = true;
home.packages = [ pkgs.hyprshell ];
# Link repo -> ~/.config/hyprshell/...
xdg.configFile."hyprshell/config.ron".source = cfgRon;
xdg.configFile."hyprshell/styles.css".source = cssFile;
xdg.configFile."hyprshell/config.ron".source = lib.mkForce cfgRon;
xdg.configFile."hyprshell/config.ron".backup = lib.mkForce false;
xdg.configFile."hyprshell/styles.css".source = lib.mkForce cssFile;
xdg.configFile."hyprshell/styles.css".backup = lib.mkForce false;
# Autostart (systemd user service)
systemd.user.services.hyprshell = {
Unit = {
+2 -1
View File
@@ -7,7 +7,8 @@ in
{
# Ensure script exists in ~/.config/hypr/scripts/
xdg.configFile."${targetRel}" = {
source = repoScript;
source = lib.mkForce repoScript;
backup = lib.mkForce false;
executable = true;
};
}
+6 -2
View File
@@ -16,10 +16,14 @@ in
xdg.enable = true;
home.packages = [ walkerPkg elephantPkg ];
# ~/.config/walker/themes/*
xdg.configFile."walker/themes/frosted/default.css".source = repoThemesDir + "/themes/frosted/default.css";
xdg.configFile."walker/themes/frosted/default.css".source = lib.mkForce repoThemesDir + "/themes/frosted/default.css";
xdg.configFile."walker/themes/frosted/default.css".backup = lib.mkForce false;
xdg.configFile."walker/themes/frosted/style.css".source = repoThemesDir + "/themes/frosted/style.css";
xdg.configFile."walker/themes/frosted/style.css".backup = lib.mkForce false;
xdg.configFile."walker/config.toml".source = repoThemesDir + "/config.toml";
# xdg.configFile."walker/themes/default.html".source = repoThemesDir + "/default.html";
xdg.configFile."walker/config.toml".backup = lib.mkForce false;
# xdg.configFile."walker/themes/default.html".source = lib.mkForce repoThemesDir + "/default.html";
# xdg.configFile."walker/themes/default.html".backup = lib.mkForce false;
# (services unchanged)
systemd.user.services.elephant = { /* ... your existing service ... */ };
systemd.user.services.walker = { /* ... your existing service ... */ };
+3 -1
View File
@@ -6,13 +6,15 @@ in
programs.waybar.enable = true;
# Ensure config matches repo (HM-managed symlink, not user-editable)
xdg.configFile."waybar/config" = {
source = repoWaybarDir + "/config.jsonc";
source = lib.mkForce repoWaybarDir + "/config.jsonc";
backup = lib.mkForce false;
force = true;
};
# Override HM's internally-generated waybar-style.css derivation
# and use your repo file instead.
xdg.configFile."waybar/style.css" = {
source = lib.mkForce (repoWaybarDir + "/style.css");
backup = lib.mkForce false;
force = true;
};
# Prevent HM from also trying to generate style content via programs.waybar.style
@@ -30,15 +30,16 @@ in
};
# Hyprpaper config (hyprpaper reads this; it does NOT need to write it)
# `ipc = true` enables `hyprctl hyprpaper ...` commands. :contentReference[oaicite:0]{index=0}
xdg.configFile."hypr/hyprpaper.conf".text = ''
xdg.configFile."hypr/hyprpaper.conf".text = lib.mkForce ''
ipc = true
splash = false
'';
xdg.configFile."hypr/hyprpaper.conf".backup = lib.mkForce false;
# Workspace wallpaper daemon: listens to socket2, applies w-<id>=... mapping
# Uses workspacev2 to get numeric workspace id. :contentReference[oaicite:1]{index=1}
xdg.configFile."${daemonRel}" = {
executable = true;
text = ''
text = lib.mkForce ''
#!/usr/bin/env bash
set -euo pipefail
: "''${XDG_RUNTIME_DIR:?XDG_RUNTIME_DIR not set}"
@@ -121,13 +122,14 @@ in
handle "''${line}" || true
done
'';
backup = lib.mkForce false;
};
# CLI setter in the style of your inspiration script.
# Usage: set-wallpaper.sh <workspace_id> <monitor> [wallpaper]
xdg.configFile."${setRel}" = {
executable = true;
text = ''
text = lib.mkForce ''
#!/usr/bin/env bash
set -euo pipefail
@@ -170,6 +172,7 @@ in
hyprctl hyprpaper wallpaper "''${mon}, ''${wp}, fill" >/dev/null
fi
'';
backup = lib.mkForce false;
};
# Services
+1
View File
@@ -7,6 +7,7 @@ in
programs.alacritty.enable = true;
# Override the config generated by programs.alacritty
xdg.configFile."alacritty/alacritty.toml".source = lib.mkForce repoAlacrittyConf;
xdg.configFile."alacritty/alacritty.toml".backup = lib.mkForce false
catppuccin.alacritty.enable = true;
catppuccin.alacritty.flavor = "mocha";
}
+2 -1
View File
@@ -9,7 +9,8 @@ in
{
xdg.enable = true;
# Stable theme file so kitty.conf can include it without /nix/store paths
xdg.configFile."kitty/themes/Catppuccin-Mocha.conf".text = catppuccinMochaConf;
xdg.configFile."kitty/themes/Catppuccin-Mocha.conf".text = lib.mkForce catppuccinMochaConf;
xdg.configFile."kitty/themes/Catppuccin-Mocha.conf".backup = lib.mkForce false;
programs.kitty = {
enable = true;
# Home Manager generates ~/.config/kitty/kitty.conf; we append in-order: