Compare commits

...

5 commits

Author SHA1 Message Date
6817826e04
fix(home): Manually create target.tray
Home manager stable only creates this on xorg. It is fixed in future
versions.
2025-02-28 18:50:09 -08:00
8b81c32ec5
feat(home): Set Niri wallpaper 2025-02-28 18:46:07 -08:00
7d78c1e2d3
fix(home): Remove unused Niri mod opts 2025-02-28 17:59:59 -08:00
98147166ff
feat(home): Misc Niri 2025-02-28 17:45:12 -08:00
c8e7de6bd1
feat(home): Enable systemd starting for waybar 2025-02-28 17:42:48 -08:00
4 changed files with 68 additions and 24 deletions

View file

@ -18,6 +18,7 @@ in {
programs.waybar = {
enable = true;
systemd.enable = true;
# https://gitlab.com/Zaney/zaneyos/-/blob/main/config/waybar.nix
settings = [

View file

@ -0,0 +1,44 @@
{
lib,
config,
pkgs,
...
}: let
cfg = config.marleyos.services.swaybg;
in {
options.marleyos.services.swaybg = {
enable = lib.mkEnableOption "swaybg";
wallpaper = lib.mkOption {
type = lib.types.path;
description = "Path to the wallpaper to use.";
};
};
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
swaybg
];
systemd.user.services.swaybg = {
Install = {
WantedBy = ["graphical-session.target"];
};
Unit = {
Description = "Wallpaper tool for Wayland compositors";
Documentation = ["man:swaybg(1)"];
After = ["graphical-session-pre.target"];
PartOf = ["graphical-session.target"];
};
Service = {
Type = "exec";
ExecStart = "${lib.getExe pkgs.swaybg} -i ${cfg.wallpaper}";
ExecReload = "${lib.getExe' pkgs.coreutils "kill"} -SIGUSR2 $MAINPID";
KillMode = "mixed";
Restart = "on-failure";
};
};
};
}

View file

@ -0,0 +1,13 @@
{
config,
lib,
...
}: {
# Fix the "tray.target not found" error.
systemd.user.targets.tray = lib.mkIf (!config.xsession.enable) {
Unit = {
Description = "Home Manager System Tray";
Requires = ["graphical-session-pre.target"];
};
};
}

View file

@ -7,32 +7,9 @@
in {
options.marleyos.wayland.niri = {
enable = lib.mkEnableOption "niri";
monitors = lib.mkOption {
description = "Monitor configuration.";
type = with lib.types; attrsOf str;
};
mainMonitor = lib.mkOption {
description = "Which monitor to treat as the main for workspace assignment";
type = with lib.types; str;
};
};
config = lib.mkIf cfg.enable {
assertions = [
{
assertion =
if cfg ? monitors
then cfg ? mainMonitor
else true;
message = ''
You have defined monitors but not selected the main monitor. Please
define marleyos.wayland.niri.mainMonitor.
'';
}
];
marleyos = {
programs = {
waybar.enable = true;
@ -40,6 +17,10 @@ in {
fuzzel.enable = true;
};
services = {
swaybg = {
enable = true;
wallpaper = ./wallpaper.png;
};
swaync.enable = true;
};
};
@ -48,7 +29,12 @@ in {
# Auto-enabled by the nixos module
# enable = true;
settings = {
settings = let
cmd = command: {command = [command];};
in {
prefer-no-csd = true;
hotkey-overlay.skip-at-startup = true;
layout = {
gaps = 16;
center-focused-column = "never";