implementing home.file instead of xdg.config
This commit is contained in:
+347
-345
File diff suppressed because it is too large
Load Diff
+45
-40
@@ -1970,7 +1970,6 @@ in
|
||||
};
|
||||
programs.waybar.style = "";
|
||||
}
|
||||
|
||||
#+end_src
|
||||
|
||||
** Lock Screen
|
||||
@@ -1985,13 +1984,18 @@ let
|
||||
in
|
||||
{
|
||||
home.packages = [ pkgs.hyprlock ];
|
||||
xdg.configFile."hypr/lock.png".source = lib.mkForce lockPngSrc;
|
||||
xdg.configFile."hypr/hyprlock.conf".source = lib.mkForce hyprlockConf;
|
||||
# Gebruik home.file voor echte bestanden (geen symlinks)
|
||||
home.file.".config/hypr/lock.png" = {
|
||||
source = lockPngSrc;
|
||||
};
|
||||
home.file.".config/hypr/hyprlock.conf" = {
|
||||
source = hyprlockConf;
|
||||
};
|
||||
}
|
||||
#+end_src
|
||||
|
||||
** Idle Screen
|
||||
<henro: needs instruction>
|
||||
|
||||
#+begin_src nix :tangle home/desktop/hypridle.nix :noweb tangle :mkdirp yes
|
||||
{ config, lib, pkgs, flakeRoot, ... }:
|
||||
let
|
||||
@@ -1999,7 +2003,9 @@ let
|
||||
in
|
||||
{
|
||||
home.packages = [ pkgs.hypridle ];
|
||||
xdg.configFile."hypr/hypridle.conf".source = lib.mkForce hypridleConf;
|
||||
home.file.".config/hypr/hypridle.conf" = {
|
||||
source = hypridleConf;
|
||||
};
|
||||
}
|
||||
#+end_src
|
||||
|
||||
@@ -2011,47 +2017,40 @@ let
|
||||
# Hyprscrolling drop-in config (repo -> ~/.config)
|
||||
repoConf = flakeRoot.outPath + "/assets/conf/desktop/hypr/hyprscrolling.conf";
|
||||
targetRel = "hypr/conf.d/90-hyprscrolling.conf";
|
||||
# Overflow indicator script (repo -> ~/.config)
|
||||
# Overflow indicator script
|
||||
repoOverflowScript = flakeRoot.outPath + "/assets/conf/desktop/hypr/scripts/hyprscroll-overflow.sh";
|
||||
targetOverflowRel = "hypr/scripts/hyprscroll-overflow.sh";
|
||||
# Adapt columnsize to monitor
|
||||
repoPerMonitorScript = flakeRoot.outPath + "/assets/conf/desktop/hypr/scripts/hyprscrolling-per-monitor.sh";
|
||||
targetPerMonitor = "hypr/scripts/hyprscrolling-per-monitor.sh";
|
||||
# Facilitate switching between scrolling and dwindle
|
||||
repoSwitchScript =
|
||||
flakeRoot.outPath + "/assets/conf/desktop/hypr/scripts/toggle-layout-scrolling-dwindle.sh";
|
||||
# Switch between scrolling/dwindle
|
||||
repoSwitchScript = flakeRoot.outPath + "/assets/conf/desktop/hypr/scripts/toggle-layout-scrolling-dwindle.sh";
|
||||
targetSwitchScript = "hypr/scripts/toggle-layout-scrolling-dwindle.sh";
|
||||
in
|
||||
{
|
||||
# Ensure deps for the script exist at runtime
|
||||
# (hyprctl comes with Hyprland; jq is often not installed by default)
|
||||
home.packages = with pkgs; [
|
||||
jq
|
||||
];
|
||||
home.packages = with pkgs; [ jq ];
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
pkgs.hyprlandPlugins.hyprscrolling
|
||||
];
|
||||
plugins = [ pkgs.hyprlandPlugins.hyprscrolling ];
|
||||
extraConfig = ''
|
||||
source = ~/.config/${targetRel}
|
||||
source = ${config.xdg.configHome}/${targetRel}
|
||||
'';
|
||||
};
|
||||
# Copy repo configs/scripts into ~/.config
|
||||
xdg.configFile."${targetRel}" = {
|
||||
source = lib.mkForce repoConf;
|
||||
# Copy repo configs/scripts into ~/.config (als echte bestanden)
|
||||
home.file."${targetRel}" = {
|
||||
source = repoConf;
|
||||
};
|
||||
xdg.configFile."${targetOverflowRel}" = {
|
||||
source = lib.mkForce repoOverflowScript;
|
||||
executable = true; # makes it chmod +x
|
||||
home.file."${targetOverflowRel}" = {
|
||||
source = repoOverflowScript;
|
||||
executable = true;
|
||||
};
|
||||
xdg.configFile."${targetPerMonitor}" = {
|
||||
source = lib.mkForce repoPerMonitorScript;
|
||||
executable = true; # makes it chmod +x
|
||||
home.file."${targetPerMonitor}" = {
|
||||
source = repoPerMonitorScript;
|
||||
executable = true;
|
||||
};
|
||||
xdg.configFile."${targetSwitchScript}" = {
|
||||
source = lib.mkForce repoSwitchScript;
|
||||
executable = true; # makes it chmod +x
|
||||
home.file."${targetSwitchScript}" = {
|
||||
source = repoSwitchScript;
|
||||
executable = true;
|
||||
};
|
||||
}
|
||||
#+end_src
|
||||
@@ -2069,9 +2068,13 @@ in
|
||||
{
|
||||
xdg.enable = true;
|
||||
home.packages = [ pkgs.hyprshell ];
|
||||
# Link repo -> ~/.config/hyprshell/...
|
||||
xdg.configFile."hyprshell/config.ron".source = lib.mkForce cfgRon;
|
||||
xdg.configFile."hyprshell/styles.css".source = lib.mkForce cssFile;
|
||||
# Gebruik home.file voor echte bestanden (geen symlinks)
|
||||
home.file.".config/hyprshell/config.ron" = {
|
||||
source = cfgRon;
|
||||
};
|
||||
home.file.".config/hyprshell/styles.css" = {
|
||||
source = cssFile;
|
||||
};
|
||||
# Autostart (systemd user service)
|
||||
systemd.user.services.hyprshell = {
|
||||
Unit = {
|
||||
@@ -2099,24 +2102,26 @@ This configures the desktop environment along with the peripherals. The comments
|
||||
let
|
||||
hyprConf = flakeRoot.outPath + "/assets/conf/desktop/hypr/hyprland.conf";
|
||||
bindingsConf = flakeRoot.outPath + "/assets/conf/desktop/hypr/bindings.conf";
|
||||
lidLockScript = flakeRoot.outPath + "/assets/conf/desktop/hypr/scripts/lid-lock.sh";
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
# Load base config + bindings from repo files
|
||||
extraConfig =
|
||||
(builtins.readFile hyprConf)
|
||||
+ "\n\n# --- Repo keybindings ---\n"
|
||||
+ (builtins.readFile bindingsConf)
|
||||
+ "\n";
|
||||
extraConfig = ''
|
||||
${builtins.readFile hyprConf}
|
||||
# --- Repo keybindings ---
|
||||
${builtins.readFile bindingsConf}
|
||||
'';
|
||||
settings = {
|
||||
windowrule = [
|
||||
"match:class nm-connection-editor, float 1, center 1, size 900 700"
|
||||
];
|
||||
};
|
||||
};
|
||||
xdg.configFile."hypr/scripts/lid-lock.sh" = {
|
||||
source = lib.mkForce (flakeRoot.outPath + "/assets/conf/desktop/hypr/scripts/lid-lock.sh");
|
||||
# Gebruik home.file voor echte bestanden (geen symlinks)
|
||||
home.file.".config/hypr/scripts/lid-lock.sh" = {
|
||||
source = lidLockScript;
|
||||
executable = true;
|
||||
};
|
||||
xdg.portal = {
|
||||
|
||||
@@ -4,5 +4,7 @@ let
|
||||
in
|
||||
{
|
||||
home.packages = [ pkgs.hypridle ];
|
||||
xdg.configFile."hypr/hypridle.conf".source = lib.mkForce hypridleConf;
|
||||
home.file.".config/hypr/hypridle.conf" = {
|
||||
source = hypridleConf;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,24 +2,26 @@
|
||||
let
|
||||
hyprConf = flakeRoot.outPath + "/assets/conf/desktop/hypr/hyprland.conf";
|
||||
bindingsConf = flakeRoot.outPath + "/assets/conf/desktop/hypr/bindings.conf";
|
||||
lidLockScript = flakeRoot.outPath + "/assets/conf/desktop/hypr/scripts/lid-lock.sh";
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
# Load base config + bindings from repo files
|
||||
extraConfig =
|
||||
(builtins.readFile hyprConf)
|
||||
+ "\n\n# --- Repo keybindings ---\n"
|
||||
+ (builtins.readFile bindingsConf)
|
||||
+ "\n";
|
||||
extraConfig = ''
|
||||
${builtins.readFile hyprConf}
|
||||
# --- Repo keybindings ---
|
||||
${builtins.readFile bindingsConf}
|
||||
'';
|
||||
settings = {
|
||||
windowrule = [
|
||||
"match:class nm-connection-editor, float 1, center 1, size 900 700"
|
||||
];
|
||||
};
|
||||
};
|
||||
xdg.configFile."hypr/scripts/lid-lock.sh" = {
|
||||
source = lib.mkForce (flakeRoot.outPath + "/assets/conf/desktop/hypr/scripts/lid-lock.sh");
|
||||
# Gebruik home.file voor echte bestanden (geen symlinks)
|
||||
home.file.".config/hypr/scripts/lid-lock.sh" = {
|
||||
source = lidLockScript;
|
||||
executable = true;
|
||||
};
|
||||
xdg.portal = {
|
||||
|
||||
@@ -5,6 +5,11 @@ let
|
||||
in
|
||||
{
|
||||
home.packages = [ pkgs.hyprlock ];
|
||||
xdg.configFile."hypr/lock.png".source = lib.mkForce lockPngSrc;
|
||||
xdg.configFile."hypr/hyprlock.conf".source = lib.mkForce hyprlockConf;
|
||||
# Gebruik home.file voor echte bestanden (geen symlinks)
|
||||
home.file.".config/hypr/lock.png" = {
|
||||
source = lockPngSrc;
|
||||
};
|
||||
home.file.".config/hypr/hyprlock.conf" = {
|
||||
source = hyprlockConf;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,46 +3,39 @@ let
|
||||
# Hyprscrolling drop-in config (repo -> ~/.config)
|
||||
repoConf = flakeRoot.outPath + "/assets/conf/desktop/hypr/hyprscrolling.conf";
|
||||
targetRel = "hypr/conf.d/90-hyprscrolling.conf";
|
||||
# Overflow indicator script (repo -> ~/.config)
|
||||
# Overflow indicator script
|
||||
repoOverflowScript = flakeRoot.outPath + "/assets/conf/desktop/hypr/scripts/hyprscroll-overflow.sh";
|
||||
targetOverflowRel = "hypr/scripts/hyprscroll-overflow.sh";
|
||||
# Adapt columnsize to monitor
|
||||
repoPerMonitorScript = flakeRoot.outPath + "/assets/conf/desktop/hypr/scripts/hyprscrolling-per-monitor.sh";
|
||||
targetPerMonitor = "hypr/scripts/hyprscrolling-per-monitor.sh";
|
||||
# Facilitate switching between scrolling and dwindle
|
||||
repoSwitchScript =
|
||||
flakeRoot.outPath + "/assets/conf/desktop/hypr/scripts/toggle-layout-scrolling-dwindle.sh";
|
||||
# Switch between scrolling/dwindle
|
||||
repoSwitchScript = flakeRoot.outPath + "/assets/conf/desktop/hypr/scripts/toggle-layout-scrolling-dwindle.sh";
|
||||
targetSwitchScript = "hypr/scripts/toggle-layout-scrolling-dwindle.sh";
|
||||
in
|
||||
{
|
||||
# Ensure deps for the script exist at runtime
|
||||
# (hyprctl comes with Hyprland; jq is often not installed by default)
|
||||
home.packages = with pkgs; [
|
||||
jq
|
||||
];
|
||||
home.packages = with pkgs; [ jq ];
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
pkgs.hyprlandPlugins.hyprscrolling
|
||||
];
|
||||
plugins = [ pkgs.hyprlandPlugins.hyprscrolling ];
|
||||
extraConfig = ''
|
||||
source = ~/.config/${targetRel}
|
||||
source = ${config.xdg.configHome}/${targetRel}
|
||||
'';
|
||||
};
|
||||
# Copy repo configs/scripts into ~/.config
|
||||
xdg.configFile."${targetRel}" = {
|
||||
source = lib.mkForce repoConf;
|
||||
# Copy repo configs/scripts into ~/.config (als echte bestanden)
|
||||
home.file."${targetRel}" = {
|
||||
source = repoConf;
|
||||
};
|
||||
xdg.configFile."${targetOverflowRel}" = {
|
||||
source = lib.mkForce repoOverflowScript;
|
||||
executable = true; # makes it chmod +x
|
||||
home.file."${targetOverflowRel}" = {
|
||||
source = repoOverflowScript;
|
||||
executable = true;
|
||||
};
|
||||
xdg.configFile."${targetPerMonitor}" = {
|
||||
source = lib.mkForce repoPerMonitorScript;
|
||||
executable = true; # makes it chmod +x
|
||||
home.file."${targetPerMonitor}" = {
|
||||
source = repoPerMonitorScript;
|
||||
executable = true;
|
||||
};
|
||||
xdg.configFile."${targetSwitchScript}" = {
|
||||
source = lib.mkForce repoSwitchScript;
|
||||
executable = true; # makes it chmod +x
|
||||
home.file."${targetSwitchScript}" = {
|
||||
source = repoSwitchScript;
|
||||
executable = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -8,9 +8,13 @@ in
|
||||
{
|
||||
xdg.enable = true;
|
||||
home.packages = [ pkgs.hyprshell ];
|
||||
# Link repo -> ~/.config/hyprshell/...
|
||||
xdg.configFile."hyprshell/config.ron".source = lib.mkForce cfgRon;
|
||||
xdg.configFile."hyprshell/styles.css".source = lib.mkForce cssFile;
|
||||
# Gebruik home.file voor echte bestanden (geen symlinks)
|
||||
home.file.".config/hyprshell/config.ron" = {
|
||||
source = cfgRon;
|
||||
};
|
||||
home.file.".config/hyprshell/styles.css" = {
|
||||
source = cssFile;
|
||||
};
|
||||
# Autostart (systemd user service)
|
||||
systemd.user.services.hyprshell = {
|
||||
Unit = {
|
||||
|
||||
Reference in New Issue
Block a user