feat[client]: add shikane
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-23 01:02:44 +01:00
parent 694dd794f7
commit 91f4393800
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
34 changed files with 2182 additions and 1802 deletions

8
.github/README.md vendored
View file

@ -118,12 +118,12 @@
|---------------|-----------------------------------------------------------------------------------------------------------------------------|
|🐚 **Shell** | [zsh](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/zsh.nix) |
|🚪 **DM** | [greetd](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/common/login.nix) |
|🪟 **WM** | [SwayFX](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/sway.nix) |
|⛩️ **Bar** | [Waybar](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/waybar.nix) |
|🪟 **WM** | [SwayFX](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/sway.nix) or [Niri](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/optional/niri.nix) |
|⛩️ **Bar** | [Waybar](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/waybar.nix) or [Noctalia Shell](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/optional/noctalia.nix) |
|✒️ **Editor** | [Emacs](https://github.com/Swarsel/.dotfiles/tree/main/files/emacs/init.el) |
|🖥️ **Terminal**| [Kitty](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/kitty.nix) |
|🚀 **Launcher**| [Fuzzel](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/fuzzel.nix) |
|🚨 **Alerts** | [Mako](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/mako.nix) |
|🚀 **Launcher**| [Fuzzel](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/fuzzel.nix) or [Noctalia Shell](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/optional/noctalia.nix) |
|🚨 **Alerts** | [Mako](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/mako.nix) or [Noctalia Shell](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/optional/noctalia.nix) |
|🌐 **Browser** | [Firefox](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/zsh.nix) |
|🎨 **Theme** | [City-Lights (managed by stylix)](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/sharedsetup.nix) |

View file

@ -16,7 +16,7 @@
*{{{NOTE(If you can see this, you might want to switch to [[https://swarsel.github.io/.dotfiles/][the hmtl version of this document]] in order to have working links and other QoL functions while reading this file.)}}}*
* Introduction (no code)
* Introduction (no config code)
:PROPERTIES:
:CUSTOM_ID: h:a86fe971-f169-4052-aacf-15e0f267c6cd
:END:
@ -39,7 +39,7 @@ This project manages my entire IT infrastructure. In particular:
- A mailserver ([[#h:81bc8746-b46b-4d29-87de-ddbd77788b43][Eagleland (Hetzner)]])
- My home router ([[#h:58c7563e-6954-42e6-a622-9d06523e8e24][Hintbooth (Router: HUNSN RM02)]]) and its MicroVMs
- Two homeservers ([[#h:82bf7fb1-631b-4acd-966b-d0c71a9eb463][Summers (Server: ASUS Z10PA-D8)]], [[#h:932ef6b0-4c14-4200-8e3f-2e208e748746][Winters (Server: ASRock J4105-ITX)]] and their respective MicroVMs) and one cloud server ([[#h:f547ed16-5e6e-4744-9e33-af090e0a175b][Moonside (OCI)]]) that are using other services defined in [[#h:79f3258f-ed9d-434d-b50a-e58d57ade2a7][Services]]
- Two homeservers ([[#h:82bf7fb1-631b-4acd-966b-d0c71a9eb463][Summers (Server: ASUS Z10PA-D8)]], [[#h:932ef6b0-4c14-4200-8e3f-2e208e748746][Winters (Server: ASRock J4105-ITX)]] and their respective MicroVMs) and one cloud server ([[#h:f547ed16-5e6e-4744-9e33-af090e0a175b][Moonside (OCI)]]) that are using other services defined in [[#h:79f3258f-ed9d-434d-b50a-e58d57ade2a7][Services]] (a list can be found in [[#h:191e82b6-6ae5-4ec8-ae6d-dc683ce325d9][Services]])
- Two servers (the cloud host [[#h:19300583-322b-4e0b-b657-857fbf23dfa1][Twothreetunnel (OCI)]] and one microvm [[#h:90dc7f71-f9da-49ef-b273-edfab7daaa05][Nginx]] hosted on [[#h:58c7563e-6954-42e6-a622-9d06523e8e24][Hintbooth (Router: HUNSN RM02)]]) that proxy requests to those services
- A NixOS hydra buildfarm ([[#h:90457194-6b97-4cd6-90bc-4f42d0d69f51][Belchsfactory (OCI)]]) with binary caching that helps me build derivations faster and cache them for reuse
- An authoritative DNS server ([[#h:1888ded8-69dc-431f-bb39-5089a8e8b1f4][Stoicclub (OCI)]]) that pushes records to both Hetzner and Hurricane Electric DNS
@ -330,21 +330,25 @@ Here I give a brief overview over the host machines that I am using. This is hel
This is meant to give a brief overview over the main programs/components that I use on a daily basis on my client machines. This should be mostly useful for people wanting to rice their config, or people who believed this repos title and are looking for =.dotfiles= :p
On [[#h:02df9dfc-d1af-4a37-a7a0-d8da0af96a20][Sway]], I run a combination of different services that are all replaced by [[#h:385cc6c7-416c-4570-a5d3-bf8fb7c841e7][Noctalia Shell]] when I am running on [[#h:06e77ca4-28ff-4cfd-bc60-b7fd848bfedb][Niri]], which has grown to become my default recently.
#+begin_src markdown :tangle no :noweb-ref programs
| Topic | Program |
|---------------|-----------------------------------------------------------------------------------------------------------------------------|
|🐚 **Shell** | [zsh](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/zsh.nix) |
|🚪 **DM** | [greetd](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/common/login.nix) |
|🪟 **WM** | [SwayFX](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/sway.nix) |
|⛩️ **Bar** | [Waybar](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/waybar.nix) |
|🪟 **WM** | [SwayFX](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/sway.nix) or [Niri](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/optional/niri.nix) |
|⛩️ **Bar** | [Waybar](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/waybar.nix) or [Noctalia Shell](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/optional/noctalia.nix) |
|✒️ **Editor** | [Emacs](https://github.com/Swarsel/.dotfiles/tree/main/files/emacs/init.el) |
|🖥️ **Terminal**| [Kitty](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/kitty.nix) |
|🚀 **Launcher**| [Fuzzel](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/fuzzel.nix) |
|🚨 **Alerts** | [Mako](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/mako.nix) |
|🚀 **Launcher**| [Fuzzel](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/fuzzel.nix) or [Noctalia Shell](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/optional/noctalia.nix) |
|🚨 **Alerts** | [Mako](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/mako.nix) or [Noctalia Shell](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/optional/noctalia.nix) |
|🌐 **Browser** | [Firefox](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/zsh.nix) |
|🎨 **Theme** | [City-Lights (managed by stylix)](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/sharedsetup.nix) |
#+end_src
** Services
:PROPERTIES:
:CUSTOM_ID: h:191e82b6-6ae5-4ec8-ae6d-dc683ce325d9
@ -3507,7 +3511,7 @@ TODO: I dont think this template would currently work out of the box
swarselsystems = lib.recursiveUpdate
{
wallpaper = self + /files/wallpaper/lenovowp.png;
wallpaper = self + /files/wallpaper/landscape/lenovowp.png;
hasBluetooth = true;
hasFingerprint = true;
isImpermanence = true;
@ -3720,7 +3724,7 @@ My work machine. Built for more security, this is the gold standard of my config
sharescreen = "eDP-2";
info = "Framework Laptop 16, 7940HS, RX7700S, 64GB RAM";
firewall = lib.mkForce true;
wallpaper = self + /files/wallpaper/lenovowp.png;
wallpaper = self + /files/wallpaper/landscape/lenovowp.png;
hasBluetooth = true;
hasFingerprint = true;
isImpermanence = false;
@ -3996,7 +4000,7 @@ My personal laptop. Closely follows the =pyramid= config, but leaves out some se
sharescreen = "eDP-1";
info = "Lenovo Ideapad 720S-13IKB";
firewall = lib.mkForce true;
wallpaper = self + /files/wallpaper/lenovowp.png;
wallpaper = self + /files/wallpaper/landscape/lenovowp.png;
hasBluetooth = true;
hasFingerprint = true;
isImpermanence = true;
@ -4407,6 +4411,7 @@ This is my main server that I run at home. It handles most tasks that require bi
swarselmodules.server = {
wireguard = true;
restic = true;
podman = true;
opkssh = true;
};
@ -6109,7 +6114,7 @@ My phone. I use only a minimal config for remote debugging here.
swarselsystems = {
isLaptop = false;
isNixos = false;
wallpaper = self + /files/wallpaper/surfacewp.png;
wallpaper = self + /files/wallpaper/landscape/surfacewp.png;
};
swarselprofiles = {
@ -7585,7 +7590,7 @@ This is a slim setup for developing base configuration. I do not track the hardw
swarselsystems = {
info = "~SwarselSystems~ remote install helper";
wallpaper = self + /files/wallpaper/lenovowp.png;
wallpaper = self + /files/wallpaper/landscape/lenovowp.png;
isImpermanence = true;
isCrypted = true;
isSecureBoot = false;
@ -7752,6 +7757,16 @@ NOTE: Yes, the path to this system does not follow the scheme outlined above - I
TODO: cleanup this mess
Steps to recover using live ISO:
- unlock LUKS: =cryptsetup luksOpen /dev/<crypted device> cryptroot=
- mount root: =mount -t btrfs -o subvol=root /dev/mapper/cryptroot /mnt=
- mounted other subvolumes: =mount -t btrfs -o subvol=<name> /dev/mapper/cryptroot /mnt/<name>= for all subvolumes
- mounted boot: =mount -o umask=077 /dev/<boot device> /mnt/boot=
- mount sbctl keys: =mount -o bind /mnt/persist/var/lib/sbctl /mnt/var/lib/sbctl=
- make it look like nixos system: =touch /mnt/etc/NIXOS=
- chroot: =nixos-enter=
- Then to e.g. fix missing bootloader entries: =/nix/var/nix/profiles/system/bin/switch-to-configuration boot=
#+begin_src nix-ts :tangle install/installer-config.nix
{ self, config, pkgs, lib, ... }:
@ -7840,6 +7855,11 @@ TODO: cleanup this mess
vim
just
sbctl
lsof
dig
cryptsetup
btrfs-progs
];
programs = {
@ -8082,7 +8102,7 @@ I also set the =WLR_RENDERER_ALLOW_SOFTWARE=1= to allow this configuration to ru
swarselsystems = {
info = "~SwarselSystems~ demo host";
wallpaper = self + /files/wallpaper/lenovowp.png;
wallpaper = self + /files/wallpaper/landscape/lenovowp.png;
isImpermanence = true;
isCrypted = true;
isSecureBoot = false;
@ -10634,14 +10654,14 @@ This section houses the greetd related settings. I do not really want to use a d
enable = true;
settings = {
# initial_session.command = "sway";
initial_session.command = "uwsm start -- sway-uwsm.desktop";
initial_session.command = "uwsm start -- niri-uwsm.desktop";
# --cmd sway
default_session.command = ''
${pkgs.tuigreet}/bin/tuigreet \
--time \
--asterisks \
--user-menu \
--cmd "uwsm start -- sway-uwsm.desktop"
--cmd "uwsm start -- niri-uwsm.desktop"
'';
};
};
@ -10995,9 +11015,11 @@ Since I hide the waybar completely during normal operation, I run the risk of no
{
options.swarselmodules.lowBattery = lib.mkEnableOption "low battery notification config";
config = lib.mkIf config.swarselmodules.lowBattery {
systemd.user.services."battery-low" = let
systemd.user.services."battery-low" =
let
target = "sway-session.target";
in {
in
{
enable = true;
description = "Timer for battery check that alerts at 10% or less";
partOf = [ target ];
@ -12472,7 +12494,8 @@ This is the configuration to make [[#h:58c7563e-6954-42e6-a622-9d06523e8e24][Hin
lan2VLANs = selectVLANs [ "home" "devices" "services" ];
lan3VLANs = selectVLANs [ "home" "devices" "services" ];
lan4VLANs = lan3VLANs;
lan5VLANs = selectVLANs [ "home" "devices" "guests" ];
# TODO: remove services and reset ports 5+6 on swLR to guest when kitchen construction is finished
lan5VLANs = selectVLANs [ "home" "devices" "services" "guests" ];
inherit (globals.general) homeDnsServer;
in
{
@ -19852,7 +19875,6 @@ When setting up a new machine:
};
};
}
#+end_src
**** microvm-host
@ -19878,7 +19900,8 @@ Some standard options that should be set for every microvm host.
mode = "0750";
};
};
}) (builtins.attrNames config.guests)
})
(builtins.attrNames config.guests)
);
users.persistentIds.microvm = confLib.mkIds 999;
@ -20657,7 +20680,7 @@ This holds packages that I can use as provided, or with small modifications (as
tridactyl-native
# mako related
mako
# mako
libnotify
# general utilities
@ -21645,9 +21668,11 @@ The theme is handled by stylix.
config = lib.mkIf config.swarselmodules.kitty {
programs.kitty = {
enable = true;
keybindings = let
keybindings =
let
bindWithModifier = lib.mapAttrs' (key: lib.nameValuePair ("ctrl+shift" + key));
in bindWithModifier {
in
bindWithModifier {
"page_up" = "scroll_page_up";
"up" = "scroll_page_up";
"page_down" = "scroll_page_down";
@ -25101,7 +25126,7 @@ Currently, I am too lazy to explain every option here, but most of it is very se
# laptop screen
output = {
criteria = config.swarselsystems.sharescreen;
mode = config.swarselsystems.highResolution;
mode = "${config.swarselsystems.highResolution}@165.000";
scale = 1.0;
};
}
@ -25135,7 +25160,7 @@ Currently, I am too lazy to explain every option here, but most of it is very se
name = "lidopen";
exec = [
"${pkgs.swaybg}/bin/swaybg --output '${config.swarselsystems.sharescreen}' --image ${config.swarselsystems.wallpaper} --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output '${monitor}' --image ${self}/files/wallpaper/standwp.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output '${monitor}' --image ${self}/files/wallpaper/landscape/standwp.png --mode ${config.stylix.imageScalingMode}"
];
outputs = [
{
@ -25160,7 +25185,7 @@ Currently, I am too lazy to explain every option here, but most of it is very se
in
{
name = "lidclosed";
exec = [ "${pkgs.swaybg}/bin/swaybg --output '${monitor}' --image ${self}/files/wallpaper/standwp.png --mode ${config.stylix.imageScalingMode}" ];
exec = [ "${pkgs.swaybg}/bin/swaybg --output '${monitor}' --image ${self}/files/wallpaper/landscape/standwp.png --mode ${config.stylix.imageScalingMode}" ];
outputs = [
{
criteria = config.swarselsystems.sharescreen;
@ -25182,6 +25207,88 @@ Currently, I am too lazy to explain every option here, but most of it is very se
}
#+end_src
**** Shikane
#+begin_src nix-ts :tangle modules/home/common/shikane.nix
{ lib, config, confLib, ... }:
{
options.swarselmodules.shikane = lib.mkEnableOption "kanshi settings";
config = lib.mkIf config.swarselmodules.shikane {
systemd.user.services.shikane = confLib.overrideTarget "noctalia-shell.target";
services.shikane = {
enable = true;
settings =
let
homeMonitor = [
"m=PHL BDM3270"
"s=AU11806002320"
"v=Philips Consumer Electronics Company"
];
exec = ["notify-send shikane \"Profile $SHIKANE_PROFILE_NAME has been applied\""];
in
{
profile = [
{
name = "internal-on";
inherit exec;
output = [
{
match = config.swarselsystems.sharescreen;
enable = true;
mode = "${config.swarselsystems.highResolution}@165.000";
scale = 1.0;
}
];
}
{
name = "home-internal-on";
inherit exec;
output = [
{
match = config.swarselsystems.sharescreen;
enable = true;
scale = 1.7;
position = "2560,0";
}
{
match = homeMonitor;
enable = true;
scale = 1.0;
mode = "2560x1440";
position = "0,0";
}
];
}
{
name = "home-internal-off";
inherit exec;
output = [
{
match = config.swarselsystems.sharescreen;
enable = false;
position = "2560,0";
}
{
match = homeMonitor;
scale = 1.0;
enable = true;
mode = "2560x1440";
position = "0,0";
}
];
}
];
};
};
};
}
#+end_src
**** gpg-agent
:PROPERTIES:
:CUSTOM_ID: h:7d384e3b-1be7-4644-b304-ada4af0b692b
@ -25337,9 +25444,11 @@ This service changes the screen hue at night. I am not sure if that really does
"${config.programs.obsidian.vaults.${name}.target}/.obsidian/core-plugins.json".force = true;
};
programs.obsidian = let
programs.obsidian =
let
pluginSource = pkgs.nur.repos.swarsel;
in {
in
{
enable = true;
package = pkgs.obsidian;
defaultSettings = {
@ -25831,12 +25940,13 @@ This service changes the screen hue at night. I am not sure if that really does
# { 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 = "${noctalia} sessionMenu lockAndSuspend || ${suspend}"; }
# { timeout = 600; command = "${noctalia} sessionMenu lockAndSuspend || ${suspend}"; }
{ timeout = 600; command = "${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 = "before-sleep"; command = "${noctalia} lockScreen lock || ${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 ";
before-sleep = "${noctalia} lockScreen lock || ${swaylock} -f ";
# lock = "${swaylock} -f ";
};
};
@ -26021,6 +26131,7 @@ Akin to the [[#h:f9aa9af0-9b8d-43ff-901d-9ffccdd70589][Optional]] NixOS modules.
programs.niri = {
package = pkgs.niri-stable; # which package to use for niri validation
settings = {
gestures.hot-corners.enable = false;
debug = {
honor-xdg-activation-with-invalid-serial = [ ];
};
@ -26030,7 +26141,7 @@ Akin to the [[#h:f9aa9af0-9b8d-43ff-901d-9ffccdd70589][Optional]] NixOS modules.
};
prefer-no-csd = true;
layer-rules = [
{ matches = [{ namespace = "^notifications$"; }]; block-out-from = "screen-capture"; }
{ matches = [{ namespace = "^notificatioans$"; }]; block-out-from = "screen-capture"; }
{ matches = [{ namespace = "^wallpaper$"; }]; place-within-backdrop = true; }
{ matches = [{ namespace = "^noctalia-overview*"; }]; place-within-backdrop = true; }
];
@ -26070,11 +26181,11 @@ Akin to the [[#h:f9aa9af0-9b8d-43ff-901d-9ffccdd70589][Optional]] NixOS modules.
{ 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 = {
environment = vars.waylandSessionVariables // {
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";
@ -26118,17 +26229,18 @@ Akin to the [[#h:f9aa9af0-9b8d-43ff-901d-9ffccdd70589][Optional]] NixOS modules.
};
binds = with config.lib.niri.actions; let
sh = spawn "sh" "-c";
resizer = "niri-resize";
resizer = "niri-resize & sleep 0.05";
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+q".action = sh "${resizer} && niri msg action close-window";
"Mod+f".action = sh "${resizer} && exec firefox";
# "Mod+Space".action = spawn "noctalia-shell" "ipc" "call" "launcher" "toggle";
"Mod+Space".action = sh "${resizer} & fuzzel";
"Mod+Space".action = sh "${resizer} && exec noctalia-shell ipc call launcher toggle";
# "Mod+Space".action = sh "${resizer} & exec 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";
@ -26142,11 +26254,11 @@ Akin to the [[#h:f9aa9af0-9b8d-43ff-901d-9ffccdd70589][Optional]] NixOS modules.
"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 "${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+e".action = sh "${resizer} && exec emacsclient -nquc -a emacs -e '(dashboard-open)'";
"Mod+c".action = sh "${resizer} && exec emacsclient -ce '(org-capture)'";
"Mod+t".action = sh "${resizer} && exec emacsclient -ce '(org-agenda)'";
"Mod+Shift+m".action = sh "${resizer} && exec emacsclient -ce '(mu4e)'";
"Mod+Shift+a".action = sh "${resizer} && exec emacsclient -ce '(swarsel/open-calendar)'";
"Mod+a".action = spawn "swarselcheck-niri" "-s";
"Mod+x".action = spawn "swarselcheck-niri" "-k";
@ -26162,8 +26274,8 @@ Akin to the [[#h:f9aa9af0-9b8d-43ff-901d-9ffccdd70589][Optional]] NixOS modules.
"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+Left".action = move-column-left-or-to-monitor-left;
"Mod+Shift+Right".action = move-column-right-or-to-monitor-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";
@ -26171,7 +26283,7 @@ Akin to the [[#h:f9aa9af0-9b8d-43ff-901d-9ffccdd70589][Optional]] NixOS modules.
# "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";
"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";
@ -26216,8 +26328,8 @@ Akin to the [[#h:f9aa9af0-9b8d-43ff-901d-9ffccdd70589][Optional]] NixOS modules.
# { command = [ "nm-applet" ]; }
# { command = [ "niri" "msg" "action" "focus-workspace" "2" ]; }
# { command = [ "noctalia-shell" ]; }
{ command = [ "pkill mako" ]; }
{ command = [ "systemctl" "--user" "start" "noctalia-shell.target" ]; }
# { argv = [ "pkill" "mako" ]; }
{ argv = [ "systemctl" "--user" "restart" "noctalia-shell.target" "tray.target" ]; }
];
# workspaces = {
# "01-Main" = {
@ -26235,8 +26347,11 @@ Akin to the [[#h:f9aa9af0-9b8d-43ff-901d-9ffccdd70589][Optional]] NixOS modules.
#+end_src
**** Noctalia
:PROPERTIES:
:CUSTOM_ID: h:385cc6c7-416c-4570-a5d3-bf8fb7c841e7
:END:
Apart from configuring Noctalia, I here also add some systemd chains to make sure the Noctalia tray is actually ready to receive tray icons. For this I add another target =noctalia-tray-pre.target= that simply waits 5 seconds, which should be sufficient.
Apart from configuring Noctalia, I here also add some systemd chains to make sure the Noctalia tray is actually ready to receive tray icons.
#+begin_src nix-ts :tangle modules/home/optional/noctalia.nix
{ self, inputs, config, pkgs, lib, confLib, ... }:
@ -26249,43 +26364,27 @@ Apart from configuring Noctalia, I here also add some systemd chains to make sur
targets = {
noctalia-shell.Unit = {
After = [ "graphical-session.target" ];
Wants = [
"tray.target"
"noctalia-tray-pre.target"
];
};
tray = {
Unit = {
After = [ "noctalia-tray-pre.target" ];
After = [ "noctalia-init.service" ];
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";
ExecStart = "${pkgs.coreutils}/bin/sleep 15";
RemainAfterExit = true;
};
Install = {
WantedBy = [ "noctalia-tray-pre.target" ];
WantedBy = [ "noctalia-shell.target" ];
};
};
};
@ -26313,7 +26412,7 @@ Apart from configuring Noctalia, I here also add some systemd chains to make sur
marginHorizontal = 0;
frameThickness = 8;
frameRadius = 12;
outerCorners = true;
outerCorners = false;
hideOnOverview = false;
displayMode = "auto_hide";
autoHideDelay = 100;
@ -26322,29 +26421,54 @@ Apart from configuring Noctalia, I here also add some systemd chains to make sur
widgets = {
left = [
{
characterCount = 2;
characterCount = 4;
colorizeIcons = false;
emptyColor = "primary";
enableScrollWheel = false;
focusedColor = "secondary";
followFocusedScreen = false;
groupedBorderOpacity = 1;
hideUnoccupied = true;
hideUnoccupied = false;
iconScale = 0.5;
id = "Workspace";
labelMode = "none";
labelMode = "name";
occupiedColor = "primary";
pillSize = 0.4;
reverseScroll = false;
showApplications = true;
showBadge = true;
showLabelsOnlyWhenOccupied = true;
showLabelsOnlyWhenOccupied = false;
unfocusedIconsOpacity = 0.25;
}
{
defaultSettings = {
completedCount = 0;
count = 0;
current_page_id = 0;
isExpanded = false;
pages = [
{
id = 0;
name = "General";
}
];
priorityColors = {
high = "#f44336";
low = "#9e9e9e";
medium = "#2196f3";
};
showBackground = true;
showCompleted = true;
todos = [];
useCustomColors = false;
};
id = "plugin:todo";
}
];
center = [
{
colorizeIcons = false;
colorizeIcons = true;
hideMode = "hidden";
id = "ActiveWindow";
maxWidth = 145;
@ -26375,6 +26499,17 @@ Apart from configuring Noctalia, I here also add some systemd chains to make sur
id = "Volume";
middleClickCommand = "pavucontrol";
}
{
id = "NotificationHistory";
hideWhenZero = false;
showUnreadBadge = true;
}
{
id = "plugin:ba7043:github-feed";
}
{
id = "plugin:clipper";
}
{
displayMode = "onhover";
id = "Network";
@ -26395,12 +26530,6 @@ Apart from configuring Noctalia, I here also add some systemd chains to make sur
showNoctaliaPerformance = false;
showPowerProfiles = true;
}
{
id = "plugin:ba7043:github-feed";
}
{
id = "plugin:clipper";
}
{
colorName = "primary";
id = "SessionMenu";
@ -26417,17 +26546,17 @@ Apart from configuring Noctalia, I here also add some systemd chains to make sur
{
colorizeDistroLogo = false;
colorizeSystemIcon = "primary";
customIconPath = "";
customIconPath = "${self}/files/icons/swarsel.png";
enableColorization = true;
icon = "noctalia";
id = "ControlCenter";
useDistroLogo = true;
useDistroLogo = false;
}
];
};
};
general = {
avatarImage = "${self}/files/wallpaper/swarsel.png";
avatarImage = "${self}/files/icons/swarsel.png";
dimmerOpacity = 0.2;
showScreenCorners = false;
forceBlackScreenCorners = false;
@ -26436,16 +26565,16 @@ Apart from configuring Noctalia, I here also add some systemd chains to make sur
iRadiusRatio = 1;
boxRadiusRatio = 1;
screenRadiusRatio = 1;
animationSpeed = 1;
animationSpeed = 1.5;
animationDisabled = false;
compactLockScreen = true;
lockOnSuspend = true;
showSessionButtonsOnLockScreen = true;
showHibernateOnLockScreen = false;
enableShadows = true;
shadowDirection = "bottom_right";
shadowOffsetX = 2;
shadowOffsetY = 3;
shadowDirection = "center";
shadowOffsetX = 0;
shadowOffsetY = 0;
language = "";
allowPanelsOnScreenWithoutBar = true;
showChangelogOnStartup = true;
@ -26501,17 +26630,17 @@ Apart from configuring Noctalia, I here also add some systemd chains to make sur
wallpaper = {
enabled = true;
overviewEnabled = true;
directory = "${self}/files/wallpaper";
directory = "${self}/files/wallpaper/landscape";
monitorDirectories = [ ];
enableMultiMonitorDirectories = true;
showHiddenFiles = false;
viewMode = "single";
setWallpaperOnAllMonitors = true;
setWallpaperOnAllMonitors = false;
fillMode = "crop";
fillColor = "#000000";
useSolidColor = false;
solidColor = "#1a1a2e";
automationEnabled = false;
automationEnabled = true;
wallpaperChangeMode = "random";
randomIntervalSec = 300;
transitionDuration = 500;
@ -26827,7 +26956,7 @@ Apart from configuring Noctalia, I here also add some systemd chains to make sur
colorizationEnabled = true;
colorizationIcon = "Primary";
colorizationBadge = "Tertiary";
colorizationBadgeText = "Primary";
colorizationBadgeText = "None";
defaultTab = 1;
enableSystemNotifications = true;
notifyGitHubNotifications = true;
@ -27229,6 +27358,84 @@ When setting up a new machine:
};
services = {
shikane = {
settings =
let
workRight = [
"m=HP Z32"
"s=CN41212T55"
"v=HP Inc."
];
workLeft = [
"m=HP 732pk"
"s=CNC4080YL5"
"v=HP Inc."
];
exec = ["notify-send shikane \"Profile $SHIKANE_PROFILE_NAME has been applied\""];
in
{
profile = [
{
name = "work-internal-on";
inherit exec;
output = [
{
match = config.swarselsystems.sharescreen;
enable = true;
scale = 1.7;
position = "2560,0";
}
{
match = workRight;
enable = true;
scale = 1.0;
mode = "3840x2160@60Hz";
position = "-1280,0";
}
{
match = workLeft;
enable = true;
scale = 1.0;
transform = "270";
mode = "3840x2160@60Hz";
position = "-3440,-1050";
}
];
}
{
name = "work-internal-off";
inherit exec;
output = [
{
match = config.swarselsystems.sharescreen;
enable = false;
scale = 1.7;
position = "2560,0";
}
{
match = workRight;
enable = true;
scale = 1.0;
mode = "3840x2160@60Hz";
position = "-1280,0";
}
{
match = workLeft;
enable = true;
scale = 1.0;
transform = "270";
mode = "3840x2160@60Hz";
position = "-3440,-1050";
}
];
}
];
};
};
kanshi = {
settings = [
{
@ -27270,8 +27477,8 @@ When setting up a new machine:
name = "lidopen";
exec = [
"${pkgs.swaybg}/bin/swaybg --output '${config.swarselsystems.sharescreen}' --image ${config.swarselsystems.wallpaper} --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output 'HP Inc. HP Z32 CN41212T55' --image ${self}/files/wallpaper/botanicswp.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output 'HP Inc. HP 732pk CNC4080YL5' --image ${self}/files/wallpaper/op6wp.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output 'HP Inc. HP Z32 CN41212T55' --image ${self}/files/wallpaper/landscape/botanicswp.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output 'HP Inc. HP 732pk CNC4080YL5' --image ${self}/files/wallpaper/portrait/op6wp.png --mode ${config.stylix.imageScalingMode}"
];
outputs = [
{
@ -27305,7 +27512,7 @@ When setting up a new machine:
name = "lidopen";
exec = [
"${pkgs.swaybg}/bin/swaybg --output '${config.swarselsystems.sharescreen}' --image ${config.swarselsystems.wallpaper} --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output '${monitor}' --image ${self}/files/wallpaper/navidrome.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output '${monitor}' --image ${self}/files/wallpaper/services/navidrome.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.kanshare}/bin/kanshare ${config.swarselsystems.sharescreen} '${monitor}'"
];
outputs = [
@ -27328,8 +27535,8 @@ When setting up a new machine:
profile = {
name = "lidclosed";
exec = [
"${pkgs.swaybg}/bin/swaybg --output 'HP Inc. HP Z32 CN41212T55' --image ${self}/files/wallpaper/botanicswp.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output 'HP Inc. HP 732pk CNC4080YL5' --image ${self}/files/wallpaper/op6wp.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output 'HP Inc. HP Z32 CN41212T55' --image ${self}/files/wallpaper/landscape/botanicswp.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output 'HP Inc. HP 732pk CNC4080YL5' --image ${self}/files/wallpaper/portrait/op6wp.png --mode ${config.stylix.imageScalingMode}"
];
outputs = [
{
@ -27360,7 +27567,7 @@ When setting up a new machine:
{
name = "lidclosed";
exec = [
"${pkgs.swaybg}/bin/swaybg --output '${monitor}' --image ${self}/files/wallpaper/navidrome.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output '${monitor}' --image ${self}/files/wallpaper/services/navidrome.png --mode ${config.stylix.imageScalingMode}"
];
outputs = [
{
@ -27781,7 +27988,7 @@ TODO: check which of these can be replaced but builtin functions.
};
wallpaper = lib.mkOption {
type = lib.types.path;
default = "${self}/files/wallpaper/lenovowp.png";
default = "${self}/files/wallpaper/landscape/lenovowp.png";
};
sharescreen = lib.mkOption {
type = lib.types.str;
@ -28264,13 +28471,10 @@ In short, the options defined here are passed to the modules systems using =_mod
_ = { };
});
overrideTarget = target: let
inherit target;
in {
overrideTarget = target: {
Unit = {
PartOf = lib.mkForce [ target ];
After = lib.mkForce [ target ];
Requires = lib.mkForce [ target ];
};
Install.WantedBy = lib.mkForce [ target ];
};
@ -28720,7 +28924,7 @@ The normal =command-not-found.sh= uses the outdated =nix-shell= commands as sugg
#+begin_src shell :tangle files/scripts/niri-resize.sh
WORKSPACE=$(niri msg -j workspaces | jq -r '.[] | select(.is_active == true) | .id')
WORKSPACE=$(niri msg -j workspaces | jq -r '.[] | select(.is_focused == true) | .id')
COUNT=$(niri msg -j windows | jq --argjson ws "$WORKSPACE" -r '.[] | select(.workspace_id == $ws and .is_floating == false) | .app_id' | wc -l)
@ -30988,6 +31192,7 @@ This holds modules that are to be used on most hosts. These are also the most im
tmux = lib.mkDefault true;
vesktop = lib.mkDefault true;
vesktop-tray = lib.mkDefault true;
shikane = lib.mkDefault true;
syncthing-tray = lib.mkDefault true;
waybar = lib.mkDefault true;
yubikey = lib.mkDefault false;
@ -34477,7 +34682,7 @@ This sets up the =dashboard=, which is really quite useless. But, it looks cool
dashboard-set-footer nil
dashboard-banner-logo-title "Welcome to SwarsEmacs!"
dashboard-image-banner-max-height 300
dashboard-startup-banner "~/.dotfiles/files/wallpaper/swarsel.png"
dashboard-startup-banner "~/.dotfiles/files/icons/swarsel.png"
dashboard-projects-backend 'projectile
dashboard-projects-switch-function 'magit-status
dashboard-set-navigator t

View file

@ -1797,7 +1797,7 @@ create a new one."
dashboard-set-footer nil
dashboard-banner-logo-title "Welcome to SwarsEmacs!"
dashboard-image-banner-max-height 300
dashboard-startup-banner "~/.dotfiles/files/wallpaper/swarsel.png"
dashboard-startup-banner "~/.dotfiles/files/icons/swarsel.png"
dashboard-projects-backend 'projectile
dashboard-projects-switch-function 'magit-status
dashboard-set-navigator t

View file

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 86 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 6.9 MiB

After

Width:  |  Height:  |  Size: 6.9 MiB

Before After
Before After

View file

@ -1,4 +1,4 @@
WORKSPACE=$(niri msg -j workspaces | jq -r '.[] | select(.is_active == true) | .id')
WORKSPACE=$(niri msg -j workspaces | jq -r '.[] | select(.is_focused == true) | .id')
COUNT=$(niri msg -j windows | jq --argjson ws "$WORKSPACE" -r '.[] | select(.workspace_id == $ws and .is_floating == false) | .app_id' | wc -l)

View file

@ -39,7 +39,7 @@ in
swarselsystems = lib.recursiveUpdate
{
wallpaper = self + /files/wallpaper/lenovowp.png;
wallpaper = self + /files/wallpaper/landscape/lenovowp.png;
hasBluetooth = true;
hasFingerprint = true;
isImpermanence = true;

View file

Before

Width:  |  Height:  |  Size: 4.5 MiB

After

Width:  |  Height:  |  Size: 4.5 MiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 7.9 MiB

After

Width:  |  Height:  |  Size: 7.9 MiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 557 KiB

After

Width:  |  Height:  |  Size: 557 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 2.9 MiB

After

Width:  |  Height:  |  Size: 2.9 MiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 3 MiB

After

Width:  |  Height:  |  Size: 3 MiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 2.5 MiB

After

Width:  |  Height:  |  Size: 2.5 MiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Before After
Before After

View file

@ -25,7 +25,7 @@
swarselsystems = {
isLaptop = false;
isNixos = false;
wallpaper = self + /files/wallpaper/surfacewp.png;
wallpaper = self + /files/wallpaper/landscape/surfacewp.png;
};
swarselprofiles = {

View file

@ -31,7 +31,7 @@ in
sharescreen = "eDP-1";
info = "Lenovo Ideapad 720S-13IKB";
firewall = lib.mkForce true;
wallpaper = self + /files/wallpaper/lenovowp.png;
wallpaper = self + /files/wallpaper/landscape/lenovowp.png;
hasBluetooth = true;
hasFingerprint = true;
isImpermanence = true;

View file

@ -40,7 +40,7 @@ in
swarselsystems = {
info = "~SwarselSystems~ demo host";
wallpaper = self + /files/wallpaper/lenovowp.png;
wallpaper = self + /files/wallpaper/landscape/lenovowp.png;
isImpermanence = true;
isCrypted = true;
isSecureBoot = false;

View file

@ -40,7 +40,7 @@ in
sharescreen = "eDP-2";
info = "Framework Laptop 16, 7940HS, RX7700S, 64GB RAM";
firewall = lib.mkForce true;
wallpaper = self + /files/wallpaper/lenovowp.png;
wallpaper = self + /files/wallpaper/landscape/lenovowp.png;
hasBluetooth = true;
hasFingerprint = true;
isImpermanence = false;

View file

@ -79,6 +79,7 @@
swarselmodules.server = {
wireguard = true;
restic = true;
podman = true;
opkssh = true;
};

View file

@ -26,7 +26,7 @@
swarselsystems = {
info = "~SwarselSystems~ remote install helper";
wallpaper = self + /files/wallpaper/lenovowp.png;
wallpaper = self + /files/wallpaper/landscape/lenovowp.png;
isImpermanence = true;
isCrypted = true;
isSecureBoot = false;

View file

@ -84,6 +84,11 @@ in
vim
just
sbctl
lsof
dig
cryptsetup
btrfs-progs
];
programs = {

View file

@ -23,7 +23,7 @@
# laptop screen
output = {
criteria = config.swarselsystems.sharescreen;
mode = config.swarselsystems.highResolution;
mode = "${config.swarselsystems.highResolution}@165.000";
scale = 1.0;
};
}
@ -57,7 +57,7 @@
name = "lidopen";
exec = [
"${pkgs.swaybg}/bin/swaybg --output '${config.swarselsystems.sharescreen}' --image ${config.swarselsystems.wallpaper} --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output '${monitor}' --image ${self}/files/wallpaper/standwp.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output '${monitor}' --image ${self}/files/wallpaper/landscape/standwp.png --mode ${config.stylix.imageScalingMode}"
];
outputs = [
{
@ -82,7 +82,7 @@
in
{
name = "lidclosed";
exec = [ "${pkgs.swaybg}/bin/swaybg --output '${monitor}' --image ${self}/files/wallpaper/standwp.png --mode ${config.stylix.imageScalingMode}" ];
exec = [ "${pkgs.swaybg}/bin/swaybg --output '${monitor}' --image ${self}/files/wallpaper/landscape/standwp.png --mode ${config.stylix.imageScalingMode}" ];
outputs = [
{
criteria = config.swarselsystems.sharescreen;

View file

@ -101,7 +101,7 @@
tridactyl-native
# mako related
mako
# mako
libnotify
# general utilities

View file

@ -0,0 +1,77 @@
{ lib, config, confLib, ... }:
{
options.swarselmodules.shikane = lib.mkEnableOption "kanshi settings";
config = lib.mkIf config.swarselmodules.shikane {
systemd.user.services.shikane = confLib.overrideTarget "noctalia-shell.target";
services.shikane = {
enable = true;
settings =
let
homeMonitor = [
"m=PHL BDM3270"
"s=AU11806002320"
"v=Philips Consumer Electronics Company"
];
exec = [ "notify-send shikane \"Profile $SHIKANE_PROFILE_NAME has been applied\"" ];
in
{
profile = [
{
name = "internal-on";
inherit exec;
output = [
{
match = config.swarselsystems.sharescreen;
enable = true;
mode = "${config.swarselsystems.highResolution}@165.000";
scale = 1.0;
}
];
}
{
name = "home-internal-on";
inherit exec;
output = [
{
match = config.swarselsystems.sharescreen;
enable = true;
scale = 1.7;
position = "2560,0";
}
{
match = homeMonitor;
enable = true;
scale = 1.0;
mode = "2560x1440";
position = "0,0";
}
];
}
{
name = "home-internal-off";
inherit exec;
output = [
{
match = config.swarselsystems.sharescreen;
enable = false;
position = "2560,0";
}
{
match = homeMonitor;
scale = 1.0;
enable = true;
mode = "2560x1440";
position = "0,0";
}
];
}
];
};
};
};
}

View file

@ -22,12 +22,13 @@ in
# { 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 = "${noctalia} sessionMenu lockAndSuspend || ${suspend}"; }
# { timeout = 600; command = "${noctalia} sessionMenu lockAndSuspend || ${suspend}"; }
{ timeout = 600; command = "${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 = "before-sleep"; command = "${noctalia} lockScreen lock || ${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 ";
before-sleep = "${noctalia} lockScreen lock || ${swaylock} -f ";
# lock = "${swaylock} -f ";
};
};

View file

@ -7,6 +7,7 @@
programs.niri = {
package = pkgs.niri-stable; # which package to use for niri validation
settings = {
gestures.hot-corners.enable = false;
debug = {
honor-xdg-activation-with-invalid-serial = [ ];
};
@ -16,7 +17,7 @@
};
prefer-no-csd = true;
layer-rules = [
{ matches = [{ namespace = "^notifications$"; }]; block-out-from = "screen-capture"; }
{ matches = [{ namespace = "^notificatioans$"; }]; block-out-from = "screen-capture"; }
{ matches = [{ namespace = "^wallpaper$"; }]; place-within-backdrop = true; }
{ matches = [{ namespace = "^noctalia-overview*"; }]; place-within-backdrop = true; }
];
@ -56,11 +57,11 @@
{ 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 = {
environment = vars.waylandSessionVariables // {
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";
@ -104,17 +105,18 @@
};
binds = with config.lib.niri.actions; let
sh = spawn "sh" "-c";
resizer = "niri-resize";
resizer = "niri-resize & sleep 0.05";
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+q".action = sh "${resizer} && niri msg action close-window";
"Mod+f".action = sh "${resizer} && exec firefox";
# "Mod+Space".action = spawn "noctalia-shell" "ipc" "call" "launcher" "toggle";
"Mod+Space".action = sh "${resizer} & fuzzel";
"Mod+Space".action = sh "${resizer} && exec noctalia-shell ipc call launcher toggle";
# "Mod+Space".action = sh "${resizer} & exec 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";
@ -128,11 +130,11 @@
"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 "${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+e".action = sh "${resizer} && exec emacsclient -nquc -a emacs -e '(dashboard-open)'";
"Mod+c".action = sh "${resizer} && exec emacsclient -ce '(org-capture)'";
"Mod+t".action = sh "${resizer} && exec emacsclient -ce '(org-agenda)'";
"Mod+Shift+m".action = sh "${resizer} && exec emacsclient -ce '(mu4e)'";
"Mod+Shift+a".action = sh "${resizer} && exec emacsclient -ce '(swarsel/open-calendar)'";
"Mod+a".action = spawn "swarselcheck-niri" "-s";
"Mod+x".action = spawn "swarselcheck-niri" "-k";
@ -148,8 +150,8 @@
"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+Left".action = move-column-left-or-to-monitor-left;
"Mod+Shift+Right".action = move-column-right-or-to-monitor-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";
@ -157,7 +159,7 @@
# "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";
"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";
@ -202,8 +204,8 @@
# { command = [ "nm-applet" ]; }
# { command = [ "niri" "msg" "action" "focus-workspace" "2" ]; }
# { command = [ "noctalia-shell" ]; }
{ command = [ "pkill mako" ]; }
{ command = [ "systemctl" "--user" "start" "noctalia-shell.target" ]; }
# { argv = [ "pkill" "mako" ]; }
{ argv = [ "systemctl" "--user" "restart" "noctalia-shell.target" "tray.target" ]; }
];
# workspaces = {
# "01-Main" = {

View file

@ -8,43 +8,27 @@
targets = {
noctalia-shell.Unit = {
After = [ "graphical-session.target" ];
Wants = [
"tray.target"
"noctalia-tray-pre.target"
];
};
tray = {
Unit = {
After = [ "noctalia-tray-pre.target" ];
After = [ "noctalia-init.service" ];
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";
ExecStart = "${pkgs.coreutils}/bin/sleep 15";
RemainAfterExit = true;
};
Install = {
WantedBy = [ "noctalia-tray-pre.target" ];
WantedBy = [ "noctalia-shell.target" ];
};
};
};
@ -72,7 +56,7 @@
marginHorizontal = 0;
frameThickness = 8;
frameRadius = 12;
outerCorners = true;
outerCorners = false;
hideOnOverview = false;
displayMode = "auto_hide";
autoHideDelay = 100;
@ -81,29 +65,54 @@
widgets = {
left = [
{
characterCount = 2;
characterCount = 4;
colorizeIcons = false;
emptyColor = "primary";
enableScrollWheel = false;
focusedColor = "secondary";
followFocusedScreen = false;
groupedBorderOpacity = 1;
hideUnoccupied = true;
hideUnoccupied = false;
iconScale = 0.5;
id = "Workspace";
labelMode = "none";
labelMode = "name";
occupiedColor = "primary";
pillSize = 0.4;
reverseScroll = false;
showApplications = true;
showBadge = true;
showLabelsOnlyWhenOccupied = true;
showLabelsOnlyWhenOccupied = false;
unfocusedIconsOpacity = 0.25;
}
{
defaultSettings = {
completedCount = 0;
count = 0;
current_page_id = 0;
isExpanded = false;
pages = [
{
id = 0;
name = "General";
}
];
priorityColors = {
high = "#f44336";
low = "#9e9e9e";
medium = "#2196f3";
};
showBackground = true;
showCompleted = true;
todos = [ ];
useCustomColors = false;
};
id = "plugin:todo";
}
];
center = [
{
colorizeIcons = false;
colorizeIcons = true;
hideMode = "hidden";
id = "ActiveWindow";
maxWidth = 145;
@ -134,6 +143,17 @@
id = "Volume";
middleClickCommand = "pavucontrol";
}
{
id = "NotificationHistory";
hideWhenZero = false;
showUnreadBadge = true;
}
{
id = "plugin:ba7043:github-feed";
}
{
id = "plugin:clipper";
}
{
displayMode = "onhover";
id = "Network";
@ -154,12 +174,6 @@
showNoctaliaPerformance = false;
showPowerProfiles = true;
}
{
id = "plugin:ba7043:github-feed";
}
{
id = "plugin:clipper";
}
{
colorName = "primary";
id = "SessionMenu";
@ -176,17 +190,17 @@
{
colorizeDistroLogo = false;
colorizeSystemIcon = "primary";
customIconPath = "";
customIconPath = "${self}/files/icons/swarsel.png";
enableColorization = true;
icon = "noctalia";
id = "ControlCenter";
useDistroLogo = true;
useDistroLogo = false;
}
];
};
};
general = {
avatarImage = "${self}/files/wallpaper/swarsel.png";
avatarImage = "${self}/files/icons/swarsel.png";
dimmerOpacity = 0.2;
showScreenCorners = false;
forceBlackScreenCorners = false;
@ -195,16 +209,16 @@
iRadiusRatio = 1;
boxRadiusRatio = 1;
screenRadiusRatio = 1;
animationSpeed = 1;
animationSpeed = 1.5;
animationDisabled = false;
compactLockScreen = true;
lockOnSuspend = true;
showSessionButtonsOnLockScreen = true;
showHibernateOnLockScreen = false;
enableShadows = true;
shadowDirection = "bottom_right";
shadowOffsetX = 2;
shadowOffsetY = 3;
shadowDirection = "center";
shadowOffsetX = 0;
shadowOffsetY = 0;
language = "";
allowPanelsOnScreenWithoutBar = true;
showChangelogOnStartup = true;
@ -260,17 +274,17 @@
wallpaper = {
enabled = true;
overviewEnabled = true;
directory = "${self}/files/wallpaper";
directory = "${self}/files/wallpaper/landscape";
monitorDirectories = [ ];
enableMultiMonitorDirectories = true;
showHiddenFiles = false;
viewMode = "single";
setWallpaperOnAllMonitors = true;
setWallpaperOnAllMonitors = false;
fillMode = "crop";
fillColor = "#000000";
useSolidColor = false;
solidColor = "#1a1a2e";
automationEnabled = false;
automationEnabled = true;
wallpaperChangeMode = "random";
randomIntervalSec = 300;
transitionDuration = 500;
@ -586,7 +600,7 @@
colorizationEnabled = true;
colorizationIcon = "Primary";
colorizationBadge = "Tertiary";
colorizationBadgeText = "Primary";
colorizationBadgeText = "None";
defaultTab = 1;
enableSystemNotifications = true;
notifyGitHubNotifications = true;

View file

@ -297,6 +297,84 @@ in
};
services = {
shikane = {
settings =
let
workRight = [
"m=HP Z32"
"s=CN41212T55"
"v=HP Inc."
];
workLeft = [
"m=HP 732pk"
"s=CNC4080YL5"
"v=HP Inc."
];
exec = [ "notify-send shikane \"Profile $SHIKANE_PROFILE_NAME has been applied\"" ];
in
{
profile = [
{
name = "work-internal-on";
inherit exec;
output = [
{
match = config.swarselsystems.sharescreen;
enable = true;
scale = 1.7;
position = "2560,0";
}
{
match = workRight;
enable = true;
scale = 1.0;
mode = "3840x2160@60Hz";
position = "-1280,0";
}
{
match = workLeft;
enable = true;
scale = 1.0;
transform = "270";
mode = "3840x2160@60Hz";
position = "-3440,-1050";
}
];
}
{
name = "work-internal-off";
inherit exec;
output = [
{
match = config.swarselsystems.sharescreen;
enable = false;
scale = 1.7;
position = "2560,0";
}
{
match = workRight;
enable = true;
scale = 1.0;
mode = "3840x2160@60Hz";
position = "-1280,0";
}
{
match = workLeft;
enable = true;
scale = 1.0;
transform = "270";
mode = "3840x2160@60Hz";
position = "-3440,-1050";
}
];
}
];
};
};
kanshi = {
settings = [
{
@ -338,8 +416,8 @@ in
name = "lidopen";
exec = [
"${pkgs.swaybg}/bin/swaybg --output '${config.swarselsystems.sharescreen}' --image ${config.swarselsystems.wallpaper} --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output 'HP Inc. HP Z32 CN41212T55' --image ${self}/files/wallpaper/botanicswp.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output 'HP Inc. HP 732pk CNC4080YL5' --image ${self}/files/wallpaper/op6wp.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output 'HP Inc. HP Z32 CN41212T55' --image ${self}/files/wallpaper/landscape/botanicswp.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output 'HP Inc. HP 732pk CNC4080YL5' --image ${self}/files/wallpaper/portrait/op6wp.png --mode ${config.stylix.imageScalingMode}"
];
outputs = [
{
@ -373,7 +451,7 @@ in
name = "lidopen";
exec = [
"${pkgs.swaybg}/bin/swaybg --output '${config.swarselsystems.sharescreen}' --image ${config.swarselsystems.wallpaper} --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output '${monitor}' --image ${self}/files/wallpaper/navidrome.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output '${monitor}' --image ${self}/files/wallpaper/services/navidrome.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.kanshare}/bin/kanshare ${config.swarselsystems.sharescreen} '${monitor}'"
];
outputs = [
@ -396,8 +474,8 @@ in
profile = {
name = "lidclosed";
exec = [
"${pkgs.swaybg}/bin/swaybg --output 'HP Inc. HP Z32 CN41212T55' --image ${self}/files/wallpaper/botanicswp.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output 'HP Inc. HP 732pk CNC4080YL5' --image ${self}/files/wallpaper/op6wp.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output 'HP Inc. HP Z32 CN41212T55' --image ${self}/files/wallpaper/landscape/botanicswp.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output 'HP Inc. HP 732pk CNC4080YL5' --image ${self}/files/wallpaper/portrait/op6wp.png --mode ${config.stylix.imageScalingMode}"
];
outputs = [
{
@ -428,7 +506,7 @@ in
{
name = "lidclosed";
exec = [
"${pkgs.swaybg}/bin/swaybg --output '${monitor}' --image ${self}/files/wallpaper/navidrome.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output '${monitor}' --image ${self}/files/wallpaper/services/navidrome.png --mode ${config.stylix.imageScalingMode}"
];
outputs = [
{

View file

@ -6,14 +6,14 @@
enable = true;
settings = {
# initial_session.command = "sway";
initial_session.command = "uwsm start -- sway-uwsm.desktop";
initial_session.command = "uwsm start -- niri-uwsm.desktop";
# --cmd sway
default_session.command = ''
${pkgs.tuigreet}/bin/tuigreet \
--time \
--asterisks \
--user-menu \
--cmd "uwsm start -- sway-uwsm.desktop"
--cmd "uwsm start -- niri-uwsm.desktop"
'';
};
};

View file

@ -11,7 +11,8 @@ let
lan2VLANs = selectVLANs [ "home" "devices" "services" ];
lan3VLANs = selectVLANs [ "home" "devices" "services" ];
lan4VLANs = lan3VLANs;
lan5VLANs = selectVLANs [ "home" "devices" "guests" ];
# TODO: remove services and reset ports 5+6 on swLR to guest when kitchen construction is finished
lan5VLANs = selectVLANs [ "home" "devices" "services" "guests" ];
inherit (globals.general) homeDnsServer;
in
{

View file

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

View file

@ -87,7 +87,7 @@
};
wallpaper = lib.mkOption {
type = lib.types.path;
default = "${self}/files/wallpaper/lenovowp.png";
default = "${self}/files/wallpaper/landscape/lenovowp.png";
};
sharescreen = lib.mkOption {
type = lib.types.str;

View file

@ -57,6 +57,7 @@
tmux = lib.mkDefault true;
vesktop = lib.mkDefault true;
vesktop-tray = lib.mkDefault true;
shikane = lib.mkDefault true;
syncthing-tray = lib.mkDefault true;
waybar = lib.mkDefault true;
yubikey = lib.mkDefault false;