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