feat: niri

This commit is contained in:
punkfairie 2025-05-26 16:07:17 -07:00
parent baa1766186
commit 3a3d1e6cdf
Signed by: punkfairie
GPG key ID: B3C5488E9A1A7CA6
6 changed files with 33 additions and 35 deletions

View file

@ -22,6 +22,8 @@ in {
};
home-manager.users."${name}" = {
marleyos.shell.niri.monitors = ["DP-1" "HDMI-A-1"];
home.stateVersion = "24.05";
};

View file

@ -19,7 +19,7 @@ in {
#
# Graphical Desktop - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(lib.optionalAttrs cfg.desktop {
shell.wayland = enabled;
shell.niri = enabled;
})
#
#

View file

@ -3,7 +3,9 @@
./stylix.nix
./xorg.nix
./wayland.nix
./niri.nix
./gtk.nix
./qt.nix

View file

@ -1,12 +1,18 @@
{
lib,
marleylib,
config,
osConfig,
lib,
pkgs,
...
}: let
cfg = config.marleyos.wayland.niri;
inherit (marleylib.module) mkEnableOption' enabled;
cfg = config.marleyos.shell.niri;
osCfg = osConfig.marleyos.shell.niri;
in {
options.marleyos.wayland.niri = {
enable = lib.mkEnableOption "niri";
options.marleyos.shell.niri = {
enable = mkEnableOption' "niri" osCfg.enable;
monitors = lib.mkOption {
type = with lib.types; nullOr (listOf str);
@ -15,20 +21,19 @@ in {
};
};
config = lib.mkIf cfg.enable {
config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) {
marleyos = {
wayland.enable = true;
programs = {
waybar.enable = true;
wlogout.enable = true;
fuzzel.enable = true;
xwayland-satellite.enable = true;
};
services = {
swaybg.enable = true;
swaync.enable = true;
};
shell.wayland = enabled;
# programs = {
# waybar = enabled;
# wlogout = enabled;
# fuzzel = enabled;
# xwayland-satellite = enabled;
# };
# services = {
# swaybg = enabled;
# swaync = enabled;
# };
};
programs.niri = {
@ -48,7 +53,7 @@ in {
### Startup Programs ###
spawn-at-startup = let
inherit (config.marleyos) apps;
inherit (config.marleycfg) apps;
in [
{command = ["sh" "-c" "${lib.getExe apps.terminal} -e tmux new -s main -A"];}
(cmd (lib.getExe apps.browser))
@ -95,7 +100,7 @@ in {
};
### Screenshots ###
screenshot-path = "~/pictures/screenshots/%Y-%m-%d %H-%M-%S.png";
screenshot-path = "~/${config.xdg.userDirs.pictures}/screenshots/%Y-%m-%d %H-%M-%S.png";
### Workspaces ###
workspaces = {
@ -128,6 +133,7 @@ in {
title = "^Picture-in-Picture$";
}
{title = "^Picture in picture$";}
{title = "Bitwarden";}
];
open-floating = true;
}
@ -164,7 +170,7 @@ in {
"Ctrl+Alt+Delete".action = quit;
"Mod+Shift+Slash".action = show-hotkey-overlay;
"Mod+Return".action = spawn (lib.getExe config.marleyos.apps.terminal);
"Mod+Return".action = spawn (lib.getExe config.marleycfg.apps.terminal);
"Mod+R".action = spawn (lib.getExe config.programs.fuzzel.package);
"Mod+H".action = focus-column-or-monitor-left;

View file

@ -11,6 +11,8 @@ in {
imports = [inputs.niri-flake.nixosModules.niri];
config = lib.mkIf cfg.enable {
marleyos.shell.hyprlock.enable = true;
programs.niri = {
enable = true;
};

View file

@ -1,14 +0,0 @@
{lib, ...}: let
inherit (lib.marleyos) enabled;
in {
marleyos = {
bundles.desktop = enabled;
wayland.niri = {
enable = true;
monitors = ["DP-1" "HDMI-A-1"];
};
};
home.stateVersion = "24.05";
}