feat: switch to niri+noctalia
Some checks failed
Build and Deploy / build (push) Has been cancelled
Flake check / Check flake (push) Has been cancelled
Build and Deploy / deploy (push) Has been cancelled

This commit is contained in:
Leon Schwarzäugl 2026-02-05 20:00:07 +01:00
parent a343de7a90
commit 694dd794f7
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
38 changed files with 3922 additions and 2066 deletions

View file

@ -6,16 +6,18 @@
systemd.user.services.anki-applet = {
Unit = {
Description = "Anki applet";
Requires = [ "tray.target" ];
Requires = [ "graphical-session.target" ];
After = [
"graphical-session.target"
"tray.target"
];
PartOf = [ "graphical-session.target" ];
PartOf = [
"tray.target"
];
};
Install = {
WantedBy = [ "graphical-session.target" ];
WantedBy = [ "tray.target" ];
};
Service = {

View file

@ -7,7 +7,7 @@ in
config = lib.mkIf config.swarselmodules.${moduleName} {
services.${moduleName} = {
enable = true;
systemdTarget = config.wayland.systemd.target;
systemdTarget = "sway-session.target";
};
};

View file

@ -11,6 +11,7 @@
bak
timer
e
niri-resize
swarselcheck
swarselcheck-niri
waybarupdate

View file

@ -6,16 +6,18 @@
systemd.user.services.element-applet = {
Unit = {
Description = "Element applet";
Requires = [ "tray.target" ];
Requires = [ "graphical-session.target" ];
After = [
"graphical-session.target"
"tray.target"
];
PartOf = [ "graphical-session.target" ];
PartOf = [
"tray.target"
];
};
Install = {
WantedBy = [ "graphical-session.target" ];
WantedBy = [ "tray.target" ];
};
Service = {

View file

@ -6,18 +6,18 @@
systemd.user.services.firezone-applet = {
Unit = {
Description = "Firezone applet";
Requires = [
"tray.target"
];
Requires = [ "graphical-session.target" ];
After = [
"graphical-session.target"
"tray.target"
];
PartOf = [ "graphical-session.target" ];
PartOf = [
"tray.target"
];
};
Install = {
WantedBy = [ "graphical-session.target" ];
WantedBy = [ "tray.target" ];
};
Service = {

View file

@ -5,6 +5,7 @@ in
{
options.swarselmodules.gammastep = lib.mkEnableOption "gammastep settings";
config = lib.mkIf config.swarselmodules.gammastep {
systemd.user.services.gammastep = confLib.overrideTarget "sway-session.target";
services.gammastep = lib.mkIf (config.swarselsystems.isNixos && !config.swarselsystems.isPublic) {
enable = true;
provider = "manual";

View file

@ -1,4 +1,4 @@
{ self, lib, pkgs, config, ... }:
{ self, lib, pkgs, config, confLib, ... }:
{
options.swarselmodules.kanshi = lib.mkEnableOption "kanshi settings";
config = lib.mkIf config.swarselmodules.kanshi {
@ -14,6 +14,8 @@
};
};
};
systemd.user.services.kanshi = confLib.overrideTarget "sway-session.target";
services.kanshi = {
enable = true;
settings = [

View file

@ -6,16 +6,18 @@
systemd.user.services.obsidian-applet = {
Unit = {
Description = "Obsidian applet";
Requires = [ "tray.target" ];
Requires = [ "graphical-session.target" ];
After = [
"graphical-session.target"
"tray.target"
];
PartOf = [ "graphical-session.target" ];
PartOf = [
"tray.target"
];
};
Install = {
WantedBy = [ "graphical-session.target" ];
WantedBy = [ "tray.target" ];
};
Service = {

View file

@ -242,6 +242,7 @@ in
startup = config.swarselsystems.startup ++ [
{ command = "kitty -T kittyterm -o confirm_os_window_close=0 zellij attach --create kittyterm"; }
{ command = "sleep 60; kitty -T spotifytui -o confirm_os_window_close=0 spotify_player"; }
{ command = "mako"; }
];
seat = {
"*" = {

View file

@ -10,23 +10,25 @@ in
brightnessctl = "${lib.getExe pkgs.brightnessctl}";
swaylock = "${lib.getExe pkgs.swaylock-effects}";
suspend = "${pkgs.systemd}/bin/systemctl suspend";
noctalia = "/etc/profiles/per-user/${config.swarselsystems.mainUser}/bin/noctalia-shell ipc call";
in
{
enable = true;
systemdTarget = config.wayland.systemd.target;
# systemdTarget = "sway-session.target";
extraArgs = [ "-w" ];
timeouts = [
{ timeout = 60; command = "${brightnessctl} -s; ${brightnessctl} set 80%-"; resumeCommand = "${brightnessctl} -r"; }
# { timeout = 300; command = "${lib.getExe pkgs.swaylock-effects} -f --screenshots --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --fade-in 0.2"; }
{ timeout = 300; command = "${swaylock} -f"; }
# { timeout = 300; command = "${swaylock} -f"; }
{ timeout = 300; command = "${noctalia} lockScreen lock || ${swaylock} -f"; }
# { timeout = 600; command = ''${pkgs.sway}/bin/swaymsg "output * dpms off"; resumeCommand = "${pkgs.sway}/bin/swaymsg output * dpms on''; }
{ timeout = 600; command = "${suspend}"; }
{ timeout = 600; command = "${noctalia} sessionMenu lockAndSuspend || ${suspend}"; }
];
events = {
# { event = "before-sleep"; command = "${lib.getExe pkgs.swaylock-effects} -f --screenshots --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --fade-in 0.2"; }
# { event = "after-resume"; command = "${swaylock} -f "; }
before-sleep = "${swaylock} -f ";
lock = "${swaylock} -f ";
# before-sleep = "${swaylock} -f ";
# lock = "${swaylock} -f ";
};
};
};

View file

@ -1,7 +1,8 @@
{ lib, pkgs, config, ... }:
{ lib, pkgs, config, confLib, ... }:
{
options.swarselmodules.swayosd = lib.mkEnableOption "swayosd settings";
config = lib.mkIf config.swarselmodules.swayosd {
systemd.user.services.swayosd = confLib.overrideTarget "sway-session.target";
services.swayosd = {
enable = true;
package = pkgs.dev.swayosd;

View file

@ -6,16 +6,18 @@
systemd.user.services.vesktop-applet = {
Unit = {
Description = "Vesktop applet";
Requires = [ "tray.target" ];
Requires = [ "graphical-session.target" ];
After = [
"graphical-session.target"
"tray.target"
];
PartOf = [ "graphical-session.target" ];
PartOf = [
"tray.target"
];
};
Install = {
WantedBy = [ "graphical-session.target" ];
WantedBy = [ "tray.target" ];
};
Service = {

View file

@ -66,8 +66,8 @@ in
enable = true;
systemd = {
enable = false;
# target = "sway-session.target";
inherit (config.wayland.systemd) target;
target = "sway-session.target";
# inherit (config.wayland.systemd) target;
};
settings = {
mainBar = {

View file

@ -5,12 +5,14 @@
programs.zellij = {
enable = true;
enableZshIntegration = true;
attachExistingSession = false;
exitShellOnExit = true;
settings = {
pane_frames = false;
simplified_ui = false;
default_shell = "zsh";
copy_on_select = true;
on_force_close = "detach";
on_force_close = "quit";
show_startup_tips = false;
support_kitty_keyboard_protocol = true;
default_layout = "swarsel";

View file

@ -1,216 +1,220 @@
{ inputs, config, pkgs, lib, vars, ... }:
{ inputs, config, pkgs, lib, vars, type, ... }:
{
imports = [
imports = lib.optionals (type != "nixos") [
inputs.niri-flake.homeModules.niri
];
options.swarselmodules.niri = lib.mkEnableOption "niri settings";
config = lib.mkIf config.swarselmodules.niri
{
programs.niri = {
package = pkgs.niri-unstable; # which package to use for niri validation
settings = {
xwayland-satellite = {
enable = true;
path = "${lib.getExe pkgs.xwayland-satellite-unstable}";
};
prefer-no-csd = true;
layer-rules = [
{ matches = [{ namespace = "^notifications$"; }]; block-out-from = "screencast"; }
{ matches = [{ namespace = "^wallpaper$"; }]; place-within-backdrop = true; }
];
window-rules = [
{
matches = [{ app-id = ".*"; }];
opacity = 0.95;
default-column-width = { proportion = 0.5; };
shadow = {
enable = true;
draw-behind-window = true;
};
geometry-corner-radius = { top-left = 2.0; top-right = 2.0; bottom-left = 2.0; bottom-right = 2.0; };
}
{ matches = [{ app-id = "at.yrlf.wl_mirror"; }]; opacity = 1.0; }
{ matches = [{ app-id = "Gimp"; }]; opacity = 1.0; }
{ matches = [{ app-id = "firefox"; }]; opacity = 0.99; }
{ matches = [{ app-id = "^special.*"; }]; default-column-width = { proportion = 0.9; }; open-on-workspace = "Scratchpad"; }
{ matches = [{ app-id = "chromium-browser"; }]; opacity = 0.99; }
{ matches = [{ app-id = "^qalculate-gtk$"; }]; open-floating = true; }
{ matches = [{ app-id = "^blueman$"; }]; open-floating = true; }
{ matches = [{ app-id = "^pavucontrol$"; }]; open-floating = true; }
{ matches = [{ app-id = "^syncthingtray$"; }]; open-floating = true; }
{ matches = [{ app-id = "^Element$"; }]; open-floating = true; default-column-width = { proportion = 0.5; }; block-out-from = "screencast"; }
# { matches = [{ app-id = "^Element$"; }]; default-column-width = { proportion = 0.9; }; open-on-workspace = "Scratchpad"; block-out-from = "screencast"; }
{ matches = [{ app-id = "^vesktop$"; }]; open-floating = true; default-column-width = { proportion = 0.5; }; block-out-from = "screencast"; }
# { matches = [{ app-id = "^vesktop$"; }]; default-column-width = { proportion = 0.9; }; open-on-workspace = "Scratchpad"; block-out-from = "screencast"; }
{ matches = [{ app-id = "^com.nextcloud.desktopclient.nextcloud$"; }]; open-floating = true; }
{ matches = [{ title = ".*1Password.*"; }]; excludes = [{ app-id = "^firefox$"; } { app-id = "^emacs$"; } { app-id = "^kitty$"; }]; open-floating = true; block-out-from = "screencast"; }
{ matches = [{ title = "(?:Open|Save) (?:File|Folder|As)"; }]; open-floating = true; }
{ matches = [{ title = "^Add$"; }]; open-floating = true; }
{ matches = [{ title = "^Picture-in-Picture$"; }]; open-floating = true; }
{ matches = [{ title = "Syncthing Tray"; }]; open-floating = true; }
{ matches = [{ title = "^Emacs Popup Frame$"; }]; open-floating = true; }
{ matches = [{ title = "^Emacs Popup Anchor$"; }]; open-floating = true; }
{ matches = [{ app-id = "^spotifytui$"; }]; open-floating = true; default-column-width = { proportion = 0.5; }; }
{ matches = [{ app-id = "^kittyterm$"; }]; open-floating = true; default-column-width = { proportion = 0.5; }; }
];
environment = {
DISPLAY = ":0";
} // vars.waylandSessionVariables;
screenshot-path = "~/Pictures/Screenshots/screenshot_%Y-%m-%d-%H%M%S.png";
input = {
mod-key = "Super";
keyboard = {
xkb = {
layout = "us";
variant = "altgr-intl";
};
};
mouse = {
natural-scroll = false;
};
touchpad = {
enable = true;
tap = true;
tap-button-map = "left-right-middle";
natural-scroll = true;
scroll-method = "two-finger";
click-method = "clickfinger";
disabled-on-external-mouse = true;
drag = true;
drag-lock = false;
dwt = true;
dwtp = true;
};
};
cursor = {
hide-after-inactive-ms = 2000;
hide-when-typing = true;
};
layout = {
background-color = "transparent";
border = {
enable = true;
width = 1;
};
focus-ring = {
enable = false;
};
gaps = 5;
};
binds = with config.lib.niri.actions; let
sh = spawn "sh" "-c";
in
config = {
programs.niri = {
package = pkgs.niri-stable; # which package to use for niri validation
settings = {
debug = {
honor-xdg-activation-with-invalid-serial = [ ];
};
xwayland-satellite = {
enable = true;
path = "${lib.getExe pkgs.xwayland-satellite-unstable}";
};
prefer-no-csd = true;
layer-rules = [
{ matches = [{ namespace = "^notifications$"; }]; block-out-from = "screen-capture"; }
{ matches = [{ namespace = "^wallpaper$"; }]; place-within-backdrop = true; }
{ matches = [{ namespace = "^noctalia-overview*"; }]; place-within-backdrop = true; }
];
window-rules = [
{
# "Mod+Super_L" = spawn "killall -SIGUSR1 .waybar-wrapped";
"Mod+z".action = spawn "killall -SIGUSR1 .waybar-wrapped";
"Mod+Shift+t".action = toggle-window-rule-opacity;
# "Mod+Escape".action = "mode $exit";
"Mod+m".action = focus-workspace-previous;
"Mod+Shift+Space".action = toggle-window-floating;
"Mod+Shift+f".action = toggle-windowed-fullscreen;
"Mod+q".action = close-window;
"Mod+f".action = spawn "firefox";
"Mod+Space".action = spawn "fuzzel";
"Mod+Shift+c".action = spawn "qalculate-gtk";
"Mod+Ctrl+p".action = spawn "1password" "--quick-acces";
"Mod+Shift+Escape".action = spawn "kitty" "-o" "confirm_os_window_close=0" "btm";
"Mod+h".action = sh ''hyprpicker | wl-copy'';
# "Mod+s".action = spawn "grim" "-g" "\"$(slurp)\"" "-t" "png" "-" "|" "wl-copy" "-t" "image/png";
# "Mod+s".action = screenshot { show-pointer = false; };
"Mod+s".action.screenshot = { show-pointer = false; };
# "Mod+Shift+s".action = spawn "slurp" "|" "grim" "-g" "-" "Pictures/Screenshots/$(date +'screenshot_%Y-%m-%d-%H%M%S.png')";
# "Mod+Shift+s".action = screenshot-window { write-to-disk = true; };
"Mod+Shift+s".action.screenshot-window = { write-to-disk = true; };
# "Mod+Shift+v".action = spawn "wf-recorder" "-g" "'$(slurp -f %o -or)'" "-f" "~/Videos/screenrecord_$(date +%Y-%m-%d-%H%M%S).mkv";
"Mod+e".action = sh "emacsclient -nquc -a emacs -e '(dashboard-open)'";
"Mod+c".action = sh "emacsclient -ce '(org-capture)'";
"Mod+t".action = sh "emacsclient -ce '(org-agenda)'";
"Mod+Shift+m".action = sh "emacsclient -ce '(mu4e)'";
"Mod+Shift+a".action = sh "emacsclient -ce '(swarsel/open-calendar)'";
"Mod+a".action = spawn "swarselcheck-niri" "-s";
"Mod+x".action = spawn "swarselcheck-niri" "-k";
"Mod+d".action = spawn "swarselcheck-niri" "-d";
"Mod+w".action = spawn "swarselcheck-niri" "-e";
"Mod+p".action = spawn "pass-fuzzel";
"Mod+o".action = spawn "pass-fuzzel" "--otp";
"Mod+Shift+p".action = spawn "pass-fuzzel" "--type";
"Mod+Shift+o".action = spawn "pass-fuzzel" "--otp" "--type";
"Mod+Left".action = focus-column-or-monitor-left;
"Mod+Right".action = focus-column-or-monitor-right;
"Mod+Down".action = focus-window-or-workspace-down;
"Mod+Up".action = focus-window-or-workspace-up;
"Mod+Shift+Left".action = move-column-left;
"Mod+Shift+Right".action = move-column-right;
"Mod+Shift+Down".action = move-window-down-or-to-workspace-down;
"Mod+Shift+Up".action = move-window-up-or-to-workspace-up;
# "Mod+Ctrl+Shift+c".action = "reload";
# "Mod+Ctrl+Shift+r".action = "exec swarsel-displaypower";
# "Mod+Shift+e".action = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'";
# "Mod+r".action = "mode resize";
# "Mod+Return".action = "exec kitty";
"Mod+Return".action = spawn "swarselzellij";
"XF86AudioRaiseVolume".action = spawn "swayosd-client" "--output-volume" "raise";
"XF86AudioLowerVolume".action = spawn "swayosd-client" "--output-volume" "lower";
"XF86AudioMute".action = spawn "swayosd-client" "--output-volume" "mute-toggle";
"XF86MonBrightnessUp".action = spawn "swayosd-client" "--brightness raise";
"XF86MonBrightnessDown".action = spawn "swayosd-client" "--brightness lower";
"XF86Display".action = spawn "wl-mirror" "eDP-1";
"Mod+Escape".action = spawn "wlogout";
"Mod+Equal".action = set-column-width "+10%";
"Mod+Minus".action = set-column-width "-10%";
"Mod+1".action = focus-workspace 1;
"Mod+2".action = focus-workspace 2;
"Mod+3".action = focus-workspace 3;
"Mod+4".action = focus-workspace 4;
"Mod+5".action = focus-workspace 5;
"Mod+6".action = focus-workspace 6;
"Mod+7".action = focus-workspace 7;
"Mod+8".action = focus-workspace 8;
"Mod+9".action = focus-workspace 9;
"Mod+0".action = focus-workspace 0;
"Mod+Shift+1".action = move-column-to-index 1;
"Mod+Shift+2".action = move-column-to-index 2;
"Mod+Shift+3".action = move-column-to-index 3;
"Mod+Shift+4".action = move-column-to-index 4;
"Mod+Shift+5".action = move-column-to-index 5;
"Mod+Shift+6".action = move-column-to-index 6;
"Mod+Shift+7".action = move-column-to-index 7;
"Mod+Shift+8".action = move-column-to-index 8;
"Mod+Shift+9".action = move-column-to-index 9;
"Mod+Shift+0".action = move-column-to-index 0;
};
spawn-at-startup = [
# { command = [ "vesktop" "--start-minimized" "--enable-speech-dispatcher" "--ozone-platform-hint=auto" "--enable-features=WaylandWindowDecorations" "--enable-wayland-ime" ]; }
# { command = [ "element-desktop" "--hidden" "--enable-features=UseOzonePlatform" "--ozone-platform=wayland" "--disable-gpu-driver-bug-workarounds" ]; }
# { command = [ "anki" ]; }
# { command = [ "obsidian" ]; }
# { command = [ "nm-applet" ]; }
{ command = [ "niri" "msg" "action" "focus-workspace" "2" ]; }
];
workspaces = {
# "01-Main" = {
# name = "Scratchpad";
# };
"99-Scratchpad" = {
name = "";
matches = [{ app-id = ".*"; }];
opacity = 0.95;
default-column-width = { proportion = 0.5; };
shadow = {
enable = true;
draw-behind-window = true;
};
clip-to-geometry = true;
geometry-corner-radius = { top-left = 5.0; top-right = 5.0; bottom-left = 5.0; bottom-right = 5.0; };
}
{ matches = [{ app-id = "at.yrlf.wl_mirror"; }]; opacity = 1.0; }
{ matches = [{ app-id = "Gimp"; }]; opacity = 1.0; }
{ matches = [{ app-id = "^firefox$"; }]; opacity = 0.95; }
{ matches = [{ app-id = "^special.*"; }]; default-column-width = { proportion = 0.9; }; open-on-workspace = "Scratchpad"; }
{ matches = [{ app-id = "chromium-browser"; }]; opacity = 0.99; }
{ matches = [{ app-id = "^qalculate-gtk$"; }]; open-floating = true; }
{ matches = [{ app-id = "^blueman$"; }]; open-floating = true; }
{ matches = [{ app-id = "^pavucontrol$"; }]; open-floating = true; }
{ matches = [{ app-id = "^syncthingtray$"; }]; open-floating = true; }
{ matches = [{ app-id = "^Element$"; }]; open-floating = true; default-column-width = { proportion = 0.5; }; block-out-from = "screen-capture"; }
# { matches = [{ app-id = "^Element$"; }]; default-column-width = { proportion = 0.9; }; open-on-workspace = "Scratchpad"; block-out-from = "screencast"; }
{ matches = [{ app-id = "^vesktop$"; }]; open-floating = true; default-column-width = { proportion = 0.5; }; block-out-from = "screen-capture"; }
# { matches = [{ app-id = "^vesktop$"; }]; default-column-width = { proportion = 0.9; }; open-on-workspace = "Scratchpad"; block-out-from = "screencast"; }
{ matches = [{ app-id = "^com.nextcloud.desktopclient.nextcloud$"; }]; open-floating = true; }
{ matches = [{ title = ".*1Password.*"; }]; excludes = [{ app-id = "^firefox$"; } { app-id = "^emacs$"; } { app-id = "^kitty$"; }]; open-floating = true; block-out-from = "screen-capture"; }
{ matches = [{ title = "(?:Open|Save) (?:File|Folder|As)"; }]; open-floating = true; }
{ matches = [{ title = "^Add$"; }]; open-floating = true; }
{ matches = [{ title = "^Picture-in-Picture$"; }]; open-floating = true; }
{ matches = [{ title = "Syncthing Tray"; }]; open-floating = true; }
{ matches = [{ title = "^Emacs Popup Frame$"; }]; open-floating = true; }
{ matches = [{ title = "^Emacs Popup Anchor$"; }]; open-floating = true; }
{ matches = [{ app-id = "^spotifytui$"; }]; open-floating = true; default-column-width = { proportion = 0.5; }; }
{ matches = [{ app-id = "^kittyterm$"; }]; open-floating = true; default-column-width = { proportion = 0.5; }; }
];
environment = {
DISPLAY = ":0";
QT_QPA_PLATFORM = lib.mkForce "wayland";
EDITOR = "emacsclient -c";
} // vars.waylandSessionVariables;
screenshot-path = "~/Pictures/Screenshots/screenshot_%Y-%m-%d-%H%M%S.png";
input = {
mod-key = "Super";
keyboard = {
xkb = {
layout = "us";
variant = "altgr-intl";
};
};
mouse = {
natural-scroll = false;
};
touchpad = {
enable = true;
tap = true;
tap-button-map = "left-right-middle";
natural-scroll = true;
scroll-method = "two-finger";
click-method = "clickfinger";
disabled-on-external-mouse = true;
drag = true;
drag-lock = false;
dwt = true;
dwtp = true;
};
};
};
cursor = {
hide-after-inactive-ms = 2000;
hide-when-typing = true;
};
layout = {
background-color = "transparent";
border = {
enable = true;
width = 1;
};
focus-ring = {
enable = false;
};
gaps = 5;
};
binds = with config.lib.niri.actions; let
sh = spawn "sh" "-c";
resizer = "niri-resize";
in
{
"Mod+Shift+t".action = toggle-window-rule-opacity;
"Mod+m".action = focus-workspace-previous;
"Mod+Shift+Space".action = toggle-window-floating;
"Mod+Shift+f".action = fullscreen-window;
"Mod+q".action = sh "niri msg action close-window & ${resizer}";
"Mod+f".action = sh "${resizer} & firefox";
# "Mod+Space".action = spawn "noctalia-shell" "ipc" "call" "launcher" "toggle";
"Mod+Space".action = sh "${resizer} & fuzzel";
"Mod+z".action = spawn "noctalia-shell" "ipc" "call" "bar" "toggle";
"Mod+Shift+c".action = spawn "qalculate-gtk";
"Mod+Ctrl+p".action = spawn "1password" "--quick-acces";
"Mod+Shift+Escape".action = spawn "kitty" "-o" "confirm_os_window_close=0" "btm";
"Mod+h".action = sh ''hyprpicker | wl-copy'';
# "Mod+s".action = spawn "grim" "-g" "\"$(slurp)\"" "-t" "png" "-" "|" "wl-copy" "-t" "image/png";
# "Mod+s".action = screenshot { show-pointer = false; };
"Mod+s".action.screenshot = { show-pointer = false; };
# "Mod+Shift+s".action = spawn "slurp" "|" "grim" "-g" "-" "Pictures/Screenshots/$(date +'screenshot_%Y-%m-%d-%H%M%S.png')";
# "Mod+Shift+s".action = screenshot-window { write-to-disk = true; };
"Mod+Shift+s".action.screenshot-window = { write-to-disk = true; };
# "Mod+Shift+v".action = spawn "wf-recorder" "-g" "'$(slurp -f %o -or)'" "-f" "~/Videos/screenrecord_$(date +%Y-%m-%d-%H%M%S).mkv";
} // {
programs.niri = lib.mkIf (!config.swarselmodules.niri) {
package = null;
config = null;
settings = null;
"Mod+e".action = sh "${resizer} & emacsclient -nquc -a emacs -e '(dashboard-open)'";
"Mod+c".action = sh "${resizer} & emacsclient -ce '(org-capture)'";
"Mod+t".action = sh "${resizer} & emacsclient -ce '(org-agenda)'";
"Mod+Shift+m".action = sh "${resizer} & emacsclient -ce '(mu4e)'";
"Mod+Shift+a".action = sh "${resizer} & emacsclient -ce '(swarsel/open-calendar)'";
"Mod+a".action = spawn "swarselcheck-niri" "-s";
"Mod+x".action = spawn "swarselcheck-niri" "-k";
"Mod+d".action = spawn "swarselcheck-niri" "-d";
"Mod+w".action = spawn "swarselcheck-niri" "-e";
"Mod+p".action = spawn "pass-fuzzel";
"Mod+o".action = spawn "pass-fuzzel" "--otp";
"Mod+Shift+p".action = spawn "pass-fuzzel" "--type";
"Mod+Shift+o".action = spawn "pass-fuzzel" "--otp" "--type";
"Mod+Left".action = focus-column-or-monitor-left;
"Mod+Right".action = focus-column-or-monitor-right;
"Mod+Down".action = focus-window-or-workspace-down;
"Mod+Up".action = focus-window-or-workspace-up;
"Mod+Shift+Left".action = move-column-left;
"Mod+Shift+Right".action = move-column-right;
"Mod+Shift+Down".action = move-window-down-or-to-workspace-down;
"Mod+Shift+Up".action = move-window-up-or-to-workspace-up;
# "Mod+Ctrl+Shift+c".action = "reload";
# "Mod+Ctrl+Shift+r".action = "exec swarsel-displaypower";
# "Mod+Shift+e".action = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'";
# "Mod+r".action = "mode resize";
# "Mod+Return".action = "exec kitty";
"Mod+Return".action = sh "${resizer} & exec kitty -o confirm_os_window_close=0";
"XF86AudioRaiseVolume".action = spawn "noctalia-shell" "ipc" "call" "volume" "increase";
"XF86AudioLowerVolume".action = spawn "noctalia-shell" "ipc" "call" "volume" "decrease";
"XF86AudioMute".action = spawn "noctalia-shell" "ipc" "call" "volume" "muteOutput";
"XF86AudioPrev".action = spawn "noctalia-shell" "ipc" "call" "media" "previous";
"XF86AudioPlay".action = spawn "noctalia-shell" "ipc" "call" "media" "playPause";
"XF86AudioNext".action = spawn "noctalia-shell" "ipc" "call" "media" "next";
"XF86MonBrightnessUp".action = spawn "noctalia-shell" "ipc" "call" "brightness" "increase";
"XF86MonBrightnessDown".action = spawn "noctalia-shell" "ipc" "call" "brightness" "decrease";
"XF86Display".action = spawn "wl-mirror" "eDP-1";
"Mod+Escape".action = spawn "noctalia-shell" "ipc" "call" "sessionMenu" "toggle";
"Mod+i".action = spawn "noctalia-shell" "ipc" "call" "launcher" "emoji";
"Mod+Equal".action = set-column-width "+10%";
"Mod+Minus".action = set-column-width "-10%";
"Mod+1".action = focus-workspace 1;
"Mod+2".action = focus-workspace 2;
"Mod+3".action = focus-workspace 3;
"Mod+4".action = focus-workspace 4;
"Mod+5".action = focus-workspace 5;
"Mod+6".action = focus-workspace 6;
"Mod+7".action = focus-workspace 7;
"Mod+8".action = focus-workspace 8;
"Mod+9".action = focus-workspace 9;
"Mod+0".action = focus-workspace 0;
"Mod+Shift+1".action = move-column-to-index 1;
"Mod+Shift+2".action = move-column-to-index 2;
"Mod+Shift+3".action = move-column-to-index 3;
"Mod+Shift+4".action = move-column-to-index 4;
"Mod+Shift+5".action = move-column-to-index 5;
"Mod+Shift+6".action = move-column-to-index 6;
"Mod+Shift+7".action = move-column-to-index 7;
"Mod+Shift+8".action = move-column-to-index 8;
"Mod+Shift+9".action = move-column-to-index 9;
"Mod+Shift+0".action = move-column-to-index 0;
};
spawn-at-startup = [
# { command = [ "vesktop" "--start-minimized" "--enable-speech-dispatcher" "--ozone-platform-hint=auto" "--enable-features=WaylandWindowDecorations" "--enable-wayland-ime" ]; }
# { command = [ "element-desktop" "--hidden" "--enable-features=UseOzonePlatform" "--ozone-platform=wayland" "--disable-gpu-driver-bug-workarounds" ]; }
# { command = [ "anki" ]; }
# { command = [ "obsidian" ]; }
# { command = [ "nm-applet" ]; }
# { command = [ "niri" "msg" "action" "focus-workspace" "2" ]; }
# { command = [ "noctalia-shell" ]; }
{ command = [ "pkill mako" ]; }
{ command = [ "systemctl" "--user" "start" "noctalia-shell.target" ]; }
];
# workspaces = {
# "01-Main" = {
# name = "Scratchpad";
# };
# "99-Scratchpad" = {
# name = "";
# };
# };
};
};
};
}

View file

@ -0,0 +1,605 @@
{ self, inputs, config, pkgs, lib, confLib, ... }:
{
imports = [
inputs.noctalia.homeModules.default
];
config = {
systemd.user = {
targets = {
noctalia-shell.Unit = {
After = [ "graphical-session.target" ];
Wants = [
"tray.target"
"noctalia-tray-pre.target"
];
};
tray = {
Unit = {
After = [ "noctalia-tray-pre.target" ];
PartOf = [ "noctalia-shell.service" ];
};
Install.WantedBy = [ "noctalia-shell.target" ];
};
noctalia-tray-pre = {
Unit = {
After = [
"noctalia-init.service"
];
};
Install.WantedBy = [ "noctalia-shell.target" ];
};
};
services = {
noctalia-shell = confLib.overrideTarget "noctalia-shell.target";
noctalia-init = {
Unit = {
PartOf = [ "noctalia-tray-pre.target" ];
};
Service = {
Type = "oneshot";
ExecStartPre = "${pkgs.coreutils}/bin/sleep 5";
ExecStart = "-${pkgs.busybox}/bin/pkill mako";
RemainAfterExit = true;
};
Install = {
WantedBy = [ "noctalia-tray-pre.target" ];
};
};
};
};
programs = {
fastfetch.enable = true;
noctalia-shell = {
enable = true;
package = pkgs.noctalia-shell.override { calendarSupport = true; };
systemd.enable = true;
settings = {
bar = {
barType = "simple";
position = "top";
monitors = [ ];
density = "default";
showCapsule = false;
showOutline = false;
capsuleOpacity = lib.mkForce 1;
backgroundOpacity = lib.mkForce 0.5;
useSeparateOpacity = true;
floating = false;
marginVertical = 4;
marginHorizontal = 0;
frameThickness = 8;
frameRadius = 12;
outerCorners = true;
hideOnOverview = false;
displayMode = "auto_hide";
autoHideDelay = 100;
autoShowDelay = 300;
screenOverrides = [ ];
widgets = {
left = [
{
characterCount = 2;
colorizeIcons = false;
emptyColor = "primary";
enableScrollWheel = false;
focusedColor = "secondary";
followFocusedScreen = false;
groupedBorderOpacity = 1;
hideUnoccupied = true;
iconScale = 0.5;
id = "Workspace";
labelMode = "none";
occupiedColor = "primary";
pillSize = 0.4;
reverseScroll = false;
showApplications = true;
showBadge = true;
showLabelsOnlyWhenOccupied = true;
unfocusedIconsOpacity = 0.25;
}
];
center = [
{
colorizeIcons = false;
hideMode = "hidden";
id = "ActiveWindow";
maxWidth = 145;
scrollingMode = "hover";
showIcon = true;
useFixedWidth = false;
}
{
id = "plugin:privacy-indicator";
}
{
id = "plugin:screen-recorder";
}
];
right = [
{
blacklist = [
"bluetooth*"
];
colorizeIcons = false;
drawerEnabled = true;
hidePassive = true;
id = "Tray";
pinned = [ ];
}
{
displayMode = "alwaysShow";
id = "Volume";
middleClickCommand = "pavucontrol";
}
{
displayMode = "onhover";
id = "Network";
}
{
displayMode = "onhover";
id = "Bluetooth";
}
{
displayMode = "onhover";
id = "VPN";
}
{
deviceNativePath = "__default__";
hideIfIdle = true;
hideIfNotDetected = true;
id = "Battery";
showNoctaliaPerformance = false;
showPowerProfiles = true;
}
{
id = "plugin:ba7043:github-feed";
}
{
id = "plugin:clipper";
}
{
colorName = "primary";
id = "SessionMenu";
}
{
customFont = "FiraCode Nerd Font Mono";
formatHorizontal = "ddd dd. MMM HH:mm:ss";
formatVertical = "";
id = "Clock";
tooltipFormat = "ddd dd. MMM HH:mm:ss";
useCustomFont = true;
usePrimaryColor = true;
}
{
colorizeDistroLogo = false;
colorizeSystemIcon = "primary";
customIconPath = "";
enableColorization = true;
icon = "noctalia";
id = "ControlCenter";
useDistroLogo = true;
}
];
};
};
general = {
avatarImage = "${self}/files/wallpaper/swarsel.png";
dimmerOpacity = 0.2;
showScreenCorners = false;
forceBlackScreenCorners = false;
scaleRatio = 1;
radiusRatio = 0.2;
iRadiusRatio = 1;
boxRadiusRatio = 1;
screenRadiusRatio = 1;
animationSpeed = 1;
animationDisabled = false;
compactLockScreen = true;
lockOnSuspend = true;
showSessionButtonsOnLockScreen = true;
showHibernateOnLockScreen = false;
enableShadows = true;
shadowDirection = "bottom_right";
shadowOffsetX = 2;
shadowOffsetY = 3;
language = "";
allowPanelsOnScreenWithoutBar = true;
showChangelogOnStartup = true;
telemetryEnabled = false;
enableLockScreenCountdown = true;
lockScreenCountdownDuration = 10000;
autoStartAuth = true;
allowPasswordWithFprintd = true;
};
ui = {
fontDefaultScale = 1;
fontFixedScale = 1;
tooltipsEnabled = true;
panelBackgroundOpacity = lib.mkForce 1;
panelsAttachedToBar = true;
settingsPanelMode = "centered";
wifiDetailsViewMode = "grid";
bluetoothDetailsViewMode = "grid";
networkPanelView = "wifi";
bluetoothHideUnnamedDevices = false;
boxBorderEnabled = false;
};
location = {
name = confLib.getConfig.repo.secrets.common.location.timezoneSpecific;
weatherEnabled = true;
weatherShowEffects = false;
useFahrenheit = false;
use12hourFormat = false;
showWeekNumberInCalendar = true;
showCalendarEvents = true;
showCalendarWeather = true;
analogClockInCalendar = false;
firstDayOfWeek = 1;
hideWeatherTimezone = false;
hideWeatherCityName = false;
};
calendar = {
cards = [
{
enabled = true;
id = "calendar-header-card";
}
{
enabled = true;
id = "calendar-month-card";
}
{
enabled = true;
id = "weather-card";
}
];
};
wallpaper = {
enabled = true;
overviewEnabled = true;
directory = "${self}/files/wallpaper";
monitorDirectories = [ ];
enableMultiMonitorDirectories = true;
showHiddenFiles = false;
viewMode = "single";
setWallpaperOnAllMonitors = true;
fillMode = "crop";
fillColor = "#000000";
useSolidColor = false;
solidColor = "#1a1a2e";
automationEnabled = false;
wallpaperChangeMode = "random";
randomIntervalSec = 300;
transitionDuration = 500;
transitionType = "random";
transitionEdgeSmoothness = 0.05;
panelPosition = "follow_bar";
hideWallpaperFilenames = false;
useWallhaven = false;
wallhavenQuery = "";
wallhavenSorting = "relevance";
wallhavenOrder = "desc";
wallhavenCategories = "111";
wallhavenPurity = "100";
wallhavenRatios = "";
wallhavenApiKey = "";
wallhavenResolutionMode = "atleast";
wallhavenResolutionWidth = "";
wallhavenResolutionHeight = "";
sortOrder = "name";
};
appLauncher = {
enableClipboardHistory = false;
autoPasteClipboard = false;
enableClipPreview = true;
clipboardWrapText = true;
clipboardWatchTextCommand = "wl-paste --type text --watch cliphist store";
clipboardWatchImageCommand = "wl-paste --type image --watch cliphist store";
position = "center";
pinnedApps = [ ];
useApp2Unit = false;
sortByMostUsed = true;
terminalCommand = "kitty -e";
customLaunchPrefixEnabled = false;
customLaunchPrefix = "";
viewMode = "list";
showCategories = false;
iconMode = "native";
showIconBackground = false;
enableSettingsSearch = false;
enableWindowsSearch = false;
ignoreMouseInput = true;
screenshotAnnotationTool = "";
};
controlCenter = {
position = "close_to_bar_button";
diskPath = "/";
shortcuts = {
left = [
{
id = "Network";
}
{
id = "Bluetooth";
}
];
right = [
{
id = "Notifications";
}
{
id = "PowerProfile";
}
{
id = "KeepAwake";
}
{
id = "plugin:screen-recorder";
}
];
};
cards = [
{
enabled = true;
id = "profile-card";
}
{
enabled = true;
id = "shortcuts-card";
}
{
enabled = true;
id = "audio-card";
}
{
enabled = true;
id = "brightness-card";
}
{
enabled = true;
id = "weather-card";
}
{
enabled = true;
id = "media-sysmon-card";
}
];
};
systemMonitor = {
cpuWarningThreshold = 80;
cpuCriticalThreshold = 90;
tempWarningThreshold = 80;
tempCriticalThreshold = 90;
gpuWarningThreshold = 80;
gpuCriticalThreshold = 90;
memWarningThreshold = 80;
memCriticalThreshold = 90;
swapWarningThreshold = 80;
swapCriticalThreshold = 90;
diskWarningThreshold = 80;
diskCriticalThreshold = 90;
diskAvailWarningThreshold = 20;
diskAvailCriticalThreshold = 10;
cpuPollingInterval = 1000;
gpuPollingInterval = 3000;
enableDgpuMonitoring = false;
memPollingInterval = 1000;
diskPollingInterval = 30000;
networkPollingInterval = 1000;
loadAvgPollingInterval = 3000;
useCustomColors = true;
warningColor = "#5ec4ff";
criticalColor = "#d95468";
externalMonitor = "btm";
};
dock = {
enabled = false;
};
network = {
wifiEnabled = true;
bluetoothRssiPollingEnabled = false;
bluetoothRssiPollIntervalMs = 10000;
wifiDetailsViewMode = "grid";
bluetoothDetailsViewMode = "grid";
bluetoothHideUnnamedDevices = false;
};
sessionMenu = {
enableCountdown = true;
countdownDuration = 3000;
position = "center";
showHeader = true;
largeButtonsStyle = true;
largeButtonsLayout = "grid";
showNumberLabels = true;
powerOptions = [
{
action = "lock";
command = "";
countdownEnabled = true;
enabled = true;
}
{
action = "suspend";
command = "";
countdownEnabled = true;
enabled = true;
}
{
action = "hibernate";
command = "";
countdownEnabled = true;
enabled = true;
}
{
action = "reboot";
command = "";
countdownEnabled = true;
enabled = true;
}
{
action = "logout";
command = "";
countdownEnabled = true;
enabled = true;
}
{
action = "shutdown";
command = "";
countdownEnabled = true;
enabled = true;
}
];
};
notifications = {
enabled = true;
monitors = [ ];
location = "top_right";
overlayLayer = true;
backgroundOpacity = 0.5;
respectExpireTimeout = true;
lowUrgencyDuration = 3;
normalUrgencyDuration = 8;
criticalUrgencyDuration = 15;
enableMediaToast = false;
enableKeyboardLayoutToast = true;
batteryWarningThreshold = 20;
batteryCriticalThreshold = 5;
saveToHistory = {
low = true;
normal = true;
critical = true;
};
sounds.enabled = false;
};
osd = {
enabled = true;
location = "right";
autoHideMs = 2000;
overlayLayer = true;
backgroundOpacity = 0.5;
monitors = [ ];
enabledTypes = [ 0 1 2 3 ];
};
audio = {
volumeStep = 5;
volumeOverdrive = false;
cavaFrameRate = 30;
visualizerType = "linear";
mprisBlacklist = [ ];
preferredPlayer = "";
volumeFeedback = false;
};
brightness = {
brightnessStep = 5;
enforceMinimum = true;
enableDdcSupport = false;
};
nightLight = {
enabled = true;
autoSchedule = true;
nightTemp = "3700";
dayTemp = "5500";
manualSunrise = "06:30";
manualSunset = "18:30";
};
hooks.enabled = false;
desktopWidgets.enabled = false;
plugins = {
sources = [
{
enabled = true;
name = "Official Noctalia Plugins";
url = "https://github.com/noctalia-dev/noctalia-plugins";
}
{
enabled = true;
name = "Dev";
url = "https://github.com/Swarsel/noctalia-plugins";
}
];
states = lib.listToAttrs
(map
(plugin:
lib.nameValuePair plugin {
enabled = true;
sourceUrl = "https://github.com/noctalia-dev/noctalia-plugins";
})
[
"clipper"
"github-feed"
"privacy-indicator"
"kaomoji-provider"
"unicode-picker"
"screen-recorder"
]) // {
github-feed = {
enabled = true;
sourceUrl = "https://github.com/Swarsel/noctalia-plugins";
};
};
};
pluginSettings = {
clipper = {
enableTodoIntegration = false;
};
privacy-indicator = {
hideInactive = true;
iconSpacing = 4;
removeMargins = true;
};
screen-recorder = {
hideInactive = true;
directory = "";
filenamePattern = "recording_yyyyMMdd_HHmmss";
frameRate = "60";
audioCodec = "opus";
videoCodec = "h264";
quality = "very_high";
colorRange = "limited";
showCursor = true;
copyToClipboard = true;
audioSource = "default_output";
videoSource = "portal";
resolution = "original";
};
github-feed = {
username = lib.toUpper config.swarselsystems.mainUser;
token = confLib.getConfig.repo.secrets.common.noctaliaGithubToken;
refreshInterval = 300;
maxEvents = 50;
showStars = false;
showForks = false;
showPRs = false;
showRepoCreations = false;
showMyRepoStars = true;
showMyRepoForks = true;
openInBrowser = true;
# my fork:
showNotificationBadge = true;
colorizationEnabled = true;
colorizationIcon = "Primary";
colorizationBadge = "Tertiary";
colorizationBadgeText = "Primary";
defaultTab = 1;
enableSystemNotifications = true;
notifyGitHubNotifications = true;
notifyStars = true;
notifyForks = true;
notifyPRs = true;
notifyRepoCreations = true;
notifyMyRepoStars = true;
notifyMyRepoForks = true;
};
};
};
};
};
};
}

View file

@ -459,16 +459,18 @@ in
teams-applet = {
Unit = {
Description = "teams applet";
Requires = [ "tray.target" ];
Requires = [ "graphical-session.target" ];
After = [
"graphical-session.target"
"tray.target"
];
PartOf = [ "graphical-session.target" ];
PartOf = [
"tray.target"
];
};
Install = {
WantedBy = [ "graphical-session.target" ];
WantedBy = [ "tray.target" ];
};
Service = {
@ -479,16 +481,18 @@ in
onepassword-applet = {
Unit = {
Description = "1password applet";
Requires = [ "tray.target" ];
Requires = [ "graphical-session.target" ];
After = [
"graphical-session.target"
"tray.target"
];
PartOf = [ "graphical-session.target" ];
PartOf = [
"tray.target"
];
};
Install = {
WantedBy = [ "graphical-session.target" ];
WantedBy = [ "tray.target" ];
};
Service = {
@ -501,7 +505,7 @@ in
services.pizauth = {
enable = true;
extraConfig = ''
auth_notify_cmd = "if [[ \"$(notify-send -A \"Open $PIZAUTH_ACCOUNT\" -t 30000 'pizauth authorisation')\" == \"0\" ]]; then open \"$PIZAUTH_URL\"; fi";
auth_notify_cmd = "if [[ \"$(notify-send -A \"Open $PIZAUTH_ACCOUNT\" -t 30000 'pizauth authorisation')\" == \"0\" ]]; then open \"$PIZAUTH_URL\"; fi";
error_notify_cmd = "notify-send -t 90000 \"pizauth error for $PIZAUTH_ACCOUNT\" \"$PIZAUTH_MSG\"";
token_event_cmd = "pizauth dump > ${homeDir}/.pizauth.state";
'';

View file

@ -2,21 +2,25 @@
{
options.swarselmodules.lowBattery = lib.mkEnableOption "low battery notification config";
config = lib.mkIf config.swarselmodules.lowBattery {
systemd.user.services."battery-low" = {
enable = true;
description = "Timer for battery check that alerts at 10% or less";
partOf = [ "graphical-session.target" ];
wantedBy = [ "graphical-session.target" ];
serviceConfig = {
Type = "simple";
ExecStart = pkgs.writeShellScript "battery-low-notification"
''
if (( 10 >= $(${lib.getExe pkgs.acpi} -b | head -n 1 | ${lib.getExe pkgs.ripgrep} -o "\d+%" | ${lib.getExe pkgs.ripgrep} -o "\d+") && $(${lib.getExe pkgs.acpi} -b | head -n 1 | ${lib.getExe pkgs.ripgrep} -o "\d+%" | ${lib.getExe pkgs.ripgrep} -o "\d+") > 0 ));
then ${lib.getExe pkgs.libnotify} --urgency=critical "low battery" "$(${lib.getExe pkgs.acpi} -b | head -n 1 | ${lib.getExe pkgs.ripgrep} -o "\d+%")";
fi;
'';
systemd.user.services."battery-low" =
let
target = "sway-session.target";
in
{
enable = true;
description = "Timer for battery check that alerts at 10% or less";
partOf = [ target ];
wantedBy = [ target ];
serviceConfig = {
Type = "simple";
ExecStart = pkgs.writeShellScript "battery-low-notification"
''
if (( 10 >= $(${lib.getExe pkgs.acpi} -b | head -n 1 | ${lib.getExe pkgs.ripgrep} -o "\d+%" | ${lib.getExe pkgs.ripgrep} -o "\d+") && $(${lib.getExe pkgs.acpi} -b | head -n 1 | ${lib.getExe pkgs.ripgrep} -o "\d+%" | ${lib.getExe pkgs.ripgrep} -o "\d+") > 0 ));
then ${lib.getExe pkgs.libnotify} --urgency=critical "low battery" "$(${lib.getExe pkgs.acpi} -b | head -n 1 | ${lib.getExe pkgs.ripgrep} -o "\d+%")";
fi;
'';
};
};
};
systemd.user.timers."battery-low" = {
wantedBy = [ "timers.target" ];
timerConfig = {

View file

@ -14,7 +14,7 @@ in
comment = "Sway compositor managed by UWSM";
binPath = "/run/current-system/sw/bin/sway";
};
niri = lib.mkIf (config.swarselmodules ? niri) {
niri = lib.mkIf (config.programs ? niri) {
prettyName = "Niri";
comment = "Niri compositor managed by UWSM";
binPath = "/run/current-system/sw/bin/niri-session";

View file

@ -1,20 +1,20 @@
{ lib, config, pkgs, ... }:
{ lib, config, ... }:
{
options.swarselmodules.xdg-portal = lib.mkEnableOption "xdg portal config";
config = lib.mkIf config.swarselmodules.xdg-portal {
xdg.portal = {
enable = true;
config = {
common = {
default = "wlr";
};
};
wlr.enable = true;
wlr.settings.screencast = {
output_name = "eDP-1";
chooser_type = "simple";
chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or";
};
# config = {
# common = {
# default = "wlr";
# };
# };
# wlr.enable = true;
# wlr.settings.screencast = {
# output_name = "eDP-1";
# chooser_type = "simple";
# chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or";
# };
};
};
}

View file

@ -1,33 +1,30 @@
{ inputs, lib, config, pkgs, ... }:
let
moduleName = "niri";
in
{ self, inputs, config, pkgs, ... }:
{
imports = [
inputs.niri-flake.nixosModules.niri
];
options.swarselmodules.${moduleName} = lib.mkEnableOption "${moduleName} settings";
config = lib.mkIf config.swarselmodules.${moduleName}
{
config = {
environment.systemPackages = with pkgs; [
wl-clipboard
wayland-utils
libsecret
cage
gamescope
xwayland-satellite-unstable
];
programs.niri = {
enable = true;
package = pkgs.niri-unstable; # the actual niri that will be installed and used
};
} // {
niri-flake.cache.enable = true;
programs.niri = {
package = null;
home-manager.users.${config.swarselsystems.mainUser}.imports = [
"${self}/modules/home/optional/niri.nix"
];
environment.systemPackages = with pkgs; [
wl-clipboard
wayland-utils
libsecret
cage
gamescope
xwayland-satellite-unstable
];
programs = {
niri = {
enable = true;
package = pkgs.niri-stable; # the actual niri that will be installed and used
};
};
};
}

View file

@ -0,0 +1,17 @@
{ self, inputs, config, ... }:
{
disabledModules = [ "programs/gpu-screen-recorder.nix" ];
imports = [
"${inputs.nixpkgs-dev}/nixos/modules/programs/gpu-screen-recorder.nix"
];
config = {
home-manager.users.${config.swarselsystems.mainUser}.imports = [
"${self}/modules/home/optional/noctalia.nix"
];
services = {
upower.enable = true; # needed for battery percentage
gnome.evolution-data-server.enable = true; # needed for calendar integration
};
programs.gpu-screen-recorder.enable = true;
};
}

View file

@ -1,4 +1,4 @@
{ self, lib, config, globals, dns, confLib, ... }:
{ lib, config, globals, dns, confLib, ... }:
let
inherit (confLib.gen { name = "firefly-iii"; port = 80; }) servicePort serviceName serviceUser serviceGroup serviceDomain serviceAddress proxyAddress4 proxyAddress6;
inherit (confLib.static) isHome dnsServer webProxy homeWebProxy homeServiceAddress nginxAccessRules;
@ -30,11 +30,11 @@ in
};
};
topology.self.services.${serviceName} = {
name = "Firefly-III";
info = "https://${serviceDomain}";
icon = "${self}/files/topology-images/${serviceName}.png";
};
# topology.self.services.${serviceName} = {
# name = "Firefly-III";
# info = "https://${serviceDomain}";
# icon = "${self}/files/topology-images/${serviceName}.png";
# };
globals.services.${serviceName} = {
domain = serviceDomain;

View file

@ -1,4 +1,4 @@
{ self, lib, config, globals, dns, confLib, ... }:
{ lib, config, globals, dns, confLib, ... }:
let
inherit (confLib.gen { name = "freshrss"; port = 80; }) servicePort serviceName serviceUser serviceGroup serviceDomain serviceAddress proxyAddress4 proxyAddress6;
inherit (confLib.static) isHome webProxy homeWebProxy dnsServer homeServiceAddress nginxAccessRules;
@ -49,11 +49,11 @@ in
# };
};
topology.self.services.${serviceName} = {
name = "FreshRSS";
info = "https://${serviceDomain}";
icon = "${self}/files/topology-images/${serviceName}.png";
};
# topology.self.services.${serviceName} = {
# name = "FreshRSS";
# info = "https://${serviceDomain}";
# icon = "${self}/files/topology-images/${serviceName}.png";
# };
globals.services.${serviceName} = {
domain = serviceDomain;

View file

@ -165,6 +165,19 @@ in
_ = { };
});
overrideTarget = target:
let
inherit target;
in
{
Unit = {
PartOf = lib.mkForce [ target ];
After = lib.mkForce [ target ];
Requires = lib.mkForce [ target ];
};
Install.WantedBy = lib.mkForce [ target ];
};
genNginx =
{ serviceAddress
, serviceName