Testing lib.mkForce
This commit is contained in:
+316
-333
File diff suppressed because it is too large
Load Diff
+13
-30
@@ -1661,13 +1661,13 @@ Creates a script for a powermenu
|
||||
{ config, lib, pkgs, flakeRoot, ... }:
|
||||
let
|
||||
repoScript =
|
||||
flakeRoot + "/assets/conf/desktop/hypr/scripts/powermenu.sh";
|
||||
targetRel = "hypr/scripts/powermenu.sh";
|
||||
flakeRoot.outPath + "/assets/conf/desktop/hypr/scripts/powermenu.sh";
|
||||
targetRel = ".config/hypr/scripts/powermenu.sh";
|
||||
in
|
||||
{
|
||||
# Ensure script exists in ~/.config/hypr/scripts/
|
||||
xdg.configFile."${targetRel}" = {
|
||||
source = lib.mkForce repoScript;
|
||||
home.file."${targetRel}" = {
|
||||
source = repoScript;
|
||||
executable = true;
|
||||
};
|
||||
}
|
||||
@@ -1679,16 +1679,10 @@ animated_wallpaper.nix installs mpvpaper and deploys your wallpaper files from t
|
||||
#+begin_src nix :tangle home/desktop/animated_wallpaper.nix :noweb tangle :mkdirp yes
|
||||
{ config, pkgs, lib, flakeRoot, ... }:
|
||||
let
|
||||
repoWallpaperDir = flakeRoot + "/assets/conf/desktop/wallpaper";
|
||||
userRelRoot = "nixos_conf/wallpaperstuff";
|
||||
repoWallpaperDir = flakeRoot.outPath + "/assets/conf/desktop/wallpaper";
|
||||
userRelRoot = ".config/nixos_conf/wallpaperstuff";
|
||||
userAbsRoot = "${config.home.homeDirectory}/${userRelRoot}";
|
||||
# The video file you want as wallpaper (must exist under the synced dir)
|
||||
userVideoPath = "${userAbsRoot}/videos/myWallpaper.mp4";
|
||||
# (keep your existing approach: sync the repo wallpaper dir to the user dir)
|
||||
repoWallpapersOnly = lib.cleanSourceWith {
|
||||
src = repoWallpaperDir;
|
||||
filter = path: type: true;
|
||||
};
|
||||
in
|
||||
{
|
||||
home.packages = [
|
||||
@@ -1697,7 +1691,7 @@ in
|
||||
];
|
||||
# Sync repo wallpapers (including videos/) into ~/nixos_conf/wallpaperstuff
|
||||
home.file."${userRelRoot}" = {
|
||||
source = repoWallpapersOnly;
|
||||
source = repoWallpaperDir;
|
||||
recursive = true;
|
||||
};
|
||||
systemd.user.services.mpvpaper-wallpaper = {
|
||||
@@ -1708,11 +1702,6 @@ in
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
# -p auto-pause saves resources when the wallpaper surface is hidden.
|
||||
# '*' applies to all outputs.
|
||||
# Stretch-to-fill (cover) behavior:
|
||||
# --panscan=1.0 fills the entire output by cropping (no letterboxing).
|
||||
# If you literally want distortion-stretch (ignore aspect ratio), use --keepaspect=no instead.
|
||||
ExecStart = ''
|
||||
${pkgs.mpvpaper}/bin/mpvpaper \
|
||||
-p \
|
||||
@@ -1992,25 +1981,19 @@ Mostly styling and enabling modules in the [[https://github.com/Alexays/Waybar][
|
||||
#+begin_src nix :tangle home/desktop/waybar.nix :noweb tangle :mkdirp yes
|
||||
{ config, lib, pkgs, flakeRoot, ... }:
|
||||
let
|
||||
repoWaybarDir = flakeRoot + "/assets/conf/desktop/waybar";
|
||||
repoWaybarDir = flakeRoot.outPath + "/assets/conf/desktop/waybar";
|
||||
in
|
||||
{
|
||||
programs.waybar.enable = true;
|
||||
# Ensure config matches repo (HM-managed symlink, not user-editable)
|
||||
xdg.configFile."waybar/config" = {
|
||||
source = lib.mkForce (repoWaybarDir + "/config.jsonc");
|
||||
force = true;
|
||||
home.file.".config/waybar/config" = {
|
||||
source = repoWaybarDir + "/config.jsonc";
|
||||
};
|
||||
# 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");
|
||||
force = true;
|
||||
home.file.".config/waybar/style.css" = {
|
||||
source = repoWaybarDir + "/style.css";
|
||||
};
|
||||
# Prevent HM from also trying to generate style content via programs.waybar.style
|
||||
# (not strictly required once mkForce is in place, but keeps intent clear)
|
||||
programs.waybar.style = "";
|
||||
}
|
||||
|
||||
#+end_src
|
||||
|
||||
** Lock Screen
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
{ config, pkgs, lib, flakeRoot, ... }:
|
||||
let
|
||||
repoWallpaperDir = flakeRoot + "/assets/conf/desktop/wallpaper";
|
||||
userRelRoot = "nixos_conf/wallpaperstuff";
|
||||
repoWallpaperDir = flakeRoot.outPath + "/assets/conf/desktop/wallpaper";
|
||||
userRelRoot = ".config/nixos_conf/wallpaperstuff";
|
||||
userAbsRoot = "${config.home.homeDirectory}/${userRelRoot}";
|
||||
# The video file you want as wallpaper (must exist under the synced dir)
|
||||
userVideoPath = "${userAbsRoot}/videos/myWallpaper.mp4";
|
||||
# (keep your existing approach: sync the repo wallpaper dir to the user dir)
|
||||
repoWallpapersOnly = lib.cleanSourceWith {
|
||||
src = repoWallpaperDir;
|
||||
filter = path: type: true;
|
||||
};
|
||||
in
|
||||
{
|
||||
home.packages = [
|
||||
@@ -18,7 +12,7 @@ in
|
||||
];
|
||||
# Sync repo wallpapers (including videos/) into ~/nixos_conf/wallpaperstuff
|
||||
home.file."${userRelRoot}" = {
|
||||
source = repoWallpapersOnly;
|
||||
source = repoWallpaperDir;
|
||||
recursive = true;
|
||||
};
|
||||
systemd.user.services.mpvpaper-wallpaper = {
|
||||
@@ -29,11 +23,6 @@ in
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
# -p auto-pause saves resources when the wallpaper surface is hidden.
|
||||
# '*' applies to all outputs.
|
||||
# Stretch-to-fill (cover) behavior:
|
||||
# --panscan=1.0 fills the entire output by cropping (no letterboxing).
|
||||
# If you literally want distortion-stretch (ignore aspect ratio), use --keepaspect=no instead.
|
||||
ExecStart = ''
|
||||
${pkgs.mpvpaper}/bin/mpvpaper \
|
||||
-p \
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{ config, lib, pkgs, flakeRoot, ... }:
|
||||
let
|
||||
repoScript =
|
||||
flakeRoot + "/assets/conf/desktop/hypr/scripts/powermenu.sh";
|
||||
targetRel = "hypr/scripts/powermenu.sh";
|
||||
flakeRoot.outPath + "/assets/conf/desktop/hypr/scripts/powermenu.sh";
|
||||
targetRel = ".config/hypr/scripts/powermenu.sh";
|
||||
in
|
||||
{
|
||||
# Ensure script exists in ~/.config/hypr/scripts/
|
||||
xdg.configFile."${targetRel}" = {
|
||||
source = lib.mkForce repoScript;
|
||||
home.file."${targetRel}" = {
|
||||
source = repoScript;
|
||||
executable = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,21 +1,14 @@
|
||||
{ config, lib, pkgs, flakeRoot, ... }:
|
||||
let
|
||||
repoWaybarDir = flakeRoot + "/assets/conf/desktop/waybar";
|
||||
repoWaybarDir = flakeRoot.outPath + "/assets/conf/desktop/waybar";
|
||||
in
|
||||
{
|
||||
programs.waybar.enable = true;
|
||||
# Ensure config matches repo (HM-managed symlink, not user-editable)
|
||||
xdg.configFile."waybar/config" = {
|
||||
source = lib.mkForce (repoWaybarDir + "/config.jsonc");
|
||||
force = true;
|
||||
home.file.".config/waybar/config" = {
|
||||
source = repoWaybarDir + "/config.jsonc";
|
||||
};
|
||||
# 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");
|
||||
force = true;
|
||||
home.file.".config/waybar/style.css" = {
|
||||
source = repoWaybarDir + "/style.css";
|
||||
};
|
||||
# Prevent HM from also trying to generate style content via programs.waybar.style
|
||||
# (not strictly required once mkForce is in place, but keeps intent clear)
|
||||
programs.waybar.style = "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user