First commit
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
# Load the Hyprexpo plugin (from nixpkgs)
|
||||
plugins = [
|
||||
pkgs.hyprlandPlugins.hyprexpo
|
||||
];
|
||||
|
||||
# Append plugin config + keybind after your existing hyprland.conf
|
||||
extraConfig = lib.mkAfter ''
|
||||
############################
|
||||
# Hyprexpo (workspace/window overview)
|
||||
############################
|
||||
|
||||
# Basic plugin config (tweak as you like)
|
||||
plugin {
|
||||
hyprexpo {
|
||||
columns = 3
|
||||
gaps_in = 5
|
||||
gaps_out = 20
|
||||
|
||||
# Optional; comment out if you don't want it
|
||||
# workspace_method = center current
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ config, lib, pkgs, flakeRoot, ... }:
|
||||
let
|
||||
hypridleConf = flakeRoot + "/assets/conf/desktop/hypr/hypridle.conf";
|
||||
in
|
||||
{
|
||||
home.packages = [ pkgs.hypridle ];
|
||||
xdg.configFile."hypr/hypridle.conf".source = hypridleConf;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{ config, lib, pkgs, flakeRoot, ... }:
|
||||
let
|
||||
hyprConf = flakeRoot + "/assets/conf/desktop/hypr/hyprland.conf";
|
||||
bindingsConf = flakeRoot + "/assets/conf/desktop/hypr/bindings.conf";
|
||||
in
|
||||
{
|
||||
programs.kitty.enable = true;
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd.enable = false;
|
||||
|
||||
# Load base config + bindings from repo files
|
||||
extraConfig =
|
||||
(builtins.readFile hyprConf)
|
||||
+ "\n\n# --- Repo keybindings ---\n"
|
||||
+ (builtins.readFile bindingsConf)
|
||||
+ "\n";
|
||||
};
|
||||
|
||||
xdg.configFile."hypr/scripts/lid-lock.sh" = {
|
||||
source = flakeRoot + "/assets/conf/desktop/hypr/scripts/lid-lock.sh";
|
||||
executable = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{config, lib, pkgs, flakeRoot, ... }:
|
||||
let
|
||||
lockPngSrc = flakeRoot + "/assets/lock.png";
|
||||
hyprlockConf = flakeRoot + "/assets/conf/desktop/hypr/hyprlock.conf";
|
||||
in
|
||||
{
|
||||
home.packages = [ pkgs.hyprlock ];
|
||||
xdg.configFile."hypr/lock.png".source = lockPngSrc;
|
||||
xdg.configFile."hypr/hyprlock.conf".source = hyprlockConf;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
# home/desktop/hyprshell.nix (Home-Manager module)
|
||||
{ config, pkgs, lib, flakeRoot, ... }:
|
||||
let
|
||||
repoDir = flakeRoot + "/assets/conf/desktop/hypr/hyprshell";
|
||||
cfgRon = repoDir + "/config.ron";
|
||||
cssFile = repoDir + "/styles.css";
|
||||
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;
|
||||
# Autostart (systemd user service)
|
||||
systemd.user.services.hyprshell = {
|
||||
Unit = {
|
||||
Description = "Hyprshell (window switcher / launcher)";
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
After = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.hyprshell}/bin/hyprshell";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
{ config, pkgs, lib, inputs ? null, ... }:
|
||||
|
||||
let
|
||||
walkerPkg =
|
||||
if inputs != null && inputs ? walker
|
||||
then inputs.walker.packages.${pkgs.system}.default
|
||||
else pkgs.walker;
|
||||
|
||||
elephantPkg =
|
||||
if inputs != null && inputs ? elephant
|
||||
then inputs.elephant.packages.${pkgs.system}.default
|
||||
else pkgs.elephant;
|
||||
|
||||
sessionTarget = "graphical-session.target";
|
||||
in
|
||||
{
|
||||
xdg.enable = true;
|
||||
|
||||
home.packages = [
|
||||
walkerPkg
|
||||
elephantPkg
|
||||
];
|
||||
|
||||
systemd.user.services.elephant = {
|
||||
Unit = {
|
||||
Description = "Elephant backend for Walker";
|
||||
PartOf = [ sessionTarget ];
|
||||
After = [ sessionTarget ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${elephantPkg}/bin/elephant";
|
||||
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
|
||||
# Ensure Elephant can create its socket under:
|
||||
# /run/user/$UID/elephant/...
|
||||
RuntimeDirectory = "elephant";
|
||||
RuntimeDirectoryMode = "0700";
|
||||
|
||||
# Light hardening (DO NOT use ProtectSystem=strict here)
|
||||
NoNewPrivileges = true;
|
||||
PrivateTmp = true;
|
||||
ProtectKernelTunables = true;
|
||||
ProtectKernelModules = true;
|
||||
ProtectControlGroups = true;
|
||||
LockPersonality = true;
|
||||
RestrictRealtime = true;
|
||||
RestrictSUIDSGID = true;
|
||||
SystemCallArchitectures = "native";
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ sessionTarget ];
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.walker = {
|
||||
Unit = {
|
||||
Description = "Walker GApplication service";
|
||||
PartOf = [ sessionTarget ];
|
||||
After = [ sessionTarget "elephant.service" ];
|
||||
Wants = [ "elephant.service" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${walkerPkg}/bin/walker --gapplication-service";
|
||||
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
|
||||
# Light hardening
|
||||
NoNewPrivileges = true;
|
||||
PrivateTmp = true;
|
||||
ProtectKernelTunables = true;
|
||||
ProtectKernelModules = true;
|
||||
ProtectControlGroups = true;
|
||||
LockPersonality = true;
|
||||
RestrictRealtime = true;
|
||||
RestrictSUIDSGID = true;
|
||||
SystemCallArchitectures = "native";
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ sessionTarget ];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
{ config, pkgs, lib, flakeRoot, ... }:
|
||||
let
|
||||
repoWallpaperDir = flakeRoot + "/assets/conf/desktop/wallpaper";
|
||||
repoWallpaperConf = flakeRoot + "/assets/conf/desktop/wallpaper/wallpaper.conf";
|
||||
userRelRoot = "nixos_conf/wallpaperstuff";
|
||||
userAbsRoot = "${config.home.homeDirectory}/${userRelRoot}";
|
||||
userConfPath = "${userAbsRoot}/wallpaper.conf";
|
||||
# Exclude wallpaper.conf so HM does NOT manage it (avoids backup collisions)
|
||||
repoWallpapersOnly = lib.cleanSourceWith {
|
||||
src = repoWallpaperDir;
|
||||
filter = path: type:
|
||||
(builtins.baseNameOf path) != "wallpaper.conf";
|
||||
};
|
||||
in
|
||||
{
|
||||
home.packages = [ pkgs.wpaperd ];
|
||||
# Sync everything *except* wallpaper.conf into ~/nixos_conf/wallpaperstuff
|
||||
home.file."${userRelRoot}" = {
|
||||
source = repoWallpapersOnly;
|
||||
recursive = true;
|
||||
};
|
||||
# Now safely overwrite the config every activation (no HM collision)
|
||||
home.activation.wallpaperConfForce =
|
||||
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
set -euo pipefail
|
||||
mkdir -p "${userAbsRoot}"
|
||||
install -m 0644 "${repoWallpaperConf}" "${userConfPath}"
|
||||
'';
|
||||
systemd.user.services.wpaperd = {
|
||||
Unit = {
|
||||
Description = "wpaperd wallpaper daemon";
|
||||
After = [ "default.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.wpaperd}/bin/wpaperd --config ${userConfPath}";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
};
|
||||
Install.WantedBy = [ "default.target" ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{ config, lib, pkgs, flakeRoot, ... }:
|
||||
let
|
||||
repoWaybarDir = flakeRoot + "/assets/conf/desktop/waybar";
|
||||
in
|
||||
{
|
||||
programs.waybar.enable = true;
|
||||
|
||||
# Ensure config matches repo (HM-managed symlink, not user-editable)
|
||||
xdg.configFile."waybar/config" = {
|
||||
source = repoWaybarDir + "/config.jsonc";
|
||||
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");
|
||||
force = true;
|
||||
};
|
||||
|
||||
# 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