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) | |🐚 **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) | |🚪 **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) | |🪟 **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) | |⛩️ **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) | |✒️ **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) | |🖥️ **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) | |🚀 **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) | |🚨 **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) | |🌐 **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) | |🎨 **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.)}}}* *{{{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: :PROPERTIES:
:CUSTOM_ID: h:a86fe971-f169-4052-aacf-15e0f267c6cd :CUSTOM_ID: h:a86fe971-f169-4052-aacf-15e0f267c6cd
:END: :END:
@ -39,7 +39,7 @@ This project manages my entire IT infrastructure. In particular:
- A mailserver ([[#h:81bc8746-b46b-4d29-87de-ddbd77788b43][Eagleland (Hetzner)]]) - 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 - 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 - 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 - 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 - 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 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 #+begin_src markdown :tangle no :noweb-ref programs
| Topic | Program | | Topic | Program |
|---------------|-----------------------------------------------------------------------------------------------------------------------------| |---------------|-----------------------------------------------------------------------------------------------------------------------------|
|🐚 **Shell** | [zsh](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/zsh.nix) | |🐚 **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) | |🚪 **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) | |🪟 **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) | |⛩️ **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) | |✒️ **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) | |🖥️ **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) | |🚀 **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) | |🚨 **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) | |🌐 **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) | |🎨 **Theme** | [City-Lights (managed by stylix)](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/sharedsetup.nix) |
#+end_src #+end_src
** Services ** Services
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h:191e82b6-6ae5-4ec8-ae6d-dc683ce325d9 :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 swarselsystems = lib.recursiveUpdate
{ {
wallpaper = self + /files/wallpaper/lenovowp.png; wallpaper = self + /files/wallpaper/landscape/lenovowp.png;
hasBluetooth = true; hasBluetooth = true;
hasFingerprint = true; hasFingerprint = true;
isImpermanence = 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"; sharescreen = "eDP-2";
info = "Framework Laptop 16, 7940HS, RX7700S, 64GB RAM"; info = "Framework Laptop 16, 7940HS, RX7700S, 64GB RAM";
firewall = lib.mkForce true; firewall = lib.mkForce true;
wallpaper = self + /files/wallpaper/lenovowp.png; wallpaper = self + /files/wallpaper/landscape/lenovowp.png;
hasBluetooth = true; hasBluetooth = true;
hasFingerprint = true; hasFingerprint = true;
isImpermanence = false; isImpermanence = false;
@ -3996,7 +4000,7 @@ My personal laptop. Closely follows the =pyramid= config, but leaves out some se
sharescreen = "eDP-1"; sharescreen = "eDP-1";
info = "Lenovo Ideapad 720S-13IKB"; info = "Lenovo Ideapad 720S-13IKB";
firewall = lib.mkForce true; firewall = lib.mkForce true;
wallpaper = self + /files/wallpaper/lenovowp.png; wallpaper = self + /files/wallpaper/landscape/lenovowp.png;
hasBluetooth = true; hasBluetooth = true;
hasFingerprint = true; hasFingerprint = true;
isImpermanence = 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 = { swarselmodules.server = {
wireguard = true; wireguard = true;
restic = true; restic = true;
podman = true;
opkssh = true; opkssh = true;
}; };
@ -5610,10 +5615,10 @@ This is my main server that I run at home. It handles most tasks that require bi
topology.self = { topology.self = {
interfaces = { interfaces = {
lan2.physicalConnections = [ { node = "summers"; interface = "lan";} ]; lan2.physicalConnections = [{ node = "summers"; interface = "lan"; }];
lan3.physicalConnections = [ { node = "summers"; interface = "bmc";} ]; lan3.physicalConnections = [{ node = "summers"; interface = "bmc"; }];
lan4.physicalConnections = [ { node = "switch-bedroom"; interface = "eth1";} ]; lan4.physicalConnections = [{ node = "switch-bedroom"; interface = "eth1"; }];
lan5.physicalConnections = [ { node = "switch-livingroom"; interface = "eth1";} ]; lan5.physicalConnections = [{ node = "switch-livingroom"; interface = "eth1"; }];
}; };
}; };
@ -6109,7 +6114,7 @@ My phone. I use only a minimal config for remote debugging here.
swarselsystems = { swarselsystems = {
isLaptop = false; isLaptop = false;
isNixos = false; isNixos = false;
wallpaper = self + /files/wallpaper/surfacewp.png; wallpaper = self + /files/wallpaper/landscape/surfacewp.png;
}; };
swarselprofiles = { swarselprofiles = {
@ -7585,7 +7590,7 @@ This is a slim setup for developing base configuration. I do not track the hardw
swarselsystems = { swarselsystems = {
info = "~SwarselSystems~ remote install helper"; info = "~SwarselSystems~ remote install helper";
wallpaper = self + /files/wallpaper/lenovowp.png; wallpaper = self + /files/wallpaper/landscape/lenovowp.png;
isImpermanence = true; isImpermanence = true;
isCrypted = true; isCrypted = true;
isSecureBoot = false; 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 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 #+begin_src nix-ts :tangle install/installer-config.nix
{ self, config, pkgs, lib, ... }: { self, config, pkgs, lib, ... }:
@ -7840,6 +7855,11 @@ TODO: cleanup this mess
vim vim
just just
sbctl sbctl
lsof
dig
cryptsetup
btrfs-progs
]; ];
programs = { programs = {
@ -8082,7 +8102,7 @@ I also set the =WLR_RENDERER_ALLOW_SOFTWARE=1= to allow this configuration to ru
swarselsystems = { swarselsystems = {
info = "~SwarselSystems~ demo host"; info = "~SwarselSystems~ demo host";
wallpaper = self + /files/wallpaper/lenovowp.png; wallpaper = self + /files/wallpaper/landscape/lenovowp.png;
isImpermanence = true; isImpermanence = true;
isCrypted = true; isCrypted = true;
isSecureBoot = false; isSecureBoot = false;
@ -10634,14 +10654,14 @@ This section houses the greetd related settings. I do not really want to use a d
enable = true; enable = true;
settings = { settings = {
# initial_session.command = "sway"; # initial_session.command = "sway";
initial_session.command = "uwsm start -- sway-uwsm.desktop"; initial_session.command = "uwsm start -- niri-uwsm.desktop";
# --cmd sway # --cmd sway
default_session.command = '' default_session.command = ''
${pkgs.tuigreet}/bin/tuigreet \ ${pkgs.tuigreet}/bin/tuigreet \
--time \ --time \
--asterisks \ --asterisks \
--user-menu \ --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"; options.swarselmodules.lowBattery = lib.mkEnableOption "low battery notification config";
config = lib.mkIf config.swarselmodules.lowBattery { config = lib.mkIf config.swarselmodules.lowBattery {
systemd.user.services."battery-low" = let systemd.user.services."battery-low" =
let
target = "sway-session.target"; target = "sway-session.target";
in { in
{
enable = true; enable = true;
description = "Timer for battery check that alerts at 10% or less"; description = "Timer for battery check that alerts at 10% or less";
partOf = [ target ]; partOf = [ target ];
@ -12472,7 +12494,8 @@ This is the configuration to make [[#h:58c7563e-6954-42e6-a622-9d06523e8e24][Hin
lan2VLANs = selectVLANs [ "home" "devices" "services" ]; lan2VLANs = selectVLANs [ "home" "devices" "services" ];
lan3VLANs = selectVLANs [ "home" "devices" "services" ]; lan3VLANs = selectVLANs [ "home" "devices" "services" ];
lan4VLANs = lan3VLANs; 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; inherit (globals.general) homeDnsServer;
in in
{ {
@ -19843,7 +19866,7 @@ When setting up a new machine:
#+begin_src nix-ts :tangle modules/nixos/optional/uni.nix :noweb yes #+begin_src nix-ts :tangle modules/nixos/optional/uni.nix :noweb yes
{ self, config, withHomeManager, ... }: { self, config, withHomeManager, ... }:
{ {
config = {} // lib.optionalAttrs withHomeManager { config = { } // lib.optionalAttrs withHomeManager {
home-manager.users."${config.swarselsystems.mainUser}" = { home-manager.users."${config.swarselsystems.mainUser}" = {
imports = [ imports = [
@ -19852,7 +19875,6 @@ When setting up a new machine:
}; };
}; };
} }
#+end_src #+end_src
**** microvm-host **** microvm-host
@ -19878,7 +19900,8 @@ Some standard options that should be set for every microvm host.
mode = "0750"; mode = "0750";
}; };
}; };
}) (builtins.attrNames config.guests) })
(builtins.attrNames config.guests)
); );
users.persistentIds.microvm = confLib.mkIds 999; users.persistentIds.microvm = confLib.mkIds 999;
@ -20094,7 +20117,7 @@ A VLAN can also be used as the initrd network - this is however disabled for the
#+begin_src nix-ts :tangle modules/nixos/optional/systemd-networkd-server-home.nix #+begin_src nix-ts :tangle modules/nixos/optional/systemd-networkd-server-home.nix
{ self,lib, config, globals, ... }: { self, lib, config, globals, ... }:
let let
inherit (globals.general) routerServer; inherit (globals.general) routerServer;
inherit (config.swarselsystems) withMicroVMs isCrypted initrdVLAN; inherit (config.swarselsystems) withMicroVMs isCrypted initrdVLAN;
@ -20110,12 +20133,12 @@ A VLAN can also be used as the initrd network - this is however disabled for the
config = { config = {
assertions = [ assertions = [
{ {
assertion = ((localVLANsList != []) && (initrdVLAN != null)) || (localVLANsList == []) || (!isCrypted); assertion = ((localVLANsList != [ ]) && (initrdVLAN != null)) || (localVLANsList == [ ]) || (!isCrypted);
message = "This host uses VLANs and disk encryption, thus a VLAN must be specified for initrd or disk encryption must be removed."; message = "This host uses VLANs and disk encryption, thus a VLAN must be specified for initrd or disk encryption must be removed.";
} }
]; ];
boot.initrd = lib.mkIf (isCrypted && (localVLANsList != []) && (!isRouter)) { boot.initrd = lib.mkIf (isCrypted && (localVLANsList != [ ]) && (!isRouter)) {
availableKernelModules = [ "8021q" ]; availableKernelModules = [ "8021q" ];
kernelModules = [ "8021q" ]; # at least summers needs this to actually find the interfaces kernelModules = [ "8021q" ]; # at least summers needs this to actually find the interfaces
systemd.network = { systemd.network = {
@ -20361,7 +20384,7 @@ This section sets up all the imports that are used in the home-manager section.
in in
{ {
# config.swarselsystems = mirrorAttrs; # config.swarselsystems = mirrorAttrs;
config.swarselsystems = lib.mkIf (nixosConfig != null) (mkDefaultCommonAttrs config.swarselsystems (nixosConfig.swarselsystems or {})); config.swarselsystems = lib.mkIf (nixosConfig != null) (mkDefaultCommonAttrs config.swarselsystems (nixosConfig.swarselsystems or { }));
} }
#+end_src #+end_src
@ -20657,7 +20680,7 @@ This holds packages that I can use as provided, or with small modifications (as
tridactyl-native tridactyl-native
# mako related # mako related
mako # mako
libnotify libnotify
# general utilities # general utilities
@ -21645,9 +21668,11 @@ The theme is handled by stylix.
config = lib.mkIf config.swarselmodules.kitty { config = lib.mkIf config.swarselmodules.kitty {
programs.kitty = { programs.kitty = {
enable = true; enable = true;
keybindings = let keybindings =
let
bindWithModifier = lib.mapAttrs' (key: lib.nameValuePair ("ctrl+shift" + key)); bindWithModifier = lib.mapAttrs' (key: lib.nameValuePair ("ctrl+shift" + key));
in bindWithModifier { in
bindWithModifier {
"page_up" = "scroll_page_up"; "page_up" = "scroll_page_up";
"up" = "scroll_page_up"; "up" = "scroll_page_up";
"page_down" = "scroll_page_down"; "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 # laptop screen
output = { output = {
criteria = config.swarselsystems.sharescreen; criteria = config.swarselsystems.sharescreen;
mode = config.swarselsystems.highResolution; mode = "${config.swarselsystems.highResolution}@165.000";
scale = 1.0; 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"; name = "lidopen";
exec = [ exec = [
"${pkgs.swaybg}/bin/swaybg --output '${config.swarselsystems.sharescreen}' --image ${config.swarselsystems.wallpaper} --mode ${config.stylix.imageScalingMode}" "${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 = [ outputs = [
{ {
@ -25160,7 +25185,7 @@ Currently, I am too lazy to explain every option here, but most of it is very se
in in
{ {
name = "lidclosed"; 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 = [ outputs = [
{ {
criteria = config.swarselsystems.sharescreen; 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 #+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 **** gpg-agent
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h:7d384e3b-1be7-4644-b304-ada4af0b692b :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; "${config.programs.obsidian.vaults.${name}.target}/.obsidian/core-plugins.json".force = true;
}; };
programs.obsidian = let programs.obsidian =
let
pluginSource = pkgs.nur.repos.swarsel; pluginSource = pkgs.nur.repos.swarsel;
in { in
{
enable = true; enable = true;
package = pkgs.obsidian; package = pkgs.obsidian;
defaultSettings = { 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 = "${swaylock} -f"; }
{ timeout = 300; command = "${noctalia} lockScreen lock || ${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 = ''${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 = { 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 "; } # { event = "after-resume"; command = "${swaylock} -f "; }
# before-sleep = "${swaylock} -f "; before-sleep = "${noctalia} lockScreen lock || ${swaylock} -f ";
# lock = "${swaylock} -f "; # lock = "${swaylock} -f ";
}; };
}; };
@ -26021,8 +26131,9 @@ Akin to the [[#h:f9aa9af0-9b8d-43ff-901d-9ffccdd70589][Optional]] NixOS modules.
programs.niri = { programs.niri = {
package = pkgs.niri-stable; # which package to use for niri validation package = pkgs.niri-stable; # which package to use for niri validation
settings = { settings = {
gestures.hot-corners.enable = false;
debug = { debug = {
honor-xdg-activation-with-invalid-serial = []; honor-xdg-activation-with-invalid-serial = [ ];
}; };
xwayland-satellite = { xwayland-satellite = {
enable = true; enable = true;
@ -26030,7 +26141,7 @@ Akin to the [[#h:f9aa9af0-9b8d-43ff-901d-9ffccdd70589][Optional]] NixOS modules.
}; };
prefer-no-csd = true; prefer-no-csd = true;
layer-rules = [ 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 = "^wallpaper$"; }]; place-within-backdrop = true; }
{ matches = [{ namespace = "^noctalia-overview*"; }]; 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 = "^spotifytui$"; }]; open-floating = true; default-column-width = { proportion = 0.5; }; }
{ matches = [{ app-id = "^kittyterm$"; }]; 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"; DISPLAY = ":0";
QT_QPA_PLATFORM = lib.mkForce "wayland"; QT_QPA_PLATFORM = lib.mkForce "wayland";
EDITOR = "emacsclient -c"; EDITOR = "emacsclient -c";
} // vars.waylandSessionVariables; };
screenshot-path = "~/Pictures/Screenshots/screenshot_%Y-%m-%d-%H%M%S.png"; screenshot-path = "~/Pictures/Screenshots/screenshot_%Y-%m-%d-%H%M%S.png";
input = { input = {
mod-key = "Super"; 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 binds = with config.lib.niri.actions; let
sh = spawn "sh" "-c"; sh = spawn "sh" "-c";
resizer = "niri-resize"; resizer = "niri-resize & sleep 0.05";
in in
{ {
"Mod+Shift+t".action = toggle-window-rule-opacity; "Mod+Shift+t".action = toggle-window-rule-opacity;
"Mod+m".action = focus-workspace-previous; "Mod+m".action = focus-workspace-previous;
"Mod+Shift+Space".action = toggle-window-floating; "Mod+Shift+Space".action = toggle-window-floating;
"Mod+Shift+f".action = fullscreen-window; "Mod+Shift+f".action = fullscreen-window;
"Mod+q".action = sh "niri msg action close-window & ${resizer}"; "Mod+q".action = sh "${resizer} && niri msg action close-window";
"Mod+f".action = sh "${resizer} & firefox"; "Mod+f".action = sh "${resizer} && exec firefox";
# "Mod+Space".action = spawn "noctalia-shell" "ipc" "call" "launcher" "toggle"; # "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+z".action = spawn "noctalia-shell" "ipc" "call" "bar" "toggle";
"Mod+Shift+c".action = spawn "qalculate-gtk"; "Mod+Shift+c".action = spawn "qalculate-gtk";
"Mod+Ctrl+p".action = spawn "1password" "--quick-acces"; "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+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+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+e".action = sh "${resizer} && exec emacsclient -nquc -a emacs -e '(dashboard-open)'";
"Mod+c".action = sh "${resizer} & emacsclient -ce '(org-capture)'"; "Mod+c".action = sh "${resizer} && exec emacsclient -ce '(org-capture)'";
"Mod+t".action = sh "${resizer} & emacsclient -ce '(org-agenda)'"; "Mod+t".action = sh "${resizer} && exec emacsclient -ce '(org-agenda)'";
"Mod+Shift+m".action = sh "${resizer} & emacsclient -ce '(mu4e)'"; "Mod+Shift+m".action = sh "${resizer} && exec emacsclient -ce '(mu4e)'";
"Mod+Shift+a".action = sh "${resizer} & emacsclient -ce '(swarsel/open-calendar)'"; "Mod+Shift+a".action = sh "${resizer} && exec emacsclient -ce '(swarsel/open-calendar)'";
"Mod+a".action = spawn "swarselcheck-niri" "-s"; "Mod+a".action = spawn "swarselcheck-niri" "-s";
"Mod+x".action = spawn "swarselcheck-niri" "-k"; "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+Right".action = focus-column-or-monitor-right;
"Mod+Down".action = focus-window-or-workspace-down; "Mod+Down".action = focus-window-or-workspace-down;
"Mod+Up".action = focus-window-or-workspace-up; "Mod+Up".action = focus-window-or-workspace-up;
"Mod+Shift+Left".action = move-column-left; "Mod+Shift+Left".action = move-column-left-or-to-monitor-left;
"Mod+Shift+Right".action = move-column-right; "Mod+Shift+Right".action = move-column-right-or-to-monitor-right;
"Mod+Shift+Down".action = move-window-down-or-to-workspace-down; "Mod+Shift+Down".action = move-window-down-or-to-workspace-down;
"Mod+Shift+Up".action = move-window-up-or-to-workspace-up; "Mod+Shift+Up".action = move-window-up-or-to-workspace-up;
# "Mod+Ctrl+Shift+c".action = "reload"; # "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+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+r".action = "mode resize";
# "Mod+Return".action = "exec kitty"; # "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"; "XF86AudioRaiseVolume".action = spawn "noctalia-shell" "ipc" "call" "volume" "increase";
"XF86AudioLowerVolume".action = spawn "noctalia-shell" "ipc" "call" "volume" "decrease"; "XF86AudioLowerVolume".action = spawn "noctalia-shell" "ipc" "call" "volume" "decrease";
"XF86AudioMute".action = spawn "noctalia-shell" "ipc" "call" "volume" "muteOutput"; "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 = [ "nm-applet" ]; }
# { command = [ "niri" "msg" "action" "focus-workspace" "2" ]; } # { command = [ "niri" "msg" "action" "focus-workspace" "2" ]; }
# { command = [ "noctalia-shell" ]; } # { command = [ "noctalia-shell" ]; }
{ command = [ "pkill mako" ]; } # { argv = [ "pkill" "mako" ]; }
{ command = [ "systemctl" "--user" "start" "noctalia-shell.target" ]; } { argv = [ "systemctl" "--user" "restart" "noctalia-shell.target" "tray.target" ]; }
]; ];
# workspaces = { # workspaces = {
# "01-Main" = { # "01-Main" = {
@ -26235,8 +26347,11 @@ Akin to the [[#h:f9aa9af0-9b8d-43ff-901d-9ffccdd70589][Optional]] NixOS modules.
#+end_src #+end_src
**** Noctalia **** 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 #+begin_src nix-ts :tangle modules/home/optional/noctalia.nix
{ self, inputs, config, pkgs, lib, confLib, ... }: { 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 = { targets = {
noctalia-shell.Unit = { noctalia-shell.Unit = {
After = [ "graphical-session.target" ]; After = [ "graphical-session.target" ];
Wants = [
"tray.target"
"noctalia-tray-pre.target"
];
}; };
tray = { tray = {
Unit = { Unit = {
After = [ "noctalia-tray-pre.target" ]; After = [ "noctalia-init.service" ];
PartOf = [ "noctalia-shell.service" ]; PartOf = [ "noctalia-shell.service" ];
}; };
Install.WantedBy = [ "noctalia-shell.target" ]; Install.WantedBy = [ "noctalia-shell.target" ];
}; };
noctalia-tray-pre = {
Unit = {
After = [
"noctalia-init.service"
];
};
Install.WantedBy = [ "noctalia-shell.target" ];
};
}; };
services = { services = {
noctalia-shell = confLib.overrideTarget "noctalia-shell.target"; noctalia-shell = confLib.overrideTarget "noctalia-shell.target";
noctalia-init = { noctalia-init = {
Unit = {
PartOf = [ "noctalia-tray-pre.target" ];
};
Service = { Service = {
Type = "oneshot"; Type = "oneshot";
ExecStartPre = "${pkgs.coreutils}/bin/sleep 5"; ExecStart = "${pkgs.coreutils}/bin/sleep 15";
ExecStart = "-${pkgs.busybox}/bin/pkill mako";
RemainAfterExit = true; RemainAfterExit = true;
}; };
Install = { 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; marginHorizontal = 0;
frameThickness = 8; frameThickness = 8;
frameRadius = 12; frameRadius = 12;
outerCorners = true; outerCorners = false;
hideOnOverview = false; hideOnOverview = false;
displayMode = "auto_hide"; displayMode = "auto_hide";
autoHideDelay = 100; autoHideDelay = 100;
@ -26322,29 +26421,54 @@ Apart from configuring Noctalia, I here also add some systemd chains to make sur
widgets = { widgets = {
left = [ left = [
{ {
characterCount = 2; characterCount = 4;
colorizeIcons = false; colorizeIcons = false;
emptyColor = "primary"; emptyColor = "primary";
enableScrollWheel = false; enableScrollWheel = false;
focusedColor = "secondary"; focusedColor = "secondary";
followFocusedScreen = false; followFocusedScreen = false;
groupedBorderOpacity = 1; groupedBorderOpacity = 1;
hideUnoccupied = true; hideUnoccupied = false;
iconScale = 0.5; iconScale = 0.5;
id = "Workspace"; id = "Workspace";
labelMode = "none"; labelMode = "name";
occupiedColor = "primary"; occupiedColor = "primary";
pillSize = 0.4; pillSize = 0.4;
reverseScroll = false; reverseScroll = false;
showApplications = true; showApplications = true;
showBadge = true; showBadge = true;
showLabelsOnlyWhenOccupied = true; showLabelsOnlyWhenOccupied = false;
unfocusedIconsOpacity = 0.25; 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 = [ center = [
{ {
colorizeIcons = false; colorizeIcons = true;
hideMode = "hidden"; hideMode = "hidden";
id = "ActiveWindow"; id = "ActiveWindow";
maxWidth = 145; maxWidth = 145;
@ -26375,6 +26499,17 @@ Apart from configuring Noctalia, I here also add some systemd chains to make sur
id = "Volume"; id = "Volume";
middleClickCommand = "pavucontrol"; middleClickCommand = "pavucontrol";
} }
{
id = "NotificationHistory";
hideWhenZero = false;
showUnreadBadge = true;
}
{
id = "plugin:ba7043:github-feed";
}
{
id = "plugin:clipper";
}
{ {
displayMode = "onhover"; displayMode = "onhover";
id = "Network"; id = "Network";
@ -26395,12 +26530,6 @@ Apart from configuring Noctalia, I here also add some systemd chains to make sur
showNoctaliaPerformance = false; showNoctaliaPerformance = false;
showPowerProfiles = true; showPowerProfiles = true;
} }
{
id = "plugin:ba7043:github-feed";
}
{
id = "plugin:clipper";
}
{ {
colorName = "primary"; colorName = "primary";
id = "SessionMenu"; id = "SessionMenu";
@ -26417,17 +26546,17 @@ Apart from configuring Noctalia, I here also add some systemd chains to make sur
{ {
colorizeDistroLogo = false; colorizeDistroLogo = false;
colorizeSystemIcon = "primary"; colorizeSystemIcon = "primary";
customIconPath = ""; customIconPath = "${self}/files/icons/swarsel.png";
enableColorization = true; enableColorization = true;
icon = "noctalia"; icon = "noctalia";
id = "ControlCenter"; id = "ControlCenter";
useDistroLogo = true; useDistroLogo = false;
} }
]; ];
}; };
}; };
general = { general = {
avatarImage = "${self}/files/wallpaper/swarsel.png"; avatarImage = "${self}/files/icons/swarsel.png";
dimmerOpacity = 0.2; dimmerOpacity = 0.2;
showScreenCorners = false; showScreenCorners = false;
forceBlackScreenCorners = false; forceBlackScreenCorners = false;
@ -26436,16 +26565,16 @@ Apart from configuring Noctalia, I here also add some systemd chains to make sur
iRadiusRatio = 1; iRadiusRatio = 1;
boxRadiusRatio = 1; boxRadiusRatio = 1;
screenRadiusRatio = 1; screenRadiusRatio = 1;
animationSpeed = 1; animationSpeed = 1.5;
animationDisabled = false; animationDisabled = false;
compactLockScreen = true; compactLockScreen = true;
lockOnSuspend = true; lockOnSuspend = true;
showSessionButtonsOnLockScreen = true; showSessionButtonsOnLockScreen = true;
showHibernateOnLockScreen = false; showHibernateOnLockScreen = false;
enableShadows = true; enableShadows = true;
shadowDirection = "bottom_right"; shadowDirection = "center";
shadowOffsetX = 2; shadowOffsetX = 0;
shadowOffsetY = 3; shadowOffsetY = 0;
language = ""; language = "";
allowPanelsOnScreenWithoutBar = true; allowPanelsOnScreenWithoutBar = true;
showChangelogOnStartup = true; showChangelogOnStartup = true;
@ -26501,17 +26630,17 @@ Apart from configuring Noctalia, I here also add some systemd chains to make sur
wallpaper = { wallpaper = {
enabled = true; enabled = true;
overviewEnabled = true; overviewEnabled = true;
directory = "${self}/files/wallpaper"; directory = "${self}/files/wallpaper/landscape";
monitorDirectories = [ ]; monitorDirectories = [ ];
enableMultiMonitorDirectories = true; enableMultiMonitorDirectories = true;
showHiddenFiles = false; showHiddenFiles = false;
viewMode = "single"; viewMode = "single";
setWallpaperOnAllMonitors = true; setWallpaperOnAllMonitors = false;
fillMode = "crop"; fillMode = "crop";
fillColor = "#000000"; fillColor = "#000000";
useSolidColor = false; useSolidColor = false;
solidColor = "#1a1a2e"; solidColor = "#1a1a2e";
automationEnabled = false; automationEnabled = true;
wallpaperChangeMode = "random"; wallpaperChangeMode = "random";
randomIntervalSec = 300; randomIntervalSec = 300;
transitionDuration = 500; transitionDuration = 500;
@ -26827,7 +26956,7 @@ Apart from configuring Noctalia, I here also add some systemd chains to make sur
colorizationEnabled = true; colorizationEnabled = true;
colorizationIcon = "Primary"; colorizationIcon = "Primary";
colorizationBadge = "Tertiary"; colorizationBadge = "Tertiary";
colorizationBadgeText = "Primary"; colorizationBadgeText = "None";
defaultTab = 1; defaultTab = 1;
enableSystemNotifications = true; enableSystemNotifications = true;
notifyGitHubNotifications = true; notifyGitHubNotifications = true;
@ -27229,6 +27358,84 @@ When setting up a new machine:
}; };
services = { 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 = { kanshi = {
settings = [ settings = [
{ {
@ -27270,8 +27477,8 @@ When setting up a new machine:
name = "lidopen"; name = "lidopen";
exec = [ exec = [
"${pkgs.swaybg}/bin/swaybg --output '${config.swarselsystems.sharescreen}' --image ${config.swarselsystems.wallpaper} --mode ${config.stylix.imageScalingMode}" "${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 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/op6wp.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 = [ outputs = [
{ {
@ -27305,7 +27512,7 @@ When setting up a new machine:
name = "lidopen"; name = "lidopen";
exec = [ exec = [
"${pkgs.swaybg}/bin/swaybg --output '${config.swarselsystems.sharescreen}' --image ${config.swarselsystems.wallpaper} --mode ${config.stylix.imageScalingMode}" "${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}'" "${pkgs.kanshare}/bin/kanshare ${config.swarselsystems.sharescreen} '${monitor}'"
]; ];
outputs = [ outputs = [
@ -27328,8 +27535,8 @@ When setting up a new machine:
profile = { profile = {
name = "lidclosed"; name = "lidclosed";
exec = [ 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 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/op6wp.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 = [ outputs = [
{ {
@ -27360,7 +27567,7 @@ When setting up a new machine:
{ {
name = "lidclosed"; name = "lidclosed";
exec = [ 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 = [ outputs = [
{ {
@ -27781,7 +27988,7 @@ TODO: check which of these can be replaced but builtin functions.
}; };
wallpaper = lib.mkOption { wallpaper = lib.mkOption {
type = lib.types.path; type = lib.types.path;
default = "${self}/files/wallpaper/lenovowp.png"; default = "${self}/files/wallpaper/landscape/lenovowp.png";
}; };
sharescreen = lib.mkOption { sharescreen = lib.mkOption {
type = lib.types.str; 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 overrideTarget = target: {
inherit target;
in {
Unit = { Unit = {
PartOf = lib.mkForce [ target ]; PartOf = lib.mkForce [ target ];
After = lib.mkForce [ target ]; After = lib.mkForce [ target ];
Requires = lib.mkForce [ target ];
}; };
Install.WantedBy = 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 #+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) 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; tmux = lib.mkDefault true;
vesktop = lib.mkDefault true; vesktop = lib.mkDefault true;
vesktop-tray = lib.mkDefault true; vesktop-tray = lib.mkDefault true;
shikane = lib.mkDefault true;
syncthing-tray = lib.mkDefault true; syncthing-tray = lib.mkDefault true;
waybar = lib.mkDefault true; waybar = lib.mkDefault true;
yubikey = lib.mkDefault false; 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-set-footer nil
dashboard-banner-logo-title "Welcome to SwarsEmacs!" dashboard-banner-logo-title "Welcome to SwarsEmacs!"
dashboard-image-banner-max-height 300 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-backend 'projectile
dashboard-projects-switch-function 'magit-status dashboard-projects-switch-function 'magit-status
dashboard-set-navigator t dashboard-set-navigator t

View file

@ -1797,7 +1797,7 @@ create a new one."
dashboard-set-footer nil dashboard-set-footer nil
dashboard-banner-logo-title "Welcome to SwarsEmacs!" dashboard-banner-logo-title "Welcome to SwarsEmacs!"
dashboard-image-banner-max-height 300 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-backend 'projectile
dashboard-projects-switch-function 'magit-status dashboard-projects-switch-function 'magit-status
dashboard-set-navigator t 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) 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 swarselsystems = lib.recursiveUpdate
{ {
wallpaper = self + /files/wallpaper/lenovowp.png; wallpaper = self + /files/wallpaper/landscape/lenovowp.png;
hasBluetooth = true; hasBluetooth = true;
hasFingerprint = true; hasFingerprint = true;
isImpermanence = 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 = { swarselsystems = {
isLaptop = false; isLaptop = false;
isNixos = false; isNixos = false;
wallpaper = self + /files/wallpaper/surfacewp.png; wallpaper = self + /files/wallpaper/landscape/surfacewp.png;
}; };
swarselprofiles = { swarselprofiles = {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -23,7 +23,7 @@
# laptop screen # laptop screen
output = { output = {
criteria = config.swarselsystems.sharescreen; criteria = config.swarselsystems.sharescreen;
mode = config.swarselsystems.highResolution; mode = "${config.swarselsystems.highResolution}@165.000";
scale = 1.0; scale = 1.0;
}; };
} }
@ -57,7 +57,7 @@
name = "lidopen"; name = "lidopen";
exec = [ exec = [
"${pkgs.swaybg}/bin/swaybg --output '${config.swarselsystems.sharescreen}' --image ${config.swarselsystems.wallpaper} --mode ${config.stylix.imageScalingMode}" "${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 = [ outputs = [
{ {
@ -82,7 +82,7 @@
in in
{ {
name = "lidclosed"; 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 = [ outputs = [
{ {
criteria = config.swarselsystems.sharescreen; criteria = config.swarselsystems.sharescreen;

View file

@ -101,7 +101,7 @@
tridactyl-native tridactyl-native
# mako related # mako related
mako # mako
libnotify libnotify
# general utilities # 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

@ -394,7 +394,7 @@ in
swayfxSettings = config.swarselsystems.swayfxConfig; swayfxSettings = config.swarselsystems.swayfxConfig;
in in
" "
# exec_always autotiling # exec_always autotiling
# set $exit \"exit: [s]leep, [l]ock, [p]oweroff, [r]eboot, [u]ser logout\" # set $exit \"exit: [s]leep, [l]ock, [p]oweroff, [r]eboot, [u]ser logout\"
# mode $exit { # mode $exit {

View file

@ -22,12 +22,13 @@ in
# { timeout = 300; command = "${swaylock} -f"; } # { timeout = 300; command = "${swaylock} -f"; }
{ timeout = 300; command = "${noctalia} lockScreen lock || ${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 = ''${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 = { 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 "; } # { event = "after-resume"; command = "${swaylock} -f "; }
# before-sleep = "${swaylock} -f "; before-sleep = "${noctalia} lockScreen lock || ${swaylock} -f ";
# lock = "${swaylock} -f "; # lock = "${swaylock} -f ";
}; };
}; };

View file

@ -7,6 +7,7 @@
programs.niri = { programs.niri = {
package = pkgs.niri-stable; # which package to use for niri validation package = pkgs.niri-stable; # which package to use for niri validation
settings = { settings = {
gestures.hot-corners.enable = false;
debug = { debug = {
honor-xdg-activation-with-invalid-serial = [ ]; honor-xdg-activation-with-invalid-serial = [ ];
}; };
@ -16,7 +17,7 @@
}; };
prefer-no-csd = true; prefer-no-csd = true;
layer-rules = [ 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 = "^wallpaper$"; }]; place-within-backdrop = true; }
{ matches = [{ namespace = "^noctalia-overview*"; }]; 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 = "^spotifytui$"; }]; open-floating = true; default-column-width = { proportion = 0.5; }; }
{ matches = [{ app-id = "^kittyterm$"; }]; 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"; DISPLAY = ":0";
QT_QPA_PLATFORM = lib.mkForce "wayland"; QT_QPA_PLATFORM = lib.mkForce "wayland";
EDITOR = "emacsclient -c"; EDITOR = "emacsclient -c";
} // vars.waylandSessionVariables; };
screenshot-path = "~/Pictures/Screenshots/screenshot_%Y-%m-%d-%H%M%S.png"; screenshot-path = "~/Pictures/Screenshots/screenshot_%Y-%m-%d-%H%M%S.png";
input = { input = {
mod-key = "Super"; mod-key = "Super";
@ -104,17 +105,18 @@
}; };
binds = with config.lib.niri.actions; let binds = with config.lib.niri.actions; let
sh = spawn "sh" "-c"; sh = spawn "sh" "-c";
resizer = "niri-resize"; resizer = "niri-resize & sleep 0.05";
in in
{ {
"Mod+Shift+t".action = toggle-window-rule-opacity; "Mod+Shift+t".action = toggle-window-rule-opacity;
"Mod+m".action = focus-workspace-previous; "Mod+m".action = focus-workspace-previous;
"Mod+Shift+Space".action = toggle-window-floating; "Mod+Shift+Space".action = toggle-window-floating;
"Mod+Shift+f".action = fullscreen-window; "Mod+Shift+f".action = fullscreen-window;
"Mod+q".action = sh "niri msg action close-window & ${resizer}"; "Mod+q".action = sh "${resizer} && niri msg action close-window";
"Mod+f".action = sh "${resizer} & firefox"; "Mod+f".action = sh "${resizer} && exec firefox";
# "Mod+Space".action = spawn "noctalia-shell" "ipc" "call" "launcher" "toggle"; # "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+z".action = spawn "noctalia-shell" "ipc" "call" "bar" "toggle";
"Mod+Shift+c".action = spawn "qalculate-gtk"; "Mod+Shift+c".action = spawn "qalculate-gtk";
"Mod+Ctrl+p".action = spawn "1password" "--quick-acces"; "Mod+Ctrl+p".action = spawn "1password" "--quick-acces";
@ -128,11 +130,11 @@
"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+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+e".action = sh "${resizer} && exec emacsclient -nquc -a emacs -e '(dashboard-open)'";
"Mod+c".action = sh "${resizer} & emacsclient -ce '(org-capture)'"; "Mod+c".action = sh "${resizer} && exec emacsclient -ce '(org-capture)'";
"Mod+t".action = sh "${resizer} & emacsclient -ce '(org-agenda)'"; "Mod+t".action = sh "${resizer} && exec emacsclient -ce '(org-agenda)'";
"Mod+Shift+m".action = sh "${resizer} & emacsclient -ce '(mu4e)'"; "Mod+Shift+m".action = sh "${resizer} && exec emacsclient -ce '(mu4e)'";
"Mod+Shift+a".action = sh "${resizer} & emacsclient -ce '(swarsel/open-calendar)'"; "Mod+Shift+a".action = sh "${resizer} && exec emacsclient -ce '(swarsel/open-calendar)'";
"Mod+a".action = spawn "swarselcheck-niri" "-s"; "Mod+a".action = spawn "swarselcheck-niri" "-s";
"Mod+x".action = spawn "swarselcheck-niri" "-k"; "Mod+x".action = spawn "swarselcheck-niri" "-k";
@ -148,8 +150,8 @@
"Mod+Right".action = focus-column-or-monitor-right; "Mod+Right".action = focus-column-or-monitor-right;
"Mod+Down".action = focus-window-or-workspace-down; "Mod+Down".action = focus-window-or-workspace-down;
"Mod+Up".action = focus-window-or-workspace-up; "Mod+Up".action = focus-window-or-workspace-up;
"Mod+Shift+Left".action = move-column-left; "Mod+Shift+Left".action = move-column-left-or-to-monitor-left;
"Mod+Shift+Right".action = move-column-right; "Mod+Shift+Right".action = move-column-right-or-to-monitor-right;
"Mod+Shift+Down".action = move-window-down-or-to-workspace-down; "Mod+Shift+Down".action = move-window-down-or-to-workspace-down;
"Mod+Shift+Up".action = move-window-up-or-to-workspace-up; "Mod+Shift+Up".action = move-window-up-or-to-workspace-up;
# "Mod+Ctrl+Shift+c".action = "reload"; # "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+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+r".action = "mode resize";
# "Mod+Return".action = "exec kitty"; # "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"; "XF86AudioRaiseVolume".action = spawn "noctalia-shell" "ipc" "call" "volume" "increase";
"XF86AudioLowerVolume".action = spawn "noctalia-shell" "ipc" "call" "volume" "decrease"; "XF86AudioLowerVolume".action = spawn "noctalia-shell" "ipc" "call" "volume" "decrease";
"XF86AudioMute".action = spawn "noctalia-shell" "ipc" "call" "volume" "muteOutput"; "XF86AudioMute".action = spawn "noctalia-shell" "ipc" "call" "volume" "muteOutput";
@ -202,8 +204,8 @@
# { command = [ "nm-applet" ]; } # { command = [ "nm-applet" ]; }
# { command = [ "niri" "msg" "action" "focus-workspace" "2" ]; } # { command = [ "niri" "msg" "action" "focus-workspace" "2" ]; }
# { command = [ "noctalia-shell" ]; } # { command = [ "noctalia-shell" ]; }
{ command = [ "pkill mako" ]; } # { argv = [ "pkill" "mako" ]; }
{ command = [ "systemctl" "--user" "start" "noctalia-shell.target" ]; } { argv = [ "systemctl" "--user" "restart" "noctalia-shell.target" "tray.target" ]; }
]; ];
# workspaces = { # workspaces = {
# "01-Main" = { # "01-Main" = {

View file

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

View file

@ -297,6 +297,84 @@ in
}; };
services = { 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 = { kanshi = {
settings = [ settings = [
{ {
@ -338,8 +416,8 @@ in
name = "lidopen"; name = "lidopen";
exec = [ exec = [
"${pkgs.swaybg}/bin/swaybg --output '${config.swarselsystems.sharescreen}' --image ${config.swarselsystems.wallpaper} --mode ${config.stylix.imageScalingMode}" "${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 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/op6wp.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 = [ outputs = [
{ {
@ -373,7 +451,7 @@ in
name = "lidopen"; name = "lidopen";
exec = [ exec = [
"${pkgs.swaybg}/bin/swaybg --output '${config.swarselsystems.sharescreen}' --image ${config.swarselsystems.wallpaper} --mode ${config.stylix.imageScalingMode}" "${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}'" "${pkgs.kanshare}/bin/kanshare ${config.swarselsystems.sharescreen} '${monitor}'"
]; ];
outputs = [ outputs = [
@ -396,8 +474,8 @@ in
profile = { profile = {
name = "lidclosed"; name = "lidclosed";
exec = [ 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 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/op6wp.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 = [ outputs = [
{ {
@ -428,7 +506,7 @@ in
{ {
name = "lidclosed"; name = "lidclosed";
exec = [ 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 = [ outputs = [
{ {

View file

@ -6,14 +6,14 @@
enable = true; enable = true;
settings = { settings = {
# initial_session.command = "sway"; # initial_session.command = "sway";
initial_session.command = "uwsm start -- sway-uwsm.desktop"; initial_session.command = "uwsm start -- niri-uwsm.desktop";
# --cmd sway # --cmd sway
default_session.command = '' default_session.command = ''
${pkgs.tuigreet}/bin/tuigreet \ ${pkgs.tuigreet}/bin/tuigreet \
--time \ --time \
--asterisks \ --asterisks \
--user-menu \ --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" ]; lan2VLANs = selectVLANs [ "home" "devices" "services" ];
lan3VLANs = selectVLANs [ "home" "devices" "services" ]; lan3VLANs = selectVLANs [ "home" "devices" "services" ];
lan4VLANs = lan3VLANs; 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; inherit (globals.general) homeDnsServer;
in in
{ {

View file

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

View file

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

View file

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