Compare commits
5 commits
24f9f1bbd3
...
6817826e04
Author | SHA1 | Date | |
---|---|---|---|
6817826e04 | |||
8b81c32ec5 | |||
7d78c1e2d3 | |||
98147166ff | |||
c8e7de6bd1 |
4 changed files with 68 additions and 24 deletions
|
@ -18,6 +18,7 @@ in {
|
|||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
|
||||
# https://gitlab.com/Zaney/zaneyos/-/blob/main/config/waybar.nix
|
||||
settings = [
|
||||
|
|
44
modules/home/services/swaybg/default.nix
Normal file
44
modules/home/services/swaybg/default.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
13
modules/home/wayland/default.nix
Normal file
13
modules/home/wayland/default.nix
Normal 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"];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue